stage4/generate_cc/search_type_code.c
changeset 35 9f3d6c089533
parent 34 a793b010e371
child 38 6cce7d14647e
equal deleted inserted replaced
34:a793b010e371 35:9f3d6c089533
     1 
     1 
     2 /****
     2 /****
     3  * IEC 61131-3 standard function lib
     3  * IEC 61131-3 standard function lib
     4  * generated code, do not edit by hand
     4  * generated code, do not edit by hand
     5  */
     5  */
     6 switch(current_function_type){
     6 
     7 
     7 void *compute_standard_function_st(function_invocation_c *symbol) {
     8 /****
     8 
     9  *REAL_TO_REAL
     9   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
    10  */
    10   function_call_param_iterator_c function_call_param_iterator(symbol);
    11 	case function_real_to_real :
    11   search_expression_type_c* search_expression_type = this;
    12 	{
    12 
    13 		symbol_c *last_type_symbol = NULL;
    13   switch(current_function_type){
    14 
    14 
    15 		{
    15 /****
    16 			identifier_c param_name("IN");
    16  *REAL_TO_LREAL
    17 			/* Get the value from a foo(<param_name> = <param_value>) style call */
    17  */
    18 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    18     case function_real_to_lreal :
    19 			
    19     {
    20 			/* Get the value from a foo(<param_value>) style call */
    20         symbol_c *last_type_symbol = NULL;
    21 			if (IN_param_value == NULL)
    21 
    22 			  IN_param_value = function_call_param_iterator.next();
    22         {
    23 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    23             identifier_c param_name("IN");
    24 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    24             /* Get the value from a foo(<param_name> = <param_value>) style call */
    25 			
    25             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    26 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    26             
    27 			{
    27             /* Get the value from a foo(<param_value>) style call */
    28 		
    28             if (IN_param_value == NULL)
    29 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
    29               IN_param_value = function_call_param_iterator.next();
    30 				return return_type_symbol;
    30             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    31 				
    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 			
    33             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    34 			ERROR;
    34             {
    35 		}
    35         
    36 		
    36                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
    37 	}/*function_real_to_real*/
    37                 return return_type_symbol;
    38 	break;
    38                 
       
    39             }
       
    40             
       
    41             ERROR;
       
    42         }
       
    43         
       
    44     }/*function_real_to_lreal*/
       
    45     break;
    39 
    46 
    40 /****
    47 /****
    41  *REAL_TO_SINT
    48  *REAL_TO_SINT
    42  */
    49  */
    43 	case function_real_to_sint :
    50     case function_real_to_sint :
    44 	{
    51     {
    45 		symbol_c *last_type_symbol = NULL;
    52         symbol_c *last_type_symbol = NULL;
    46 
    53 
    47 		{
    54         {
    48 			identifier_c param_name("IN");
    55             identifier_c param_name("IN");
    49 			/* Get the value from a foo(<param_name> = <param_value>) style call */
    56             /* Get the value from a foo(<param_name> = <param_value>) style call */
    50 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    57             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    51 			
    58             
    52 			/* Get the value from a foo(<param_value>) style call */
    59             /* Get the value from a foo(<param_value>) style call */
    53 			if (IN_param_value == NULL)
    60             if (IN_param_value == NULL)
    54 			  IN_param_value = function_call_param_iterator.next();
    61               IN_param_value = function_call_param_iterator.next();
    55 			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);
    56 			last_type_symbol = last_type_symbol && search_expression_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 ;
    57 			
    64             
    58 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    65             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    59 			{
    66             {
    60 		
    67         
    61 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    68                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    62 				return return_type_symbol;
    69                 return return_type_symbol;
    63 				
    70                 
    64 			}
    71             }
    65 			
    72             
    66 			ERROR;
    73             ERROR;
    67 		}
    74         }
    68 		
    75         
    69 	}/*function_real_to_sint*/
    76     }/*function_real_to_sint*/
    70 	break;
    77     break;
       
    78 
       
    79 /****
       
    80  *REAL_TO_INT
       
    81  */
       
    82     case function_real_to_int :
       
    83     {
       
    84         symbol_c *last_type_symbol = NULL;
       
    85 
       
    86         {
       
    87             identifier_c param_name("IN");
       
    88             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    89             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    90             
       
    91             /* Get the value from a foo(<param_value>) style call */
       
    92             if (IN_param_value == NULL)
       
    93               IN_param_value = function_call_param_iterator.next();
       
    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 ;
       
    96             
       
    97             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
    98             {
       
    99         
       
   100                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   101                 return return_type_symbol;
       
   102                 
       
   103             }
       
   104             
       
   105             ERROR;
       
   106         }
       
   107         
       
   108     }/*function_real_to_int*/
       
   109     break;
       
   110 
       
   111 /****
       
   112  *REAL_TO_DINT
       
   113  */
       
   114     case function_real_to_dint :
       
   115     {
       
   116         symbol_c *last_type_symbol = NULL;
       
   117 
       
   118         {
       
   119             identifier_c param_name("IN");
       
   120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   122             
       
   123             /* Get the value from a foo(<param_value>) style call */
       
   124             if (IN_param_value == NULL)
       
   125               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   128             
       
   129             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   130             {
       
   131         
       
   132                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   133                 return return_type_symbol;
       
   134                 
       
   135             }
       
   136             
       
   137             ERROR;
       
   138         }
       
   139         
       
   140     }/*function_real_to_dint*/
       
   141     break;
    71 
   142 
    72 /****
   143 /****
    73  *REAL_TO_LINT
   144  *REAL_TO_LINT
    74  */
   145  */
    75 	case function_real_to_lint :
   146     case function_real_to_lint :
    76 	{
   147     {
    77 		symbol_c *last_type_symbol = NULL;
   148         symbol_c *last_type_symbol = NULL;
    78 
   149 
    79 		{
   150         {
    80 			identifier_c param_name("IN");
   151             identifier_c param_name("IN");
    81 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   152             /* Get the value from a foo(<param_name> = <param_value>) style call */
    82 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    83 			
   154             
    84 			/* Get the value from a foo(<param_value>) style call */
   155             /* Get the value from a foo(<param_value>) style call */
    85 			if (IN_param_value == NULL)
   156             if (IN_param_value == NULL)
    86 			  IN_param_value = function_call_param_iterator.next();
   157               IN_param_value = function_call_param_iterator.next();
    87 			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);
    88 			last_type_symbol = last_type_symbol && search_expression_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 ;
    89 			
   160             
    90 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   161             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    91 			{
   162             {
    92 		
   163         
    93 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   164                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
    94 				return return_type_symbol;
   165                 return return_type_symbol;
    95 				
   166                 
    96 			}
   167             }
    97 			
   168             
    98 			ERROR;
   169             ERROR;
    99 		}
   170         }
   100 		
   171         
   101 	}/*function_real_to_lint*/
   172     }/*function_real_to_lint*/
   102 	break;
   173     break;
       
   174 
       
   175 /****
       
   176  *REAL_TO_USINT
       
   177  */
       
   178     case function_real_to_usint :
       
   179     {
       
   180         symbol_c *last_type_symbol = NULL;
       
   181 
       
   182         {
       
   183             identifier_c param_name("IN");
       
   184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   186             
       
   187             /* Get the value from a foo(<param_value>) style call */
       
   188             if (IN_param_value == NULL)
       
   189               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   192             
       
   193             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   194             {
       
   195         
       
   196                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   197                 return return_type_symbol;
       
   198                 
       
   199             }
       
   200             
       
   201             ERROR;
       
   202         }
       
   203         
       
   204     }/*function_real_to_usint*/
       
   205     break;
       
   206 
       
   207 /****
       
   208  *REAL_TO_UINT
       
   209  */
       
   210     case function_real_to_uint :
       
   211     {
       
   212         symbol_c *last_type_symbol = NULL;
       
   213 
       
   214         {
       
   215             identifier_c param_name("IN");
       
   216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   218             
       
   219             /* Get the value from a foo(<param_value>) style call */
       
   220             if (IN_param_value == NULL)
       
   221               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   224             
       
   225             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   226             {
       
   227         
       
   228                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   229                 return return_type_symbol;
       
   230                 
       
   231             }
       
   232             
       
   233             ERROR;
       
   234         }
       
   235         
       
   236     }/*function_real_to_uint*/
       
   237     break;
       
   238 
       
   239 /****
       
   240  *REAL_TO_UDINT
       
   241  */
       
   242     case function_real_to_udint :
       
   243     {
       
   244         symbol_c *last_type_symbol = NULL;
       
   245 
       
   246         {
       
   247             identifier_c param_name("IN");
       
   248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   250             
       
   251             /* Get the value from a foo(<param_value>) style call */
       
   252             if (IN_param_value == NULL)
       
   253               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   256             
       
   257             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   258             {
       
   259         
       
   260                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   261                 return return_type_symbol;
       
   262                 
       
   263             }
       
   264             
       
   265             ERROR;
       
   266         }
       
   267         
       
   268     }/*function_real_to_udint*/
       
   269     break;
       
   270 
       
   271 /****
       
   272  *REAL_TO_ULINT
       
   273  */
       
   274     case function_real_to_ulint :
       
   275     {
       
   276         symbol_c *last_type_symbol = NULL;
       
   277 
       
   278         {
       
   279             identifier_c param_name("IN");
       
   280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   282             
       
   283             /* Get the value from a foo(<param_value>) style call */
       
   284             if (IN_param_value == NULL)
       
   285               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   288             
       
   289             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   290             {
       
   291         
       
   292                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   293                 return return_type_symbol;
       
   294                 
       
   295             }
       
   296             
       
   297             ERROR;
       
   298         }
       
   299         
       
   300     }/*function_real_to_ulint*/
       
   301     break;
       
   302 
       
   303 /****
       
   304  *REAL_TO_TIME
       
   305  */
       
   306     case function_real_to_time :
       
   307     {
       
   308         symbol_c *last_type_symbol = NULL;
       
   309 
       
   310         {
       
   311             identifier_c param_name("IN");
       
   312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   314             
       
   315             /* Get the value from a foo(<param_value>) style call */
       
   316             if (IN_param_value == NULL)
       
   317               IN_param_value = function_call_param_iterator.next();
       
   318             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 ;
       
   320             
       
   321             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   322             {
       
   323         
       
   324                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   325                 return return_type_symbol;
       
   326                 
       
   327             }
       
   328             
       
   329             ERROR;
       
   330         }
       
   331         
       
   332     }/*function_real_to_time*/
       
   333     break;
       
   334 
       
   335 /****
       
   336  *REAL_TO_BOOL
       
   337  */
       
   338     case function_real_to_bool :
       
   339     {
       
   340         symbol_c *last_type_symbol = NULL;
       
   341 
       
   342         {
       
   343             identifier_c param_name("IN");
       
   344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   346             
       
   347             /* Get the value from a foo(<param_value>) style call */
       
   348             if (IN_param_value == NULL)
       
   349               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   352             
       
   353             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   354             {
       
   355         
       
   356                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   357                 return return_type_symbol;
       
   358                 
       
   359             }
       
   360             
       
   361             ERROR;
       
   362         }
       
   363         
       
   364     }/*function_real_to_bool*/
       
   365     break;
       
   366 
       
   367 /****
       
   368  *REAL_TO_BYTE
       
   369  */
       
   370     case function_real_to_byte :
       
   371     {
       
   372         symbol_c *last_type_symbol = NULL;
       
   373 
       
   374         {
       
   375             identifier_c param_name("IN");
       
   376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   378             
       
   379             /* Get the value from a foo(<param_value>) style call */
       
   380             if (IN_param_value == NULL)
       
   381               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   384             
       
   385             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   386             {
       
   387         
       
   388                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   389                 return return_type_symbol;
       
   390                 
       
   391             }
       
   392             
       
   393             ERROR;
       
   394         }
       
   395         
       
   396     }/*function_real_to_byte*/
       
   397     break;
       
   398 
       
   399 /****
       
   400  *REAL_TO_WORD
       
   401  */
       
   402     case function_real_to_word :
       
   403     {
       
   404         symbol_c *last_type_symbol = NULL;
       
   405 
       
   406         {
       
   407             identifier_c param_name("IN");
       
   408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   410             
       
   411             /* Get the value from a foo(<param_value>) style call */
       
   412             if (IN_param_value == NULL)
       
   413               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   416             
       
   417             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   418             {
       
   419         
       
   420                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   421                 return return_type_symbol;
       
   422                 
       
   423             }
       
   424             
       
   425             ERROR;
       
   426         }
       
   427         
       
   428     }/*function_real_to_word*/
       
   429     break;
       
   430 
       
   431 /****
       
   432  *REAL_TO_DWORD
       
   433  */
       
   434     case function_real_to_dword :
       
   435     {
       
   436         symbol_c *last_type_symbol = NULL;
       
   437 
       
   438         {
       
   439             identifier_c param_name("IN");
       
   440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   442             
       
   443             /* Get the value from a foo(<param_value>) style call */
       
   444             if (IN_param_value == NULL)
       
   445               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   448             
       
   449             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   450             {
       
   451         
       
   452                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   453                 return return_type_symbol;
       
   454                 
       
   455             }
       
   456             
       
   457             ERROR;
       
   458         }
       
   459         
       
   460     }/*function_real_to_dword*/
       
   461     break;
       
   462 
       
   463 /****
       
   464  *REAL_TO_LWORD
       
   465  */
       
   466     case function_real_to_lword :
       
   467     {
       
   468         symbol_c *last_type_symbol = NULL;
       
   469 
       
   470         {
       
   471             identifier_c param_name("IN");
       
   472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   474             
       
   475             /* Get the value from a foo(<param_value>) style call */
       
   476             if (IN_param_value == NULL)
       
   477               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   480             
       
   481             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   482             {
       
   483         
       
   484                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   485                 return return_type_symbol;
       
   486                 
       
   487             }
       
   488             
       
   489             ERROR;
       
   490         }
       
   491         
       
   492     }/*function_real_to_lword*/
       
   493     break;
       
   494 
       
   495 /****
       
   496  *REAL_TO_STRING
       
   497  */
       
   498     case function_real_to_string :
       
   499     {
       
   500         symbol_c *last_type_symbol = NULL;
       
   501 
       
   502         {
       
   503             identifier_c param_name("IN");
       
   504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   506             
       
   507             /* Get the value from a foo(<param_value>) style call */
       
   508             if (IN_param_value == NULL)
       
   509               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   512             
       
   513             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   514             {
       
   515         
       
   516                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   517                 return return_type_symbol;
       
   518                 
       
   519             }
       
   520             
       
   521             ERROR;
       
   522         }
       
   523         
       
   524     }/*function_real_to_string*/
       
   525     break;
       
   526 
       
   527 /****
       
   528  *REAL_TO_WSTRING
       
   529  */
       
   530     case function_real_to_wstring :
       
   531     {
       
   532         symbol_c *last_type_symbol = NULL;
       
   533 
       
   534         {
       
   535             identifier_c param_name("IN");
       
   536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   538             
       
   539             /* Get the value from a foo(<param_value>) style call */
       
   540             if (IN_param_value == NULL)
       
   541               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   544             
       
   545             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   546             {
       
   547         
       
   548                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
   549                 return return_type_symbol;
       
   550                 
       
   551             }
       
   552             
       
   553             ERROR;
       
   554         }
       
   555         
       
   556     }/*function_real_to_wstring*/
       
   557     break;
       
   558 
       
   559 /****
       
   560  *REAL_TO_DATE
       
   561  */
       
   562     case function_real_to_date :
       
   563     {
       
   564         symbol_c *last_type_symbol = NULL;
       
   565 
       
   566         {
       
   567             identifier_c param_name("IN");
       
   568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   570             
       
   571             /* Get the value from a foo(<param_value>) style call */
       
   572             if (IN_param_value == NULL)
       
   573               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   576             
       
   577             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   578             {
       
   579         
       
   580                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   581                 return return_type_symbol;
       
   582                 
       
   583             }
       
   584             
       
   585             ERROR;
       
   586         }
       
   587         
       
   588     }/*function_real_to_date*/
       
   589     break;
       
   590 
       
   591 /****
       
   592  *REAL_TO_TOD
       
   593  */
       
   594     case function_real_to_tod :
       
   595     {
       
   596         symbol_c *last_type_symbol = NULL;
       
   597 
       
   598         {
       
   599             identifier_c param_name("IN");
       
   600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   602             
       
   603             /* Get the value from a foo(<param_value>) style call */
       
   604             if (IN_param_value == NULL)
       
   605               IN_param_value = function_call_param_iterator.next();
       
   606             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 ;
       
   608             
       
   609             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   610             {
       
   611         
       
   612                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   613                 return return_type_symbol;
       
   614                 
       
   615             }
       
   616             
       
   617             ERROR;
       
   618         }
       
   619         
       
   620     }/*function_real_to_tod*/
       
   621     break;
       
   622 
       
   623 /****
       
   624  *REAL_TO_DT
       
   625  */
       
   626     case function_real_to_dt :
       
   627     {
       
   628         symbol_c *last_type_symbol = NULL;
       
   629 
       
   630         {
       
   631             identifier_c param_name("IN");
       
   632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   634             
       
   635             /* Get the value from a foo(<param_value>) style call */
       
   636             if (IN_param_value == NULL)
       
   637               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   640             
       
   641             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   642             {
       
   643         
       
   644                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   645                 return return_type_symbol;
       
   646                 
       
   647             }
       
   648             
       
   649             ERROR;
       
   650         }
       
   651         
       
   652     }/*function_real_to_dt*/
       
   653     break;
       
   654 
       
   655 /****
       
   656  *LREAL_TO_REAL
       
   657  */
       
   658     case function_lreal_to_real :
       
   659     {
       
   660         symbol_c *last_type_symbol = NULL;
       
   661 
       
   662         {
       
   663             identifier_c param_name("IN");
       
   664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   666             
       
   667             /* Get the value from a foo(<param_value>) style call */
       
   668             if (IN_param_value == NULL)
       
   669               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   672             
       
   673             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   674             {
       
   675         
       
   676                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   677                 return return_type_symbol;
       
   678                 
       
   679             }
       
   680             
       
   681             ERROR;
       
   682         }
       
   683         
       
   684     }/*function_lreal_to_real*/
       
   685     break;
       
   686 
       
   687 /****
       
   688  *LREAL_TO_SINT
       
   689  */
       
   690     case function_lreal_to_sint :
       
   691     {
       
   692         symbol_c *last_type_symbol = NULL;
       
   693 
       
   694         {
       
   695             identifier_c param_name("IN");
       
   696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   698             
       
   699             /* Get the value from a foo(<param_value>) style call */
       
   700             if (IN_param_value == NULL)
       
   701               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   704             
       
   705             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   706             {
       
   707         
       
   708                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
   709                 return return_type_symbol;
       
   710                 
       
   711             }
       
   712             
       
   713             ERROR;
       
   714         }
       
   715         
       
   716     }/*function_lreal_to_sint*/
       
   717     break;
       
   718 
       
   719 /****
       
   720  *LREAL_TO_INT
       
   721  */
       
   722     case function_lreal_to_int :
       
   723     {
       
   724         symbol_c *last_type_symbol = NULL;
       
   725 
       
   726         {
       
   727             identifier_c param_name("IN");
       
   728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   730             
       
   731             /* Get the value from a foo(<param_value>) style call */
       
   732             if (IN_param_value == NULL)
       
   733               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   736             
       
   737             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   738             {
       
   739         
       
   740                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   741                 return return_type_symbol;
       
   742                 
       
   743             }
       
   744             
       
   745             ERROR;
       
   746         }
       
   747         
       
   748     }/*function_lreal_to_int*/
       
   749     break;
       
   750 
       
   751 /****
       
   752  *LREAL_TO_DINT
       
   753  */
       
   754     case function_lreal_to_dint :
       
   755     {
       
   756         symbol_c *last_type_symbol = NULL;
       
   757 
       
   758         {
       
   759             identifier_c param_name("IN");
       
   760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   762             
       
   763             /* Get the value from a foo(<param_value>) style call */
       
   764             if (IN_param_value == NULL)
       
   765               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   768             
       
   769             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   770             {
       
   771         
       
   772                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   773                 return return_type_symbol;
       
   774                 
       
   775             }
       
   776             
       
   777             ERROR;
       
   778         }
       
   779         
       
   780     }/*function_lreal_to_dint*/
       
   781     break;
       
   782 
       
   783 /****
       
   784  *LREAL_TO_LINT
       
   785  */
       
   786     case function_lreal_to_lint :
       
   787     {
       
   788         symbol_c *last_type_symbol = NULL;
       
   789 
       
   790         {
       
   791             identifier_c param_name("IN");
       
   792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   794             
       
   795             /* Get the value from a foo(<param_value>) style call */
       
   796             if (IN_param_value == NULL)
       
   797               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   800             
       
   801             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   802             {
       
   803         
       
   804                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   805                 return return_type_symbol;
       
   806                 
       
   807             }
       
   808             
       
   809             ERROR;
       
   810         }
       
   811         
       
   812     }/*function_lreal_to_lint*/
       
   813     break;
       
   814 
       
   815 /****
       
   816  *LREAL_TO_USINT
       
   817  */
       
   818     case function_lreal_to_usint :
       
   819     {
       
   820         symbol_c *last_type_symbol = NULL;
       
   821 
       
   822         {
       
   823             identifier_c param_name("IN");
       
   824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   826             
       
   827             /* Get the value from a foo(<param_value>) style call */
       
   828             if (IN_param_value == NULL)
       
   829               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   832             
       
   833             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   834             {
       
   835         
       
   836                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   837                 return return_type_symbol;
       
   838                 
       
   839             }
       
   840             
       
   841             ERROR;
       
   842         }
       
   843         
       
   844     }/*function_lreal_to_usint*/
       
   845     break;
       
   846 
       
   847 /****
       
   848  *LREAL_TO_UINT
       
   849  */
       
   850     case function_lreal_to_uint :
       
   851     {
       
   852         symbol_c *last_type_symbol = NULL;
       
   853 
       
   854         {
       
   855             identifier_c param_name("IN");
       
   856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   858             
       
   859             /* Get the value from a foo(<param_value>) style call */
       
   860             if (IN_param_value == NULL)
       
   861               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   864             
       
   865             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   866             {
       
   867         
       
   868                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   869                 return return_type_symbol;
       
   870                 
       
   871             }
       
   872             
       
   873             ERROR;
       
   874         }
       
   875         
       
   876     }/*function_lreal_to_uint*/
       
   877     break;
       
   878 
       
   879 /****
       
   880  *LREAL_TO_UDINT
       
   881  */
       
   882     case function_lreal_to_udint :
       
   883     {
       
   884         symbol_c *last_type_symbol = NULL;
       
   885 
       
   886         {
       
   887             identifier_c param_name("IN");
       
   888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   890             
       
   891             /* Get the value from a foo(<param_value>) style call */
       
   892             if (IN_param_value == NULL)
       
   893               IN_param_value = function_call_param_iterator.next();
       
   894             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 ;
       
   896             
       
   897             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   898             {
       
   899         
       
   900                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   901                 return return_type_symbol;
       
   902                 
       
   903             }
       
   904             
       
   905             ERROR;
       
   906         }
       
   907         
       
   908     }/*function_lreal_to_udint*/
       
   909     break;
       
   910 
       
   911 /****
       
   912  *LREAL_TO_ULINT
       
   913  */
       
   914     case function_lreal_to_ulint :
       
   915     {
       
   916         symbol_c *last_type_symbol = NULL;
       
   917 
       
   918         {
       
   919             identifier_c param_name("IN");
       
   920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   922             
       
   923             /* Get the value from a foo(<param_value>) style call */
       
   924             if (IN_param_value == NULL)
       
   925               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   928             
       
   929             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   930             {
       
   931         
       
   932                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   933                 return return_type_symbol;
       
   934                 
       
   935             }
       
   936             
       
   937             ERROR;
       
   938         }
       
   939         
       
   940     }/*function_lreal_to_ulint*/
       
   941     break;
       
   942 
       
   943 /****
       
   944  *LREAL_TO_TIME
       
   945  */
       
   946     case function_lreal_to_time :
       
   947     {
       
   948         symbol_c *last_type_symbol = NULL;
       
   949 
       
   950         {
       
   951             identifier_c param_name("IN");
       
   952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   954             
       
   955             /* Get the value from a foo(<param_value>) style call */
       
   956             if (IN_param_value == NULL)
       
   957               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   960             
       
   961             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   962             {
       
   963         
       
   964                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   965                 return return_type_symbol;
       
   966                 
       
   967             }
       
   968             
       
   969             ERROR;
       
   970         }
       
   971         
       
   972     }/*function_lreal_to_time*/
       
   973     break;
       
   974 
       
   975 /****
       
   976  *LREAL_TO_BOOL
       
   977  */
       
   978     case function_lreal_to_bool :
       
   979     {
       
   980         symbol_c *last_type_symbol = NULL;
       
   981 
       
   982         {
       
   983             identifier_c param_name("IN");
       
   984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   986             
       
   987             /* Get the value from a foo(<param_value>) style call */
       
   988             if (IN_param_value == NULL)
       
   989               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   992             
       
   993             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   994             {
       
   995         
       
   996                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   997                 return return_type_symbol;
       
   998                 
       
   999             }
       
  1000             
       
  1001             ERROR;
       
  1002         }
       
  1003         
       
  1004     }/*function_lreal_to_bool*/
       
  1005     break;
       
  1006 
       
  1007 /****
       
  1008  *LREAL_TO_BYTE
       
  1009  */
       
  1010     case function_lreal_to_byte :
       
  1011     {
       
  1012         symbol_c *last_type_symbol = NULL;
       
  1013 
       
  1014         {
       
  1015             identifier_c param_name("IN");
       
  1016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1018             
       
  1019             /* Get the value from a foo(<param_value>) style call */
       
  1020             if (IN_param_value == NULL)
       
  1021               IN_param_value = function_call_param_iterator.next();
       
  1022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1024             
       
  1025             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1026             {
       
  1027         
       
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1029                 return return_type_symbol;
       
  1030                 
       
  1031             }
       
  1032             
       
  1033             ERROR;
       
  1034         }
       
  1035         
       
  1036     }/*function_lreal_to_byte*/
       
  1037     break;
       
  1038 
       
  1039 /****
       
  1040  *LREAL_TO_WORD
       
  1041  */
       
  1042     case function_lreal_to_word :
       
  1043     {
       
  1044         symbol_c *last_type_symbol = NULL;
       
  1045 
       
  1046         {
       
  1047             identifier_c param_name("IN");
       
  1048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1050             
       
  1051             /* Get the value from a foo(<param_value>) style call */
       
  1052             if (IN_param_value == NULL)
       
  1053               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1056             
       
  1057             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1058             {
       
  1059         
       
  1060                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1061                 return return_type_symbol;
       
  1062                 
       
  1063             }
       
  1064             
       
  1065             ERROR;
       
  1066         }
       
  1067         
       
  1068     }/*function_lreal_to_word*/
       
  1069     break;
       
  1070 
       
  1071 /****
       
  1072  *LREAL_TO_DWORD
       
  1073  */
       
  1074     case function_lreal_to_dword :
       
  1075     {
       
  1076         symbol_c *last_type_symbol = NULL;
       
  1077 
       
  1078         {
       
  1079             identifier_c param_name("IN");
       
  1080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1082             
       
  1083             /* Get the value from a foo(<param_value>) style call */
       
  1084             if (IN_param_value == NULL)
       
  1085               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1088             
       
  1089             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1090             {
       
  1091         
       
  1092                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1093                 return return_type_symbol;
       
  1094                 
       
  1095             }
       
  1096             
       
  1097             ERROR;
       
  1098         }
       
  1099         
       
  1100     }/*function_lreal_to_dword*/
       
  1101     break;
       
  1102 
       
  1103 /****
       
  1104  *LREAL_TO_LWORD
       
  1105  */
       
  1106     case function_lreal_to_lword :
       
  1107     {
       
  1108         symbol_c *last_type_symbol = NULL;
       
  1109 
       
  1110         {
       
  1111             identifier_c param_name("IN");
       
  1112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1114             
       
  1115             /* Get the value from a foo(<param_value>) style call */
       
  1116             if (IN_param_value == NULL)
       
  1117               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1120             
       
  1121             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1122             {
       
  1123         
       
  1124                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1125                 return return_type_symbol;
       
  1126                 
       
  1127             }
       
  1128             
       
  1129             ERROR;
       
  1130         }
       
  1131         
       
  1132     }/*function_lreal_to_lword*/
       
  1133     break;
       
  1134 
       
  1135 /****
       
  1136  *LREAL_TO_STRING
       
  1137  */
       
  1138     case function_lreal_to_string :
       
  1139     {
       
  1140         symbol_c *last_type_symbol = NULL;
       
  1141 
       
  1142         {
       
  1143             identifier_c param_name("IN");
       
  1144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1146             
       
  1147             /* Get the value from a foo(<param_value>) style call */
       
  1148             if (IN_param_value == NULL)
       
  1149               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1152             
       
  1153             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1154             {
       
  1155         
       
  1156                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1157                 return return_type_symbol;
       
  1158                 
       
  1159             }
       
  1160             
       
  1161             ERROR;
       
  1162         }
       
  1163         
       
  1164     }/*function_lreal_to_string*/
       
  1165     break;
       
  1166 
       
  1167 /****
       
  1168  *LREAL_TO_WSTRING
       
  1169  */
       
  1170     case function_lreal_to_wstring :
       
  1171     {
       
  1172         symbol_c *last_type_symbol = NULL;
       
  1173 
       
  1174         {
       
  1175             identifier_c param_name("IN");
       
  1176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1178             
       
  1179             /* Get the value from a foo(<param_value>) style call */
       
  1180             if (IN_param_value == NULL)
       
  1181               IN_param_value = function_call_param_iterator.next();
       
  1182             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 ;
       
  1184             
       
  1185             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1186             {
       
  1187         
       
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1189                 return return_type_symbol;
       
  1190                 
       
  1191             }
       
  1192             
       
  1193             ERROR;
       
  1194         }
       
  1195         
       
  1196     }/*function_lreal_to_wstring*/
       
  1197     break;
       
  1198 
       
  1199 /****
       
  1200  *LREAL_TO_DATE
       
  1201  */
       
  1202     case function_lreal_to_date :
       
  1203     {
       
  1204         symbol_c *last_type_symbol = NULL;
       
  1205 
       
  1206         {
       
  1207             identifier_c param_name("IN");
       
  1208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1210             
       
  1211             /* Get the value from a foo(<param_value>) style call */
       
  1212             if (IN_param_value == NULL)
       
  1213               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1216             
       
  1217             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1218             {
       
  1219         
       
  1220                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1221                 return return_type_symbol;
       
  1222                 
       
  1223             }
       
  1224             
       
  1225             ERROR;
       
  1226         }
       
  1227         
       
  1228     }/*function_lreal_to_date*/
       
  1229     break;
       
  1230 
       
  1231 /****
       
  1232  *LREAL_TO_TOD
       
  1233  */
       
  1234     case function_lreal_to_tod :
       
  1235     {
       
  1236         symbol_c *last_type_symbol = NULL;
       
  1237 
       
  1238         {
       
  1239             identifier_c param_name("IN");
       
  1240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1242             
       
  1243             /* Get the value from a foo(<param_value>) style call */
       
  1244             if (IN_param_value == NULL)
       
  1245               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1248             
       
  1249             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1250             {
       
  1251         
       
  1252                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1253                 return return_type_symbol;
       
  1254                 
       
  1255             }
       
  1256             
       
  1257             ERROR;
       
  1258         }
       
  1259         
       
  1260     }/*function_lreal_to_tod*/
       
  1261     break;
       
  1262 
       
  1263 /****
       
  1264  *LREAL_TO_DT
       
  1265  */
       
  1266     case function_lreal_to_dt :
       
  1267     {
       
  1268         symbol_c *last_type_symbol = NULL;
       
  1269 
       
  1270         {
       
  1271             identifier_c param_name("IN");
       
  1272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1274             
       
  1275             /* Get the value from a foo(<param_value>) style call */
       
  1276             if (IN_param_value == NULL)
       
  1277               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1280             
       
  1281             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1282             {
       
  1283         
       
  1284                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1285                 return return_type_symbol;
       
  1286                 
       
  1287             }
       
  1288             
       
  1289             ERROR;
       
  1290         }
       
  1291         
       
  1292     }/*function_lreal_to_dt*/
       
  1293     break;
       
  1294 
       
  1295 /****
       
  1296  *SINT_TO_REAL
       
  1297  */
       
  1298     case function_sint_to_real :
       
  1299     {
       
  1300         symbol_c *last_type_symbol = NULL;
       
  1301 
       
  1302         {
       
  1303             identifier_c param_name("IN");
       
  1304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1306             
       
  1307             /* Get the value from a foo(<param_value>) style call */
       
  1308             if (IN_param_value == NULL)
       
  1309               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1312             
       
  1313             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1314             {
       
  1315         
       
  1316                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1317                 return return_type_symbol;
       
  1318                 
       
  1319             }
       
  1320             
       
  1321             ERROR;
       
  1322         }
       
  1323         
       
  1324     }/*function_sint_to_real*/
       
  1325     break;
       
  1326 
       
  1327 /****
       
  1328  *SINT_TO_LREAL
       
  1329  */
       
  1330     case function_sint_to_lreal :
       
  1331     {
       
  1332         symbol_c *last_type_symbol = NULL;
       
  1333 
       
  1334         {
       
  1335             identifier_c param_name("IN");
       
  1336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1338             
       
  1339             /* Get the value from a foo(<param_value>) style call */
       
  1340             if (IN_param_value == NULL)
       
  1341               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1344             
       
  1345             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1346             {
       
  1347         
       
  1348                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1349                 return return_type_symbol;
       
  1350                 
       
  1351             }
       
  1352             
       
  1353             ERROR;
       
  1354         }
       
  1355         
       
  1356     }/*function_sint_to_lreal*/
       
  1357     break;
       
  1358 
       
  1359 /****
       
  1360  *SINT_TO_INT
       
  1361  */
       
  1362     case function_sint_to_int :
       
  1363     {
       
  1364         symbol_c *last_type_symbol = NULL;
       
  1365 
       
  1366         {
       
  1367             identifier_c param_name("IN");
       
  1368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1370             
       
  1371             /* Get the value from a foo(<param_value>) style call */
       
  1372             if (IN_param_value == NULL)
       
  1373               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1376             
       
  1377             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1378             {
       
  1379         
       
  1380                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1381                 return return_type_symbol;
       
  1382                 
       
  1383             }
       
  1384             
       
  1385             ERROR;
       
  1386         }
       
  1387         
       
  1388     }/*function_sint_to_int*/
       
  1389     break;
       
  1390 
       
  1391 /****
       
  1392  *SINT_TO_DINT
       
  1393  */
       
  1394     case function_sint_to_dint :
       
  1395     {
       
  1396         symbol_c *last_type_symbol = NULL;
       
  1397 
       
  1398         {
       
  1399             identifier_c param_name("IN");
       
  1400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1402             
       
  1403             /* Get the value from a foo(<param_value>) style call */
       
  1404             if (IN_param_value == NULL)
       
  1405               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1408             
       
  1409             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1410             {
       
  1411         
       
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1413                 return return_type_symbol;
       
  1414                 
       
  1415             }
       
  1416             
       
  1417             ERROR;
       
  1418         }
       
  1419         
       
  1420     }/*function_sint_to_dint*/
       
  1421     break;
       
  1422 
       
  1423 /****
       
  1424  *SINT_TO_LINT
       
  1425  */
       
  1426     case function_sint_to_lint :
       
  1427     {
       
  1428         symbol_c *last_type_symbol = NULL;
       
  1429 
       
  1430         {
       
  1431             identifier_c param_name("IN");
       
  1432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1434             
       
  1435             /* Get the value from a foo(<param_value>) style call */
       
  1436             if (IN_param_value == NULL)
       
  1437               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1440             
       
  1441             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1442             {
       
  1443         
       
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1445                 return return_type_symbol;
       
  1446                 
       
  1447             }
       
  1448             
       
  1449             ERROR;
       
  1450         }
       
  1451         
       
  1452     }/*function_sint_to_lint*/
       
  1453     break;
       
  1454 
       
  1455 /****
       
  1456  *SINT_TO_USINT
       
  1457  */
       
  1458     case function_sint_to_usint :
       
  1459     {
       
  1460         symbol_c *last_type_symbol = NULL;
       
  1461 
       
  1462         {
       
  1463             identifier_c param_name("IN");
       
  1464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1466             
       
  1467             /* Get the value from a foo(<param_value>) style call */
       
  1468             if (IN_param_value == NULL)
       
  1469               IN_param_value = function_call_param_iterator.next();
       
  1470             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 ;
       
  1472             
       
  1473             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1474             {
       
  1475         
       
  1476                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1477                 return return_type_symbol;
       
  1478                 
       
  1479             }
       
  1480             
       
  1481             ERROR;
       
  1482         }
       
  1483         
       
  1484     }/*function_sint_to_usint*/
       
  1485     break;
       
  1486 
       
  1487 /****
       
  1488  *SINT_TO_UINT
       
  1489  */
       
  1490     case function_sint_to_uint :
       
  1491     {
       
  1492         symbol_c *last_type_symbol = NULL;
       
  1493 
       
  1494         {
       
  1495             identifier_c param_name("IN");
       
  1496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1498             
       
  1499             /* Get the value from a foo(<param_value>) style call */
       
  1500             if (IN_param_value == NULL)
       
  1501               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1504             
       
  1505             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1506             {
       
  1507         
       
  1508                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1509                 return return_type_symbol;
       
  1510                 
       
  1511             }
       
  1512             
       
  1513             ERROR;
       
  1514         }
       
  1515         
       
  1516     }/*function_sint_to_uint*/
       
  1517     break;
       
  1518 
       
  1519 /****
       
  1520  *SINT_TO_UDINT
       
  1521  */
       
  1522     case function_sint_to_udint :
       
  1523     {
       
  1524         symbol_c *last_type_symbol = NULL;
       
  1525 
       
  1526         {
       
  1527             identifier_c param_name("IN");
       
  1528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1530             
       
  1531             /* Get the value from a foo(<param_value>) style call */
       
  1532             if (IN_param_value == NULL)
       
  1533               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1536             
       
  1537             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1538             {
       
  1539         
       
  1540                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1541                 return return_type_symbol;
       
  1542                 
       
  1543             }
       
  1544             
       
  1545             ERROR;
       
  1546         }
       
  1547         
       
  1548     }/*function_sint_to_udint*/
       
  1549     break;
       
  1550 
       
  1551 /****
       
  1552  *SINT_TO_ULINT
       
  1553  */
       
  1554     case function_sint_to_ulint :
       
  1555     {
       
  1556         symbol_c *last_type_symbol = NULL;
       
  1557 
       
  1558         {
       
  1559             identifier_c param_name("IN");
       
  1560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1562             
       
  1563             /* Get the value from a foo(<param_value>) style call */
       
  1564             if (IN_param_value == NULL)
       
  1565               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1568             
       
  1569             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1570             {
       
  1571         
       
  1572                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1573                 return return_type_symbol;
       
  1574                 
       
  1575             }
       
  1576             
       
  1577             ERROR;
       
  1578         }
       
  1579         
       
  1580     }/*function_sint_to_ulint*/
       
  1581     break;
       
  1582 
       
  1583 /****
       
  1584  *SINT_TO_TIME
       
  1585  */
       
  1586     case function_sint_to_time :
       
  1587     {
       
  1588         symbol_c *last_type_symbol = NULL;
       
  1589 
       
  1590         {
       
  1591             identifier_c param_name("IN");
       
  1592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1594             
       
  1595             /* Get the value from a foo(<param_value>) style call */
       
  1596             if (IN_param_value == NULL)
       
  1597               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1600             
       
  1601             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1602             {
       
  1603         
       
  1604                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1605                 return return_type_symbol;
       
  1606                 
       
  1607             }
       
  1608             
       
  1609             ERROR;
       
  1610         }
       
  1611         
       
  1612     }/*function_sint_to_time*/
       
  1613     break;
       
  1614 
       
  1615 /****
       
  1616  *SINT_TO_BOOL
       
  1617  */
       
  1618     case function_sint_to_bool :
       
  1619     {
       
  1620         symbol_c *last_type_symbol = NULL;
       
  1621 
       
  1622         {
       
  1623             identifier_c param_name("IN");
       
  1624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1626             
       
  1627             /* Get the value from a foo(<param_value>) style call */
       
  1628             if (IN_param_value == NULL)
       
  1629               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1632             
       
  1633             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1634             {
       
  1635         
       
  1636                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1637                 return return_type_symbol;
       
  1638                 
       
  1639             }
       
  1640             
       
  1641             ERROR;
       
  1642         }
       
  1643         
       
  1644     }/*function_sint_to_bool*/
       
  1645     break;
       
  1646 
       
  1647 /****
       
  1648  *SINT_TO_BYTE
       
  1649  */
       
  1650     case function_sint_to_byte :
       
  1651     {
       
  1652         symbol_c *last_type_symbol = NULL;
       
  1653 
       
  1654         {
       
  1655             identifier_c param_name("IN");
       
  1656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1658             
       
  1659             /* Get the value from a foo(<param_value>) style call */
       
  1660             if (IN_param_value == NULL)
       
  1661               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1664             
       
  1665             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1666             {
       
  1667         
       
  1668                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1669                 return return_type_symbol;
       
  1670                 
       
  1671             }
       
  1672             
       
  1673             ERROR;
       
  1674         }
       
  1675         
       
  1676     }/*function_sint_to_byte*/
       
  1677     break;
       
  1678 
       
  1679 /****
       
  1680  *SINT_TO_WORD
       
  1681  */
       
  1682     case function_sint_to_word :
       
  1683     {
       
  1684         symbol_c *last_type_symbol = NULL;
       
  1685 
       
  1686         {
       
  1687             identifier_c param_name("IN");
       
  1688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1690             
       
  1691             /* Get the value from a foo(<param_value>) style call */
       
  1692             if (IN_param_value == NULL)
       
  1693               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1696             
       
  1697             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1698             {
       
  1699         
       
  1700                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1701                 return return_type_symbol;
       
  1702                 
       
  1703             }
       
  1704             
       
  1705             ERROR;
       
  1706         }
       
  1707         
       
  1708     }/*function_sint_to_word*/
       
  1709     break;
       
  1710 
       
  1711 /****
       
  1712  *SINT_TO_DWORD
       
  1713  */
       
  1714     case function_sint_to_dword :
       
  1715     {
       
  1716         symbol_c *last_type_symbol = NULL;
       
  1717 
       
  1718         {
       
  1719             identifier_c param_name("IN");
       
  1720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1722             
       
  1723             /* Get the value from a foo(<param_value>) style call */
       
  1724             if (IN_param_value == NULL)
       
  1725               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1728             
       
  1729             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1730             {
       
  1731         
       
  1732                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1733                 return return_type_symbol;
       
  1734                 
       
  1735             }
       
  1736             
       
  1737             ERROR;
       
  1738         }
       
  1739         
       
  1740     }/*function_sint_to_dword*/
       
  1741     break;
       
  1742 
       
  1743 /****
       
  1744  *SINT_TO_LWORD
       
  1745  */
       
  1746     case function_sint_to_lword :
       
  1747     {
       
  1748         symbol_c *last_type_symbol = NULL;
       
  1749 
       
  1750         {
       
  1751             identifier_c param_name("IN");
       
  1752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1754             
       
  1755             /* Get the value from a foo(<param_value>) style call */
       
  1756             if (IN_param_value == NULL)
       
  1757               IN_param_value = function_call_param_iterator.next();
       
  1758             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 ;
       
  1760             
       
  1761             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1762             {
       
  1763         
       
  1764                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1765                 return return_type_symbol;
       
  1766                 
       
  1767             }
       
  1768             
       
  1769             ERROR;
       
  1770         }
       
  1771         
       
  1772     }/*function_sint_to_lword*/
       
  1773     break;
       
  1774 
       
  1775 /****
       
  1776  *SINT_TO_STRING
       
  1777  */
       
  1778     case function_sint_to_string :
       
  1779     {
       
  1780         symbol_c *last_type_symbol = NULL;
       
  1781 
       
  1782         {
       
  1783             identifier_c param_name("IN");
       
  1784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1786             
       
  1787             /* Get the value from a foo(<param_value>) style call */
       
  1788             if (IN_param_value == NULL)
       
  1789               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1792             
       
  1793             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1794             {
       
  1795         
       
  1796                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1797                 return return_type_symbol;
       
  1798                 
       
  1799             }
       
  1800             
       
  1801             ERROR;
       
  1802         }
       
  1803         
       
  1804     }/*function_sint_to_string*/
       
  1805     break;
       
  1806 
       
  1807 /****
       
  1808  *SINT_TO_WSTRING
       
  1809  */
       
  1810     case function_sint_to_wstring :
       
  1811     {
       
  1812         symbol_c *last_type_symbol = NULL;
       
  1813 
       
  1814         {
       
  1815             identifier_c param_name("IN");
       
  1816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1818             
       
  1819             /* Get the value from a foo(<param_value>) style call */
       
  1820             if (IN_param_value == NULL)
       
  1821               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1824             
       
  1825             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1826             {
       
  1827         
       
  1828                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1829                 return return_type_symbol;
       
  1830                 
       
  1831             }
       
  1832             
       
  1833             ERROR;
       
  1834         }
       
  1835         
       
  1836     }/*function_sint_to_wstring*/
       
  1837     break;
       
  1838 
       
  1839 /****
       
  1840  *SINT_TO_DATE
       
  1841  */
       
  1842     case function_sint_to_date :
       
  1843     {
       
  1844         symbol_c *last_type_symbol = NULL;
       
  1845 
       
  1846         {
       
  1847             identifier_c param_name("IN");
       
  1848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1850             
       
  1851             /* Get the value from a foo(<param_value>) style call */
       
  1852             if (IN_param_value == NULL)
       
  1853               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1856             
       
  1857             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1858             {
       
  1859         
       
  1860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1861                 return return_type_symbol;
       
  1862                 
       
  1863             }
       
  1864             
       
  1865             ERROR;
       
  1866         }
       
  1867         
       
  1868     }/*function_sint_to_date*/
       
  1869     break;
       
  1870 
       
  1871 /****
       
  1872  *SINT_TO_TOD
       
  1873  */
       
  1874     case function_sint_to_tod :
       
  1875     {
       
  1876         symbol_c *last_type_symbol = NULL;
       
  1877 
       
  1878         {
       
  1879             identifier_c param_name("IN");
       
  1880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1882             
       
  1883             /* Get the value from a foo(<param_value>) style call */
       
  1884             if (IN_param_value == NULL)
       
  1885               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1888             
       
  1889             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1890             {
       
  1891         
       
  1892                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1893                 return return_type_symbol;
       
  1894                 
       
  1895             }
       
  1896             
       
  1897             ERROR;
       
  1898         }
       
  1899         
       
  1900     }/*function_sint_to_tod*/
       
  1901     break;
       
  1902 
       
  1903 /****
       
  1904  *SINT_TO_DT
       
  1905  */
       
  1906     case function_sint_to_dt :
       
  1907     {
       
  1908         symbol_c *last_type_symbol = NULL;
       
  1909 
       
  1910         {
       
  1911             identifier_c param_name("IN");
       
  1912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1914             
       
  1915             /* Get the value from a foo(<param_value>) style call */
       
  1916             if (IN_param_value == NULL)
       
  1917               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1920             
       
  1921             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1922             {
       
  1923         
       
  1924                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1925                 return return_type_symbol;
       
  1926                 
       
  1927             }
       
  1928             
       
  1929             ERROR;
       
  1930         }
       
  1931         
       
  1932     }/*function_sint_to_dt*/
       
  1933     break;
       
  1934 
       
  1935 /****
       
  1936  *INT_TO_REAL
       
  1937  */
       
  1938     case function_int_to_real :
       
  1939     {
       
  1940         symbol_c *last_type_symbol = NULL;
       
  1941 
       
  1942         {
       
  1943             identifier_c param_name("IN");
       
  1944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1946             
       
  1947             /* Get the value from a foo(<param_value>) style call */
       
  1948             if (IN_param_value == NULL)
       
  1949               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1952             
       
  1953             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1954             {
       
  1955         
       
  1956                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1957                 return return_type_symbol;
       
  1958                 
       
  1959             }
       
  1960             
       
  1961             ERROR;
       
  1962         }
       
  1963         
       
  1964     }/*function_int_to_real*/
       
  1965     break;
       
  1966 
       
  1967 /****
       
  1968  *INT_TO_LREAL
       
  1969  */
       
  1970     case function_int_to_lreal :
       
  1971     {
       
  1972         symbol_c *last_type_symbol = NULL;
       
  1973 
       
  1974         {
       
  1975             identifier_c param_name("IN");
       
  1976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1978             
       
  1979             /* Get the value from a foo(<param_value>) style call */
       
  1980             if (IN_param_value == NULL)
       
  1981               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1984             
       
  1985             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1986             {
       
  1987         
       
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1989                 return return_type_symbol;
       
  1990                 
       
  1991             }
       
  1992             
       
  1993             ERROR;
       
  1994         }
       
  1995         
       
  1996     }/*function_int_to_lreal*/
       
  1997     break;
       
  1998 
       
  1999 /****
       
  2000  *INT_TO_SINT
       
  2001  */
       
  2002     case function_int_to_sint :
       
  2003     {
       
  2004         symbol_c *last_type_symbol = NULL;
       
  2005 
       
  2006         {
       
  2007             identifier_c param_name("IN");
       
  2008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2010             
       
  2011             /* Get the value from a foo(<param_value>) style call */
       
  2012             if (IN_param_value == NULL)
       
  2013               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2016             
       
  2017             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2018             {
       
  2019         
       
  2020                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2021                 return return_type_symbol;
       
  2022                 
       
  2023             }
       
  2024             
       
  2025             ERROR;
       
  2026         }
       
  2027         
       
  2028     }/*function_int_to_sint*/
       
  2029     break;
       
  2030 
       
  2031 /****
       
  2032  *INT_TO_DINT
       
  2033  */
       
  2034     case function_int_to_dint :
       
  2035     {
       
  2036         symbol_c *last_type_symbol = NULL;
       
  2037 
       
  2038         {
       
  2039             identifier_c param_name("IN");
       
  2040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2042             
       
  2043             /* Get the value from a foo(<param_value>) style call */
       
  2044             if (IN_param_value == NULL)
       
  2045               IN_param_value = function_call_param_iterator.next();
       
  2046             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 ;
       
  2048             
       
  2049             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2050             {
       
  2051         
       
  2052                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2053                 return return_type_symbol;
       
  2054                 
       
  2055             }
       
  2056             
       
  2057             ERROR;
       
  2058         }
       
  2059         
       
  2060     }/*function_int_to_dint*/
       
  2061     break;
       
  2062 
       
  2063 /****
       
  2064  *INT_TO_LINT
       
  2065  */
       
  2066     case function_int_to_lint :
       
  2067     {
       
  2068         symbol_c *last_type_symbol = NULL;
       
  2069 
       
  2070         {
       
  2071             identifier_c param_name("IN");
       
  2072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2074             
       
  2075             /* Get the value from a foo(<param_value>) style call */
       
  2076             if (IN_param_value == NULL)
       
  2077               IN_param_value = function_call_param_iterator.next();
       
  2078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2080             
       
  2081             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2082             {
       
  2083         
       
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2085                 return return_type_symbol;
       
  2086                 
       
  2087             }
       
  2088             
       
  2089             ERROR;
       
  2090         }
       
  2091         
       
  2092     }/*function_int_to_lint*/
       
  2093     break;
       
  2094 
       
  2095 /****
       
  2096  *INT_TO_USINT
       
  2097  */
       
  2098     case function_int_to_usint :
       
  2099     {
       
  2100         symbol_c *last_type_symbol = NULL;
       
  2101 
       
  2102         {
       
  2103             identifier_c param_name("IN");
       
  2104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2106             
       
  2107             /* Get the value from a foo(<param_value>) style call */
       
  2108             if (IN_param_value == NULL)
       
  2109               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2112             
       
  2113             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2114             {
       
  2115         
       
  2116                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2117                 return return_type_symbol;
       
  2118                 
       
  2119             }
       
  2120             
       
  2121             ERROR;
       
  2122         }
       
  2123         
       
  2124     }/*function_int_to_usint*/
       
  2125     break;
       
  2126 
       
  2127 /****
       
  2128  *INT_TO_UINT
       
  2129  */
       
  2130     case function_int_to_uint :
       
  2131     {
       
  2132         symbol_c *last_type_symbol = NULL;
       
  2133 
       
  2134         {
       
  2135             identifier_c param_name("IN");
       
  2136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2138             
       
  2139             /* Get the value from a foo(<param_value>) style call */
       
  2140             if (IN_param_value == NULL)
       
  2141               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2144             
       
  2145             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2146             {
       
  2147         
       
  2148                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2149                 return return_type_symbol;
       
  2150                 
       
  2151             }
       
  2152             
       
  2153             ERROR;
       
  2154         }
       
  2155         
       
  2156     }/*function_int_to_uint*/
       
  2157     break;
       
  2158 
       
  2159 /****
       
  2160  *INT_TO_UDINT
       
  2161  */
       
  2162     case function_int_to_udint :
       
  2163     {
       
  2164         symbol_c *last_type_symbol = NULL;
       
  2165 
       
  2166         {
       
  2167             identifier_c param_name("IN");
       
  2168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2170             
       
  2171             /* Get the value from a foo(<param_value>) style call */
       
  2172             if (IN_param_value == NULL)
       
  2173               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2176             
       
  2177             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2178             {
       
  2179         
       
  2180                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2181                 return return_type_symbol;
       
  2182                 
       
  2183             }
       
  2184             
       
  2185             ERROR;
       
  2186         }
       
  2187         
       
  2188     }/*function_int_to_udint*/
       
  2189     break;
       
  2190 
       
  2191 /****
       
  2192  *INT_TO_ULINT
       
  2193  */
       
  2194     case function_int_to_ulint :
       
  2195     {
       
  2196         symbol_c *last_type_symbol = NULL;
       
  2197 
       
  2198         {
       
  2199             identifier_c param_name("IN");
       
  2200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2202             
       
  2203             /* Get the value from a foo(<param_value>) style call */
       
  2204             if (IN_param_value == NULL)
       
  2205               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2208             
       
  2209             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2210             {
       
  2211         
       
  2212                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2213                 return return_type_symbol;
       
  2214                 
       
  2215             }
       
  2216             
       
  2217             ERROR;
       
  2218         }
       
  2219         
       
  2220     }/*function_int_to_ulint*/
       
  2221     break;
       
  2222 
       
  2223 /****
       
  2224  *INT_TO_TIME
       
  2225  */
       
  2226     case function_int_to_time :
       
  2227     {
       
  2228         symbol_c *last_type_symbol = NULL;
       
  2229 
       
  2230         {
       
  2231             identifier_c param_name("IN");
       
  2232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2234             
       
  2235             /* Get the value from a foo(<param_value>) style call */
       
  2236             if (IN_param_value == NULL)
       
  2237               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2240             
       
  2241             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2242             {
       
  2243         
       
  2244                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2245                 return return_type_symbol;
       
  2246                 
       
  2247             }
       
  2248             
       
  2249             ERROR;
       
  2250         }
       
  2251         
       
  2252     }/*function_int_to_time*/
       
  2253     break;
       
  2254 
       
  2255 /****
       
  2256  *INT_TO_BOOL
       
  2257  */
       
  2258     case function_int_to_bool :
       
  2259     {
       
  2260         symbol_c *last_type_symbol = NULL;
       
  2261 
       
  2262         {
       
  2263             identifier_c param_name("IN");
       
  2264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2266             
       
  2267             /* Get the value from a foo(<param_value>) style call */
       
  2268             if (IN_param_value == NULL)
       
  2269               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2272             
       
  2273             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2274             {
       
  2275         
       
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2277                 return return_type_symbol;
       
  2278                 
       
  2279             }
       
  2280             
       
  2281             ERROR;
       
  2282         }
       
  2283         
       
  2284     }/*function_int_to_bool*/
       
  2285     break;
       
  2286 
       
  2287 /****
       
  2288  *INT_TO_BYTE
       
  2289  */
       
  2290     case function_int_to_byte :
       
  2291     {
       
  2292         symbol_c *last_type_symbol = NULL;
       
  2293 
       
  2294         {
       
  2295             identifier_c param_name("IN");
       
  2296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2298             
       
  2299             /* Get the value from a foo(<param_value>) style call */
       
  2300             if (IN_param_value == NULL)
       
  2301               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2304             
       
  2305             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2306             {
       
  2307         
       
  2308                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2309                 return return_type_symbol;
       
  2310                 
       
  2311             }
       
  2312             
       
  2313             ERROR;
       
  2314         }
       
  2315         
       
  2316     }/*function_int_to_byte*/
       
  2317     break;
       
  2318 
       
  2319 /****
       
  2320  *INT_TO_WORD
       
  2321  */
       
  2322     case function_int_to_word :
       
  2323     {
       
  2324         symbol_c *last_type_symbol = NULL;
       
  2325 
       
  2326         {
       
  2327             identifier_c param_name("IN");
       
  2328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2330             
       
  2331             /* Get the value from a foo(<param_value>) style call */
       
  2332             if (IN_param_value == NULL)
       
  2333               IN_param_value = function_call_param_iterator.next();
       
  2334             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 ;
       
  2336             
       
  2337             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2338             {
       
  2339         
       
  2340                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2341                 return return_type_symbol;
       
  2342                 
       
  2343             }
       
  2344             
       
  2345             ERROR;
       
  2346         }
       
  2347         
       
  2348     }/*function_int_to_word*/
       
  2349     break;
       
  2350 
       
  2351 /****
       
  2352  *INT_TO_DWORD
       
  2353  */
       
  2354     case function_int_to_dword :
       
  2355     {
       
  2356         symbol_c *last_type_symbol = NULL;
       
  2357 
       
  2358         {
       
  2359             identifier_c param_name("IN");
       
  2360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2362             
       
  2363             /* Get the value from a foo(<param_value>) style call */
       
  2364             if (IN_param_value == NULL)
       
  2365               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2368             
       
  2369             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2370             {
       
  2371         
       
  2372                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2373                 return return_type_symbol;
       
  2374                 
       
  2375             }
       
  2376             
       
  2377             ERROR;
       
  2378         }
       
  2379         
       
  2380     }/*function_int_to_dword*/
       
  2381     break;
       
  2382 
       
  2383 /****
       
  2384  *INT_TO_LWORD
       
  2385  */
       
  2386     case function_int_to_lword :
       
  2387     {
       
  2388         symbol_c *last_type_symbol = NULL;
       
  2389 
       
  2390         {
       
  2391             identifier_c param_name("IN");
       
  2392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2394             
       
  2395             /* Get the value from a foo(<param_value>) style call */
       
  2396             if (IN_param_value == NULL)
       
  2397               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2400             
       
  2401             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2402             {
       
  2403         
       
  2404                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2405                 return return_type_symbol;
       
  2406                 
       
  2407             }
       
  2408             
       
  2409             ERROR;
       
  2410         }
       
  2411         
       
  2412     }/*function_int_to_lword*/
       
  2413     break;
       
  2414 
       
  2415 /****
       
  2416  *INT_TO_STRING
       
  2417  */
       
  2418     case function_int_to_string :
       
  2419     {
       
  2420         symbol_c *last_type_symbol = NULL;
       
  2421 
       
  2422         {
       
  2423             identifier_c param_name("IN");
       
  2424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2426             
       
  2427             /* Get the value from a foo(<param_value>) style call */
       
  2428             if (IN_param_value == NULL)
       
  2429               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2432             
       
  2433             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2434             {
       
  2435         
       
  2436                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2437                 return return_type_symbol;
       
  2438                 
       
  2439             }
       
  2440             
       
  2441             ERROR;
       
  2442         }
       
  2443         
       
  2444     }/*function_int_to_string*/
       
  2445     break;
       
  2446 
       
  2447 /****
       
  2448  *INT_TO_WSTRING
       
  2449  */
       
  2450     case function_int_to_wstring :
       
  2451     {
       
  2452         symbol_c *last_type_symbol = NULL;
       
  2453 
       
  2454         {
       
  2455             identifier_c param_name("IN");
       
  2456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2458             
       
  2459             /* Get the value from a foo(<param_value>) style call */
       
  2460             if (IN_param_value == NULL)
       
  2461               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2464             
       
  2465             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2466             {
       
  2467         
       
  2468                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  2469                 return return_type_symbol;
       
  2470                 
       
  2471             }
       
  2472             
       
  2473             ERROR;
       
  2474         }
       
  2475         
       
  2476     }/*function_int_to_wstring*/
       
  2477     break;
       
  2478 
       
  2479 /****
       
  2480  *INT_TO_DATE
       
  2481  */
       
  2482     case function_int_to_date :
       
  2483     {
       
  2484         symbol_c *last_type_symbol = NULL;
       
  2485 
       
  2486         {
       
  2487             identifier_c param_name("IN");
       
  2488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2490             
       
  2491             /* Get the value from a foo(<param_value>) style call */
       
  2492             if (IN_param_value == NULL)
       
  2493               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2496             
       
  2497             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2498             {
       
  2499         
       
  2500                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2501                 return return_type_symbol;
       
  2502                 
       
  2503             }
       
  2504             
       
  2505             ERROR;
       
  2506         }
       
  2507         
       
  2508     }/*function_int_to_date*/
       
  2509     break;
       
  2510 
       
  2511 /****
       
  2512  *INT_TO_TOD
       
  2513  */
       
  2514     case function_int_to_tod :
       
  2515     {
       
  2516         symbol_c *last_type_symbol = NULL;
       
  2517 
       
  2518         {
       
  2519             identifier_c param_name("IN");
       
  2520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2522             
       
  2523             /* Get the value from a foo(<param_value>) style call */
       
  2524             if (IN_param_value == NULL)
       
  2525               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2528             
       
  2529             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2530             {
       
  2531         
       
  2532                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2533                 return return_type_symbol;
       
  2534                 
       
  2535             }
       
  2536             
       
  2537             ERROR;
       
  2538         }
       
  2539         
       
  2540     }/*function_int_to_tod*/
       
  2541     break;
       
  2542 
       
  2543 /****
       
  2544  *INT_TO_DT
       
  2545  */
       
  2546     case function_int_to_dt :
       
  2547     {
       
  2548         symbol_c *last_type_symbol = NULL;
       
  2549 
       
  2550         {
       
  2551             identifier_c param_name("IN");
       
  2552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2554             
       
  2555             /* Get the value from a foo(<param_value>) style call */
       
  2556             if (IN_param_value == NULL)
       
  2557               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2560             
       
  2561             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2562             {
       
  2563         
       
  2564                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2565                 return return_type_symbol;
       
  2566                 
       
  2567             }
       
  2568             
       
  2569             ERROR;
       
  2570         }
       
  2571         
       
  2572     }/*function_int_to_dt*/
       
  2573     break;
       
  2574 
       
  2575 /****
       
  2576  *DINT_TO_REAL
       
  2577  */
       
  2578     case function_dint_to_real :
       
  2579     {
       
  2580         symbol_c *last_type_symbol = NULL;
       
  2581 
       
  2582         {
       
  2583             identifier_c param_name("IN");
       
  2584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2586             
       
  2587             /* Get the value from a foo(<param_value>) style call */
       
  2588             if (IN_param_value == NULL)
       
  2589               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2592             
       
  2593             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2594             {
       
  2595         
       
  2596                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2597                 return return_type_symbol;
       
  2598                 
       
  2599             }
       
  2600             
       
  2601             ERROR;
       
  2602         }
       
  2603         
       
  2604     }/*function_dint_to_real*/
       
  2605     break;
       
  2606 
       
  2607 /****
       
  2608  *DINT_TO_LREAL
       
  2609  */
       
  2610     case function_dint_to_lreal :
       
  2611     {
       
  2612         symbol_c *last_type_symbol = NULL;
       
  2613 
       
  2614         {
       
  2615             identifier_c param_name("IN");
       
  2616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2618             
       
  2619             /* Get the value from a foo(<param_value>) style call */
       
  2620             if (IN_param_value == NULL)
       
  2621               IN_param_value = function_call_param_iterator.next();
       
  2622             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 ;
       
  2624             
       
  2625             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2626             {
       
  2627         
       
  2628                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2629                 return return_type_symbol;
       
  2630                 
       
  2631             }
       
  2632             
       
  2633             ERROR;
       
  2634         }
       
  2635         
       
  2636     }/*function_dint_to_lreal*/
       
  2637     break;
       
  2638 
       
  2639 /****
       
  2640  *DINT_TO_SINT
       
  2641  */
       
  2642     case function_dint_to_sint :
       
  2643     {
       
  2644         symbol_c *last_type_symbol = NULL;
       
  2645 
       
  2646         {
       
  2647             identifier_c param_name("IN");
       
  2648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2650             
       
  2651             /* Get the value from a foo(<param_value>) style call */
       
  2652             if (IN_param_value == NULL)
       
  2653               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2656             
       
  2657             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2658             {
       
  2659         
       
  2660                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2661                 return return_type_symbol;
       
  2662                 
       
  2663             }
       
  2664             
       
  2665             ERROR;
       
  2666         }
       
  2667         
       
  2668     }/*function_dint_to_sint*/
       
  2669     break;
       
  2670 
       
  2671 /****
       
  2672  *DINT_TO_INT
       
  2673  */
       
  2674     case function_dint_to_int :
       
  2675     {
       
  2676         symbol_c *last_type_symbol = NULL;
       
  2677 
       
  2678         {
       
  2679             identifier_c param_name("IN");
       
  2680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2682             
       
  2683             /* Get the value from a foo(<param_value>) style call */
       
  2684             if (IN_param_value == NULL)
       
  2685               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2688             
       
  2689             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2690             {
       
  2691         
       
  2692                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2693                 return return_type_symbol;
       
  2694                 
       
  2695             }
       
  2696             
       
  2697             ERROR;
       
  2698         }
       
  2699         
       
  2700     }/*function_dint_to_int*/
       
  2701     break;
       
  2702 
       
  2703 /****
       
  2704  *DINT_TO_LINT
       
  2705  */
       
  2706     case function_dint_to_lint :
       
  2707     {
       
  2708         symbol_c *last_type_symbol = NULL;
       
  2709 
       
  2710         {
       
  2711             identifier_c param_name("IN");
       
  2712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2714             
       
  2715             /* Get the value from a foo(<param_value>) style call */
       
  2716             if (IN_param_value == NULL)
       
  2717               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2720             
       
  2721             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2722             {
       
  2723         
       
  2724                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2725                 return return_type_symbol;
       
  2726                 
       
  2727             }
       
  2728             
       
  2729             ERROR;
       
  2730         }
       
  2731         
       
  2732     }/*function_dint_to_lint*/
       
  2733     break;
       
  2734 
       
  2735 /****
       
  2736  *DINT_TO_USINT
       
  2737  */
       
  2738     case function_dint_to_usint :
       
  2739     {
       
  2740         symbol_c *last_type_symbol = NULL;
       
  2741 
       
  2742         {
       
  2743             identifier_c param_name("IN");
       
  2744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2746             
       
  2747             /* Get the value from a foo(<param_value>) style call */
       
  2748             if (IN_param_value == NULL)
       
  2749               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2752             
       
  2753             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2754             {
       
  2755         
       
  2756                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2757                 return return_type_symbol;
       
  2758                 
       
  2759             }
       
  2760             
       
  2761             ERROR;
       
  2762         }
       
  2763         
       
  2764     }/*function_dint_to_usint*/
       
  2765     break;
       
  2766 
       
  2767 /****
       
  2768  *DINT_TO_UINT
       
  2769  */
       
  2770     case function_dint_to_uint :
       
  2771     {
       
  2772         symbol_c *last_type_symbol = NULL;
       
  2773 
       
  2774         {
       
  2775             identifier_c param_name("IN");
       
  2776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2778             
       
  2779             /* Get the value from a foo(<param_value>) style call */
       
  2780             if (IN_param_value == NULL)
       
  2781               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2784             
       
  2785             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2786             {
       
  2787         
       
  2788                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2789                 return return_type_symbol;
       
  2790                 
       
  2791             }
       
  2792             
       
  2793             ERROR;
       
  2794         }
       
  2795         
       
  2796     }/*function_dint_to_uint*/
       
  2797     break;
       
  2798 
       
  2799 /****
       
  2800  *DINT_TO_UDINT
       
  2801  */
       
  2802     case function_dint_to_udint :
       
  2803     {
       
  2804         symbol_c *last_type_symbol = NULL;
       
  2805 
       
  2806         {
       
  2807             identifier_c param_name("IN");
       
  2808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2810             
       
  2811             /* Get the value from a foo(<param_value>) style call */
       
  2812             if (IN_param_value == NULL)
       
  2813               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2816             
       
  2817             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2818             {
       
  2819         
       
  2820                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2821                 return return_type_symbol;
       
  2822                 
       
  2823             }
       
  2824             
       
  2825             ERROR;
       
  2826         }
       
  2827         
       
  2828     }/*function_dint_to_udint*/
       
  2829     break;
       
  2830 
       
  2831 /****
       
  2832  *DINT_TO_ULINT
       
  2833  */
       
  2834     case function_dint_to_ulint :
       
  2835     {
       
  2836         symbol_c *last_type_symbol = NULL;
       
  2837 
       
  2838         {
       
  2839             identifier_c param_name("IN");
       
  2840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2842             
       
  2843             /* Get the value from a foo(<param_value>) style call */
       
  2844             if (IN_param_value == NULL)
       
  2845               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2848             
       
  2849             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2850             {
       
  2851         
       
  2852                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2853                 return return_type_symbol;
       
  2854                 
       
  2855             }
       
  2856             
       
  2857             ERROR;
       
  2858         }
       
  2859         
       
  2860     }/*function_dint_to_ulint*/
       
  2861     break;
       
  2862 
       
  2863 /****
       
  2864  *DINT_TO_TIME
       
  2865  */
       
  2866     case function_dint_to_time :
       
  2867     {
       
  2868         symbol_c *last_type_symbol = NULL;
       
  2869 
       
  2870         {
       
  2871             identifier_c param_name("IN");
       
  2872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2874             
       
  2875             /* Get the value from a foo(<param_value>) style call */
       
  2876             if (IN_param_value == NULL)
       
  2877               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2880             
       
  2881             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2882             {
       
  2883         
       
  2884                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2885                 return return_type_symbol;
       
  2886                 
       
  2887             }
       
  2888             
       
  2889             ERROR;
       
  2890         }
       
  2891         
       
  2892     }/*function_dint_to_time*/
       
  2893     break;
       
  2894 
       
  2895 /****
       
  2896  *DINT_TO_BOOL
       
  2897  */
       
  2898     case function_dint_to_bool :
       
  2899     {
       
  2900         symbol_c *last_type_symbol = NULL;
       
  2901 
       
  2902         {
       
  2903             identifier_c param_name("IN");
       
  2904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2906             
       
  2907             /* Get the value from a foo(<param_value>) style call */
       
  2908             if (IN_param_value == NULL)
       
  2909               IN_param_value = function_call_param_iterator.next();
       
  2910             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 ;
       
  2912             
       
  2913             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2914             {
       
  2915         
       
  2916                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2917                 return return_type_symbol;
       
  2918                 
       
  2919             }
       
  2920             
       
  2921             ERROR;
       
  2922         }
       
  2923         
       
  2924     }/*function_dint_to_bool*/
       
  2925     break;
       
  2926 
       
  2927 /****
       
  2928  *DINT_TO_BYTE
       
  2929  */
       
  2930     case function_dint_to_byte :
       
  2931     {
       
  2932         symbol_c *last_type_symbol = NULL;
       
  2933 
       
  2934         {
       
  2935             identifier_c param_name("IN");
       
  2936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2938             
       
  2939             /* Get the value from a foo(<param_value>) style call */
       
  2940             if (IN_param_value == NULL)
       
  2941               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2944             
       
  2945             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2946             {
       
  2947         
       
  2948                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2949                 return return_type_symbol;
       
  2950                 
       
  2951             }
       
  2952             
       
  2953             ERROR;
       
  2954         }
       
  2955         
       
  2956     }/*function_dint_to_byte*/
       
  2957     break;
       
  2958 
       
  2959 /****
       
  2960  *DINT_TO_WORD
       
  2961  */
       
  2962     case function_dint_to_word :
       
  2963     {
       
  2964         symbol_c *last_type_symbol = NULL;
       
  2965 
       
  2966         {
       
  2967             identifier_c param_name("IN");
       
  2968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2970             
       
  2971             /* Get the value from a foo(<param_value>) style call */
       
  2972             if (IN_param_value == NULL)
       
  2973               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2976             
       
  2977             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2978             {
       
  2979         
       
  2980                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2981                 return return_type_symbol;
       
  2982                 
       
  2983             }
       
  2984             
       
  2985             ERROR;
       
  2986         }
       
  2987         
       
  2988     }/*function_dint_to_word*/
       
  2989     break;
       
  2990 
       
  2991 /****
       
  2992  *DINT_TO_DWORD
       
  2993  */
       
  2994     case function_dint_to_dword :
       
  2995     {
       
  2996         symbol_c *last_type_symbol = NULL;
       
  2997 
       
  2998         {
       
  2999             identifier_c param_name("IN");
       
  3000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3002             
       
  3003             /* Get the value from a foo(<param_value>) style call */
       
  3004             if (IN_param_value == NULL)
       
  3005               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3008             
       
  3009             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3010             {
       
  3011         
       
  3012                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3013                 return return_type_symbol;
       
  3014                 
       
  3015             }
       
  3016             
       
  3017             ERROR;
       
  3018         }
       
  3019         
       
  3020     }/*function_dint_to_dword*/
       
  3021     break;
       
  3022 
       
  3023 /****
       
  3024  *DINT_TO_LWORD
       
  3025  */
       
  3026     case function_dint_to_lword :
       
  3027     {
       
  3028         symbol_c *last_type_symbol = NULL;
       
  3029 
       
  3030         {
       
  3031             identifier_c param_name("IN");
       
  3032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3034             
       
  3035             /* Get the value from a foo(<param_value>) style call */
       
  3036             if (IN_param_value == NULL)
       
  3037               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3040             
       
  3041             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3042             {
       
  3043         
       
  3044                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3045                 return return_type_symbol;
       
  3046                 
       
  3047             }
       
  3048             
       
  3049             ERROR;
       
  3050         }
       
  3051         
       
  3052     }/*function_dint_to_lword*/
       
  3053     break;
       
  3054 
       
  3055 /****
       
  3056  *DINT_TO_STRING
       
  3057  */
       
  3058     case function_dint_to_string :
       
  3059     {
       
  3060         symbol_c *last_type_symbol = NULL;
       
  3061 
       
  3062         {
       
  3063             identifier_c param_name("IN");
       
  3064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3066             
       
  3067             /* Get the value from a foo(<param_value>) style call */
       
  3068             if (IN_param_value == NULL)
       
  3069               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3072             
       
  3073             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3074             {
       
  3075         
       
  3076                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3077                 return return_type_symbol;
       
  3078                 
       
  3079             }
       
  3080             
       
  3081             ERROR;
       
  3082         }
       
  3083         
       
  3084     }/*function_dint_to_string*/
       
  3085     break;
       
  3086 
       
  3087 /****
       
  3088  *DINT_TO_WSTRING
       
  3089  */
       
  3090     case function_dint_to_wstring :
       
  3091     {
       
  3092         symbol_c *last_type_symbol = NULL;
       
  3093 
       
  3094         {
       
  3095             identifier_c param_name("IN");
       
  3096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3098             
       
  3099             /* Get the value from a foo(<param_value>) style call */
       
  3100             if (IN_param_value == NULL)
       
  3101               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3104             
       
  3105             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3106             {
       
  3107         
       
  3108                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3109                 return return_type_symbol;
       
  3110                 
       
  3111             }
       
  3112             
       
  3113             ERROR;
       
  3114         }
       
  3115         
       
  3116     }/*function_dint_to_wstring*/
       
  3117     break;
       
  3118 
       
  3119 /****
       
  3120  *DINT_TO_DATE
       
  3121  */
       
  3122     case function_dint_to_date :
       
  3123     {
       
  3124         symbol_c *last_type_symbol = NULL;
       
  3125 
       
  3126         {
       
  3127             identifier_c param_name("IN");
       
  3128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3130             
       
  3131             /* Get the value from a foo(<param_value>) style call */
       
  3132             if (IN_param_value == NULL)
       
  3133               IN_param_value = function_call_param_iterator.next();
       
  3134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3136             
       
  3137             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3138             {
       
  3139         
       
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3141                 return return_type_symbol;
       
  3142                 
       
  3143             }
       
  3144             
       
  3145             ERROR;
       
  3146         }
       
  3147         
       
  3148     }/*function_dint_to_date*/
       
  3149     break;
       
  3150 
       
  3151 /****
       
  3152  *DINT_TO_TOD
       
  3153  */
       
  3154     case function_dint_to_tod :
       
  3155     {
       
  3156         symbol_c *last_type_symbol = NULL;
       
  3157 
       
  3158         {
       
  3159             identifier_c param_name("IN");
       
  3160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3162             
       
  3163             /* Get the value from a foo(<param_value>) style call */
       
  3164             if (IN_param_value == NULL)
       
  3165               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3168             
       
  3169             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3170             {
       
  3171         
       
  3172                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3173                 return return_type_symbol;
       
  3174                 
       
  3175             }
       
  3176             
       
  3177             ERROR;
       
  3178         }
       
  3179         
       
  3180     }/*function_dint_to_tod*/
       
  3181     break;
       
  3182 
       
  3183 /****
       
  3184  *DINT_TO_DT
       
  3185  */
       
  3186     case function_dint_to_dt :
       
  3187     {
       
  3188         symbol_c *last_type_symbol = NULL;
       
  3189 
       
  3190         {
       
  3191             identifier_c param_name("IN");
       
  3192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3194             
       
  3195             /* Get the value from a foo(<param_value>) style call */
       
  3196             if (IN_param_value == NULL)
       
  3197               IN_param_value = function_call_param_iterator.next();
       
  3198             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 ;
       
  3200             
       
  3201             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3202             {
       
  3203         
       
  3204                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3205                 return return_type_symbol;
       
  3206                 
       
  3207             }
       
  3208             
       
  3209             ERROR;
       
  3210         }
       
  3211         
       
  3212     }/*function_dint_to_dt*/
       
  3213     break;
       
  3214 
       
  3215 /****
       
  3216  *LINT_TO_REAL
       
  3217  */
       
  3218     case function_lint_to_real :
       
  3219     {
       
  3220         symbol_c *last_type_symbol = NULL;
       
  3221 
       
  3222         {
       
  3223             identifier_c param_name("IN");
       
  3224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3226             
       
  3227             /* Get the value from a foo(<param_value>) style call */
       
  3228             if (IN_param_value == NULL)
       
  3229               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3232             
       
  3233             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3234             {
       
  3235         
       
  3236                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3237                 return return_type_symbol;
       
  3238                 
       
  3239             }
       
  3240             
       
  3241             ERROR;
       
  3242         }
       
  3243         
       
  3244     }/*function_lint_to_real*/
       
  3245     break;
       
  3246 
       
  3247 /****
       
  3248  *LINT_TO_LREAL
       
  3249  */
       
  3250     case function_lint_to_lreal :
       
  3251     {
       
  3252         symbol_c *last_type_symbol = NULL;
       
  3253 
       
  3254         {
       
  3255             identifier_c param_name("IN");
       
  3256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3258             
       
  3259             /* Get the value from a foo(<param_value>) style call */
       
  3260             if (IN_param_value == NULL)
       
  3261               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3264             
       
  3265             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3266             {
       
  3267         
       
  3268                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3269                 return return_type_symbol;
       
  3270                 
       
  3271             }
       
  3272             
       
  3273             ERROR;
       
  3274         }
       
  3275         
       
  3276     }/*function_lint_to_lreal*/
       
  3277     break;
       
  3278 
       
  3279 /****
       
  3280  *LINT_TO_SINT
       
  3281  */
       
  3282     case function_lint_to_sint :
       
  3283     {
       
  3284         symbol_c *last_type_symbol = NULL;
       
  3285 
       
  3286         {
       
  3287             identifier_c param_name("IN");
       
  3288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3290             
       
  3291             /* Get the value from a foo(<param_value>) style call */
       
  3292             if (IN_param_value == NULL)
       
  3293               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3296             
       
  3297             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3298             {
       
  3299         
       
  3300                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3301                 return return_type_symbol;
       
  3302                 
       
  3303             }
       
  3304             
       
  3305             ERROR;
       
  3306         }
       
  3307         
       
  3308     }/*function_lint_to_sint*/
       
  3309     break;
       
  3310 
       
  3311 /****
       
  3312  *LINT_TO_INT
       
  3313  */
       
  3314     case function_lint_to_int :
       
  3315     {
       
  3316         symbol_c *last_type_symbol = NULL;
       
  3317 
       
  3318         {
       
  3319             identifier_c param_name("IN");
       
  3320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3322             
       
  3323             /* Get the value from a foo(<param_value>) style call */
       
  3324             if (IN_param_value == NULL)
       
  3325               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3328             
       
  3329             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3330             {
       
  3331         
       
  3332                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3333                 return return_type_symbol;
       
  3334                 
       
  3335             }
       
  3336             
       
  3337             ERROR;
       
  3338         }
       
  3339         
       
  3340     }/*function_lint_to_int*/
       
  3341     break;
       
  3342 
       
  3343 /****
       
  3344  *LINT_TO_DINT
       
  3345  */
       
  3346     case function_lint_to_dint :
       
  3347     {
       
  3348         symbol_c *last_type_symbol = NULL;
       
  3349 
       
  3350         {
       
  3351             identifier_c param_name("IN");
       
  3352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3354             
       
  3355             /* Get the value from a foo(<param_value>) style call */
       
  3356             if (IN_param_value == NULL)
       
  3357               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3360             
       
  3361             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3362             {
       
  3363         
       
  3364                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3365                 return return_type_symbol;
       
  3366                 
       
  3367             }
       
  3368             
       
  3369             ERROR;
       
  3370         }
       
  3371         
       
  3372     }/*function_lint_to_dint*/
       
  3373     break;
       
  3374 
       
  3375 /****
       
  3376  *LINT_TO_USINT
       
  3377  */
       
  3378     case function_lint_to_usint :
       
  3379     {
       
  3380         symbol_c *last_type_symbol = NULL;
       
  3381 
       
  3382         {
       
  3383             identifier_c param_name("IN");
       
  3384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3386             
       
  3387             /* Get the value from a foo(<param_value>) style call */
       
  3388             if (IN_param_value == NULL)
       
  3389               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3392             
       
  3393             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3394             {
       
  3395         
       
  3396                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3397                 return return_type_symbol;
       
  3398                 
       
  3399             }
       
  3400             
       
  3401             ERROR;
       
  3402         }
       
  3403         
       
  3404     }/*function_lint_to_usint*/
       
  3405     break;
       
  3406 
       
  3407 /****
       
  3408  *LINT_TO_UINT
       
  3409  */
       
  3410     case function_lint_to_uint :
       
  3411     {
       
  3412         symbol_c *last_type_symbol = NULL;
       
  3413 
       
  3414         {
       
  3415             identifier_c param_name("IN");
       
  3416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3418             
       
  3419             /* Get the value from a foo(<param_value>) style call */
       
  3420             if (IN_param_value == NULL)
       
  3421               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3424             
       
  3425             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3426             {
       
  3427         
       
  3428                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3429                 return return_type_symbol;
       
  3430                 
       
  3431             }
       
  3432             
       
  3433             ERROR;
       
  3434         }
       
  3435         
       
  3436     }/*function_lint_to_uint*/
       
  3437     break;
       
  3438 
       
  3439 /****
       
  3440  *LINT_TO_UDINT
       
  3441  */
       
  3442     case function_lint_to_udint :
       
  3443     {
       
  3444         symbol_c *last_type_symbol = NULL;
       
  3445 
       
  3446         {
       
  3447             identifier_c param_name("IN");
       
  3448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3450             
       
  3451             /* Get the value from a foo(<param_value>) style call */
       
  3452             if (IN_param_value == NULL)
       
  3453               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3456             
       
  3457             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3458             {
       
  3459         
       
  3460                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3461                 return return_type_symbol;
       
  3462                 
       
  3463             }
       
  3464             
       
  3465             ERROR;
       
  3466         }
       
  3467         
       
  3468     }/*function_lint_to_udint*/
       
  3469     break;
       
  3470 
       
  3471 /****
       
  3472  *LINT_TO_ULINT
       
  3473  */
       
  3474     case function_lint_to_ulint :
       
  3475     {
       
  3476         symbol_c *last_type_symbol = NULL;
       
  3477 
       
  3478         {
       
  3479             identifier_c param_name("IN");
       
  3480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3482             
       
  3483             /* Get the value from a foo(<param_value>) style call */
       
  3484             if (IN_param_value == NULL)
       
  3485               IN_param_value = function_call_param_iterator.next();
       
  3486             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 ;
       
  3488             
       
  3489             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3490             {
       
  3491         
       
  3492                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3493                 return return_type_symbol;
       
  3494                 
       
  3495             }
       
  3496             
       
  3497             ERROR;
       
  3498         }
       
  3499         
       
  3500     }/*function_lint_to_ulint*/
       
  3501     break;
       
  3502 
       
  3503 /****
       
  3504  *LINT_TO_TIME
       
  3505  */
       
  3506     case function_lint_to_time :
       
  3507     {
       
  3508         symbol_c *last_type_symbol = NULL;
       
  3509 
       
  3510         {
       
  3511             identifier_c param_name("IN");
       
  3512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3514             
       
  3515             /* Get the value from a foo(<param_value>) style call */
       
  3516             if (IN_param_value == NULL)
       
  3517               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3520             
       
  3521             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3522             {
       
  3523         
       
  3524                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3525                 return return_type_symbol;
       
  3526                 
       
  3527             }
       
  3528             
       
  3529             ERROR;
       
  3530         }
       
  3531         
       
  3532     }/*function_lint_to_time*/
       
  3533     break;
       
  3534 
       
  3535 /****
       
  3536  *LINT_TO_BOOL
       
  3537  */
       
  3538     case function_lint_to_bool :
       
  3539     {
       
  3540         symbol_c *last_type_symbol = NULL;
       
  3541 
       
  3542         {
       
  3543             identifier_c param_name("IN");
       
  3544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3546             
       
  3547             /* Get the value from a foo(<param_value>) style call */
       
  3548             if (IN_param_value == NULL)
       
  3549               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3552             
       
  3553             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3554             {
       
  3555         
       
  3556                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3557                 return return_type_symbol;
       
  3558                 
       
  3559             }
       
  3560             
       
  3561             ERROR;
       
  3562         }
       
  3563         
       
  3564     }/*function_lint_to_bool*/
       
  3565     break;
       
  3566 
       
  3567 /****
       
  3568  *LINT_TO_BYTE
       
  3569  */
       
  3570     case function_lint_to_byte :
       
  3571     {
       
  3572         symbol_c *last_type_symbol = NULL;
       
  3573 
       
  3574         {
       
  3575             identifier_c param_name("IN");
       
  3576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3578             
       
  3579             /* Get the value from a foo(<param_value>) style call */
       
  3580             if (IN_param_value == NULL)
       
  3581               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3584             
       
  3585             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3586             {
       
  3587         
       
  3588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3589                 return return_type_symbol;
       
  3590                 
       
  3591             }
       
  3592             
       
  3593             ERROR;
       
  3594         }
       
  3595         
       
  3596     }/*function_lint_to_byte*/
       
  3597     break;
       
  3598 
       
  3599 /****
       
  3600  *LINT_TO_WORD
       
  3601  */
       
  3602     case function_lint_to_word :
       
  3603     {
       
  3604         symbol_c *last_type_symbol = NULL;
       
  3605 
       
  3606         {
       
  3607             identifier_c param_name("IN");
       
  3608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3610             
       
  3611             /* Get the value from a foo(<param_value>) style call */
       
  3612             if (IN_param_value == NULL)
       
  3613               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3616             
       
  3617             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3618             {
       
  3619         
       
  3620                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3621                 return return_type_symbol;
       
  3622                 
       
  3623             }
       
  3624             
       
  3625             ERROR;
       
  3626         }
       
  3627         
       
  3628     }/*function_lint_to_word*/
       
  3629     break;
       
  3630 
       
  3631 /****
       
  3632  *LINT_TO_DWORD
       
  3633  */
       
  3634     case function_lint_to_dword :
       
  3635     {
       
  3636         symbol_c *last_type_symbol = NULL;
       
  3637 
       
  3638         {
       
  3639             identifier_c param_name("IN");
       
  3640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3642             
       
  3643             /* Get the value from a foo(<param_value>) style call */
       
  3644             if (IN_param_value == NULL)
       
  3645               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3648             
       
  3649             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3650             {
       
  3651         
       
  3652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3653                 return return_type_symbol;
       
  3654                 
       
  3655             }
       
  3656             
       
  3657             ERROR;
       
  3658         }
       
  3659         
       
  3660     }/*function_lint_to_dword*/
       
  3661     break;
       
  3662 
       
  3663 /****
       
  3664  *LINT_TO_LWORD
       
  3665  */
       
  3666     case function_lint_to_lword :
       
  3667     {
       
  3668         symbol_c *last_type_symbol = NULL;
       
  3669 
       
  3670         {
       
  3671             identifier_c param_name("IN");
       
  3672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3674             
       
  3675             /* Get the value from a foo(<param_value>) style call */
       
  3676             if (IN_param_value == NULL)
       
  3677               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3680             
       
  3681             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3682             {
       
  3683         
       
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3685                 return return_type_symbol;
       
  3686                 
       
  3687             }
       
  3688             
       
  3689             ERROR;
       
  3690         }
       
  3691         
       
  3692     }/*function_lint_to_lword*/
       
  3693     break;
       
  3694 
       
  3695 /****
       
  3696  *LINT_TO_STRING
       
  3697  */
       
  3698     case function_lint_to_string :
       
  3699     {
       
  3700         symbol_c *last_type_symbol = NULL;
       
  3701 
       
  3702         {
       
  3703             identifier_c param_name("IN");
       
  3704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3706             
       
  3707             /* Get the value from a foo(<param_value>) style call */
       
  3708             if (IN_param_value == NULL)
       
  3709               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3712             
       
  3713             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3714             {
       
  3715         
       
  3716                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3717                 return return_type_symbol;
       
  3718                 
       
  3719             }
       
  3720             
       
  3721             ERROR;
       
  3722         }
       
  3723         
       
  3724     }/*function_lint_to_string*/
       
  3725     break;
       
  3726 
       
  3727 /****
       
  3728  *LINT_TO_WSTRING
       
  3729  */
       
  3730     case function_lint_to_wstring :
       
  3731     {
       
  3732         symbol_c *last_type_symbol = NULL;
       
  3733 
       
  3734         {
       
  3735             identifier_c param_name("IN");
       
  3736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3738             
       
  3739             /* Get the value from a foo(<param_value>) style call */
       
  3740             if (IN_param_value == NULL)
       
  3741               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3744             
       
  3745             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3746             {
       
  3747         
       
  3748                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3749                 return return_type_symbol;
       
  3750                 
       
  3751             }
       
  3752             
       
  3753             ERROR;
       
  3754         }
       
  3755         
       
  3756     }/*function_lint_to_wstring*/
       
  3757     break;
       
  3758 
       
  3759 /****
       
  3760  *LINT_TO_DATE
       
  3761  */
       
  3762     case function_lint_to_date :
       
  3763     {
       
  3764         symbol_c *last_type_symbol = NULL;
       
  3765 
       
  3766         {
       
  3767             identifier_c param_name("IN");
       
  3768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3770             
       
  3771             /* Get the value from a foo(<param_value>) style call */
       
  3772             if (IN_param_value == NULL)
       
  3773               IN_param_value = function_call_param_iterator.next();
       
  3774             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 ;
       
  3776             
       
  3777             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3778             {
       
  3779         
       
  3780                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3781                 return return_type_symbol;
       
  3782                 
       
  3783             }
       
  3784             
       
  3785             ERROR;
       
  3786         }
       
  3787         
       
  3788     }/*function_lint_to_date*/
       
  3789     break;
       
  3790 
       
  3791 /****
       
  3792  *LINT_TO_TOD
       
  3793  */
       
  3794     case function_lint_to_tod :
       
  3795     {
       
  3796         symbol_c *last_type_symbol = NULL;
       
  3797 
       
  3798         {
       
  3799             identifier_c param_name("IN");
       
  3800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3802             
       
  3803             /* Get the value from a foo(<param_value>) style call */
       
  3804             if (IN_param_value == NULL)
       
  3805               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3808             
       
  3809             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3810             {
       
  3811         
       
  3812                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3813                 return return_type_symbol;
       
  3814                 
       
  3815             }
       
  3816             
       
  3817             ERROR;
       
  3818         }
       
  3819         
       
  3820     }/*function_lint_to_tod*/
       
  3821     break;
       
  3822 
       
  3823 /****
       
  3824  *LINT_TO_DT
       
  3825  */
       
  3826     case function_lint_to_dt :
       
  3827     {
       
  3828         symbol_c *last_type_symbol = NULL;
       
  3829 
       
  3830         {
       
  3831             identifier_c param_name("IN");
       
  3832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3834             
       
  3835             /* Get the value from a foo(<param_value>) style call */
       
  3836             if (IN_param_value == NULL)
       
  3837               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3840             
       
  3841             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3842             {
       
  3843         
       
  3844                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3845                 return return_type_symbol;
       
  3846                 
       
  3847             }
       
  3848             
       
  3849             ERROR;
       
  3850         }
       
  3851         
       
  3852     }/*function_lint_to_dt*/
       
  3853     break;
       
  3854 
       
  3855 /****
       
  3856  *USINT_TO_REAL
       
  3857  */
       
  3858     case function_usint_to_real :
       
  3859     {
       
  3860         symbol_c *last_type_symbol = NULL;
       
  3861 
       
  3862         {
       
  3863             identifier_c param_name("IN");
       
  3864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3866             
       
  3867             /* Get the value from a foo(<param_value>) style call */
       
  3868             if (IN_param_value == NULL)
       
  3869               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3872             
       
  3873             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3874             {
       
  3875         
       
  3876                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3877                 return return_type_symbol;
       
  3878                 
       
  3879             }
       
  3880             
       
  3881             ERROR;
       
  3882         }
       
  3883         
       
  3884     }/*function_usint_to_real*/
       
  3885     break;
       
  3886 
       
  3887 /****
       
  3888  *USINT_TO_LREAL
       
  3889  */
       
  3890     case function_usint_to_lreal :
       
  3891     {
       
  3892         symbol_c *last_type_symbol = NULL;
       
  3893 
       
  3894         {
       
  3895             identifier_c param_name("IN");
       
  3896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3898             
       
  3899             /* Get the value from a foo(<param_value>) style call */
       
  3900             if (IN_param_value == NULL)
       
  3901               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3904             
       
  3905             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3906             {
       
  3907         
       
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3909                 return return_type_symbol;
       
  3910                 
       
  3911             }
       
  3912             
       
  3913             ERROR;
       
  3914         }
       
  3915         
       
  3916     }/*function_usint_to_lreal*/
       
  3917     break;
       
  3918 
       
  3919 /****
       
  3920  *USINT_TO_SINT
       
  3921  */
       
  3922     case function_usint_to_sint :
       
  3923     {
       
  3924         symbol_c *last_type_symbol = NULL;
       
  3925 
       
  3926         {
       
  3927             identifier_c param_name("IN");
       
  3928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3930             
       
  3931             /* Get the value from a foo(<param_value>) style call */
       
  3932             if (IN_param_value == NULL)
       
  3933               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3936             
       
  3937             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3938             {
       
  3939         
       
  3940                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3941                 return return_type_symbol;
       
  3942                 
       
  3943             }
       
  3944             
       
  3945             ERROR;
       
  3946         }
       
  3947         
       
  3948     }/*function_usint_to_sint*/
       
  3949     break;
       
  3950 
       
  3951 /****
       
  3952  *USINT_TO_INT
       
  3953  */
       
  3954     case function_usint_to_int :
       
  3955     {
       
  3956         symbol_c *last_type_symbol = NULL;
       
  3957 
       
  3958         {
       
  3959             identifier_c param_name("IN");
       
  3960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3962             
       
  3963             /* Get the value from a foo(<param_value>) style call */
       
  3964             if (IN_param_value == NULL)
       
  3965               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3968             
       
  3969             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3970             {
       
  3971         
       
  3972                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3973                 return return_type_symbol;
       
  3974                 
       
  3975             }
       
  3976             
       
  3977             ERROR;
       
  3978         }
       
  3979         
       
  3980     }/*function_usint_to_int*/
       
  3981     break;
       
  3982 
       
  3983 /****
       
  3984  *USINT_TO_DINT
       
  3985  */
       
  3986     case function_usint_to_dint :
       
  3987     {
       
  3988         symbol_c *last_type_symbol = NULL;
       
  3989 
       
  3990         {
       
  3991             identifier_c param_name("IN");
       
  3992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3994             
       
  3995             /* Get the value from a foo(<param_value>) style call */
       
  3996             if (IN_param_value == NULL)
       
  3997               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4000             
       
  4001             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4002             {
       
  4003         
       
  4004                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4005                 return return_type_symbol;
       
  4006                 
       
  4007             }
       
  4008             
       
  4009             ERROR;
       
  4010         }
       
  4011         
       
  4012     }/*function_usint_to_dint*/
       
  4013     break;
       
  4014 
       
  4015 /****
       
  4016  *USINT_TO_LINT
       
  4017  */
       
  4018     case function_usint_to_lint :
       
  4019     {
       
  4020         symbol_c *last_type_symbol = NULL;
       
  4021 
       
  4022         {
       
  4023             identifier_c param_name("IN");
       
  4024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4026             
       
  4027             /* Get the value from a foo(<param_value>) style call */
       
  4028             if (IN_param_value == NULL)
       
  4029               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4032             
       
  4033             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4034             {
       
  4035         
       
  4036                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4037                 return return_type_symbol;
       
  4038                 
       
  4039             }
       
  4040             
       
  4041             ERROR;
       
  4042         }
       
  4043         
       
  4044     }/*function_usint_to_lint*/
       
  4045     break;
       
  4046 
       
  4047 /****
       
  4048  *USINT_TO_UINT
       
  4049  */
       
  4050     case function_usint_to_uint :
       
  4051     {
       
  4052         symbol_c *last_type_symbol = NULL;
       
  4053 
       
  4054         {
       
  4055             identifier_c param_name("IN");
       
  4056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4058             
       
  4059             /* Get the value from a foo(<param_value>) style call */
       
  4060             if (IN_param_value == NULL)
       
  4061               IN_param_value = function_call_param_iterator.next();
       
  4062             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 ;
       
  4064             
       
  4065             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4066             {
       
  4067         
       
  4068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4069                 return return_type_symbol;
       
  4070                 
       
  4071             }
       
  4072             
       
  4073             ERROR;
       
  4074         }
       
  4075         
       
  4076     }/*function_usint_to_uint*/
       
  4077     break;
       
  4078 
       
  4079 /****
       
  4080  *USINT_TO_UDINT
       
  4081  */
       
  4082     case function_usint_to_udint :
       
  4083     {
       
  4084         symbol_c *last_type_symbol = NULL;
       
  4085 
       
  4086         {
       
  4087             identifier_c param_name("IN");
       
  4088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4090             
       
  4091             /* Get the value from a foo(<param_value>) style call */
       
  4092             if (IN_param_value == NULL)
       
  4093               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4096             
       
  4097             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4098             {
       
  4099         
       
  4100                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4101                 return return_type_symbol;
       
  4102                 
       
  4103             }
       
  4104             
       
  4105             ERROR;
       
  4106         }
       
  4107         
       
  4108     }/*function_usint_to_udint*/
       
  4109     break;
       
  4110 
       
  4111 /****
       
  4112  *USINT_TO_ULINT
       
  4113  */
       
  4114     case function_usint_to_ulint :
       
  4115     {
       
  4116         symbol_c *last_type_symbol = NULL;
       
  4117 
       
  4118         {
       
  4119             identifier_c param_name("IN");
       
  4120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4122             
       
  4123             /* Get the value from a foo(<param_value>) style call */
       
  4124             if (IN_param_value == NULL)
       
  4125               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4128             
       
  4129             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4130             {
       
  4131         
       
  4132                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4133                 return return_type_symbol;
       
  4134                 
       
  4135             }
       
  4136             
       
  4137             ERROR;
       
  4138         }
       
  4139         
       
  4140     }/*function_usint_to_ulint*/
       
  4141     break;
       
  4142 
       
  4143 /****
       
  4144  *USINT_TO_TIME
       
  4145  */
       
  4146     case function_usint_to_time :
       
  4147     {
       
  4148         symbol_c *last_type_symbol = NULL;
       
  4149 
       
  4150         {
       
  4151             identifier_c param_name("IN");
       
  4152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4154             
       
  4155             /* Get the value from a foo(<param_value>) style call */
       
  4156             if (IN_param_value == NULL)
       
  4157               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4160             
       
  4161             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4162             {
       
  4163         
       
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4165                 return return_type_symbol;
       
  4166                 
       
  4167             }
       
  4168             
       
  4169             ERROR;
       
  4170         }
       
  4171         
       
  4172     }/*function_usint_to_time*/
       
  4173     break;
       
  4174 
       
  4175 /****
       
  4176  *USINT_TO_BOOL
       
  4177  */
       
  4178     case function_usint_to_bool :
       
  4179     {
       
  4180         symbol_c *last_type_symbol = NULL;
       
  4181 
       
  4182         {
       
  4183             identifier_c param_name("IN");
       
  4184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4186             
       
  4187             /* Get the value from a foo(<param_value>) style call */
       
  4188             if (IN_param_value == NULL)
       
  4189               IN_param_value = function_call_param_iterator.next();
       
  4190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4192             
       
  4193             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4194             {
       
  4195         
       
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4197                 return return_type_symbol;
       
  4198                 
       
  4199             }
       
  4200             
       
  4201             ERROR;
       
  4202         }
       
  4203         
       
  4204     }/*function_usint_to_bool*/
       
  4205     break;
       
  4206 
       
  4207 /****
       
  4208  *USINT_TO_BYTE
       
  4209  */
       
  4210     case function_usint_to_byte :
       
  4211     {
       
  4212         symbol_c *last_type_symbol = NULL;
       
  4213 
       
  4214         {
       
  4215             identifier_c param_name("IN");
       
  4216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4218             
       
  4219             /* Get the value from a foo(<param_value>) style call */
       
  4220             if (IN_param_value == NULL)
       
  4221               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4224             
       
  4225             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4226             {
       
  4227         
       
  4228                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4229                 return return_type_symbol;
       
  4230                 
       
  4231             }
       
  4232             
       
  4233             ERROR;
       
  4234         }
       
  4235         
       
  4236     }/*function_usint_to_byte*/
       
  4237     break;
       
  4238 
       
  4239 /****
       
  4240  *USINT_TO_WORD
       
  4241  */
       
  4242     case function_usint_to_word :
       
  4243     {
       
  4244         symbol_c *last_type_symbol = NULL;
       
  4245 
       
  4246         {
       
  4247             identifier_c param_name("IN");
       
  4248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4250             
       
  4251             /* Get the value from a foo(<param_value>) style call */
       
  4252             if (IN_param_value == NULL)
       
  4253               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4256             
       
  4257             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4258             {
       
  4259         
       
  4260                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4261                 return return_type_symbol;
       
  4262                 
       
  4263             }
       
  4264             
       
  4265             ERROR;
       
  4266         }
       
  4267         
       
  4268     }/*function_usint_to_word*/
       
  4269     break;
       
  4270 
       
  4271 /****
       
  4272  *USINT_TO_DWORD
       
  4273  */
       
  4274     case function_usint_to_dword :
       
  4275     {
       
  4276         symbol_c *last_type_symbol = NULL;
       
  4277 
       
  4278         {
       
  4279             identifier_c param_name("IN");
       
  4280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4282             
       
  4283             /* Get the value from a foo(<param_value>) style call */
       
  4284             if (IN_param_value == NULL)
       
  4285               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4288             
       
  4289             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4290             {
       
  4291         
       
  4292                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4293                 return return_type_symbol;
       
  4294                 
       
  4295             }
       
  4296             
       
  4297             ERROR;
       
  4298         }
       
  4299         
       
  4300     }/*function_usint_to_dword*/
       
  4301     break;
       
  4302 
       
  4303 /****
       
  4304  *USINT_TO_LWORD
       
  4305  */
       
  4306     case function_usint_to_lword :
       
  4307     {
       
  4308         symbol_c *last_type_symbol = NULL;
       
  4309 
       
  4310         {
       
  4311             identifier_c param_name("IN");
       
  4312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4314             
       
  4315             /* Get the value from a foo(<param_value>) style call */
       
  4316             if (IN_param_value == NULL)
       
  4317               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4320             
       
  4321             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4322             {
       
  4323         
       
  4324                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4325                 return return_type_symbol;
       
  4326                 
       
  4327             }
       
  4328             
       
  4329             ERROR;
       
  4330         }
       
  4331         
       
  4332     }/*function_usint_to_lword*/
       
  4333     break;
       
  4334 
       
  4335 /****
       
  4336  *USINT_TO_STRING
       
  4337  */
       
  4338     case function_usint_to_string :
       
  4339     {
       
  4340         symbol_c *last_type_symbol = NULL;
       
  4341 
       
  4342         {
       
  4343             identifier_c param_name("IN");
       
  4344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4346             
       
  4347             /* Get the value from a foo(<param_value>) style call */
       
  4348             if (IN_param_value == NULL)
       
  4349               IN_param_value = function_call_param_iterator.next();
       
  4350             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 ;
       
  4352             
       
  4353             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4354             {
       
  4355         
       
  4356                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4357                 return return_type_symbol;
       
  4358                 
       
  4359             }
       
  4360             
       
  4361             ERROR;
       
  4362         }
       
  4363         
       
  4364     }/*function_usint_to_string*/
       
  4365     break;
       
  4366 
       
  4367 /****
       
  4368  *USINT_TO_WSTRING
       
  4369  */
       
  4370     case function_usint_to_wstring :
       
  4371     {
       
  4372         symbol_c *last_type_symbol = NULL;
       
  4373 
       
  4374         {
       
  4375             identifier_c param_name("IN");
       
  4376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4378             
       
  4379             /* Get the value from a foo(<param_value>) style call */
       
  4380             if (IN_param_value == NULL)
       
  4381               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4384             
       
  4385             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4386             {
       
  4387         
       
  4388                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  4389                 return return_type_symbol;
       
  4390                 
       
  4391             }
       
  4392             
       
  4393             ERROR;
       
  4394         }
       
  4395         
       
  4396     }/*function_usint_to_wstring*/
       
  4397     break;
       
  4398 
       
  4399 /****
       
  4400  *USINT_TO_DATE
       
  4401  */
       
  4402     case function_usint_to_date :
       
  4403     {
       
  4404         symbol_c *last_type_symbol = NULL;
       
  4405 
       
  4406         {
       
  4407             identifier_c param_name("IN");
       
  4408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4410             
       
  4411             /* Get the value from a foo(<param_value>) style call */
       
  4412             if (IN_param_value == NULL)
       
  4413               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4416             
       
  4417             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4418             {
       
  4419         
       
  4420                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4421                 return return_type_symbol;
       
  4422                 
       
  4423             }
       
  4424             
       
  4425             ERROR;
       
  4426         }
       
  4427         
       
  4428     }/*function_usint_to_date*/
       
  4429     break;
       
  4430 
       
  4431 /****
       
  4432  *USINT_TO_TOD
       
  4433  */
       
  4434     case function_usint_to_tod :
       
  4435     {
       
  4436         symbol_c *last_type_symbol = NULL;
       
  4437 
       
  4438         {
       
  4439             identifier_c param_name("IN");
       
  4440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4442             
       
  4443             /* Get the value from a foo(<param_value>) style call */
       
  4444             if (IN_param_value == NULL)
       
  4445               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4448             
       
  4449             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4450             {
       
  4451         
       
  4452                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4453                 return return_type_symbol;
       
  4454                 
       
  4455             }
       
  4456             
       
  4457             ERROR;
       
  4458         }
       
  4459         
       
  4460     }/*function_usint_to_tod*/
       
  4461     break;
       
  4462 
       
  4463 /****
       
  4464  *USINT_TO_DT
       
  4465  */
       
  4466     case function_usint_to_dt :
       
  4467     {
       
  4468         symbol_c *last_type_symbol = NULL;
       
  4469 
       
  4470         {
       
  4471             identifier_c param_name("IN");
       
  4472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4474             
       
  4475             /* Get the value from a foo(<param_value>) style call */
       
  4476             if (IN_param_value == NULL)
       
  4477               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4480             
       
  4481             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4482             {
       
  4483         
       
  4484                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4485                 return return_type_symbol;
       
  4486                 
       
  4487             }
       
  4488             
       
  4489             ERROR;
       
  4490         }
       
  4491         
       
  4492     }/*function_usint_to_dt*/
       
  4493     break;
       
  4494 
       
  4495 /****
       
  4496  *UINT_TO_REAL
       
  4497  */
       
  4498     case function_uint_to_real :
       
  4499     {
       
  4500         symbol_c *last_type_symbol = NULL;
       
  4501 
       
  4502         {
       
  4503             identifier_c param_name("IN");
       
  4504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4506             
       
  4507             /* Get the value from a foo(<param_value>) style call */
       
  4508             if (IN_param_value == NULL)
       
  4509               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4512             
       
  4513             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4514             {
       
  4515         
       
  4516                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4517                 return return_type_symbol;
       
  4518                 
       
  4519             }
       
  4520             
       
  4521             ERROR;
       
  4522         }
       
  4523         
       
  4524     }/*function_uint_to_real*/
       
  4525     break;
       
  4526 
       
  4527 /****
       
  4528  *UINT_TO_LREAL
       
  4529  */
       
  4530     case function_uint_to_lreal :
       
  4531     {
       
  4532         symbol_c *last_type_symbol = NULL;
       
  4533 
       
  4534         {
       
  4535             identifier_c param_name("IN");
       
  4536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4538             
       
  4539             /* Get the value from a foo(<param_value>) style call */
       
  4540             if (IN_param_value == NULL)
       
  4541               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4544             
       
  4545             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4546             {
       
  4547         
       
  4548                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4549                 return return_type_symbol;
       
  4550                 
       
  4551             }
       
  4552             
       
  4553             ERROR;
       
  4554         }
       
  4555         
       
  4556     }/*function_uint_to_lreal*/
       
  4557     break;
       
  4558 
       
  4559 /****
       
  4560  *UINT_TO_SINT
       
  4561  */
       
  4562     case function_uint_to_sint :
       
  4563     {
       
  4564         symbol_c *last_type_symbol = NULL;
       
  4565 
       
  4566         {
       
  4567             identifier_c param_name("IN");
       
  4568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4570             
       
  4571             /* Get the value from a foo(<param_value>) style call */
       
  4572             if (IN_param_value == NULL)
       
  4573               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4576             
       
  4577             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4578             {
       
  4579         
       
  4580                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4581                 return return_type_symbol;
       
  4582                 
       
  4583             }
       
  4584             
       
  4585             ERROR;
       
  4586         }
       
  4587         
       
  4588     }/*function_uint_to_sint*/
       
  4589     break;
       
  4590 
       
  4591 /****
       
  4592  *UINT_TO_INT
       
  4593  */
       
  4594     case function_uint_to_int :
       
  4595     {
       
  4596         symbol_c *last_type_symbol = NULL;
       
  4597 
       
  4598         {
       
  4599             identifier_c param_name("IN");
       
  4600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4602             
       
  4603             /* Get the value from a foo(<param_value>) style call */
       
  4604             if (IN_param_value == NULL)
       
  4605               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4608             
       
  4609             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4610             {
       
  4611         
       
  4612                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4613                 return return_type_symbol;
       
  4614                 
       
  4615             }
       
  4616             
       
  4617             ERROR;
       
  4618         }
       
  4619         
       
  4620     }/*function_uint_to_int*/
       
  4621     break;
       
  4622 
       
  4623 /****
       
  4624  *UINT_TO_DINT
       
  4625  */
       
  4626     case function_uint_to_dint :
       
  4627     {
       
  4628         symbol_c *last_type_symbol = NULL;
       
  4629 
       
  4630         {
       
  4631             identifier_c param_name("IN");
       
  4632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4634             
       
  4635             /* Get the value from a foo(<param_value>) style call */
       
  4636             if (IN_param_value == NULL)
       
  4637               IN_param_value = function_call_param_iterator.next();
       
  4638             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 ;
       
  4640             
       
  4641             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4642             {
       
  4643         
       
  4644                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4645                 return return_type_symbol;
       
  4646                 
       
  4647             }
       
  4648             
       
  4649             ERROR;
       
  4650         }
       
  4651         
       
  4652     }/*function_uint_to_dint*/
       
  4653     break;
       
  4654 
       
  4655 /****
       
  4656  *UINT_TO_LINT
       
  4657  */
       
  4658     case function_uint_to_lint :
       
  4659     {
       
  4660         symbol_c *last_type_symbol = NULL;
       
  4661 
       
  4662         {
       
  4663             identifier_c param_name("IN");
       
  4664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4666             
       
  4667             /* Get the value from a foo(<param_value>) style call */
       
  4668             if (IN_param_value == NULL)
       
  4669               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4672             
       
  4673             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4674             {
       
  4675         
       
  4676                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4677                 return return_type_symbol;
       
  4678                 
       
  4679             }
       
  4680             
       
  4681             ERROR;
       
  4682         }
       
  4683         
       
  4684     }/*function_uint_to_lint*/
       
  4685     break;
       
  4686 
       
  4687 /****
       
  4688  *UINT_TO_USINT
       
  4689  */
       
  4690     case function_uint_to_usint :
       
  4691     {
       
  4692         symbol_c *last_type_symbol = NULL;
       
  4693 
       
  4694         {
       
  4695             identifier_c param_name("IN");
       
  4696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4698             
       
  4699             /* Get the value from a foo(<param_value>) style call */
       
  4700             if (IN_param_value == NULL)
       
  4701               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4704             
       
  4705             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4706             {
       
  4707         
       
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4709                 return return_type_symbol;
       
  4710                 
       
  4711             }
       
  4712             
       
  4713             ERROR;
       
  4714         }
       
  4715         
       
  4716     }/*function_uint_to_usint*/
       
  4717     break;
       
  4718 
       
  4719 /****
       
  4720  *UINT_TO_UDINT
       
  4721  */
       
  4722     case function_uint_to_udint :
       
  4723     {
       
  4724         symbol_c *last_type_symbol = NULL;
       
  4725 
       
  4726         {
       
  4727             identifier_c param_name("IN");
       
  4728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4730             
       
  4731             /* Get the value from a foo(<param_value>) style call */
       
  4732             if (IN_param_value == NULL)
       
  4733               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4736             
       
  4737             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4738             {
       
  4739         
       
  4740                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4741                 return return_type_symbol;
       
  4742                 
       
  4743             }
       
  4744             
       
  4745             ERROR;
       
  4746         }
       
  4747         
       
  4748     }/*function_uint_to_udint*/
       
  4749     break;
       
  4750 
       
  4751 /****
       
  4752  *UINT_TO_ULINT
       
  4753  */
       
  4754     case function_uint_to_ulint :
       
  4755     {
       
  4756         symbol_c *last_type_symbol = NULL;
       
  4757 
       
  4758         {
       
  4759             identifier_c param_name("IN");
       
  4760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4762             
       
  4763             /* Get the value from a foo(<param_value>) style call */
       
  4764             if (IN_param_value == NULL)
       
  4765               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4768             
       
  4769             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4770             {
       
  4771         
       
  4772                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4773                 return return_type_symbol;
       
  4774                 
       
  4775             }
       
  4776             
       
  4777             ERROR;
       
  4778         }
       
  4779         
       
  4780     }/*function_uint_to_ulint*/
       
  4781     break;
       
  4782 
       
  4783 /****
       
  4784  *UINT_TO_TIME
       
  4785  */
       
  4786     case function_uint_to_time :
       
  4787     {
       
  4788         symbol_c *last_type_symbol = NULL;
       
  4789 
       
  4790         {
       
  4791             identifier_c param_name("IN");
       
  4792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4794             
       
  4795             /* Get the value from a foo(<param_value>) style call */
       
  4796             if (IN_param_value == NULL)
       
  4797               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4800             
       
  4801             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4802             {
       
  4803         
       
  4804                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4805                 return return_type_symbol;
       
  4806                 
       
  4807             }
       
  4808             
       
  4809             ERROR;
       
  4810         }
       
  4811         
       
  4812     }/*function_uint_to_time*/
       
  4813     break;
       
  4814 
       
  4815 /****
       
  4816  *UINT_TO_BOOL
       
  4817  */
       
  4818     case function_uint_to_bool :
       
  4819     {
       
  4820         symbol_c *last_type_symbol = NULL;
       
  4821 
       
  4822         {
       
  4823             identifier_c param_name("IN");
       
  4824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4826             
       
  4827             /* Get the value from a foo(<param_value>) style call */
       
  4828             if (IN_param_value == NULL)
       
  4829               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4832             
       
  4833             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4834             {
       
  4835         
       
  4836                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4837                 return return_type_symbol;
       
  4838                 
       
  4839             }
       
  4840             
       
  4841             ERROR;
       
  4842         }
       
  4843         
       
  4844     }/*function_uint_to_bool*/
       
  4845     break;
       
  4846 
       
  4847 /****
       
  4848  *UINT_TO_BYTE
       
  4849  */
       
  4850     case function_uint_to_byte :
       
  4851     {
       
  4852         symbol_c *last_type_symbol = NULL;
       
  4853 
       
  4854         {
       
  4855             identifier_c param_name("IN");
       
  4856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4858             
       
  4859             /* Get the value from a foo(<param_value>) style call */
       
  4860             if (IN_param_value == NULL)
       
  4861               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4864             
       
  4865             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4866             {
       
  4867         
       
  4868                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4869                 return return_type_symbol;
       
  4870                 
       
  4871             }
       
  4872             
       
  4873             ERROR;
       
  4874         }
       
  4875         
       
  4876     }/*function_uint_to_byte*/
       
  4877     break;
       
  4878 
       
  4879 /****
       
  4880  *UINT_TO_WORD
       
  4881  */
       
  4882     case function_uint_to_word :
       
  4883     {
       
  4884         symbol_c *last_type_symbol = NULL;
       
  4885 
       
  4886         {
       
  4887             identifier_c param_name("IN");
       
  4888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4890             
       
  4891             /* Get the value from a foo(<param_value>) style call */
       
  4892             if (IN_param_value == NULL)
       
  4893               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4896             
       
  4897             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4898             {
       
  4899         
       
  4900                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4901                 return return_type_symbol;
       
  4902                 
       
  4903             }
       
  4904             
       
  4905             ERROR;
       
  4906         }
       
  4907         
       
  4908     }/*function_uint_to_word*/
       
  4909     break;
       
  4910 
       
  4911 /****
       
  4912  *UINT_TO_DWORD
       
  4913  */
       
  4914     case function_uint_to_dword :
       
  4915     {
       
  4916         symbol_c *last_type_symbol = NULL;
       
  4917 
       
  4918         {
       
  4919             identifier_c param_name("IN");
       
  4920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4922             
       
  4923             /* Get the value from a foo(<param_value>) style call */
       
  4924             if (IN_param_value == NULL)
       
  4925               IN_param_value = function_call_param_iterator.next();
       
  4926             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 ;
       
  4928             
       
  4929             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4930             {
       
  4931         
       
  4932                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4933                 return return_type_symbol;
       
  4934                 
       
  4935             }
       
  4936             
       
  4937             ERROR;
       
  4938         }
       
  4939         
       
  4940     }/*function_uint_to_dword*/
       
  4941     break;
       
  4942 
       
  4943 /****
       
  4944  *UINT_TO_LWORD
       
  4945  */
       
  4946     case function_uint_to_lword :
       
  4947     {
       
  4948         symbol_c *last_type_symbol = NULL;
       
  4949 
       
  4950         {
       
  4951             identifier_c param_name("IN");
       
  4952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4954             
       
  4955             /* Get the value from a foo(<param_value>) style call */
       
  4956             if (IN_param_value == NULL)
       
  4957               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4960             
       
  4961             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4962             {
       
  4963         
       
  4964                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4965                 return return_type_symbol;
       
  4966                 
       
  4967             }
       
  4968             
       
  4969             ERROR;
       
  4970         }
       
  4971         
       
  4972     }/*function_uint_to_lword*/
       
  4973     break;
       
  4974 
       
  4975 /****
       
  4976  *UINT_TO_STRING
       
  4977  */
       
  4978     case function_uint_to_string :
       
  4979     {
       
  4980         symbol_c *last_type_symbol = NULL;
       
  4981 
       
  4982         {
       
  4983             identifier_c param_name("IN");
       
  4984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4986             
       
  4987             /* Get the value from a foo(<param_value>) style call */
       
  4988             if (IN_param_value == NULL)
       
  4989               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4992             
       
  4993             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4994             {
       
  4995         
       
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4997                 return return_type_symbol;
       
  4998                 
       
  4999             }
       
  5000             
       
  5001             ERROR;
       
  5002         }
       
  5003         
       
  5004     }/*function_uint_to_string*/
       
  5005     break;
       
  5006 
       
  5007 /****
       
  5008  *UINT_TO_WSTRING
       
  5009  */
       
  5010     case function_uint_to_wstring :
       
  5011     {
       
  5012         symbol_c *last_type_symbol = NULL;
       
  5013 
       
  5014         {
       
  5015             identifier_c param_name("IN");
       
  5016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5018             
       
  5019             /* Get the value from a foo(<param_value>) style call */
       
  5020             if (IN_param_value == NULL)
       
  5021               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5024             
       
  5025             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5026             {
       
  5027         
       
  5028                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5029                 return return_type_symbol;
       
  5030                 
       
  5031             }
       
  5032             
       
  5033             ERROR;
       
  5034         }
       
  5035         
       
  5036     }/*function_uint_to_wstring*/
       
  5037     break;
       
  5038 
       
  5039 /****
       
  5040  *UINT_TO_DATE
       
  5041  */
       
  5042     case function_uint_to_date :
       
  5043     {
       
  5044         symbol_c *last_type_symbol = NULL;
       
  5045 
       
  5046         {
       
  5047             identifier_c param_name("IN");
       
  5048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5050             
       
  5051             /* Get the value from a foo(<param_value>) style call */
       
  5052             if (IN_param_value == NULL)
       
  5053               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5056             
       
  5057             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5058             {
       
  5059         
       
  5060                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5061                 return return_type_symbol;
       
  5062                 
       
  5063             }
       
  5064             
       
  5065             ERROR;
       
  5066         }
       
  5067         
       
  5068     }/*function_uint_to_date*/
       
  5069     break;
       
  5070 
       
  5071 /****
       
  5072  *UINT_TO_TOD
       
  5073  */
       
  5074     case function_uint_to_tod :
       
  5075     {
       
  5076         symbol_c *last_type_symbol = NULL;
       
  5077 
       
  5078         {
       
  5079             identifier_c param_name("IN");
       
  5080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5082             
       
  5083             /* Get the value from a foo(<param_value>) style call */
       
  5084             if (IN_param_value == NULL)
       
  5085               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5088             
       
  5089             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5090             {
       
  5091         
       
  5092                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5093                 return return_type_symbol;
       
  5094                 
       
  5095             }
       
  5096             
       
  5097             ERROR;
       
  5098         }
       
  5099         
       
  5100     }/*function_uint_to_tod*/
       
  5101     break;
       
  5102 
       
  5103 /****
       
  5104  *UINT_TO_DT
       
  5105  */
       
  5106     case function_uint_to_dt :
       
  5107     {
       
  5108         symbol_c *last_type_symbol = NULL;
       
  5109 
       
  5110         {
       
  5111             identifier_c param_name("IN");
       
  5112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5114             
       
  5115             /* Get the value from a foo(<param_value>) style call */
       
  5116             if (IN_param_value == NULL)
       
  5117               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5120             
       
  5121             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5122             {
       
  5123         
       
  5124                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5125                 return return_type_symbol;
       
  5126                 
       
  5127             }
       
  5128             
       
  5129             ERROR;
       
  5130         }
       
  5131         
       
  5132     }/*function_uint_to_dt*/
       
  5133     break;
       
  5134 
       
  5135 /****
       
  5136  *UDINT_TO_REAL
       
  5137  */
       
  5138     case function_udint_to_real :
       
  5139     {
       
  5140         symbol_c *last_type_symbol = NULL;
       
  5141 
       
  5142         {
       
  5143             identifier_c param_name("IN");
       
  5144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5146             
       
  5147             /* Get the value from a foo(<param_value>) style call */
       
  5148             if (IN_param_value == NULL)
       
  5149               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5152             
       
  5153             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5154             {
       
  5155         
       
  5156                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5157                 return return_type_symbol;
       
  5158                 
       
  5159             }
       
  5160             
       
  5161             ERROR;
       
  5162         }
       
  5163         
       
  5164     }/*function_udint_to_real*/
       
  5165     break;
       
  5166 
       
  5167 /****
       
  5168  *UDINT_TO_LREAL
       
  5169  */
       
  5170     case function_udint_to_lreal :
       
  5171     {
       
  5172         symbol_c *last_type_symbol = NULL;
       
  5173 
       
  5174         {
       
  5175             identifier_c param_name("IN");
       
  5176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5178             
       
  5179             /* Get the value from a foo(<param_value>) style call */
       
  5180             if (IN_param_value == NULL)
       
  5181               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5184             
       
  5185             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5186             {
       
  5187         
       
  5188                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5189                 return return_type_symbol;
       
  5190                 
       
  5191             }
       
  5192             
       
  5193             ERROR;
       
  5194         }
       
  5195         
       
  5196     }/*function_udint_to_lreal*/
       
  5197     break;
       
  5198 
       
  5199 /****
       
  5200  *UDINT_TO_SINT
       
  5201  */
       
  5202     case function_udint_to_sint :
       
  5203     {
       
  5204         symbol_c *last_type_symbol = NULL;
       
  5205 
       
  5206         {
       
  5207             identifier_c param_name("IN");
       
  5208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5210             
       
  5211             /* Get the value from a foo(<param_value>) style call */
       
  5212             if (IN_param_value == NULL)
       
  5213               IN_param_value = function_call_param_iterator.next();
       
  5214             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 ;
       
  5216             
       
  5217             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5218             {
       
  5219         
       
  5220                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5221                 return return_type_symbol;
       
  5222                 
       
  5223             }
       
  5224             
       
  5225             ERROR;
       
  5226         }
       
  5227         
       
  5228     }/*function_udint_to_sint*/
       
  5229     break;
       
  5230 
       
  5231 /****
       
  5232  *UDINT_TO_INT
       
  5233  */
       
  5234     case function_udint_to_int :
       
  5235     {
       
  5236         symbol_c *last_type_symbol = NULL;
       
  5237 
       
  5238         {
       
  5239             identifier_c param_name("IN");
       
  5240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5242             
       
  5243             /* Get the value from a foo(<param_value>) style call */
       
  5244             if (IN_param_value == NULL)
       
  5245               IN_param_value = function_call_param_iterator.next();
       
  5246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5248             
       
  5249             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5250             {
       
  5251         
       
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5253                 return return_type_symbol;
       
  5254                 
       
  5255             }
       
  5256             
       
  5257             ERROR;
       
  5258         }
       
  5259         
       
  5260     }/*function_udint_to_int*/
       
  5261     break;
       
  5262 
       
  5263 /****
       
  5264  *UDINT_TO_DINT
       
  5265  */
       
  5266     case function_udint_to_dint :
       
  5267     {
       
  5268         symbol_c *last_type_symbol = NULL;
       
  5269 
       
  5270         {
       
  5271             identifier_c param_name("IN");
       
  5272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5274             
       
  5275             /* Get the value from a foo(<param_value>) style call */
       
  5276             if (IN_param_value == NULL)
       
  5277               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5280             
       
  5281             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5282             {
       
  5283         
       
  5284                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5285                 return return_type_symbol;
       
  5286                 
       
  5287             }
       
  5288             
       
  5289             ERROR;
       
  5290         }
       
  5291         
       
  5292     }/*function_udint_to_dint*/
       
  5293     break;
       
  5294 
       
  5295 /****
       
  5296  *UDINT_TO_LINT
       
  5297  */
       
  5298     case function_udint_to_lint :
       
  5299     {
       
  5300         symbol_c *last_type_symbol = NULL;
       
  5301 
       
  5302         {
       
  5303             identifier_c param_name("IN");
       
  5304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5306             
       
  5307             /* Get the value from a foo(<param_value>) style call */
       
  5308             if (IN_param_value == NULL)
       
  5309               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5312             
       
  5313             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5314             {
       
  5315         
       
  5316                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5317                 return return_type_symbol;
       
  5318                 
       
  5319             }
       
  5320             
       
  5321             ERROR;
       
  5322         }
       
  5323         
       
  5324     }/*function_udint_to_lint*/
       
  5325     break;
       
  5326 
       
  5327 /****
       
  5328  *UDINT_TO_USINT
       
  5329  */
       
  5330     case function_udint_to_usint :
       
  5331     {
       
  5332         symbol_c *last_type_symbol = NULL;
       
  5333 
       
  5334         {
       
  5335             identifier_c param_name("IN");
       
  5336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5338             
       
  5339             /* Get the value from a foo(<param_value>) style call */
       
  5340             if (IN_param_value == NULL)
       
  5341               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5344             
       
  5345             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5346             {
       
  5347         
       
  5348                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5349                 return return_type_symbol;
       
  5350                 
       
  5351             }
       
  5352             
       
  5353             ERROR;
       
  5354         }
       
  5355         
       
  5356     }/*function_udint_to_usint*/
       
  5357     break;
       
  5358 
       
  5359 /****
       
  5360  *UDINT_TO_UINT
       
  5361  */
       
  5362     case function_udint_to_uint :
       
  5363     {
       
  5364         symbol_c *last_type_symbol = NULL;
       
  5365 
       
  5366         {
       
  5367             identifier_c param_name("IN");
       
  5368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5370             
       
  5371             /* Get the value from a foo(<param_value>) style call */
       
  5372             if (IN_param_value == NULL)
       
  5373               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5376             
       
  5377             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5378             {
       
  5379         
       
  5380                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5381                 return return_type_symbol;
       
  5382                 
       
  5383             }
       
  5384             
       
  5385             ERROR;
       
  5386         }
       
  5387         
       
  5388     }/*function_udint_to_uint*/
       
  5389     break;
       
  5390 
       
  5391 /****
       
  5392  *UDINT_TO_ULINT
       
  5393  */
       
  5394     case function_udint_to_ulint :
       
  5395     {
       
  5396         symbol_c *last_type_symbol = NULL;
       
  5397 
       
  5398         {
       
  5399             identifier_c param_name("IN");
       
  5400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5402             
       
  5403             /* Get the value from a foo(<param_value>) style call */
       
  5404             if (IN_param_value == NULL)
       
  5405               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5408             
       
  5409             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5410             {
       
  5411         
       
  5412                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5413                 return return_type_symbol;
       
  5414                 
       
  5415             }
       
  5416             
       
  5417             ERROR;
       
  5418         }
       
  5419         
       
  5420     }/*function_udint_to_ulint*/
       
  5421     break;
       
  5422 
       
  5423 /****
       
  5424  *UDINT_TO_TIME
       
  5425  */
       
  5426     case function_udint_to_time :
       
  5427     {
       
  5428         symbol_c *last_type_symbol = NULL;
       
  5429 
       
  5430         {
       
  5431             identifier_c param_name("IN");
       
  5432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5434             
       
  5435             /* Get the value from a foo(<param_value>) style call */
       
  5436             if (IN_param_value == NULL)
       
  5437               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5440             
       
  5441             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5442             {
       
  5443         
       
  5444                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5445                 return return_type_symbol;
       
  5446                 
       
  5447             }
       
  5448             
       
  5449             ERROR;
       
  5450         }
       
  5451         
       
  5452     }/*function_udint_to_time*/
       
  5453     break;
       
  5454 
       
  5455 /****
       
  5456  *UDINT_TO_BOOL
       
  5457  */
       
  5458     case function_udint_to_bool :
       
  5459     {
       
  5460         symbol_c *last_type_symbol = NULL;
       
  5461 
       
  5462         {
       
  5463             identifier_c param_name("IN");
       
  5464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5466             
       
  5467             /* Get the value from a foo(<param_value>) style call */
       
  5468             if (IN_param_value == NULL)
       
  5469               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5472             
       
  5473             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5474             {
       
  5475         
       
  5476                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5477                 return return_type_symbol;
       
  5478                 
       
  5479             }
       
  5480             
       
  5481             ERROR;
       
  5482         }
       
  5483         
       
  5484     }/*function_udint_to_bool*/
       
  5485     break;
       
  5486 
       
  5487 /****
       
  5488  *UDINT_TO_BYTE
       
  5489  */
       
  5490     case function_udint_to_byte :
       
  5491     {
       
  5492         symbol_c *last_type_symbol = NULL;
       
  5493 
       
  5494         {
       
  5495             identifier_c param_name("IN");
       
  5496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5498             
       
  5499             /* Get the value from a foo(<param_value>) style call */
       
  5500             if (IN_param_value == NULL)
       
  5501               IN_param_value = function_call_param_iterator.next();
       
  5502             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 ;
       
  5504             
       
  5505             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5506             {
       
  5507         
       
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5509                 return return_type_symbol;
       
  5510                 
       
  5511             }
       
  5512             
       
  5513             ERROR;
       
  5514         }
       
  5515         
       
  5516     }/*function_udint_to_byte*/
       
  5517     break;
       
  5518 
       
  5519 /****
       
  5520  *UDINT_TO_WORD
       
  5521  */
       
  5522     case function_udint_to_word :
       
  5523     {
       
  5524         symbol_c *last_type_symbol = NULL;
       
  5525 
       
  5526         {
       
  5527             identifier_c param_name("IN");
       
  5528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5530             
       
  5531             /* Get the value from a foo(<param_value>) style call */
       
  5532             if (IN_param_value == NULL)
       
  5533               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5536             
       
  5537             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5538             {
       
  5539         
       
  5540                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5541                 return return_type_symbol;
       
  5542                 
       
  5543             }
       
  5544             
       
  5545             ERROR;
       
  5546         }
       
  5547         
       
  5548     }/*function_udint_to_word*/
       
  5549     break;
       
  5550 
       
  5551 /****
       
  5552  *UDINT_TO_DWORD
       
  5553  */
       
  5554     case function_udint_to_dword :
       
  5555     {
       
  5556         symbol_c *last_type_symbol = NULL;
       
  5557 
       
  5558         {
       
  5559             identifier_c param_name("IN");
       
  5560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5562             
       
  5563             /* Get the value from a foo(<param_value>) style call */
       
  5564             if (IN_param_value == NULL)
       
  5565               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5568             
       
  5569             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5570             {
       
  5571         
       
  5572                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5573                 return return_type_symbol;
       
  5574                 
       
  5575             }
       
  5576             
       
  5577             ERROR;
       
  5578         }
       
  5579         
       
  5580     }/*function_udint_to_dword*/
       
  5581     break;
       
  5582 
       
  5583 /****
       
  5584  *UDINT_TO_LWORD
       
  5585  */
       
  5586     case function_udint_to_lword :
       
  5587     {
       
  5588         symbol_c *last_type_symbol = NULL;
       
  5589 
       
  5590         {
       
  5591             identifier_c param_name("IN");
       
  5592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5594             
       
  5595             /* Get the value from a foo(<param_value>) style call */
       
  5596             if (IN_param_value == NULL)
       
  5597               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5600             
       
  5601             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5602             {
       
  5603         
       
  5604                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5605                 return return_type_symbol;
       
  5606                 
       
  5607             }
       
  5608             
       
  5609             ERROR;
       
  5610         }
       
  5611         
       
  5612     }/*function_udint_to_lword*/
       
  5613     break;
       
  5614 
       
  5615 /****
       
  5616  *UDINT_TO_STRING
       
  5617  */
       
  5618     case function_udint_to_string :
       
  5619     {
       
  5620         symbol_c *last_type_symbol = NULL;
       
  5621 
       
  5622         {
       
  5623             identifier_c param_name("IN");
       
  5624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5626             
       
  5627             /* Get the value from a foo(<param_value>) style call */
       
  5628             if (IN_param_value == NULL)
       
  5629               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5632             
       
  5633             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5634             {
       
  5635         
       
  5636                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5637                 return return_type_symbol;
       
  5638                 
       
  5639             }
       
  5640             
       
  5641             ERROR;
       
  5642         }
       
  5643         
       
  5644     }/*function_udint_to_string*/
       
  5645     break;
       
  5646 
       
  5647 /****
       
  5648  *UDINT_TO_WSTRING
       
  5649  */
       
  5650     case function_udint_to_wstring :
       
  5651     {
       
  5652         symbol_c *last_type_symbol = NULL;
       
  5653 
       
  5654         {
       
  5655             identifier_c param_name("IN");
       
  5656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5658             
       
  5659             /* Get the value from a foo(<param_value>) style call */
       
  5660             if (IN_param_value == NULL)
       
  5661               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5664             
       
  5665             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5666             {
       
  5667         
       
  5668                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5669                 return return_type_symbol;
       
  5670                 
       
  5671             }
       
  5672             
       
  5673             ERROR;
       
  5674         }
       
  5675         
       
  5676     }/*function_udint_to_wstring*/
       
  5677     break;
       
  5678 
       
  5679 /****
       
  5680  *UDINT_TO_DATE
       
  5681  */
       
  5682     case function_udint_to_date :
       
  5683     {
       
  5684         symbol_c *last_type_symbol = NULL;
       
  5685 
       
  5686         {
       
  5687             identifier_c param_name("IN");
       
  5688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5690             
       
  5691             /* Get the value from a foo(<param_value>) style call */
       
  5692             if (IN_param_value == NULL)
       
  5693               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5696             
       
  5697             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5698             {
       
  5699         
       
  5700                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5701                 return return_type_symbol;
       
  5702                 
       
  5703             }
       
  5704             
       
  5705             ERROR;
       
  5706         }
       
  5707         
       
  5708     }/*function_udint_to_date*/
       
  5709     break;
       
  5710 
       
  5711 /****
       
  5712  *UDINT_TO_TOD
       
  5713  */
       
  5714     case function_udint_to_tod :
       
  5715     {
       
  5716         symbol_c *last_type_symbol = NULL;
       
  5717 
       
  5718         {
       
  5719             identifier_c param_name("IN");
       
  5720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5722             
       
  5723             /* Get the value from a foo(<param_value>) style call */
       
  5724             if (IN_param_value == NULL)
       
  5725               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5728             
       
  5729             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5730             {
       
  5731         
       
  5732                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5733                 return return_type_symbol;
       
  5734                 
       
  5735             }
       
  5736             
       
  5737             ERROR;
       
  5738         }
       
  5739         
       
  5740     }/*function_udint_to_tod*/
       
  5741     break;
       
  5742 
       
  5743 /****
       
  5744  *UDINT_TO_DT
       
  5745  */
       
  5746     case function_udint_to_dt :
       
  5747     {
       
  5748         symbol_c *last_type_symbol = NULL;
       
  5749 
       
  5750         {
       
  5751             identifier_c param_name("IN");
       
  5752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5754             
       
  5755             /* Get the value from a foo(<param_value>) style call */
       
  5756             if (IN_param_value == NULL)
       
  5757               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5760             
       
  5761             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5762             {
       
  5763         
       
  5764                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5765                 return return_type_symbol;
       
  5766                 
       
  5767             }
       
  5768             
       
  5769             ERROR;
       
  5770         }
       
  5771         
       
  5772     }/*function_udint_to_dt*/
       
  5773     break;
       
  5774 
       
  5775 /****
       
  5776  *ULINT_TO_REAL
       
  5777  */
       
  5778     case function_ulint_to_real :
       
  5779     {
       
  5780         symbol_c *last_type_symbol = NULL;
       
  5781 
       
  5782         {
       
  5783             identifier_c param_name("IN");
       
  5784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5786             
       
  5787             /* Get the value from a foo(<param_value>) style call */
       
  5788             if (IN_param_value == NULL)
       
  5789               IN_param_value = function_call_param_iterator.next();
       
  5790             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 ;
       
  5792             
       
  5793             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5794             {
       
  5795         
       
  5796                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5797                 return return_type_symbol;
       
  5798                 
       
  5799             }
       
  5800             
       
  5801             ERROR;
       
  5802         }
       
  5803         
       
  5804     }/*function_ulint_to_real*/
       
  5805     break;
       
  5806 
       
  5807 /****
       
  5808  *ULINT_TO_LREAL
       
  5809  */
       
  5810     case function_ulint_to_lreal :
       
  5811     {
       
  5812         symbol_c *last_type_symbol = NULL;
       
  5813 
       
  5814         {
       
  5815             identifier_c param_name("IN");
       
  5816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5818             
       
  5819             /* Get the value from a foo(<param_value>) style call */
       
  5820             if (IN_param_value == NULL)
       
  5821               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5824             
       
  5825             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5826             {
       
  5827         
       
  5828                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5829                 return return_type_symbol;
       
  5830                 
       
  5831             }
       
  5832             
       
  5833             ERROR;
       
  5834         }
       
  5835         
       
  5836     }/*function_ulint_to_lreal*/
       
  5837     break;
       
  5838 
       
  5839 /****
       
  5840  *ULINT_TO_SINT
       
  5841  */
       
  5842     case function_ulint_to_sint :
       
  5843     {
       
  5844         symbol_c *last_type_symbol = NULL;
       
  5845 
       
  5846         {
       
  5847             identifier_c param_name("IN");
       
  5848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5850             
       
  5851             /* Get the value from a foo(<param_value>) style call */
       
  5852             if (IN_param_value == NULL)
       
  5853               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5856             
       
  5857             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5858             {
       
  5859         
       
  5860                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5861                 return return_type_symbol;
       
  5862                 
       
  5863             }
       
  5864             
       
  5865             ERROR;
       
  5866         }
       
  5867         
       
  5868     }/*function_ulint_to_sint*/
       
  5869     break;
       
  5870 
       
  5871 /****
       
  5872  *ULINT_TO_INT
       
  5873  */
       
  5874     case function_ulint_to_int :
       
  5875     {
       
  5876         symbol_c *last_type_symbol = NULL;
       
  5877 
       
  5878         {
       
  5879             identifier_c param_name("IN");
       
  5880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5882             
       
  5883             /* Get the value from a foo(<param_value>) style call */
       
  5884             if (IN_param_value == NULL)
       
  5885               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5888             
       
  5889             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5890             {
       
  5891         
       
  5892                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5893                 return return_type_symbol;
       
  5894                 
       
  5895             }
       
  5896             
       
  5897             ERROR;
       
  5898         }
       
  5899         
       
  5900     }/*function_ulint_to_int*/
       
  5901     break;
       
  5902 
       
  5903 /****
       
  5904  *ULINT_TO_DINT
       
  5905  */
       
  5906     case function_ulint_to_dint :
       
  5907     {
       
  5908         symbol_c *last_type_symbol = NULL;
       
  5909 
       
  5910         {
       
  5911             identifier_c param_name("IN");
       
  5912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5914             
       
  5915             /* Get the value from a foo(<param_value>) style call */
       
  5916             if (IN_param_value == NULL)
       
  5917               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5920             
       
  5921             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5922             {
       
  5923         
       
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5925                 return return_type_symbol;
       
  5926                 
       
  5927             }
       
  5928             
       
  5929             ERROR;
       
  5930         }
       
  5931         
       
  5932     }/*function_ulint_to_dint*/
       
  5933     break;
       
  5934 
       
  5935 /****
       
  5936  *ULINT_TO_LINT
       
  5937  */
       
  5938     case function_ulint_to_lint :
       
  5939     {
       
  5940         symbol_c *last_type_symbol = NULL;
       
  5941 
       
  5942         {
       
  5943             identifier_c param_name("IN");
       
  5944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5946             
       
  5947             /* Get the value from a foo(<param_value>) style call */
       
  5948             if (IN_param_value == NULL)
       
  5949               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5952             
       
  5953             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5954             {
       
  5955         
       
  5956                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5957                 return return_type_symbol;
       
  5958                 
       
  5959             }
       
  5960             
       
  5961             ERROR;
       
  5962         }
       
  5963         
       
  5964     }/*function_ulint_to_lint*/
       
  5965     break;
       
  5966 
       
  5967 /****
       
  5968  *ULINT_TO_USINT
       
  5969  */
       
  5970     case function_ulint_to_usint :
       
  5971     {
       
  5972         symbol_c *last_type_symbol = NULL;
       
  5973 
       
  5974         {
       
  5975             identifier_c param_name("IN");
       
  5976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5978             
       
  5979             /* Get the value from a foo(<param_value>) style call */
       
  5980             if (IN_param_value == NULL)
       
  5981               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5984             
       
  5985             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5986             {
       
  5987         
       
  5988                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5989                 return return_type_symbol;
       
  5990                 
       
  5991             }
       
  5992             
       
  5993             ERROR;
       
  5994         }
       
  5995         
       
  5996     }/*function_ulint_to_usint*/
       
  5997     break;
       
  5998 
       
  5999 /****
       
  6000  *ULINT_TO_UINT
       
  6001  */
       
  6002     case function_ulint_to_uint :
       
  6003     {
       
  6004         symbol_c *last_type_symbol = NULL;
       
  6005 
       
  6006         {
       
  6007             identifier_c param_name("IN");
       
  6008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6010             
       
  6011             /* Get the value from a foo(<param_value>) style call */
       
  6012             if (IN_param_value == NULL)
       
  6013               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6016             
       
  6017             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6018             {
       
  6019         
       
  6020                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6021                 return return_type_symbol;
       
  6022                 
       
  6023             }
       
  6024             
       
  6025             ERROR;
       
  6026         }
       
  6027         
       
  6028     }/*function_ulint_to_uint*/
       
  6029     break;
       
  6030 
       
  6031 /****
       
  6032  *ULINT_TO_UDINT
       
  6033  */
       
  6034     case function_ulint_to_udint :
       
  6035     {
       
  6036         symbol_c *last_type_symbol = NULL;
       
  6037 
       
  6038         {
       
  6039             identifier_c param_name("IN");
       
  6040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6042             
       
  6043             /* Get the value from a foo(<param_value>) style call */
       
  6044             if (IN_param_value == NULL)
       
  6045               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6048             
       
  6049             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6050             {
       
  6051         
       
  6052                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6053                 return return_type_symbol;
       
  6054                 
       
  6055             }
       
  6056             
       
  6057             ERROR;
       
  6058         }
       
  6059         
       
  6060     }/*function_ulint_to_udint*/
       
  6061     break;
       
  6062 
       
  6063 /****
       
  6064  *ULINT_TO_TIME
       
  6065  */
       
  6066     case function_ulint_to_time :
       
  6067     {
       
  6068         symbol_c *last_type_symbol = NULL;
       
  6069 
       
  6070         {
       
  6071             identifier_c param_name("IN");
       
  6072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6074             
       
  6075             /* Get the value from a foo(<param_value>) style call */
       
  6076             if (IN_param_value == NULL)
       
  6077               IN_param_value = function_call_param_iterator.next();
       
  6078             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 ;
       
  6080             
       
  6081             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6082             {
       
  6083         
       
  6084                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6085                 return return_type_symbol;
       
  6086                 
       
  6087             }
       
  6088             
       
  6089             ERROR;
       
  6090         }
       
  6091         
       
  6092     }/*function_ulint_to_time*/
       
  6093     break;
       
  6094 
       
  6095 /****
       
  6096  *ULINT_TO_BOOL
       
  6097  */
       
  6098     case function_ulint_to_bool :
       
  6099     {
       
  6100         symbol_c *last_type_symbol = NULL;
       
  6101 
       
  6102         {
       
  6103             identifier_c param_name("IN");
       
  6104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6106             
       
  6107             /* Get the value from a foo(<param_value>) style call */
       
  6108             if (IN_param_value == NULL)
       
  6109               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6112             
       
  6113             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6114             {
       
  6115         
       
  6116                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6117                 return return_type_symbol;
       
  6118                 
       
  6119             }
       
  6120             
       
  6121             ERROR;
       
  6122         }
       
  6123         
       
  6124     }/*function_ulint_to_bool*/
       
  6125     break;
       
  6126 
       
  6127 /****
       
  6128  *ULINT_TO_BYTE
       
  6129  */
       
  6130     case function_ulint_to_byte :
       
  6131     {
       
  6132         symbol_c *last_type_symbol = NULL;
       
  6133 
       
  6134         {
       
  6135             identifier_c param_name("IN");
       
  6136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6138             
       
  6139             /* Get the value from a foo(<param_value>) style call */
       
  6140             if (IN_param_value == NULL)
       
  6141               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6144             
       
  6145             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6146             {
       
  6147         
       
  6148                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6149                 return return_type_symbol;
       
  6150                 
       
  6151             }
       
  6152             
       
  6153             ERROR;
       
  6154         }
       
  6155         
       
  6156     }/*function_ulint_to_byte*/
       
  6157     break;
       
  6158 
       
  6159 /****
       
  6160  *ULINT_TO_WORD
       
  6161  */
       
  6162     case function_ulint_to_word :
       
  6163     {
       
  6164         symbol_c *last_type_symbol = NULL;
       
  6165 
       
  6166         {
       
  6167             identifier_c param_name("IN");
       
  6168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6170             
       
  6171             /* Get the value from a foo(<param_value>) style call */
       
  6172             if (IN_param_value == NULL)
       
  6173               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6176             
       
  6177             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6178             {
       
  6179         
       
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6181                 return return_type_symbol;
       
  6182                 
       
  6183             }
       
  6184             
       
  6185             ERROR;
       
  6186         }
       
  6187         
       
  6188     }/*function_ulint_to_word*/
       
  6189     break;
       
  6190 
       
  6191 /****
       
  6192  *ULINT_TO_DWORD
       
  6193  */
       
  6194     case function_ulint_to_dword :
       
  6195     {
       
  6196         symbol_c *last_type_symbol = NULL;
       
  6197 
       
  6198         {
       
  6199             identifier_c param_name("IN");
       
  6200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6202             
       
  6203             /* Get the value from a foo(<param_value>) style call */
       
  6204             if (IN_param_value == NULL)
       
  6205               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6208             
       
  6209             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6210             {
       
  6211         
       
  6212                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6213                 return return_type_symbol;
       
  6214                 
       
  6215             }
       
  6216             
       
  6217             ERROR;
       
  6218         }
       
  6219         
       
  6220     }/*function_ulint_to_dword*/
       
  6221     break;
       
  6222 
       
  6223 /****
       
  6224  *ULINT_TO_LWORD
       
  6225  */
       
  6226     case function_ulint_to_lword :
       
  6227     {
       
  6228         symbol_c *last_type_symbol = NULL;
       
  6229 
       
  6230         {
       
  6231             identifier_c param_name("IN");
       
  6232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6234             
       
  6235             /* Get the value from a foo(<param_value>) style call */
       
  6236             if (IN_param_value == NULL)
       
  6237               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6240             
       
  6241             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6242             {
       
  6243         
       
  6244                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6245                 return return_type_symbol;
       
  6246                 
       
  6247             }
       
  6248             
       
  6249             ERROR;
       
  6250         }
       
  6251         
       
  6252     }/*function_ulint_to_lword*/
       
  6253     break;
       
  6254 
       
  6255 /****
       
  6256  *ULINT_TO_STRING
       
  6257  */
       
  6258     case function_ulint_to_string :
       
  6259     {
       
  6260         symbol_c *last_type_symbol = NULL;
       
  6261 
       
  6262         {
       
  6263             identifier_c param_name("IN");
       
  6264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6266             
       
  6267             /* Get the value from a foo(<param_value>) style call */
       
  6268             if (IN_param_value == NULL)
       
  6269               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6272             
       
  6273             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6274             {
       
  6275         
       
  6276                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6277                 return return_type_symbol;
       
  6278                 
       
  6279             }
       
  6280             
       
  6281             ERROR;
       
  6282         }
       
  6283         
       
  6284     }/*function_ulint_to_string*/
       
  6285     break;
       
  6286 
       
  6287 /****
       
  6288  *ULINT_TO_WSTRING
       
  6289  */
       
  6290     case function_ulint_to_wstring :
       
  6291     {
       
  6292         symbol_c *last_type_symbol = NULL;
       
  6293 
       
  6294         {
       
  6295             identifier_c param_name("IN");
       
  6296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6298             
       
  6299             /* Get the value from a foo(<param_value>) style call */
       
  6300             if (IN_param_value == NULL)
       
  6301               IN_param_value = function_call_param_iterator.next();
       
  6302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6304             
       
  6305             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6306             {
       
  6307         
       
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6309                 return return_type_symbol;
       
  6310                 
       
  6311             }
       
  6312             
       
  6313             ERROR;
       
  6314         }
       
  6315         
       
  6316     }/*function_ulint_to_wstring*/
       
  6317     break;
       
  6318 
       
  6319 /****
       
  6320  *ULINT_TO_DATE
       
  6321  */
       
  6322     case function_ulint_to_date :
       
  6323     {
       
  6324         symbol_c *last_type_symbol = NULL;
       
  6325 
       
  6326         {
       
  6327             identifier_c param_name("IN");
       
  6328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6330             
       
  6331             /* Get the value from a foo(<param_value>) style call */
       
  6332             if (IN_param_value == NULL)
       
  6333               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6336             
       
  6337             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6338             {
       
  6339         
       
  6340                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6341                 return return_type_symbol;
       
  6342                 
       
  6343             }
       
  6344             
       
  6345             ERROR;
       
  6346         }
       
  6347         
       
  6348     }/*function_ulint_to_date*/
       
  6349     break;
       
  6350 
       
  6351 /****
       
  6352  *ULINT_TO_TOD
       
  6353  */
       
  6354     case function_ulint_to_tod :
       
  6355     {
       
  6356         symbol_c *last_type_symbol = NULL;
       
  6357 
       
  6358         {
       
  6359             identifier_c param_name("IN");
       
  6360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next();
       
  6366             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 ;
       
  6368             
       
  6369             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6370             {
       
  6371         
       
  6372                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6373                 return return_type_symbol;
       
  6374                 
       
  6375             }
       
  6376             
       
  6377             ERROR;
       
  6378         }
       
  6379         
       
  6380     }/*function_ulint_to_tod*/
       
  6381     break;
       
  6382 
       
  6383 /****
       
  6384  *ULINT_TO_DT
       
  6385  */
       
  6386     case function_ulint_to_dt :
       
  6387     {
       
  6388         symbol_c *last_type_symbol = NULL;
       
  6389 
       
  6390         {
       
  6391             identifier_c param_name("IN");
       
  6392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6394             
       
  6395             /* Get the value from a foo(<param_value>) style call */
       
  6396             if (IN_param_value == NULL)
       
  6397               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6400             
       
  6401             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6402             {
       
  6403         
       
  6404                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6405                 return return_type_symbol;
       
  6406                 
       
  6407             }
       
  6408             
       
  6409             ERROR;
       
  6410         }
       
  6411         
       
  6412     }/*function_ulint_to_dt*/
       
  6413     break;
       
  6414 
       
  6415 /****
       
  6416  *TIME_TO_REAL
       
  6417  */
       
  6418     case function_time_to_real :
       
  6419     {
       
  6420         symbol_c *last_type_symbol = NULL;
       
  6421 
       
  6422         {
       
  6423             identifier_c param_name("IN");
       
  6424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6426             
       
  6427             /* Get the value from a foo(<param_value>) style call */
       
  6428             if (IN_param_value == NULL)
       
  6429               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6432             
       
  6433             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6434             {
       
  6435         
       
  6436                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6437                 return return_type_symbol;
       
  6438                 
       
  6439             }
       
  6440             
       
  6441             ERROR;
       
  6442         }
       
  6443         
       
  6444     }/*function_time_to_real*/
       
  6445     break;
       
  6446 
       
  6447 /****
       
  6448  *TIME_TO_LREAL
       
  6449  */
       
  6450     case function_time_to_lreal :
       
  6451     {
       
  6452         symbol_c *last_type_symbol = NULL;
       
  6453 
       
  6454         {
       
  6455             identifier_c param_name("IN");
       
  6456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6458             
       
  6459             /* Get the value from a foo(<param_value>) style call */
       
  6460             if (IN_param_value == NULL)
       
  6461               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6464             
       
  6465             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6466             {
       
  6467         
       
  6468                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6469                 return return_type_symbol;
       
  6470                 
       
  6471             }
       
  6472             
       
  6473             ERROR;
       
  6474         }
       
  6475         
       
  6476     }/*function_time_to_lreal*/
       
  6477     break;
       
  6478 
       
  6479 /****
       
  6480  *TIME_TO_SINT
       
  6481  */
       
  6482     case function_time_to_sint :
       
  6483     {
       
  6484         symbol_c *last_type_symbol = NULL;
       
  6485 
       
  6486         {
       
  6487             identifier_c param_name("IN");
       
  6488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6490             
       
  6491             /* Get the value from a foo(<param_value>) style call */
       
  6492             if (IN_param_value == NULL)
       
  6493               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6496             
       
  6497             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6498             {
       
  6499         
       
  6500                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6501                 return return_type_symbol;
       
  6502                 
       
  6503             }
       
  6504             
       
  6505             ERROR;
       
  6506         }
       
  6507         
       
  6508     }/*function_time_to_sint*/
       
  6509     break;
       
  6510 
       
  6511 /****
       
  6512  *TIME_TO_INT
       
  6513  */
       
  6514     case function_time_to_int :
       
  6515     {
       
  6516         symbol_c *last_type_symbol = NULL;
       
  6517 
       
  6518         {
       
  6519             identifier_c param_name("IN");
       
  6520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6522             
       
  6523             /* Get the value from a foo(<param_value>) style call */
       
  6524             if (IN_param_value == NULL)
       
  6525               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6528             
       
  6529             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6530             {
       
  6531         
       
  6532                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6533                 return return_type_symbol;
       
  6534                 
       
  6535             }
       
  6536             
       
  6537             ERROR;
       
  6538         }
       
  6539         
       
  6540     }/*function_time_to_int*/
       
  6541     break;
       
  6542 
       
  6543 /****
       
  6544  *TIME_TO_DINT
       
  6545  */
       
  6546     case function_time_to_dint :
       
  6547     {
       
  6548         symbol_c *last_type_symbol = NULL;
       
  6549 
       
  6550         {
       
  6551             identifier_c param_name("IN");
       
  6552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6554             
       
  6555             /* Get the value from a foo(<param_value>) style call */
       
  6556             if (IN_param_value == NULL)
       
  6557               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6560             
       
  6561             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6562             {
       
  6563         
       
  6564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6565                 return return_type_symbol;
       
  6566                 
       
  6567             }
       
  6568             
       
  6569             ERROR;
       
  6570         }
       
  6571         
       
  6572     }/*function_time_to_dint*/
       
  6573     break;
       
  6574 
       
  6575 /****
       
  6576  *TIME_TO_LINT
       
  6577  */
       
  6578     case function_time_to_lint :
       
  6579     {
       
  6580         symbol_c *last_type_symbol = NULL;
       
  6581 
       
  6582         {
       
  6583             identifier_c param_name("IN");
       
  6584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6586             
       
  6587             /* Get the value from a foo(<param_value>) style call */
       
  6588             if (IN_param_value == NULL)
       
  6589               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6592             
       
  6593             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6594             {
       
  6595         
       
  6596                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6597                 return return_type_symbol;
       
  6598                 
       
  6599             }
       
  6600             
       
  6601             ERROR;
       
  6602         }
       
  6603         
       
  6604     }/*function_time_to_lint*/
       
  6605     break;
       
  6606 
       
  6607 /****
       
  6608  *TIME_TO_USINT
       
  6609  */
       
  6610     case function_time_to_usint :
       
  6611     {
       
  6612         symbol_c *last_type_symbol = NULL;
       
  6613 
       
  6614         {
       
  6615             identifier_c param_name("IN");
       
  6616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6618             
       
  6619             /* Get the value from a foo(<param_value>) style call */
       
  6620             if (IN_param_value == NULL)
       
  6621               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6624             
       
  6625             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6626             {
       
  6627         
       
  6628                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6629                 return return_type_symbol;
       
  6630                 
       
  6631             }
       
  6632             
       
  6633             ERROR;
       
  6634         }
       
  6635         
       
  6636     }/*function_time_to_usint*/
       
  6637     break;
       
  6638 
       
  6639 /****
       
  6640  *TIME_TO_UINT
       
  6641  */
       
  6642     case function_time_to_uint :
       
  6643     {
       
  6644         symbol_c *last_type_symbol = NULL;
       
  6645 
       
  6646         {
       
  6647             identifier_c param_name("IN");
       
  6648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6650             
       
  6651             /* Get the value from a foo(<param_value>) style call */
       
  6652             if (IN_param_value == NULL)
       
  6653               IN_param_value = function_call_param_iterator.next();
       
  6654             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 ;
       
  6656             
       
  6657             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6658             {
       
  6659         
       
  6660                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6661                 return return_type_symbol;
       
  6662                 
       
  6663             }
       
  6664             
       
  6665             ERROR;
       
  6666         }
       
  6667         
       
  6668     }/*function_time_to_uint*/
       
  6669     break;
       
  6670 
       
  6671 /****
       
  6672  *TIME_TO_UDINT
       
  6673  */
       
  6674     case function_time_to_udint :
       
  6675     {
       
  6676         symbol_c *last_type_symbol = NULL;
       
  6677 
       
  6678         {
       
  6679             identifier_c param_name("IN");
       
  6680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6682             
       
  6683             /* Get the value from a foo(<param_value>) style call */
       
  6684             if (IN_param_value == NULL)
       
  6685               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6688             
       
  6689             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6690             {
       
  6691         
       
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6693                 return return_type_symbol;
       
  6694                 
       
  6695             }
       
  6696             
       
  6697             ERROR;
       
  6698         }
       
  6699         
       
  6700     }/*function_time_to_udint*/
       
  6701     break;
       
  6702 
       
  6703 /****
       
  6704  *TIME_TO_ULINT
       
  6705  */
       
  6706     case function_time_to_ulint :
       
  6707     {
       
  6708         symbol_c *last_type_symbol = NULL;
       
  6709 
       
  6710         {
       
  6711             identifier_c param_name("IN");
       
  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);
       
  6714             
       
  6715             /* Get the value from a foo(<param_value>) style call */
       
  6716             if (IN_param_value == NULL)
       
  6717               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6720             
       
  6721             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6722             {
       
  6723         
       
  6724                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6725                 return return_type_symbol;
       
  6726                 
       
  6727             }
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_time_to_ulint*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *TIME_TO_BOOL
       
  6737  */
       
  6738     case function_time_to_bool :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6754             {
       
  6755         
       
  6756                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6757                 return return_type_symbol;
       
  6758                 
       
  6759             }
       
  6760             
       
  6761             ERROR;
       
  6762         }
       
  6763         
       
  6764     }/*function_time_to_bool*/
       
  6765     break;
       
  6766 
       
  6767 /****
       
  6768  *TIME_TO_BYTE
       
  6769  */
       
  6770     case function_time_to_byte :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6786             {
       
  6787         
       
  6788                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6789                 return return_type_symbol;
       
  6790                 
       
  6791             }
       
  6792             
       
  6793             ERROR;
       
  6794         }
       
  6795         
       
  6796     }/*function_time_to_byte*/
       
  6797     break;
       
  6798 
       
  6799 /****
       
  6800  *TIME_TO_WORD
       
  6801  */
       
  6802     case function_time_to_word :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6818             {
       
  6819         
       
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6821                 return return_type_symbol;
       
  6822                 
       
  6823             }
       
  6824             
       
  6825             ERROR;
       
  6826         }
       
  6827         
       
  6828     }/*function_time_to_word*/
       
  6829     break;
       
  6830 
       
  6831 /****
       
  6832  *TIME_TO_DWORD
       
  6833  */
       
  6834     case function_time_to_dword :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6850             {
       
  6851         
       
  6852                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6853                 return return_type_symbol;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             ERROR;
       
  6858         }
       
  6859         
       
  6860     }/*function_time_to_dword*/
       
  6861     break;
       
  6862 
       
  6863 /****
       
  6864  *TIME_TO_LWORD
       
  6865  */
       
  6866     case function_time_to_lword :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6882             {
       
  6883         
       
  6884                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6885                 return return_type_symbol;
       
  6886                 
       
  6887             }
       
  6888             
       
  6889             ERROR;
       
  6890         }
       
  6891         
       
  6892     }/*function_time_to_lword*/
       
  6893     break;
       
  6894 
       
  6895 /****
       
  6896  *TIME_TO_STRING
       
  6897  */
       
  6898     case function_time_to_string :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6914             {
       
  6915         
       
  6916                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6917                 return return_type_symbol;
       
  6918                 
       
  6919             }
       
  6920             
       
  6921             ERROR;
       
  6922         }
       
  6923         
       
  6924     }/*function_time_to_string*/
       
  6925     break;
       
  6926 
       
  6927 /****
       
  6928  *TIME_TO_WSTRING
       
  6929  */
       
  6930     case function_time_to_wstring :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6946             {
       
  6947         
       
  6948                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6949                 return return_type_symbol;
       
  6950                 
       
  6951             }
       
  6952             
       
  6953             ERROR;
       
  6954         }
       
  6955         
       
  6956     }/*function_time_to_wstring*/
       
  6957     break;
       
  6958 
       
  6959 /****
       
  6960  *BOOL_TO_REAL
       
  6961  */
       
  6962     case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  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_bool_to_real*/
       
  6989     break;
       
  6990 
       
  6991 /****
       
  6992  *BOOL_TO_LREAL
       
  6993  */
       
  6994     case function_bool_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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  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_bool_to_lreal*/
       
  7021     break;
       
  7022 
       
  7023 /****
       
  7024  *BOOL_TO_SINT
       
  7025  */
       
  7026     case function_bool_to_sint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7042             {
       
  7043         
       
  7044                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7045                 return return_type_symbol;
       
  7046                 
       
  7047             }
       
  7048             
       
  7049             ERROR;
       
  7050         }
       
  7051         
       
  7052     }/*function_bool_to_sint*/
       
  7053     break;
       
  7054 
       
  7055 /****
       
  7056  *BOOL_TO_INT
       
  7057  */
       
  7058     case function_bool_to_int :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7074             {
       
  7075         
       
  7076                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7077                 return return_type_symbol;
       
  7078                 
       
  7079             }
       
  7080             
       
  7081             ERROR;
       
  7082         }
       
  7083         
       
  7084     }/*function_bool_to_int*/
       
  7085     break;
       
  7086 
       
  7087 /****
       
  7088  *BOOL_TO_DINT
       
  7089  */
       
  7090     case function_bool_to_dint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7106             {
       
  7107         
       
  7108                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7109                 return return_type_symbol;
       
  7110                 
       
  7111             }
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_bool_to_dint*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *BOOL_TO_LINT
       
  7121  */
       
  7122     case function_bool_to_lint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7138             {
       
  7139         
       
  7140                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7141                 return return_type_symbol;
       
  7142                 
       
  7143             }
       
  7144             
       
  7145             ERROR;
       
  7146         }
       
  7147         
       
  7148     }/*function_bool_to_lint*/
       
  7149     break;
       
  7150 
       
  7151 /****
       
  7152  *BOOL_TO_USINT
       
  7153  */
       
  7154     case function_bool_to_usint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7170             {
       
  7171         
       
  7172                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7173                 return return_type_symbol;
       
  7174                 
       
  7175             }
       
  7176             
       
  7177             ERROR;
       
  7178         }
       
  7179         
       
  7180     }/*function_bool_to_usint*/
       
  7181     break;
       
  7182 
       
  7183 /****
       
  7184  *BOOL_TO_UINT
       
  7185  */
       
  7186     case function_bool_to_uint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7202             {
       
  7203         
       
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7205                 return return_type_symbol;
       
  7206                 
       
  7207             }
       
  7208             
       
  7209             ERROR;
       
  7210         }
       
  7211         
       
  7212     }/*function_bool_to_uint*/
       
  7213     break;
       
  7214 
       
  7215 /****
       
  7216  *BOOL_TO_UDINT
       
  7217  */
       
  7218     case function_bool_to_udint :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7234             {
       
  7235         
       
  7236                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7237                 return return_type_symbol;
       
  7238                 
       
  7239             }
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_bool_to_udint*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *BOOL_TO_ULINT
       
  7249  */
       
  7250     case function_bool_to_ulint :
       
  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(bool_type_name_c))
       
  7266             {
       
  7267         
       
  7268                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7269                 return return_type_symbol;
       
  7270                 
       
  7271             }
       
  7272             
       
  7273             ERROR;
       
  7274         }
       
  7275         
       
  7276     }/*function_bool_to_ulint*/
       
  7277     break;
       
  7278 
       
  7279 /****
       
  7280  *BOOL_TO_TIME
       
  7281  */
       
  7282     case function_bool_to_time :
       
  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(bool_type_name_c))
       
  7298             {
       
  7299         
       
  7300                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7301                 return return_type_symbol;
       
  7302                 
       
  7303             }
       
  7304             
       
  7305             ERROR;
       
  7306         }
       
  7307         
       
  7308     }/*function_bool_to_time*/
       
  7309     break;
       
  7310 
       
  7311 /****
       
  7312  *BOOL_TO_BYTE
       
  7313  */
       
  7314     case function_bool_to_byte :
       
  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(bool_type_name_c))
       
  7330             {
       
  7331         
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7333                 return return_type_symbol;
       
  7334                 
       
  7335             }
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_bool_to_byte*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *BOOL_TO_WORD
       
  7345  */
       
  7346     case function_bool_to_word :
       
  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(bool_type_name_c))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             ERROR;
       
  7370         }
       
  7371         
       
  7372     }/*function_bool_to_word*/
       
  7373     break;
       
  7374 
       
  7375 /****
       
  7376  *BOOL_TO_DWORD
       
  7377  */
       
  7378     case function_bool_to_dword :
       
  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(bool_type_name_c))
       
  7394             {
       
  7395         
       
  7396                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7397                 return return_type_symbol;
       
  7398                 
       
  7399             }
       
  7400             
       
  7401             ERROR;
       
  7402         }
       
  7403         
       
  7404     }/*function_bool_to_dword*/
       
  7405     break;
       
  7406 
       
  7407 /****
       
  7408  *BOOL_TO_LWORD
       
  7409  */
       
  7410     case function_bool_to_lword :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7426             {
       
  7427         
       
  7428                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7429                 return return_type_symbol;
       
  7430                 
       
  7431             }
       
  7432             
       
  7433             ERROR;
       
  7434         }
       
  7435         
       
  7436     }/*function_bool_to_lword*/
       
  7437     break;
       
  7438 
       
  7439 /****
       
  7440  *BOOL_TO_STRING
       
  7441  */
       
  7442     case function_bool_to_string :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7458             {
       
  7459         
       
  7460                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7461                 return return_type_symbol;
       
  7462                 
       
  7463             }
       
  7464             
       
  7465             ERROR;
       
  7466         }
       
  7467         
       
  7468     }/*function_bool_to_string*/
       
  7469     break;
       
  7470 
       
  7471 /****
       
  7472  *BOOL_TO_WSTRING
       
  7473  */
       
  7474     case function_bool_to_wstring :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7490             {
       
  7491         
       
  7492                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7493                 return return_type_symbol;
       
  7494                 
       
  7495             }
       
  7496             
       
  7497             ERROR;
       
  7498         }
       
  7499         
       
  7500     }/*function_bool_to_wstring*/
       
  7501     break;
       
  7502 
       
  7503 /****
       
  7504  *BOOL_TO_DATE
       
  7505  */
       
  7506     case function_bool_to_date :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7522             {
       
  7523         
       
  7524                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7525                 return return_type_symbol;
       
  7526                 
       
  7527             }
       
  7528             
       
  7529             ERROR;
       
  7530         }
       
  7531         
       
  7532     }/*function_bool_to_date*/
       
  7533     break;
       
  7534 
       
  7535 /****
       
  7536  *BOOL_TO_TOD
       
  7537  */
       
  7538     case function_bool_to_tod :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7554             {
       
  7555         
       
  7556                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7557                 return return_type_symbol;
       
  7558                 
       
  7559             }
       
  7560             
       
  7561             ERROR;
       
  7562         }
       
  7563         
       
  7564     }/*function_bool_to_tod*/
       
  7565     break;
       
  7566 
       
  7567 /****
       
  7568  *BOOL_TO_DT
       
  7569  */
       
  7570     case function_bool_to_dt :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7586             {
       
  7587         
       
  7588                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7589                 return return_type_symbol;
       
  7590                 
       
  7591             }
       
  7592             
       
  7593             ERROR;
       
  7594         }
       
  7595         
       
  7596     }/*function_bool_to_dt*/
       
  7597     break;
       
  7598 
       
  7599 /****
       
  7600  *BYTE_TO_REAL
       
  7601  */
       
  7602     case function_byte_to_real :
       
  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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7618             {
       
  7619         
       
  7620                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7621                 return return_type_symbol;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             ERROR;
       
  7626         }
       
  7627         
       
  7628     }/*function_byte_to_real*/
       
  7629     break;
       
  7630 
       
  7631 /****
       
  7632  *BYTE_TO_LREAL
       
  7633  */
       
  7634     case function_byte_to_lreal :
       
  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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7650             {
       
  7651         
       
  7652                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7653                 return return_type_symbol;
       
  7654                 
       
  7655             }
       
  7656             
       
  7657             ERROR;
       
  7658         }
       
  7659         
       
  7660     }/*function_byte_to_lreal*/
       
  7661     break;
       
  7662 
       
  7663 /****
       
  7664  *BYTE_TO_SINT
       
  7665  */
       
  7666     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_sint*/
       
  7693     break;
       
  7694 
       
  7695 /****
       
  7696  *BYTE_TO_INT
       
  7697  */
       
  7698     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_int*/
       
  7725     break;
       
  7726 
       
  7727 /****
       
  7728  *BYTE_TO_DINT
       
  7729  */
       
  7730     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_dint*/
       
  7757     break;
       
  7758 
       
  7759 /****
       
  7760  *BYTE_TO_LINT
       
  7761  */
       
  7762     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_lint*/
       
  7789     break;
       
  7790 
       
  7791 /****
       
  7792  *BYTE_TO_USINT
       
  7793  */
       
  7794     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_usint*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *BYTE_TO_UINT
       
  7825  */
       
  7826     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_uint*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *BYTE_TO_UDINT
       
  7857  */
       
  7858     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_udint*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *BYTE_TO_ULINT
       
  7889  */
       
  7890     case function_byte_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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  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_byte_to_ulint*/
       
  7917     break;
       
  7918 
       
  7919 /****
       
  7920  *BYTE_TO_TIME
       
  7921  */
       
  7922     case function_byte_to_time :
       
  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(byte_type_name_c))
       
  7938             {
       
  7939         
       
  7940                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7941                 return return_type_symbol;
       
  7942                 
       
  7943             }
       
  7944             
       
  7945             ERROR;
       
  7946         }
       
  7947         
       
  7948     }/*function_byte_to_time*/
       
  7949     break;
       
  7950 
       
  7951 /****
       
  7952  *BYTE_TO_BOOL
       
  7953  */
       
  7954     case function_byte_to_bool :
       
  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(byte_type_name_c))
       
  7970             {
       
  7971         
       
  7972                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7973                 return return_type_symbol;
       
  7974                 
       
  7975             }
       
  7976             
       
  7977             ERROR;
       
  7978         }
       
  7979         
       
  7980     }/*function_byte_to_bool*/
       
  7981     break;
       
  7982 
       
  7983 /****
       
  7984  *BYTE_TO_WORD
       
  7985  */
       
  7986     case function_byte_to_word :
       
  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(byte_type_name_c))
       
  8002             {
       
  8003         
       
  8004                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8005                 return return_type_symbol;
       
  8006                 
       
  8007             }
       
  8008             
       
  8009             ERROR;
       
  8010         }
       
  8011         
       
  8012     }/*function_byte_to_word*/
       
  8013     break;
       
  8014 
       
  8015 /****
       
  8016  *BYTE_TO_DWORD
       
  8017  */
       
  8018     case function_byte_to_dword :
       
  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(byte_type_name_c))
       
  8034             {
       
  8035         
       
  8036                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8037                 return return_type_symbol;
       
  8038                 
       
  8039             }
       
  8040             
       
  8041             ERROR;
       
  8042         }
       
  8043         
       
  8044     }/*function_byte_to_dword*/
       
  8045     break;
       
  8046 
       
  8047 /****
       
  8048  *BYTE_TO_LWORD
       
  8049  */
       
  8050     case function_byte_to_lword :
       
  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(byte_type_name_c))
       
  8066             {
       
  8067         
       
  8068                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8069                 return return_type_symbol;
       
  8070                 
       
  8071             }
       
  8072             
       
  8073             ERROR;
       
  8074         }
       
  8075         
       
  8076     }/*function_byte_to_lword*/
       
  8077     break;
       
  8078 
       
  8079 /****
       
  8080  *BYTE_TO_STRING
       
  8081  */
       
  8082     case function_byte_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(byte_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_byte_to_string*/
       
  8109     break;
       
  8110 
       
  8111 /****
       
  8112  *BYTE_TO_WSTRING
       
  8113  */
       
  8114     case function_byte_to_wstring :
       
  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(byte_type_name_c))
       
  8130             {
       
  8131         
       
  8132                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8133                 return return_type_symbol;
       
  8134                 
       
  8135             }
       
  8136             
       
  8137             ERROR;
       
  8138         }
       
  8139         
       
  8140     }/*function_byte_to_wstring*/
       
  8141     break;
       
  8142 
       
  8143 /****
       
  8144  *BYTE_TO_DATE
       
  8145  */
       
  8146     case function_byte_to_date :
       
  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(byte_type_name_c))
       
  8162             {
       
  8163         
       
  8164                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8165                 return return_type_symbol;
       
  8166                 
       
  8167             }
       
  8168             
       
  8169             ERROR;
       
  8170         }
       
  8171         
       
  8172     }/*function_byte_to_date*/
       
  8173     break;
       
  8174 
       
  8175 /****
       
  8176  *BYTE_TO_TOD
       
  8177  */
       
  8178     case function_byte_to_tod :
       
  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(byte_type_name_c))
       
  8194             {
       
  8195         
       
  8196                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8197                 return return_type_symbol;
       
  8198                 
       
  8199             }
       
  8200             
       
  8201             ERROR;
       
  8202         }
       
  8203         
       
  8204     }/*function_byte_to_tod*/
       
  8205     break;
       
  8206 
       
  8207 /****
       
  8208  *BYTE_TO_DT
       
  8209  */
       
  8210     case function_byte_to_dt :
       
  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(byte_type_name_c))
       
  8226             {
       
  8227         
       
  8228                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8229                 return return_type_symbol;
       
  8230                 
       
  8231             }
       
  8232             
       
  8233             ERROR;
       
  8234         }
       
  8235         
       
  8236     }/*function_byte_to_dt*/
       
  8237     break;
       
  8238 
       
  8239 /****
       
  8240  *WORD_TO_REAL
       
  8241  */
       
  8242     case function_word_to_real :
       
  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(word_type_name_c))
       
  8258             {
       
  8259         
       
  8260                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8261                 return return_type_symbol;
       
  8262                 
       
  8263             }
       
  8264             
       
  8265             ERROR;
       
  8266         }
       
  8267         
       
  8268     }/*function_word_to_real*/
       
  8269     break;
       
  8270 
       
  8271 /****
       
  8272  *WORD_TO_LREAL
       
  8273  */
       
  8274     case function_word_to_lreal :
       
  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(word_type_name_c))
       
  8290             {
       
  8291         
       
  8292                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8293                 return return_type_symbol;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             ERROR;
       
  8298         }
       
  8299         
       
  8300     }/*function_word_to_lreal*/
       
  8301     break;
       
  8302 
       
  8303 /****
       
  8304  *WORD_TO_SINT
       
  8305  */
       
  8306     case function_word_to_sint :
       
  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(word_type_name_c))
       
  8322             {
       
  8323         
       
  8324                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8325                 return return_type_symbol;
       
  8326                 
       
  8327             }
       
  8328             
       
  8329             ERROR;
       
  8330         }
       
  8331         
       
  8332     }/*function_word_to_sint*/
       
  8333     break;
       
  8334 
       
  8335 /****
       
  8336  *WORD_TO_INT
       
  8337  */
       
  8338     case function_word_to_int :
       
  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(word_type_name_c))
       
  8354             {
       
  8355         
       
  8356                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8357                 return return_type_symbol;
       
  8358                 
       
  8359             }
       
  8360             
       
  8361             ERROR;
       
  8362         }
       
  8363         
       
  8364     }/*function_word_to_int*/
       
  8365     break;
       
  8366 
       
  8367 /****
       
  8368  *WORD_TO_DINT
       
  8369  */
       
  8370     case function_word_to_dint :
       
  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(word_type_name_c))
       
  8386             {
       
  8387         
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8389                 return return_type_symbol;
       
  8390                 
       
  8391             }
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_word_to_dint*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *WORD_TO_LINT
       
  8401  */
       
  8402     case function_word_to_lint :
       
  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(word_type_name_c))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_word_to_lint*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *WORD_TO_USINT
       
  8433  */
       
  8434     case function_word_to_usint :
       
  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(word_type_name_c))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8453                 return return_type_symbol;
       
  8454                 
       
  8455             }
       
  8456             
       
  8457             ERROR;
       
  8458         }
       
  8459         
       
  8460     }/*function_word_to_usint*/
       
  8461     break;
       
  8462 
       
  8463 /****
       
  8464  *WORD_TO_UINT
       
  8465  */
       
  8466     case function_word_to_uint :
       
  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(word_type_name_c))
       
  8482             {
       
  8483         
       
  8484                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8485                 return return_type_symbol;
       
  8486                 
       
  8487             }
       
  8488             
       
  8489             ERROR;
       
  8490         }
       
  8491         
       
  8492     }/*function_word_to_uint*/
       
  8493     break;
       
  8494 
       
  8495 /****
       
  8496  *WORD_TO_UDINT
       
  8497  */
       
  8498     case function_word_to_udint :
       
  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(word_type_name_c))
       
  8514             {
       
  8515         
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8517                 return return_type_symbol;
       
  8518                 
       
  8519             }
       
  8520             
       
  8521             ERROR;
       
  8522         }
       
  8523         
       
  8524     }/*function_word_to_udint*/
       
  8525     break;
       
  8526 
       
  8527 /****
       
  8528  *WORD_TO_ULINT
       
  8529  */
       
  8530     case function_word_to_ulint :
       
  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(word_type_name_c))
       
  8546             {
       
  8547         
       
  8548                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8549                 return return_type_symbol;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             ERROR;
       
  8554         }
       
  8555         
       
  8556     }/*function_word_to_ulint*/
       
  8557     break;
       
  8558 
       
  8559 /****
       
  8560  *WORD_TO_TIME
       
  8561  */
       
  8562     case function_word_to_time :
       
  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(word_type_name_c))
       
  8578             {
       
  8579         
       
  8580                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8581                 return return_type_symbol;
       
  8582                 
       
  8583             }
       
  8584             
       
  8585             ERROR;
       
  8586         }
       
  8587         
       
  8588     }/*function_word_to_time*/
       
  8589     break;
       
  8590 
       
  8591 /****
       
  8592  *WORD_TO_BOOL
       
  8593  */
       
  8594     case function_word_to_bool :
       
  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(word_type_name_c))
       
  8610             {
       
  8611         
       
  8612                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8613                 return return_type_symbol;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_word_to_bool*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *WORD_TO_BYTE
       
  8625  */
       
  8626     case function_word_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(word_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_word_to_byte*/
       
  8653     break;
       
  8654 
       
  8655 /****
       
  8656  *WORD_TO_DWORD
       
  8657  */
       
  8658     case function_word_to_dword :
       
  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(word_type_name_c))
       
  8674             {
       
  8675         
       
  8676                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8677                 return return_type_symbol;
       
  8678                 
       
  8679             }
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_word_to_dword*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *WORD_TO_LWORD
       
  8689  */
       
  8690     case function_word_to_lword :
       
  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(word_type_name_c))
       
  8706             {
       
  8707         
       
  8708                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8709                 return return_type_symbol;
       
  8710                 
       
  8711             }
       
  8712             
       
  8713             ERROR;
       
  8714         }
       
  8715         
       
  8716     }/*function_word_to_lword*/
       
  8717     break;
       
  8718 
       
  8719 /****
       
  8720  *WORD_TO_STRING
       
  8721  */
       
  8722     case function_word_to_string :
       
  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(word_type_name_c))
       
  8738             {
       
  8739         
       
  8740                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8741                 return return_type_symbol;
       
  8742                 
       
  8743             }
       
  8744             
       
  8745             ERROR;
       
  8746         }
       
  8747         
       
  8748     }/*function_word_to_string*/
       
  8749     break;
       
  8750 
       
  8751 /****
       
  8752  *WORD_TO_WSTRING
       
  8753  */
       
  8754     case function_word_to_wstring :
       
  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(word_type_name_c))
       
  8770             {
       
  8771         
       
  8772                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8773                 return return_type_symbol;
       
  8774                 
       
  8775             }
       
  8776             
       
  8777             ERROR;
       
  8778         }
       
  8779         
       
  8780     }/*function_word_to_wstring*/
       
  8781     break;
       
  8782 
       
  8783 /****
       
  8784  *WORD_TO_DATE
       
  8785  */
       
  8786     case function_word_to_date :
       
  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(word_type_name_c))
       
  8802             {
       
  8803         
       
  8804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8805                 return return_type_symbol;
       
  8806                 
       
  8807             }
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_word_to_date*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *WORD_TO_TOD
       
  8817  */
       
  8818     case function_word_to_tod :
       
  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(word_type_name_c))
       
  8834             {
       
  8835         
       
  8836                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8837                 return return_type_symbol;
       
  8838                 
       
  8839             }
       
  8840             
       
  8841             ERROR;
       
  8842         }
       
  8843         
       
  8844     }/*function_word_to_tod*/
       
  8845     break;
       
  8846 
       
  8847 /****
       
  8848  *WORD_TO_DT
       
  8849  */
       
  8850     case function_word_to_dt :
       
  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(word_type_name_c))
       
  8866             {
       
  8867         
       
  8868                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8869                 return return_type_symbol;
       
  8870                 
       
  8871             }
       
  8872             
       
  8873             ERROR;
       
  8874         }
       
  8875         
       
  8876     }/*function_word_to_dt*/
       
  8877     break;
       
  8878 
       
  8879 /****
       
  8880  *DWORD_TO_REAL
       
  8881  */
       
  8882     case function_dword_to_real :
       
  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(dword_type_name_c))
       
  8898             {
       
  8899         
       
  8900                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8901                 return return_type_symbol;
       
  8902                 
       
  8903             }
       
  8904             
       
  8905             ERROR;
       
  8906         }
       
  8907         
       
  8908     }/*function_dword_to_real*/
       
  8909     break;
       
  8910 
       
  8911 /****
       
  8912  *DWORD_TO_LREAL
       
  8913  */
       
  8914     case function_dword_to_lreal :
       
  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(dword_type_name_c))
       
  8930             {
       
  8931         
       
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8933                 return return_type_symbol;
       
  8934                 
       
  8935             }
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_dword_to_lreal*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *DWORD_TO_SINT
       
  8945  */
       
  8946     case function_dword_to_sint :
       
  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(dword_type_name_c))
       
  8962             {
       
  8963         
       
  8964                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8965                 return return_type_symbol;
       
  8966                 
       
  8967             }
       
  8968             
       
  8969             ERROR;
       
  8970         }
       
  8971         
       
  8972     }/*function_dword_to_sint*/
       
  8973     break;
       
  8974 
       
  8975 /****
       
  8976  *DWORD_TO_INT
       
  8977  */
       
  8978     case function_dword_to_int :
       
  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(dword_type_name_c))
       
  8994             {
       
  8995         
       
  8996                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8997                 return return_type_symbol;
       
  8998                 
       
  8999             }
       
  9000             
       
  9001             ERROR;
       
  9002         }
       
  9003         
       
  9004     }/*function_dword_to_int*/
       
  9005     break;
       
  9006 
       
  9007 /****
       
  9008  *DWORD_TO_DINT
       
  9009  */
       
  9010     case function_dword_to_dint :
       
  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(dword_type_name_c))
       
  9026             {
       
  9027         
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9029                 return return_type_symbol;
       
  9030                 
       
  9031             }
       
  9032             
       
  9033             ERROR;
       
  9034         }
       
  9035         
       
  9036     }/*function_dword_to_dint*/
       
  9037     break;
       
  9038 
       
  9039 /****
       
  9040  *DWORD_TO_LINT
       
  9041  */
       
  9042     case function_dword_to_lint :
       
  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(dword_type_name_c))
       
  9058             {
       
  9059         
       
  9060                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9061                 return return_type_symbol;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             ERROR;
       
  9066         }
       
  9067         
       
  9068     }/*function_dword_to_lint*/
       
  9069     break;
       
  9070 
       
  9071 /****
       
  9072  *DWORD_TO_USINT
       
  9073  */
       
  9074     case function_dword_to_usint :
       
  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(dword_type_name_c))
       
  9090             {
       
  9091         
       
  9092                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9093                 return return_type_symbol;
       
  9094                 
       
  9095             }
       
  9096             
       
  9097             ERROR;
       
  9098         }
       
  9099         
       
  9100     }/*function_dword_to_usint*/
       
  9101     break;
       
  9102 
       
  9103 /****
       
  9104  *DWORD_TO_UINT
       
  9105  */
       
  9106     case function_dword_to_uint :
       
  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(dword_type_name_c))
       
  9122             {
       
  9123         
       
  9124                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9125                 return return_type_symbol;
       
  9126                 
       
  9127             }
       
  9128             
       
  9129             ERROR;
       
  9130         }
       
  9131         
       
  9132     }/*function_dword_to_uint*/
       
  9133     break;
       
  9134 
       
  9135 /****
       
  9136  *DWORD_TO_UDINT
       
  9137  */
       
  9138     case function_dword_to_udint :
       
  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(dword_type_name_c))
       
  9154             {
       
  9155         
       
  9156                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9157                 return return_type_symbol;
       
  9158                 
       
  9159             }
       
  9160             
       
  9161             ERROR;
       
  9162         }
       
  9163         
       
  9164     }/*function_dword_to_udint*/
       
  9165     break;
       
  9166 
       
  9167 /****
       
  9168  *DWORD_TO_ULINT
       
  9169  */
       
  9170     case function_dword_to_ulint :
       
  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(dword_type_name_c))
       
  9186             {
       
  9187         
       
  9188                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9189                 return return_type_symbol;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             ERROR;
       
  9194         }
       
  9195         
       
  9196     }/*function_dword_to_ulint*/
       
  9197     break;
       
  9198 
       
  9199 /****
       
  9200  *DWORD_TO_TIME
       
  9201  */
       
  9202     case function_dword_to_time :
       
  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(dword_type_name_c))
       
  9218             {
       
  9219         
       
  9220                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9221                 return return_type_symbol;
       
  9222                 
       
  9223             }
       
  9224             
       
  9225             ERROR;
       
  9226         }
       
  9227         
       
  9228     }/*function_dword_to_time*/
       
  9229     break;
       
  9230 
       
  9231 /****
       
  9232  *DWORD_TO_BOOL
       
  9233  */
       
  9234     case function_dword_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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  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_dword_to_bool*/
       
  9261     break;
       
  9262 
       
  9263 /****
       
  9264  *DWORD_TO_BYTE
       
  9265  */
       
  9266     case function_dword_to_byte :
       
  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(dword_type_name_c))
       
  9282             {
       
  9283         
       
  9284                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9285                 return return_type_symbol;
       
  9286                 
       
  9287             }
       
  9288             
       
  9289             ERROR;
       
  9290         }
       
  9291         
       
  9292     }/*function_dword_to_byte*/
       
  9293     break;
       
  9294 
       
  9295 /****
       
  9296  *DWORD_TO_WORD
       
  9297  */
       
  9298     case function_dword_to_word :
       
  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(dword_type_name_c))
       
  9314             {
       
  9315         
       
  9316                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9317                 return return_type_symbol;
       
  9318                 
       
  9319             }
       
  9320             
       
  9321             ERROR;
       
  9322         }
       
  9323         
       
  9324     }/*function_dword_to_word*/
       
  9325     break;
       
  9326 
       
  9327 /****
       
  9328  *DWORD_TO_LWORD
       
  9329  */
       
  9330     case function_dword_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(dword_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_dword_to_lword*/
       
  9357     break;
       
  9358 
       
  9359 /****
       
  9360  *DWORD_TO_STRING
       
  9361  */
       
  9362     case function_dword_to_string :
       
  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(dword_type_name_c))
       
  9378             {
       
  9379         
       
  9380                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9381                 return return_type_symbol;
       
  9382                 
       
  9383             }
       
  9384             
       
  9385             ERROR;
       
  9386         }
       
  9387         
       
  9388     }/*function_dword_to_string*/
       
  9389     break;
       
  9390 
       
  9391 /****
       
  9392  *DWORD_TO_WSTRING
       
  9393  */
       
  9394     case function_dword_to_wstring :
       
  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(dword_type_name_c))
       
  9410             {
       
  9411         
       
  9412                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9413                 return return_type_symbol;
       
  9414                 
       
  9415             }
       
  9416             
       
  9417             ERROR;
       
  9418         }
       
  9419         
       
  9420     }/*function_dword_to_wstring*/
       
  9421     break;
       
  9422 
       
  9423 /****
       
  9424  *DWORD_TO_DATE
       
  9425  */
       
  9426     case function_dword_to_date :
       
  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(dword_type_name_c))
       
  9442             {
       
  9443         
       
  9444                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9445                 return return_type_symbol;
       
  9446                 
       
  9447             }
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_dword_to_date*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *DWORD_TO_TOD
       
  9457  */
       
  9458     case function_dword_to_tod :
       
  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(dword_type_name_c))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             ERROR;
       
  9482         }
       
  9483         
       
  9484     }/*function_dword_to_tod*/
       
  9485     break;
       
  9486 
       
  9487 /****
       
  9488  *DWORD_TO_DT
       
  9489  */
       
  9490     case function_dword_to_dt :
       
  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(dword_type_name_c))
       
  9506             {
       
  9507         
       
  9508                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9509                 return return_type_symbol;
       
  9510                 
       
  9511             }
       
  9512             
       
  9513             ERROR;
       
  9514         }
       
  9515         
       
  9516     }/*function_dword_to_dt*/
       
  9517     break;
       
  9518 
       
  9519 /****
       
  9520  *LWORD_TO_REAL
       
  9521  */
       
  9522     case function_lword_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  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_lword_to_real*/
       
  9549     break;
       
  9550 
       
  9551 /****
       
  9552  *LWORD_TO_LREAL
       
  9553  */
       
  9554     case function_lword_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  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_lword_to_lreal*/
       
  9581     break;
       
  9582 
       
  9583 /****
       
  9584  *LWORD_TO_SINT
       
  9585  */
       
  9586     case function_lword_to_sint :
       
  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(lword_type_name_c))
       
  9602             {
       
  9603         
       
  9604                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9605                 return return_type_symbol;
       
  9606                 
       
  9607             }
       
  9608             
       
  9609             ERROR;
       
  9610         }
       
  9611         
       
  9612     }/*function_lword_to_sint*/
       
  9613     break;
       
  9614 
       
  9615 /****
       
  9616  *LWORD_TO_INT
       
  9617  */
       
  9618     case function_lword_to_int :
       
  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(lword_type_name_c))
       
  9634             {
       
  9635         
       
  9636                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9637                 return return_type_symbol;
       
  9638                 
       
  9639             }
       
  9640             
       
  9641             ERROR;
       
  9642         }
       
  9643         
       
  9644     }/*function_lword_to_int*/
       
  9645     break;
       
  9646 
       
  9647 /****
       
  9648  *LWORD_TO_DINT
       
  9649  */
       
  9650     case function_lword_to_dint :
       
  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(lword_type_name_c))
       
  9666             {
       
  9667         
       
  9668                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9669                 return return_type_symbol;
       
  9670                 
       
  9671             }
       
  9672             
       
  9673             ERROR;
       
  9674         }
       
  9675         
       
  9676     }/*function_lword_to_dint*/
       
  9677     break;
       
  9678 
       
  9679 /****
       
  9680  *LWORD_TO_LINT
       
  9681  */
       
  9682     case function_lword_to_lint :
       
  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(lword_type_name_c))
       
  9698             {
       
  9699         
       
  9700                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9701                 return return_type_symbol;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             ERROR;
       
  9706         }
       
  9707         
       
  9708     }/*function_lword_to_lint*/
       
  9709     break;
       
  9710 
       
  9711 /****
       
  9712  *LWORD_TO_USINT
       
  9713  */
       
  9714     case function_lword_to_usint :
       
  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(lword_type_name_c))
       
  9730             {
       
  9731         
       
  9732                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9733                 return return_type_symbol;
       
  9734                 
       
  9735             }
       
  9736             
       
  9737             ERROR;
       
  9738         }
       
  9739         
       
  9740     }/*function_lword_to_usint*/
       
  9741     break;
       
  9742 
       
  9743 /****
       
  9744  *LWORD_TO_UINT
       
  9745  */
       
  9746     case function_lword_to_uint :
       
  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(lword_type_name_c))
       
  9762             {
       
  9763         
       
  9764                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9765                 return return_type_symbol;
       
  9766                 
       
  9767             }
       
  9768             
       
  9769             ERROR;
       
  9770         }
       
  9771         
       
  9772     }/*function_lword_to_uint*/
       
  9773     break;
       
  9774 
       
  9775 /****
       
  9776  *LWORD_TO_UDINT
       
  9777  */
       
  9778     case function_lword_to_udint :
       
  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(lword_type_name_c))
       
  9794             {
       
  9795         
       
  9796                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9797                 return return_type_symbol;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_lword_to_udint*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *LWORD_TO_ULINT
       
  9809  */
       
  9810     case function_lword_to_ulint :
       
  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(lword_type_name_c))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9829                 return return_type_symbol;
       
  9830                 
       
  9831             }
       
  9832             
       
  9833             ERROR;
       
  9834         }
       
  9835         
       
  9836     }/*function_lword_to_ulint*/
       
  9837     break;
       
  9838 
       
  9839 /****
       
  9840  *LWORD_TO_TIME
       
  9841  */
       
  9842     case function_lword_to_time :
       
  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(lword_type_name_c))
       
  9858             {
       
  9859         
       
  9860                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9861                 return return_type_symbol;
       
  9862                 
       
  9863             }
       
  9864             
       
  9865             ERROR;
       
  9866         }
       
  9867         
       
  9868     }/*function_lword_to_time*/
       
  9869     break;
       
  9870 
       
  9871 /****
       
  9872  *LWORD_TO_BOOL
       
  9873  */
       
  9874     case function_lword_to_bool :
       
  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(lword_type_name_c))
       
  9890             {
       
  9891         
       
  9892                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9893                 return return_type_symbol;
       
  9894                 
       
  9895             }
       
  9896             
       
  9897             ERROR;
       
  9898         }
       
  9899         
       
  9900     }/*function_lword_to_bool*/
       
  9901     break;
       
  9902 
       
  9903 /****
       
  9904  *LWORD_TO_BYTE
       
  9905  */
       
  9906     case function_lword_to_byte :
       
  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(lword_type_name_c))
       
  9922             {
       
  9923         
       
  9924                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9925                 return return_type_symbol;
       
  9926                 
       
  9927             }
       
  9928             
       
  9929             ERROR;
       
  9930         }
       
  9931         
       
  9932     }/*function_lword_to_byte*/
       
  9933     break;
       
  9934 
       
  9935 /****
       
  9936  *LWORD_TO_WORD
       
  9937  */
       
  9938     case function_lword_to_word :
       
  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(lword_type_name_c))
       
  9954             {
       
  9955         
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9957                 return return_type_symbol;
       
  9958                 
       
  9959             }
       
  9960             
       
  9961             ERROR;
       
  9962         }
       
  9963         
       
  9964     }/*function_lword_to_word*/
       
  9965     break;
       
  9966 
       
  9967 /****
       
  9968  *LWORD_TO_DWORD
       
  9969  */
       
  9970     case function_lword_to_dword :
       
  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(lword_type_name_c))
       
  9986             {
       
  9987         
       
  9988                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9989                 return return_type_symbol;
       
  9990                 
       
  9991             }
       
  9992             
       
  9993             ERROR;
       
  9994         }
       
  9995         
       
  9996     }/*function_lword_to_dword*/
       
  9997     break;
       
  9998 
       
  9999 /****
       
 10000  *LWORD_TO_STRING
       
 10001  */
       
 10002     case function_lword_to_string :
       
 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(lword_type_name_c))
       
 10018             {
       
 10019         
       
 10020                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10021                 return return_type_symbol;
       
 10022                 
       
 10023             }
       
 10024             
       
 10025             ERROR;
       
 10026         }
       
 10027         
       
 10028     }/*function_lword_to_string*/
       
 10029     break;
       
 10030 
       
 10031 /****
       
 10032  *LWORD_TO_WSTRING
       
 10033  */
       
 10034     case function_lword_to_wstring :
       
 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(lword_type_name_c))
       
 10050             {
       
 10051         
       
 10052                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 10053                 return return_type_symbol;
       
 10054                 
       
 10055             }
       
 10056             
       
 10057             ERROR;
       
 10058         }
       
 10059         
       
 10060     }/*function_lword_to_wstring*/
       
 10061     break;
       
 10062 
       
 10063 /****
       
 10064  *LWORD_TO_DATE
       
 10065  */
       
 10066     case function_lword_to_date :
       
 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(lword_type_name_c))
       
 10082             {
       
 10083         
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10085                 return return_type_symbol;
       
 10086                 
       
 10087             }
       
 10088             
       
 10089             ERROR;
       
 10090         }
       
 10091         
       
 10092     }/*function_lword_to_date*/
       
 10093     break;
       
 10094 
       
 10095 /****
       
 10096  *LWORD_TO_TOD
       
 10097  */
       
 10098     case function_lword_to_tod :
       
 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(lword_type_name_c))
       
 10114             {
       
 10115         
       
 10116                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10117                 return return_type_symbol;
       
 10118                 
       
 10119             }
       
 10120             
       
 10121             ERROR;
       
 10122         }
       
 10123         
       
 10124     }/*function_lword_to_tod*/
       
 10125     break;
       
 10126 
       
 10127 /****
       
 10128  *LWORD_TO_DT
       
 10129  */
       
 10130     case function_lword_to_dt :
       
 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(lword_type_name_c))
       
 10146             {
       
 10147         
       
 10148                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10149                 return return_type_symbol;
       
 10150                 
       
 10151             }
       
 10152             
       
 10153             ERROR;
       
 10154         }
       
 10155         
       
 10156     }/*function_lword_to_dt*/
       
 10157     break;
       
 10158 
       
 10159 /****
       
 10160  *STRING_TO_REAL
       
 10161  */
       
 10162     case function_string_to_real :
       
 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(string_type_name_c))
       
 10178             {
       
 10179         
       
 10180                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10181                 return return_type_symbol;
       
 10182                 
       
 10183             }
       
 10184             
       
 10185             ERROR;
       
 10186         }
       
 10187         
       
 10188     }/*function_string_to_real*/
       
 10189     break;
       
 10190 
       
 10191 /****
       
 10192  *STRING_TO_LREAL
       
 10193  */
       
 10194     case function_string_to_lreal :
       
 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(string_type_name_c))
       
 10210             {
       
 10211         
       
 10212                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10213                 return return_type_symbol;
       
 10214                 
       
 10215             }
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_string_to_lreal*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *STRING_TO_SINT
       
 10225  */
       
 10226     case function_string_to_sint :
       
 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(string_type_name_c))
       
 10242             {
       
 10243         
       
 10244                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10245                 return return_type_symbol;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_string_to_sint*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *STRING_TO_INT
       
 10257  */
       
 10258     case function_string_to_int :
       
 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(string_type_name_c))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10277                 return return_type_symbol;
       
 10278                 
       
 10279             }
       
 10280             
       
 10281             ERROR;
       
 10282         }
       
 10283         
       
 10284     }/*function_string_to_int*/
       
 10285     break;
       
 10286 
       
 10287 /****
       
 10288  *STRING_TO_DINT
       
 10289  */
       
 10290     case function_string_to_dint :
       
 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(string_type_name_c))
       
 10306             {
       
 10307         
       
 10308                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10309                 return return_type_symbol;
       
 10310                 
       
 10311             }
       
 10312             
       
 10313             ERROR;
       
 10314         }
       
 10315         
       
 10316     }/*function_string_to_dint*/
       
 10317     break;
       
 10318 
       
 10319 /****
       
 10320  *STRING_TO_LINT
       
 10321  */
       
 10322     case function_string_to_lint :
       
 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(string_type_name_c))
       
 10338             {
       
 10339         
       
 10340                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10341                 return return_type_symbol;
       
 10342                 
       
 10343             }
       
 10344             
       
 10345             ERROR;
       
 10346         }
       
 10347         
       
 10348     }/*function_string_to_lint*/
       
 10349     break;
       
 10350 
       
 10351 /****
       
 10352  *STRING_TO_USINT
       
 10353  */
       
 10354     case function_string_to_usint :
       
 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(string_type_name_c))
       
 10370             {
       
 10371         
       
 10372                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10373                 return return_type_symbol;
       
 10374                 
       
 10375             }
       
 10376             
       
 10377             ERROR;
       
 10378         }
       
 10379         
       
 10380     }/*function_string_to_usint*/
       
 10381     break;
       
 10382 
       
 10383 /****
       
 10384  *STRING_TO_UINT
       
 10385  */
       
 10386     case function_string_to_uint :
       
 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(string_type_name_c))
       
 10402             {
       
 10403         
       
 10404                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10405                 return return_type_symbol;
       
 10406                 
       
 10407             }
       
 10408             
       
 10409             ERROR;
       
 10410         }
       
 10411         
       
 10412     }/*function_string_to_uint*/
       
 10413     break;
       
 10414 
       
 10415 /****
       
 10416  *STRING_TO_UDINT
       
 10417  */
       
 10418     case function_string_to_udint :
       
 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(string_type_name_c))
       
 10434             {
       
 10435         
       
 10436                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10437                 return return_type_symbol;
       
 10438                 
       
 10439             }
       
 10440             
       
 10441             ERROR;
       
 10442         }
       
 10443         
       
 10444     }/*function_string_to_udint*/
       
 10445     break;
       
 10446 
       
 10447 /****
       
 10448  *STRING_TO_ULINT
       
 10449  */
       
 10450     case function_string_to_ulint :
       
 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(string_type_name_c))
       
 10466             {
       
 10467         
       
 10468                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10469                 return return_type_symbol;
       
 10470                 
       
 10471             }
       
 10472             
       
 10473             ERROR;
       
 10474         }
       
 10475         
       
 10476     }/*function_string_to_ulint*/
       
 10477     break;
       
 10478 
       
 10479 /****
       
 10480  *STRING_TO_TIME
       
 10481  */
       
 10482     case function_string_to_time :
       
 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(string_type_name_c))
       
 10498             {
       
 10499         
       
 10500                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10501                 return return_type_symbol;
       
 10502                 
       
 10503             }
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_string_to_time*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *STRING_TO_BOOL
       
 10513  */
       
 10514     case function_string_to_bool :
       
 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(string_type_name_c))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             ERROR;
       
 10538         }
       
 10539         
       
 10540     }/*function_string_to_bool*/
       
 10541     break;
       
 10542 
       
 10543 /****
       
 10544  *STRING_TO_BYTE
       
 10545  */
       
 10546     case function_string_to_byte :
       
 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(string_type_name_c))
       
 10562             {
       
 10563         
       
 10564                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10565                 return return_type_symbol;
       
 10566                 
       
 10567             }
       
 10568             
       
 10569             ERROR;
       
 10570         }
       
 10571         
       
 10572     }/*function_string_to_byte*/
       
 10573     break;
       
 10574 
       
 10575 /****
       
 10576  *STRING_TO_WORD
       
 10577  */
       
 10578     case function_string_to_word :
       
 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(string_type_name_c))
       
 10594             {
       
 10595         
       
 10596                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10597                 return return_type_symbol;
       
 10598                 
       
 10599             }
       
 10600             
       
 10601             ERROR;
       
 10602         }
       
 10603         
       
 10604     }/*function_string_to_word*/
       
 10605     break;
       
 10606 
       
 10607 /****
       
 10608  *STRING_TO_DWORD
       
 10609  */
       
 10610     case function_string_to_dword :
       
 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(string_type_name_c))
       
 10626             {
       
 10627         
       
 10628                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10629                 return return_type_symbol;
       
 10630                 
       
 10631             }
       
 10632             
       
 10633             ERROR;
       
 10634         }
       
 10635         
       
 10636     }/*function_string_to_dword*/
       
 10637     break;
       
 10638 
       
 10639 /****
       
 10640  *STRING_TO_LWORD
       
 10641  */
       
 10642     case function_string_to_lword :
       
 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(string_type_name_c))
       
 10658             {
       
 10659         
       
 10660                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10661                 return return_type_symbol;
       
 10662                 
       
 10663             }
       
 10664             
       
 10665             ERROR;
       
 10666         }
       
 10667         
       
 10668     }/*function_string_to_lword*/
       
 10669     break;
       
 10670 
       
 10671 /****
       
 10672  *STRING_TO_DATE
       
 10673  */
       
 10674     case function_string_to_date :
       
 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(string_type_name_c))
       
 10690             {
       
 10691         
       
 10692                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10693                 return return_type_symbol;
       
 10694                 
       
 10695             }
       
 10696             
       
 10697             ERROR;
       
 10698         }
       
 10699         
       
 10700     }/*function_string_to_date*/
       
 10701     break;
       
 10702 
       
 10703 /****
       
 10704  *STRING_TO_TOD
       
 10705  */
       
 10706     case function_string_to_tod :
       
 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(string_type_name_c))
       
 10722             {
       
 10723         
       
 10724                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10725                 return return_type_symbol;
       
 10726                 
       
 10727             }
       
 10728             
       
 10729             ERROR;
       
 10730         }
       
 10731         
       
 10732     }/*function_string_to_tod*/
       
 10733     break;
       
 10734 
       
 10735 /****
       
 10736  *STRING_TO_DT
       
 10737  */
       
 10738     case function_string_to_dt :
       
 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(string_type_name_c))
       
 10754             {
       
 10755         
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10757                 return return_type_symbol;
       
 10758                 
       
 10759             }
       
 10760             
       
 10761             ERROR;
       
 10762         }
       
 10763         
       
 10764     }/*function_string_to_dt*/
       
 10765     break;
       
 10766 
       
 10767 /****
       
 10768  *WSTRING_TO_REAL
       
 10769  */
       
 10770     case function_wstring_to_real :
       
 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(wstring_type_name_c))
       
 10786             {
       
 10787         
       
 10788                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10789                 return return_type_symbol;
       
 10790                 
       
 10791             }
       
 10792             
       
 10793             ERROR;
       
 10794         }
       
 10795         
       
 10796     }/*function_wstring_to_real*/
       
 10797     break;
       
 10798 
       
 10799 /****
       
 10800  *WSTRING_TO_LREAL
       
 10801  */
       
 10802     case function_wstring_to_lreal :
       
 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(wstring_type_name_c))
       
 10818             {
       
 10819         
       
 10820                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10821                 return return_type_symbol;
       
 10822                 
       
 10823             }
       
 10824             
       
 10825             ERROR;
       
 10826         }
       
 10827         
       
 10828     }/*function_wstring_to_lreal*/
       
 10829     break;
       
 10830 
       
 10831 /****
       
 10832  *WSTRING_TO_SINT
       
 10833  */
       
 10834     case function_wstring_to_sint :
       
 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(wstring_type_name_c))
       
 10850             {
       
 10851         
       
 10852                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10853                 return return_type_symbol;
       
 10854                 
       
 10855             }
       
 10856             
       
 10857             ERROR;
       
 10858         }
       
 10859         
       
 10860     }/*function_wstring_to_sint*/
       
 10861     break;
       
 10862 
       
 10863 /****
       
 10864  *WSTRING_TO_INT
       
 10865  */
       
 10866     case function_wstring_to_int :
       
 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(wstring_type_name_c))
       
 10882             {
       
 10883         
       
 10884                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10885                 return return_type_symbol;
       
 10886                 
       
 10887             }
       
 10888             
       
 10889             ERROR;
       
 10890         }
       
 10891         
       
 10892     }/*function_wstring_to_int*/
       
 10893     break;
       
 10894 
       
 10895 /****
       
 10896  *WSTRING_TO_DINT
       
 10897  */
       
 10898     case function_wstring_to_dint :
       
 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(wstring_type_name_c))
       
 10914             {
       
 10915         
       
 10916                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10917                 return return_type_symbol;
       
 10918                 
       
 10919             }
       
 10920             
       
 10921             ERROR;
       
 10922         }
       
 10923         
       
 10924     }/*function_wstring_to_dint*/
       
 10925     break;
       
 10926 
       
 10927 /****
       
 10928  *WSTRING_TO_LINT
       
 10929  */
       
 10930     case function_wstring_to_lint :
       
 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(wstring_type_name_c))
       
 10946             {
       
 10947         
       
 10948                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10949                 return return_type_symbol;
       
 10950                 
       
 10951             }
       
 10952             
       
 10953             ERROR;
       
 10954         }
       
 10955         
       
 10956     }/*function_wstring_to_lint*/
       
 10957     break;
       
 10958 
       
 10959 /****
       
 10960  *WSTRING_TO_USINT
       
 10961  */
       
 10962     case function_wstring_to_usint :
       
 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(wstring_type_name_c))
       
 10978             {
       
 10979         
       
 10980                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10981                 return return_type_symbol;
       
 10982                 
       
 10983             }
       
 10984             
       
 10985             ERROR;
       
 10986         }
       
 10987         
       
 10988     }/*function_wstring_to_usint*/
       
 10989     break;
       
 10990 
       
 10991 /****
       
 10992  *WSTRING_TO_UINT
       
 10993  */
       
 10994     case function_wstring_to_uint :
       
 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(wstring_type_name_c))
       
 11010             {
       
 11011         
       
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11013                 return return_type_symbol;
       
 11014                 
       
 11015             }
       
 11016             
       
 11017             ERROR;
       
 11018         }
       
 11019         
       
 11020     }/*function_wstring_to_uint*/
       
 11021     break;
       
 11022 
       
 11023 /****
       
 11024  *WSTRING_TO_UDINT
       
 11025  */
       
 11026     case function_wstring_to_udint :
       
 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(wstring_type_name_c))
       
 11042             {
       
 11043         
       
 11044                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11045                 return return_type_symbol;
       
 11046                 
       
 11047             }
       
 11048             
       
 11049             ERROR;
       
 11050         }
       
 11051         
       
 11052     }/*function_wstring_to_udint*/
       
 11053     break;
       
 11054 
       
 11055 /****
       
 11056  *WSTRING_TO_ULINT
       
 11057  */
       
 11058     case function_wstring_to_ulint :
       
 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(wstring_type_name_c))
       
 11074             {
       
 11075         
       
 11076                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11077                 return return_type_symbol;
       
 11078                 
       
 11079             }
       
 11080             
       
 11081             ERROR;
       
 11082         }
       
 11083         
       
 11084     }/*function_wstring_to_ulint*/
       
 11085     break;
       
 11086 
       
 11087 /****
       
 11088  *WSTRING_TO_TIME
       
 11089  */
       
 11090     case function_wstring_to_time :
       
 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(wstring_type_name_c))
       
 11106             {
       
 11107         
       
 11108                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11109                 return return_type_symbol;
       
 11110                 
       
 11111             }
       
 11112             
       
 11113             ERROR;
       
 11114         }
       
 11115         
       
 11116     }/*function_wstring_to_time*/
       
 11117     break;
       
 11118 
       
 11119 /****
       
 11120  *WSTRING_TO_BOOL
       
 11121  */
       
 11122     case function_wstring_to_bool :
       
 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(wstring_type_name_c))
       
 11138             {
       
 11139         
       
 11140                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11141                 return return_type_symbol;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             ERROR;
       
 11146         }
       
 11147         
       
 11148     }/*function_wstring_to_bool*/
       
 11149     break;
       
 11150 
       
 11151 /****
       
 11152  *WSTRING_TO_BYTE
       
 11153  */
       
 11154     case function_wstring_to_byte :
       
 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(wstring_type_name_c))
       
 11170             {
       
 11171         
       
 11172                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11173                 return return_type_symbol;
       
 11174                 
       
 11175             }
       
 11176             
       
 11177             ERROR;
       
 11178         }
       
 11179         
       
 11180     }/*function_wstring_to_byte*/
       
 11181     break;
       
 11182 
       
 11183 /****
       
 11184  *WSTRING_TO_WORD
       
 11185  */
       
 11186     case function_wstring_to_word :
       
 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(wstring_type_name_c))
       
 11202             {
       
 11203         
       
 11204                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11205                 return return_type_symbol;
       
 11206                 
       
 11207             }
       
 11208             
       
 11209             ERROR;
       
 11210         }
       
 11211         
       
 11212     }/*function_wstring_to_word*/
       
 11213     break;
       
 11214 
       
 11215 /****
       
 11216  *WSTRING_TO_DWORD
       
 11217  */
       
 11218     case function_wstring_to_dword :
       
 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(wstring_type_name_c))
       
 11234             {
       
 11235         
       
 11236                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11237                 return return_type_symbol;
       
 11238                 
       
 11239             }
       
 11240             
       
 11241             ERROR;
       
 11242         }
       
 11243         
       
 11244     }/*function_wstring_to_dword*/
       
 11245     break;
       
 11246 
       
 11247 /****
       
 11248  *WSTRING_TO_LWORD
       
 11249  */
       
 11250     case function_wstring_to_lword :
       
 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(wstring_type_name_c))
       
 11266             {
       
 11267         
       
 11268                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11269                 return return_type_symbol;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             ERROR;
       
 11274         }
       
 11275         
       
 11276     }/*function_wstring_to_lword*/
       
 11277     break;
       
 11278 
       
 11279 /****
       
 11280  *WSTRING_TO_DATE
       
 11281  */
       
 11282     case function_wstring_to_date :
       
 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(wstring_type_name_c))
       
 11298             {
       
 11299         
       
 11300                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11301                 return return_type_symbol;
       
 11302                 
       
 11303             }
       
 11304             
       
 11305             ERROR;
       
 11306         }
       
 11307         
       
 11308     }/*function_wstring_to_date*/
       
 11309     break;
       
 11310 
       
 11311 /****
       
 11312  *WSTRING_TO_TOD
       
 11313  */
       
 11314     case function_wstring_to_tod :
       
 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(wstring_type_name_c))
       
 11330             {
       
 11331         
       
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11333                 return return_type_symbol;
       
 11334                 
       
 11335             }
       
 11336             
       
 11337             ERROR;
       
 11338         }
       
 11339         
       
 11340     }/*function_wstring_to_tod*/
       
 11341     break;
       
 11342 
       
 11343 /****
       
 11344  *WSTRING_TO_DT
       
 11345  */
       
 11346     case function_wstring_to_dt :
       
 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(wstring_type_name_c))
       
 11362             {
       
 11363         
       
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11365                 return return_type_symbol;
       
 11366                 
       
 11367             }
       
 11368             
       
 11369             ERROR;
       
 11370         }
       
 11371         
       
 11372     }/*function_wstring_to_dt*/
       
 11373     break;
       
 11374 
       
 11375 /****
       
 11376  *DATE_TO_REAL
       
 11377  */
       
 11378     case function_date_to_real :
       
 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(date_type_name_c))
       
 11394             {
       
 11395         
       
 11396                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11397                 return return_type_symbol;
       
 11398                 
       
 11399             }
       
 11400             
       
 11401             ERROR;
       
 11402         }
       
 11403         
       
 11404     }/*function_date_to_real*/
       
 11405     break;
       
 11406 
       
 11407 /****
       
 11408  *DATE_TO_LREAL
       
 11409  */
       
 11410     case function_date_to_lreal :
       
 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(date_type_name_c))
       
 11426             {
       
 11427         
       
 11428                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11429                 return return_type_symbol;
       
 11430                 
       
 11431             }
       
 11432             
       
 11433             ERROR;
       
 11434         }
       
 11435         
       
 11436     }/*function_date_to_lreal*/
       
 11437     break;
       
 11438 
       
 11439 /****
       
 11440  *DATE_TO_SINT
       
 11441  */
       
 11442     case function_date_to_sint :
       
 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(date_type_name_c))
       
 11458             {
       
 11459         
       
 11460                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11461                 return return_type_symbol;
       
 11462                 
       
 11463             }
       
 11464             
       
 11465             ERROR;
       
 11466         }
       
 11467         
       
 11468     }/*function_date_to_sint*/
       
 11469     break;
       
 11470 
       
 11471 /****
       
 11472  *DATE_TO_INT
       
 11473  */
       
 11474     case function_date_to_int :
       
 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(date_type_name_c))
       
 11490             {
       
 11491         
       
 11492                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11493                 return return_type_symbol;
       
 11494                 
       
 11495             }
       
 11496             
       
 11497             ERROR;
       
 11498         }
       
 11499         
       
 11500     }/*function_date_to_int*/
       
 11501     break;
       
 11502 
       
 11503 /****
       
 11504  *DATE_TO_DINT
       
 11505  */
       
 11506     case function_date_to_dint :
       
 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(date_type_name_c))
       
 11522             {
       
 11523         
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11525                 return return_type_symbol;
       
 11526                 
       
 11527             }
       
 11528             
       
 11529             ERROR;
       
 11530         }
       
 11531         
       
 11532     }/*function_date_to_dint*/
       
 11533     break;
       
 11534 
       
 11535 /****
       
 11536  *DATE_TO_LINT
       
 11537  */
       
 11538     case function_date_to_lint :
       
 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(date_type_name_c))
       
 11554             {
       
 11555         
       
 11556                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11557                 return return_type_symbol;
       
 11558                 
       
 11559             }
       
 11560             
       
 11561             ERROR;
       
 11562         }
       
 11563         
       
 11564     }/*function_date_to_lint*/
       
 11565     break;
       
 11566 
       
 11567 /****
       
 11568  *DATE_TO_USINT
       
 11569  */
       
 11570     case function_date_to_usint :
       
 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(date_type_name_c))
       
 11586             {
       
 11587         
       
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11589                 return return_type_symbol;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             ERROR;
       
 11594         }
       
 11595         
       
 11596     }/*function_date_to_usint*/
       
 11597     break;
       
 11598 
       
 11599 /****
       
 11600  *DATE_TO_UINT
       
 11601  */
       
 11602     case function_date_to_uint :
       
 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(date_type_name_c))
       
 11618             {
       
 11619         
       
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11621                 return return_type_symbol;
       
 11622                 
       
 11623             }
       
 11624             
       
 11625             ERROR;
       
 11626         }
       
 11627         
       
 11628     }/*function_date_to_uint*/
       
 11629     break;
       
 11630 
       
 11631 /****
       
 11632  *DATE_TO_UDINT
       
 11633  */
       
 11634     case function_date_to_udint :
       
 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(date_type_name_c))
       
 11650             {
       
 11651         
       
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11653                 return return_type_symbol;
       
 11654                 
       
 11655             }
       
 11656             
       
 11657             ERROR;
       
 11658         }
       
 11659         
       
 11660     }/*function_date_to_udint*/
       
 11661     break;
       
 11662 
       
 11663 /****
       
 11664  *DATE_TO_ULINT
       
 11665  */
       
 11666     case function_date_to_ulint :
       
 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(date_type_name_c))
       
 11682             {
       
 11683         
       
 11684                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11685                 return return_type_symbol;
       
 11686                 
       
 11687             }
       
 11688             
       
 11689             ERROR;
       
 11690         }
       
 11691         
       
 11692     }/*function_date_to_ulint*/
       
 11693     break;
       
 11694 
       
 11695 /****
       
 11696  *DATE_TO_BOOL
       
 11697  */
       
 11698     case function_date_to_bool :
       
 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(date_type_name_c))
       
 11714             {
       
 11715         
       
 11716                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11717                 return return_type_symbol;
       
 11718                 
       
 11719             }
       
 11720             
       
 11721             ERROR;
       
 11722         }
       
 11723         
       
 11724     }/*function_date_to_bool*/
       
 11725     break;
       
 11726 
       
 11727 /****
       
 11728  *DATE_TO_BYTE
       
 11729  */
       
 11730     case function_date_to_byte :
       
 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(date_type_name_c))
       
 11746             {
       
 11747         
       
 11748                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11749                 return return_type_symbol;
       
 11750                 
       
 11751             }
       
 11752             
       
 11753             ERROR;
       
 11754         }
       
 11755         
       
 11756     }/*function_date_to_byte*/
       
 11757     break;
       
 11758 
       
 11759 /****
       
 11760  *DATE_TO_WORD
       
 11761  */
       
 11762     case function_date_to_word :
       
 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(date_type_name_c))
       
 11778             {
       
 11779         
       
 11780                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11781                 return return_type_symbol;
       
 11782                 
       
 11783             }
       
 11784             
       
 11785             ERROR;
       
 11786         }
       
 11787         
       
 11788     }/*function_date_to_word*/
       
 11789     break;
       
 11790 
       
 11791 /****
       
 11792  *DATE_TO_DWORD
       
 11793  */
       
 11794     case function_date_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11810             {
       
 11811         
       
 11812                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11813                 return return_type_symbol;
       
 11814                 
       
 11815             }
       
 11816             
       
 11817             ERROR;
       
 11818         }
       
 11819         
       
 11820     }/*function_date_to_dword*/
       
 11821     break;
       
 11822 
       
 11823 /****
       
 11824  *DATE_TO_LWORD
       
 11825  */
       
 11826     case function_date_to_lword :
       
 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(date_type_name_c))
       
 11842             {
       
 11843         
       
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11845                 return return_type_symbol;
       
 11846                 
       
 11847             }
       
 11848             
       
 11849             ERROR;
       
 11850         }
       
 11851         
       
 11852     }/*function_date_to_lword*/
       
 11853     break;
       
 11854 
       
 11855 /****
       
 11856  *DATE_TO_STRING
       
 11857  */
       
 11858     case function_date_to_string :
       
 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(date_type_name_c))
       
 11874             {
       
 11875         
       
 11876                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11877                 return return_type_symbol;
       
 11878                 
       
 11879             }
       
 11880             
       
 11881             ERROR;
       
 11882         }
       
 11883         
       
 11884     }/*function_date_to_string*/
       
 11885     break;
       
 11886 
       
 11887 /****
       
 11888  *DATE_TO_WSTRING
       
 11889  */
       
 11890     case function_date_to_wstring :
       
 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(date_type_name_c))
       
 11906             {
       
 11907         
       
 11908                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11909                 return return_type_symbol;
       
 11910                 
       
 11911             }
       
 11912             
       
 11913             ERROR;
       
 11914         }
       
 11915         
       
 11916     }/*function_date_to_wstring*/
       
 11917     break;
       
 11918 
       
 11919 /****
       
 11920  *TOD_TO_REAL
       
 11921  */
       
 11922     case function_tod_to_real :
       
 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(tod_type_name_c))
       
 11938             {
       
 11939         
       
 11940                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11941                 return return_type_symbol;
       
 11942                 
       
 11943             }
       
 11944             
       
 11945             ERROR;
       
 11946         }
       
 11947         
       
 11948     }/*function_tod_to_real*/
       
 11949     break;
       
 11950 
       
 11951 /****
       
 11952  *TOD_TO_LREAL
       
 11953  */
       
 11954     case function_tod_to_lreal :
       
 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(tod_type_name_c))
       
 11970             {
       
 11971         
       
 11972                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11973                 return return_type_symbol;
       
 11974                 
       
 11975             }
       
 11976             
       
 11977             ERROR;
       
 11978         }
       
 11979         
       
 11980     }/*function_tod_to_lreal*/
       
 11981     break;
       
 11982 
       
 11983 /****
       
 11984  *TOD_TO_SINT
       
 11985  */
       
 11986     case function_tod_to_sint :
       
 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(tod_type_name_c))
       
 12002             {
       
 12003         
       
 12004                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12005                 return return_type_symbol;
       
 12006                 
       
 12007             }
       
 12008             
       
 12009             ERROR;
       
 12010         }
       
 12011         
       
 12012     }/*function_tod_to_sint*/
       
 12013     break;
       
 12014 
       
 12015 /****
       
 12016  *TOD_TO_INT
       
 12017  */
       
 12018     case function_tod_to_int :
       
 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(tod_type_name_c))
       
 12034             {
       
 12035         
       
 12036                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12037                 return return_type_symbol;
       
 12038                 
       
 12039             }
       
 12040             
       
 12041             ERROR;
       
 12042         }
       
 12043         
       
 12044     }/*function_tod_to_int*/
       
 12045     break;
       
 12046 
       
 12047 /****
       
 12048  *TOD_TO_DINT
       
 12049  */
       
 12050     case function_tod_to_dint :
       
 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(tod_type_name_c))
       
 12066             {
       
 12067         
       
 12068                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12069                 return return_type_symbol;
       
 12070                 
       
 12071             }
       
 12072             
       
 12073             ERROR;
       
 12074         }
       
 12075         
       
 12076     }/*function_tod_to_dint*/
       
 12077     break;
       
 12078 
       
 12079 /****
       
 12080  *TOD_TO_LINT
       
 12081  */
       
 12082     case function_tod_to_lint :
       
 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(tod_type_name_c))
       
 12098             {
       
 12099         
       
 12100                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12101                 return return_type_symbol;
       
 12102                 
       
 12103             }
       
 12104             
       
 12105             ERROR;
       
 12106         }
       
 12107         
       
 12108     }/*function_tod_to_lint*/
       
 12109     break;
       
 12110 
       
 12111 /****
       
 12112  *TOD_TO_USINT
       
 12113  */
       
 12114     case function_tod_to_usint :
       
 12115     {
       
 12116         symbol_c *last_type_symbol = NULL;
       
 12117 
       
 12118         {
       
 12119             identifier_c param_name("IN");
       
 12120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12122             
       
 12123             /* Get the value from a foo(<param_value>) style call */
       
 12124             if (IN_param_value == NULL)
       
 12125               IN_param_value = function_call_param_iterator.next();
       
 12126             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 ;
       
 12128             
       
 12129             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12130             {
       
 12131         
       
 12132                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12133                 return return_type_symbol;
       
 12134                 
       
 12135             }
       
 12136             
       
 12137             ERROR;
       
 12138         }
       
 12139         
       
 12140     }/*function_tod_to_usint*/
       
 12141     break;
       
 12142 
       
 12143 /****
       
 12144  *TOD_TO_UINT
       
 12145  */
       
 12146     case function_tod_to_uint :
       
 12147     {
       
 12148         symbol_c *last_type_symbol = NULL;
       
 12149 
       
 12150         {
       
 12151             identifier_c param_name("IN");
       
 12152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12154             
       
 12155             /* Get the value from a foo(<param_value>) style call */
       
 12156             if (IN_param_value == NULL)
       
 12157               IN_param_value = function_call_param_iterator.next();
       
 12158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12160             
       
 12161             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12162             {
       
 12163         
       
 12164                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12165                 return return_type_symbol;
       
 12166                 
       
 12167             }
       
 12168             
       
 12169             ERROR;
       
 12170         }
       
 12171         
       
 12172     }/*function_tod_to_uint*/
       
 12173     break;
       
 12174 
       
 12175 /****
       
 12176  *TOD_TO_UDINT
       
 12177  */
       
 12178     case function_tod_to_udint :
       
 12179     {
       
 12180         symbol_c *last_type_symbol = NULL;
       
 12181 
       
 12182         {
       
 12183             identifier_c param_name("IN");
       
 12184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12186             
       
 12187             /* Get the value from a foo(<param_value>) style call */
       
 12188             if (IN_param_value == NULL)
       
 12189               IN_param_value = function_call_param_iterator.next();
       
 12190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12192             
       
 12193             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12194             {
       
 12195         
       
 12196                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12197                 return return_type_symbol;
       
 12198                 
       
 12199             }
       
 12200             
       
 12201             ERROR;
       
 12202         }
       
 12203         
       
 12204     }/*function_tod_to_udint*/
       
 12205     break;
       
 12206 
       
 12207 /****
       
 12208  *TOD_TO_ULINT
       
 12209  */
       
 12210     case function_tod_to_ulint :
       
 12211     {
       
 12212         symbol_c *last_type_symbol = NULL;
       
 12213 
       
 12214         {
       
 12215             identifier_c param_name("IN");
       
 12216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12218             
       
 12219             /* Get the value from a foo(<param_value>) style call */
       
 12220             if (IN_param_value == NULL)
       
 12221               IN_param_value = function_call_param_iterator.next();
       
 12222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12224             
       
 12225             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12226             {
       
 12227         
       
 12228                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12229                 return return_type_symbol;
       
 12230                 
       
 12231             }
       
 12232             
       
 12233             ERROR;
       
 12234         }
       
 12235         
       
 12236     }/*function_tod_to_ulint*/
       
 12237     break;
       
 12238 
       
 12239 /****
       
 12240  *TOD_TO_BOOL
       
 12241  */
       
 12242     case function_tod_to_bool :
       
 12243     {
       
 12244         symbol_c *last_type_symbol = NULL;
       
 12245 
       
 12246         {
       
 12247             identifier_c param_name("IN");
       
 12248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12250             
       
 12251             /* Get the value from a foo(<param_value>) style call */
       
 12252             if (IN_param_value == NULL)
       
 12253               IN_param_value = function_call_param_iterator.next();
       
 12254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12256             
       
 12257             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12258             {
       
 12259         
       
 12260                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12261                 return return_type_symbol;
       
 12262                 
       
 12263             }
       
 12264             
       
 12265             ERROR;
       
 12266         }
       
 12267         
       
 12268     }/*function_tod_to_bool*/
       
 12269     break;
       
 12270 
       
 12271 /****
       
 12272  *TOD_TO_BYTE
       
 12273  */
       
 12274     case function_tod_to_byte :
       
 12275     {
       
 12276         symbol_c *last_type_symbol = NULL;
       
 12277 
       
 12278         {
       
 12279             identifier_c param_name("IN");
       
 12280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12282             
       
 12283             /* Get the value from a foo(<param_value>) style call */
       
 12284             if (IN_param_value == NULL)
       
 12285               IN_param_value = function_call_param_iterator.next();
       
 12286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12288             
       
 12289             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12290             {
       
 12291         
       
 12292                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12293                 return return_type_symbol;
       
 12294                 
       
 12295             }
       
 12296             
       
 12297             ERROR;
       
 12298         }
       
 12299         
       
 12300     }/*function_tod_to_byte*/
       
 12301     break;
       
 12302 
       
 12303 /****
       
 12304  *TOD_TO_WORD
       
 12305  */
       
 12306     case function_tod_to_word :
       
 12307     {
       
 12308         symbol_c *last_type_symbol = NULL;
       
 12309 
       
 12310         {
       
 12311             identifier_c param_name("IN");
       
 12312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12314             
       
 12315             /* Get the value from a foo(<param_value>) style call */
       
 12316             if (IN_param_value == NULL)
       
 12317               IN_param_value = function_call_param_iterator.next();
       
 12318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12320             
       
 12321             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12322             {
       
 12323         
       
 12324                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12325                 return return_type_symbol;
       
 12326                 
       
 12327             }
       
 12328             
       
 12329             ERROR;
       
 12330         }
       
 12331         
       
 12332     }/*function_tod_to_word*/
       
 12333     break;
       
 12334 
       
 12335 /****
       
 12336  *TOD_TO_DWORD
       
 12337  */
       
 12338     case function_tod_to_dword :
       
 12339     {
       
 12340         symbol_c *last_type_symbol = NULL;
       
 12341 
       
 12342         {
       
 12343             identifier_c param_name("IN");
       
 12344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12346             
       
 12347             /* Get the value from a foo(<param_value>) style call */
       
 12348             if (IN_param_value == NULL)
       
 12349               IN_param_value = function_call_param_iterator.next();
       
 12350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12352             
       
 12353             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12354             {
       
 12355         
       
 12356                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12357                 return return_type_symbol;
       
 12358                 
       
 12359             }
       
 12360             
       
 12361             ERROR;
       
 12362         }
       
 12363         
       
 12364     }/*function_tod_to_dword*/
       
 12365     break;
       
 12366 
       
 12367 /****
       
 12368  *TOD_TO_LWORD
       
 12369  */
       
 12370     case function_tod_to_lword :
       
 12371     {
       
 12372         symbol_c *last_type_symbol = NULL;
       
 12373 
       
 12374         {
       
 12375             identifier_c param_name("IN");
       
 12376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12378             
       
 12379             /* Get the value from a foo(<param_value>) style call */
       
 12380             if (IN_param_value == NULL)
       
 12381               IN_param_value = function_call_param_iterator.next();
       
 12382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12384             
       
 12385             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12386             {
       
 12387         
       
 12388                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12389                 return return_type_symbol;
       
 12390                 
       
 12391             }
       
 12392             
       
 12393             ERROR;
       
 12394         }
       
 12395         
       
 12396     }/*function_tod_to_lword*/
       
 12397     break;
       
 12398 
       
 12399 /****
       
 12400  *TOD_TO_STRING
       
 12401  */
       
 12402     case function_tod_to_string :
       
 12403     {
       
 12404         symbol_c *last_type_symbol = NULL;
       
 12405 
       
 12406         {
       
 12407             identifier_c param_name("IN");
       
 12408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12410             
       
 12411             /* Get the value from a foo(<param_value>) style call */
       
 12412             if (IN_param_value == NULL)
       
 12413               IN_param_value = function_call_param_iterator.next();
       
 12414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12416             
       
 12417             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12418             {
       
 12419         
       
 12420                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12421                 return return_type_symbol;
       
 12422                 
       
 12423             }
       
 12424             
       
 12425             ERROR;
       
 12426         }
       
 12427         
       
 12428     }/*function_tod_to_string*/
       
 12429     break;
       
 12430 
       
 12431 /****
       
 12432  *TOD_TO_WSTRING
       
 12433  */
       
 12434     case function_tod_to_wstring :
       
 12435     {
       
 12436         symbol_c *last_type_symbol = NULL;
       
 12437 
       
 12438         {
       
 12439             identifier_c param_name("IN");
       
 12440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12442             
       
 12443             /* Get the value from a foo(<param_value>) style call */
       
 12444             if (IN_param_value == NULL)
       
 12445               IN_param_value = function_call_param_iterator.next();
       
 12446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12448             
       
 12449             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12450             {
       
 12451         
       
 12452                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12453                 return return_type_symbol;
       
 12454                 
       
 12455             }
       
 12456             
       
 12457             ERROR;
       
 12458         }
       
 12459         
       
 12460     }/*function_tod_to_wstring*/
       
 12461     break;
       
 12462 
       
 12463 /****
       
 12464  *DT_TO_REAL
       
 12465  */
       
 12466     case function_dt_to_real :
       
 12467     {
       
 12468         symbol_c *last_type_symbol = NULL;
       
 12469 
       
 12470         {
       
 12471             identifier_c param_name("IN");
       
 12472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12474             
       
 12475             /* Get the value from a foo(<param_value>) style call */
       
 12476             if (IN_param_value == NULL)
       
 12477               IN_param_value = function_call_param_iterator.next();
       
 12478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12480             
       
 12481             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12482             {
       
 12483         
       
 12484                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12485                 return return_type_symbol;
       
 12486                 
       
 12487             }
       
 12488             
       
 12489             ERROR;
       
 12490         }
       
 12491         
       
 12492     }/*function_dt_to_real*/
       
 12493     break;
       
 12494 
       
 12495 /****
       
 12496  *DT_TO_LREAL
       
 12497  */
       
 12498     case function_dt_to_lreal :
       
 12499     {
       
 12500         symbol_c *last_type_symbol = NULL;
       
 12501 
       
 12502         {
       
 12503             identifier_c param_name("IN");
       
 12504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12506             
       
 12507             /* Get the value from a foo(<param_value>) style call */
       
 12508             if (IN_param_value == NULL)
       
 12509               IN_param_value = function_call_param_iterator.next();
       
 12510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12512             
       
 12513             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12514             {
       
 12515         
       
 12516                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12517                 return return_type_symbol;
       
 12518                 
       
 12519             }
       
 12520             
       
 12521             ERROR;
       
 12522         }
       
 12523         
       
 12524     }/*function_dt_to_lreal*/
       
 12525     break;
       
 12526 
       
 12527 /****
       
 12528  *DT_TO_SINT
       
 12529  */
       
 12530     case function_dt_to_sint :
       
 12531     {
       
 12532         symbol_c *last_type_symbol = NULL;
       
 12533 
       
 12534         {
       
 12535             identifier_c param_name("IN");
       
 12536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12538             
       
 12539             /* Get the value from a foo(<param_value>) style call */
       
 12540             if (IN_param_value == NULL)
       
 12541               IN_param_value = function_call_param_iterator.next();
       
 12542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12544             
       
 12545             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12546             {
       
 12547         
       
 12548                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12549                 return return_type_symbol;
       
 12550                 
       
 12551             }
       
 12552             
       
 12553             ERROR;
       
 12554         }
       
 12555         
       
 12556     }/*function_dt_to_sint*/
       
 12557     break;
       
 12558 
       
 12559 /****
       
 12560  *DT_TO_INT
       
 12561  */
       
 12562     case function_dt_to_int :
       
 12563     {
       
 12564         symbol_c *last_type_symbol = NULL;
       
 12565 
       
 12566         {
       
 12567             identifier_c param_name("IN");
       
 12568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12570             
       
 12571             /* Get the value from a foo(<param_value>) style call */
       
 12572             if (IN_param_value == NULL)
       
 12573               IN_param_value = function_call_param_iterator.next();
       
 12574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12576             
       
 12577             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12578             {
       
 12579         
       
 12580                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12581                 return return_type_symbol;
       
 12582                 
       
 12583             }
       
 12584             
       
 12585             ERROR;
       
 12586         }
       
 12587         
       
 12588     }/*function_dt_to_int*/
       
 12589     break;
       
 12590 
       
 12591 /****
       
 12592  *DT_TO_DINT
       
 12593  */
       
 12594     case function_dt_to_dint :
       
 12595     {
       
 12596         symbol_c *last_type_symbol = NULL;
       
 12597 
       
 12598         {
       
 12599             identifier_c param_name("IN");
       
 12600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12602             
       
 12603             /* Get the value from a foo(<param_value>) style call */
       
 12604             if (IN_param_value == NULL)
       
 12605               IN_param_value = function_call_param_iterator.next();
       
 12606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12608             
       
 12609             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12610             {
       
 12611         
       
 12612                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12613                 return return_type_symbol;
       
 12614                 
       
 12615             }
       
 12616             
       
 12617             ERROR;
       
 12618         }
       
 12619         
       
 12620     }/*function_dt_to_dint*/
       
 12621     break;
       
 12622 
       
 12623 /****
       
 12624  *DT_TO_LINT
       
 12625  */
       
 12626     case function_dt_to_lint :
       
 12627     {
       
 12628         symbol_c *last_type_symbol = NULL;
       
 12629 
       
 12630         {
       
 12631             identifier_c param_name("IN");
       
 12632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12634             
       
 12635             /* Get the value from a foo(<param_value>) style call */
       
 12636             if (IN_param_value == NULL)
       
 12637               IN_param_value = function_call_param_iterator.next();
       
 12638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12640             
       
 12641             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12642             {
       
 12643         
       
 12644                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12645                 return return_type_symbol;
       
 12646                 
       
 12647             }
       
 12648             
       
 12649             ERROR;
       
 12650         }
       
 12651         
       
 12652     }/*function_dt_to_lint*/
       
 12653     break;
       
 12654 
       
 12655 /****
       
 12656  *DT_TO_USINT
       
 12657  */
       
 12658     case function_dt_to_usint :
       
 12659     {
       
 12660         symbol_c *last_type_symbol = NULL;
       
 12661 
       
 12662         {
       
 12663             identifier_c param_name("IN");
       
 12664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12666             
       
 12667             /* Get the value from a foo(<param_value>) style call */
       
 12668             if (IN_param_value == NULL)
       
 12669               IN_param_value = function_call_param_iterator.next();
       
 12670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12672             
       
 12673             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12674             {
       
 12675         
       
 12676                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12677                 return return_type_symbol;
       
 12678                 
       
 12679             }
       
 12680             
       
 12681             ERROR;
       
 12682         }
       
 12683         
       
 12684     }/*function_dt_to_usint*/
       
 12685     break;
       
 12686 
       
 12687 /****
       
 12688  *DT_TO_UINT
       
 12689  */
       
 12690     case function_dt_to_uint :
       
 12691     {
       
 12692         symbol_c *last_type_symbol = NULL;
       
 12693 
       
 12694         {
       
 12695             identifier_c param_name("IN");
       
 12696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12698             
       
 12699             /* Get the value from a foo(<param_value>) style call */
       
 12700             if (IN_param_value == NULL)
       
 12701               IN_param_value = function_call_param_iterator.next();
       
 12702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12704             
       
 12705             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12706             {
       
 12707         
       
 12708                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12709                 return return_type_symbol;
       
 12710                 
       
 12711             }
       
 12712             
       
 12713             ERROR;
       
 12714         }
       
 12715         
       
 12716     }/*function_dt_to_uint*/
       
 12717     break;
       
 12718 
       
 12719 /****
       
 12720  *DT_TO_UDINT
       
 12721  */
       
 12722     case function_dt_to_udint :
       
 12723     {
       
 12724         symbol_c *last_type_symbol = NULL;
       
 12725 
       
 12726         {
       
 12727             identifier_c param_name("IN");
       
 12728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12730             
       
 12731             /* Get the value from a foo(<param_value>) style call */
       
 12732             if (IN_param_value == NULL)
       
 12733               IN_param_value = function_call_param_iterator.next();
       
 12734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12736             
       
 12737             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12738             {
       
 12739         
       
 12740                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12741                 return return_type_symbol;
       
 12742                 
       
 12743             }
       
 12744             
       
 12745             ERROR;
       
 12746         }
       
 12747         
       
 12748     }/*function_dt_to_udint*/
       
 12749     break;
       
 12750 
       
 12751 /****
       
 12752  *DT_TO_ULINT
       
 12753  */
       
 12754     case function_dt_to_ulint :
       
 12755     {
       
 12756         symbol_c *last_type_symbol = NULL;
       
 12757 
       
 12758         {
       
 12759             identifier_c param_name("IN");
       
 12760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12762             
       
 12763             /* Get the value from a foo(<param_value>) style call */
       
 12764             if (IN_param_value == NULL)
       
 12765               IN_param_value = function_call_param_iterator.next();
       
 12766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12768             
       
 12769             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12770             {
       
 12771         
       
 12772                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12773                 return return_type_symbol;
       
 12774                 
       
 12775             }
       
 12776             
       
 12777             ERROR;
       
 12778         }
       
 12779         
       
 12780     }/*function_dt_to_ulint*/
       
 12781     break;
       
 12782 
       
 12783 /****
       
 12784  *DT_TO_BOOL
       
 12785  */
       
 12786     case function_dt_to_bool :
       
 12787     {
       
 12788         symbol_c *last_type_symbol = NULL;
       
 12789 
       
 12790         {
       
 12791             identifier_c param_name("IN");
       
 12792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12794             
       
 12795             /* Get the value from a foo(<param_value>) style call */
       
 12796             if (IN_param_value == NULL)
       
 12797               IN_param_value = function_call_param_iterator.next();
       
 12798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12800             
       
 12801             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12802             {
       
 12803         
       
 12804                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12805                 return return_type_symbol;
       
 12806                 
       
 12807             }
       
 12808             
       
 12809             ERROR;
       
 12810         }
       
 12811         
       
 12812     }/*function_dt_to_bool*/
       
 12813     break;
       
 12814 
       
 12815 /****
       
 12816  *DT_TO_BYTE
       
 12817  */
       
 12818     case function_dt_to_byte :
       
 12819     {
       
 12820         symbol_c *last_type_symbol = NULL;
       
 12821 
       
 12822         {
       
 12823             identifier_c param_name("IN");
       
 12824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12826             
       
 12827             /* Get the value from a foo(<param_value>) style call */
       
 12828             if (IN_param_value == NULL)
       
 12829               IN_param_value = function_call_param_iterator.next();
       
 12830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12832             
       
 12833             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12834             {
       
 12835         
       
 12836                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12837                 return return_type_symbol;
       
 12838                 
       
 12839             }
       
 12840             
       
 12841             ERROR;
       
 12842         }
       
 12843         
       
 12844     }/*function_dt_to_byte*/
       
 12845     break;
       
 12846 
       
 12847 /****
       
 12848  *DT_TO_WORD
       
 12849  */
       
 12850     case function_dt_to_word :
       
 12851     {
       
 12852         symbol_c *last_type_symbol = NULL;
       
 12853 
       
 12854         {
       
 12855             identifier_c param_name("IN");
       
 12856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12858             
       
 12859             /* Get the value from a foo(<param_value>) style call */
       
 12860             if (IN_param_value == NULL)
       
 12861               IN_param_value = function_call_param_iterator.next();
       
 12862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12864             
       
 12865             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12866             {
       
 12867         
       
 12868                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12869                 return return_type_symbol;
       
 12870                 
       
 12871             }
       
 12872             
       
 12873             ERROR;
       
 12874         }
       
 12875         
       
 12876     }/*function_dt_to_word*/
       
 12877     break;
       
 12878 
       
 12879 /****
       
 12880  *DT_TO_DWORD
       
 12881  */
       
 12882     case function_dt_to_dword :
       
 12883     {
       
 12884         symbol_c *last_type_symbol = NULL;
       
 12885 
       
 12886         {
       
 12887             identifier_c param_name("IN");
       
 12888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12890             
       
 12891             /* Get the value from a foo(<param_value>) style call */
       
 12892             if (IN_param_value == NULL)
       
 12893               IN_param_value = function_call_param_iterator.next();
       
 12894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12896             
       
 12897             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12898             {
       
 12899         
       
 12900                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12901                 return return_type_symbol;
       
 12902                 
       
 12903             }
       
 12904             
       
 12905             ERROR;
       
 12906         }
       
 12907         
       
 12908     }/*function_dt_to_dword*/
       
 12909     break;
       
 12910 
       
 12911 /****
       
 12912  *DT_TO_LWORD
       
 12913  */
       
 12914     case function_dt_to_lword :
       
 12915     {
       
 12916         symbol_c *last_type_symbol = NULL;
       
 12917 
       
 12918         {
       
 12919             identifier_c param_name("IN");
       
 12920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12922             
       
 12923             /* Get the value from a foo(<param_value>) style call */
       
 12924             if (IN_param_value == NULL)
       
 12925               IN_param_value = function_call_param_iterator.next();
       
 12926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12928             
       
 12929             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12930             {
       
 12931         
       
 12932                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12933                 return return_type_symbol;
       
 12934                 
       
 12935             }
       
 12936             
       
 12937             ERROR;
       
 12938         }
       
 12939         
       
 12940     }/*function_dt_to_lword*/
       
 12941     break;
       
 12942 
       
 12943 /****
       
 12944  *DT_TO_STRING
       
 12945  */
       
 12946     case function_dt_to_string :
       
 12947     {
       
 12948         symbol_c *last_type_symbol = NULL;
       
 12949 
       
 12950         {
       
 12951             identifier_c param_name("IN");
       
 12952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12954             
       
 12955             /* Get the value from a foo(<param_value>) style call */
       
 12956             if (IN_param_value == NULL)
       
 12957               IN_param_value = function_call_param_iterator.next();
       
 12958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12960             
       
 12961             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12962             {
       
 12963         
       
 12964                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12965                 return return_type_symbol;
       
 12966                 
       
 12967             }
       
 12968             
       
 12969             ERROR;
       
 12970         }
       
 12971         
       
 12972     }/*function_dt_to_string*/
       
 12973     break;
       
 12974 
       
 12975 /****
       
 12976  *DT_TO_WSTRING
       
 12977  */
       
 12978     case function_dt_to_wstring :
       
 12979     {
       
 12980         symbol_c *last_type_symbol = NULL;
       
 12981 
       
 12982         {
       
 12983             identifier_c param_name("IN");
       
 12984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12986             
       
 12987             /* Get the value from a foo(<param_value>) style call */
       
 12988             if (IN_param_value == NULL)
       
 12989               IN_param_value = function_call_param_iterator.next();
       
 12990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12992             
       
 12993             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12994             {
       
 12995         
       
 12996                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12997                 return return_type_symbol;
       
 12998                 
       
 12999             }
       
 13000             
       
 13001             ERROR;
       
 13002         }
       
 13003         
       
 13004     }/*function_dt_to_wstring*/
       
 13005     break;
       
 13006 
       
 13007 /****
       
 13008  *TRUNC
       
 13009  */
       
 13010     case function_trunc :
       
 13011     {
       
 13012         symbol_c *last_type_symbol = NULL;
       
 13013 
       
 13014         {
       
 13015             identifier_c param_name("IN");
       
 13016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13018             
       
 13019             /* Get the value from a foo(<param_value>) style call */
       
 13020             if (IN_param_value == NULL)
       
 13021               IN_param_value = function_call_param_iterator.next();
       
 13022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13024             
       
 13025             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13026             {
       
 13027         
       
 13028                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13029                 return return_type_symbol;
       
 13030                 
       
 13031             }
       
 13032             
       
 13033             ERROR;
       
 13034         }
       
 13035         
       
 13036     }/*function_trunc*/
       
 13037     break;
       
 13038 
       
 13039 /****
       
 13040  *BCD_TO_SINT
       
 13041  */
       
 13042     case function_bcd_to_sint :
       
 13043     {
       
 13044         symbol_c *last_type_symbol = NULL;
       
 13045 
       
 13046         {
       
 13047             identifier_c param_name("IN");
       
 13048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13050             
       
 13051             /* Get the value from a foo(<param_value>) style call */
       
 13052             if (IN_param_value == NULL)
       
 13053               IN_param_value = function_call_param_iterator.next();
       
 13054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13056             
       
 13057             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13058             {
       
 13059         
       
 13060                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13061                 return return_type_symbol;
       
 13062                 
       
 13063             }
       
 13064             
       
 13065             ERROR;
       
 13066         }
       
 13067         
       
 13068     }/*function_bcd_to_sint*/
       
 13069     break;
       
 13070 
       
 13071 /****
       
 13072  *BCD_TO_INT
       
 13073  */
       
 13074     case function_bcd_to_int :
       
 13075     {
       
 13076         symbol_c *last_type_symbol = NULL;
       
 13077 
       
 13078         {
       
 13079             identifier_c param_name("IN");
       
 13080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13082             
       
 13083             /* Get the value from a foo(<param_value>) style call */
       
 13084             if (IN_param_value == NULL)
       
 13085               IN_param_value = function_call_param_iterator.next();
       
 13086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13088             
       
 13089             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13090             {
       
 13091         
       
 13092                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13093                 return return_type_symbol;
       
 13094                 
       
 13095             }
       
 13096             
       
 13097             ERROR;
       
 13098         }
       
 13099         
       
 13100     }/*function_bcd_to_int*/
       
 13101     break;
       
 13102 
       
 13103 /****
       
 13104  *BCD_TO_DINT
       
 13105  */
       
 13106     case function_bcd_to_dint :
       
 13107     {
       
 13108         symbol_c *last_type_symbol = NULL;
       
 13109 
       
 13110         {
       
 13111             identifier_c param_name("IN");
       
 13112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13114             
       
 13115             /* Get the value from a foo(<param_value>) style call */
       
 13116             if (IN_param_value == NULL)
       
 13117               IN_param_value = function_call_param_iterator.next();
       
 13118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13120             
       
 13121             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13122             {
       
 13123         
       
 13124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13125                 return return_type_symbol;
       
 13126                 
       
 13127             }
       
 13128             
       
 13129             ERROR;
       
 13130         }
       
 13131         
       
 13132     }/*function_bcd_to_dint*/
       
 13133     break;
       
 13134 
       
 13135 /****
       
 13136  *BCD_TO_LINT
       
 13137  */
       
 13138     case function_bcd_to_lint :
       
 13139     {
       
 13140         symbol_c *last_type_symbol = NULL;
       
 13141 
       
 13142         {
       
 13143             identifier_c param_name("IN");
       
 13144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13146             
       
 13147             /* Get the value from a foo(<param_value>) style call */
       
 13148             if (IN_param_value == NULL)
       
 13149               IN_param_value = function_call_param_iterator.next();
       
 13150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13152             
       
 13153             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13154             {
       
 13155         
       
 13156                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13157                 return return_type_symbol;
       
 13158                 
       
 13159             }
       
 13160             
       
 13161             ERROR;
       
 13162         }
       
 13163         
       
 13164     }/*function_bcd_to_lint*/
       
 13165     break;
       
 13166 
       
 13167 /****
       
 13168  *BCD_TO_USINT
       
 13169  */
       
 13170     case function_bcd_to_usint :
       
 13171     {
       
 13172         symbol_c *last_type_symbol = NULL;
       
 13173 
       
 13174         {
       
 13175             identifier_c param_name("IN");
       
 13176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13178             
       
 13179             /* Get the value from a foo(<param_value>) style call */
       
 13180             if (IN_param_value == NULL)
       
 13181               IN_param_value = function_call_param_iterator.next();
       
 13182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13184             
       
 13185             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13186             {
       
 13187         
       
 13188                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13189                 return return_type_symbol;
       
 13190                 
       
 13191             }
       
 13192             
       
 13193             ERROR;
       
 13194         }
       
 13195         
       
 13196     }/*function_bcd_to_usint*/
       
 13197     break;
       
 13198 
       
 13199 /****
       
 13200  *BCD_TO_UINT
       
 13201  */
       
 13202     case function_bcd_to_uint :
       
 13203     {
       
 13204         symbol_c *last_type_symbol = NULL;
       
 13205 
       
 13206         {
       
 13207             identifier_c param_name("IN");
       
 13208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13210             
       
 13211             /* Get the value from a foo(<param_value>) style call */
       
 13212             if (IN_param_value == NULL)
       
 13213               IN_param_value = function_call_param_iterator.next();
       
 13214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13216             
       
 13217             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13218             {
       
 13219         
       
 13220                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13221                 return return_type_symbol;
       
 13222                 
       
 13223             }
       
 13224             
       
 13225             ERROR;
       
 13226         }
       
 13227         
       
 13228     }/*function_bcd_to_uint*/
       
 13229     break;
       
 13230 
       
 13231 /****
       
 13232  *BCD_TO_UDINT
       
 13233  */
       
 13234     case function_bcd_to_udint :
       
 13235     {
       
 13236         symbol_c *last_type_symbol = NULL;
       
 13237 
       
 13238         {
       
 13239             identifier_c param_name("IN");
       
 13240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13242             
       
 13243             /* Get the value from a foo(<param_value>) style call */
       
 13244             if (IN_param_value == NULL)
       
 13245               IN_param_value = function_call_param_iterator.next();
       
 13246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13248             
       
 13249             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13250             {
       
 13251         
       
 13252                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13253                 return return_type_symbol;
       
 13254                 
       
 13255             }
       
 13256             
       
 13257             ERROR;
       
 13258         }
       
 13259         
       
 13260     }/*function_bcd_to_udint*/
       
 13261     break;
       
 13262 
       
 13263 /****
       
 13264  *BCD_TO_ULINT
       
 13265  */
       
 13266     case function_bcd_to_ulint :
       
 13267     {
       
 13268         symbol_c *last_type_symbol = NULL;
       
 13269 
       
 13270         {
       
 13271             identifier_c param_name("IN");
       
 13272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13274             
       
 13275             /* Get the value from a foo(<param_value>) style call */
       
 13276             if (IN_param_value == NULL)
       
 13277               IN_param_value = function_call_param_iterator.next();
       
 13278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13280             
       
 13281             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13282             {
       
 13283         
       
 13284                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13285                 return return_type_symbol;
       
 13286                 
       
 13287             }
       
 13288             
       
 13289             ERROR;
       
 13290         }
       
 13291         
       
 13292     }/*function_bcd_to_ulint*/
       
 13293     break;
       
 13294 
       
 13295 /****
       
 13296  *SINT_TO_BCD
       
 13297  */
       
 13298     case function_sint_to_bcd :
       
 13299     {
       
 13300         symbol_c *last_type_symbol = NULL;
       
 13301 
       
 13302         {
       
 13303             identifier_c param_name("IN");
       
 13304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13306             
       
 13307             /* Get the value from a foo(<param_value>) style call */
       
 13308             if (IN_param_value == NULL)
       
 13309               IN_param_value = function_call_param_iterator.next();
       
 13310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13312             
       
 13313             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 13314             {
       
 13315         
       
 13316                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13317                 return return_type_symbol;
       
 13318                 
       
 13319             }
       
 13320             
       
 13321             ERROR;
       
 13322         }
       
 13323         
       
 13324     }/*function_sint_to_bcd*/
       
 13325     break;
       
 13326 
       
 13327 /****
       
 13328  *INT_TO_BCD
       
 13329  */
       
 13330     case function_int_to_bcd :
       
 13331     {
       
 13332         symbol_c *last_type_symbol = NULL;
       
 13333 
       
 13334         {
       
 13335             identifier_c param_name("IN");
       
 13336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13338             
       
 13339             /* Get the value from a foo(<param_value>) style call */
       
 13340             if (IN_param_value == NULL)
       
 13341               IN_param_value = function_call_param_iterator.next();
       
 13342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13344             
       
 13345             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13346             {
       
 13347         
       
 13348                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13349                 return return_type_symbol;
       
 13350                 
       
 13351             }
       
 13352             
       
 13353             ERROR;
       
 13354         }
       
 13355         
       
 13356     }/*function_int_to_bcd*/
       
 13357     break;
       
 13358 
       
 13359 /****
       
 13360  *DINT_TO_BCD
       
 13361  */
       
 13362     case function_dint_to_bcd :
       
 13363     {
       
 13364         symbol_c *last_type_symbol = NULL;
       
 13365 
       
 13366         {
       
 13367             identifier_c param_name("IN");
       
 13368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13370             
       
 13371             /* Get the value from a foo(<param_value>) style call */
       
 13372             if (IN_param_value == NULL)
       
 13373               IN_param_value = function_call_param_iterator.next();
       
 13374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13376             
       
 13377             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 13378             {
       
 13379         
       
 13380                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13381                 return return_type_symbol;
       
 13382                 
       
 13383             }
       
 13384             
       
 13385             ERROR;
       
 13386         }
       
 13387         
       
 13388     }/*function_dint_to_bcd*/
       
 13389     break;
       
 13390 
       
 13391 /****
       
 13392  *LINT_TO_BCD
       
 13393  */
       
 13394     case function_lint_to_bcd :
       
 13395     {
       
 13396         symbol_c *last_type_symbol = NULL;
       
 13397 
       
 13398         {
       
 13399             identifier_c param_name("IN");
       
 13400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13402             
       
 13403             /* Get the value from a foo(<param_value>) style call */
       
 13404             if (IN_param_value == NULL)
       
 13405               IN_param_value = function_call_param_iterator.next();
       
 13406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13408             
       
 13409             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 13410             {
       
 13411         
       
 13412                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13413                 return return_type_symbol;
       
 13414                 
       
 13415             }
       
 13416             
       
 13417             ERROR;
       
 13418         }
       
 13419         
       
 13420     }/*function_lint_to_bcd*/
       
 13421     break;
       
 13422 
       
 13423 /****
       
 13424  *USINT_TO_BCD
       
 13425  */
       
 13426     case function_usint_to_bcd :
       
 13427     {
       
 13428         symbol_c *last_type_symbol = NULL;
       
 13429 
       
 13430         {
       
 13431             identifier_c param_name("IN");
       
 13432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13434             
       
 13435             /* Get the value from a foo(<param_value>) style call */
       
 13436             if (IN_param_value == NULL)
       
 13437               IN_param_value = function_call_param_iterator.next();
       
 13438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13440             
       
 13441             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 13442             {
       
 13443         
       
 13444                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13445                 return return_type_symbol;
       
 13446                 
       
 13447             }
       
 13448             
       
 13449             ERROR;
       
 13450         }
       
 13451         
       
 13452     }/*function_usint_to_bcd*/
       
 13453     break;
       
 13454 
       
 13455 /****
       
 13456  *UINT_TO_BCD
       
 13457  */
       
 13458     case function_uint_to_bcd :
       
 13459     {
       
 13460         symbol_c *last_type_symbol = NULL;
       
 13461 
       
 13462         {
       
 13463             identifier_c param_name("IN");
       
 13464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13466             
       
 13467             /* Get the value from a foo(<param_value>) style call */
       
 13468             if (IN_param_value == NULL)
       
 13469               IN_param_value = function_call_param_iterator.next();
       
 13470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13472             
       
 13473             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 13474             {
       
 13475         
       
 13476                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13477                 return return_type_symbol;
       
 13478                 
       
 13479             }
       
 13480             
       
 13481             ERROR;
       
 13482         }
       
 13483         
       
 13484     }/*function_uint_to_bcd*/
       
 13485     break;
       
 13486 
       
 13487 /****
       
 13488  *UDINT_TO_BCD
       
 13489  */
       
 13490     case function_udint_to_bcd :
       
 13491     {
       
 13492         symbol_c *last_type_symbol = NULL;
       
 13493 
       
 13494         {
       
 13495             identifier_c param_name("IN");
       
 13496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13498             
       
 13499             /* Get the value from a foo(<param_value>) style call */
       
 13500             if (IN_param_value == NULL)
       
 13501               IN_param_value = function_call_param_iterator.next();
       
 13502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13504             
       
 13505             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 13506             {
       
 13507         
       
 13508                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13509                 return return_type_symbol;
       
 13510                 
       
 13511             }
       
 13512             
       
 13513             ERROR;
       
 13514         }
       
 13515         
       
 13516     }/*function_udint_to_bcd*/
       
 13517     break;
       
 13518 
       
 13519 /****
       
 13520  *ULINT_TO_BCD
       
 13521  */
       
 13522     case function_ulint_to_bcd :
       
 13523     {
       
 13524         symbol_c *last_type_symbol = NULL;
       
 13525 
       
 13526         {
       
 13527             identifier_c param_name("IN");
       
 13528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13530             
       
 13531             /* Get the value from a foo(<param_value>) style call */
       
 13532             if (IN_param_value == NULL)
       
 13533               IN_param_value = function_call_param_iterator.next();
       
 13534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13536             
       
 13537             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13538             {
       
 13539         
       
 13540                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13541                 return return_type_symbol;
       
 13542                 
       
 13543             }
       
 13544             
       
 13545             ERROR;
       
 13546         }
       
 13547         
       
 13548     }/*function_ulint_to_bcd*/
       
 13549     break;
       
 13550 
       
 13551 /****
       
 13552  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 13553  */
       
 13554     case function_date_and_time_to_time_of_day :
       
 13555     {
       
 13556         symbol_c *last_type_symbol = NULL;
       
 13557 
       
 13558         {
       
 13559             identifier_c param_name("IN");
       
 13560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13562             
       
 13563             /* Get the value from a foo(<param_value>) style call */
       
 13564             if (IN_param_value == NULL)
       
 13565               IN_param_value = function_call_param_iterator.next();
       
 13566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13568             
       
 13569             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13570             {
       
 13571         
       
 13572                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13573                 return return_type_symbol;
       
 13574                 
       
 13575             }
       
 13576             
       
 13577             ERROR;
       
 13578         }
       
 13579         
       
 13580     }/*function_date_and_time_to_time_of_day*/
       
 13581     break;
       
 13582 
       
 13583 /****
       
 13584  *DATE_AND_TIME_TO_DATE
       
 13585  */
       
 13586     case function_date_and_time_to_date :
       
 13587     {
       
 13588         symbol_c *last_type_symbol = NULL;
       
 13589 
       
 13590         {
       
 13591             identifier_c param_name("IN");
       
 13592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13594             
       
 13595             /* Get the value from a foo(<param_value>) style call */
       
 13596             if (IN_param_value == NULL)
       
 13597               IN_param_value = function_call_param_iterator.next();
       
 13598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13600             
       
 13601             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13602             {
       
 13603         
       
 13604                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13605                 return return_type_symbol;
       
 13606                 
       
 13607             }
       
 13608             
       
 13609             ERROR;
       
 13610         }
       
 13611         
       
 13612     }/*function_date_and_time_to_date*/
       
 13613     break;
       
 13614 
       
 13615 /****
       
 13616  *ABS
       
 13617  */
       
 13618     case function_abs :
       
 13619     {
       
 13620         symbol_c *last_type_symbol = NULL;
       
 13621 
       
 13622         {
       
 13623             identifier_c param_name("IN");
       
 13624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13626             
       
 13627             /* Get the value from a foo(<param_value>) style call */
       
 13628             if (IN_param_value == NULL)
       
 13629               IN_param_value = function_call_param_iterator.next();
       
 13630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13632             
       
 13633             if(search_expression_type->is_num_type(IN_type_symbol))
       
 13634             {
       
 13635         
       
 13636                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13637                 return return_type_symbol;
       
 13638                 
       
 13639             }
       
 13640             
       
 13641             ERROR;
       
 13642         }
       
 13643         
       
 13644     }/*function_abs*/
       
 13645     break;
       
 13646 
       
 13647 /****
       
 13648  *SQRT
       
 13649  */
       
 13650     case function_sqrt :
       
 13651     {
       
 13652         symbol_c *last_type_symbol = NULL;
       
 13653 
       
 13654         {
       
 13655             identifier_c param_name("IN");
       
 13656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13658             
       
 13659             /* Get the value from a foo(<param_value>) style call */
       
 13660             if (IN_param_value == NULL)
       
 13661               IN_param_value = function_call_param_iterator.next();
       
 13662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13664             
       
 13665             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13666             {
       
 13667         
       
 13668                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13669                 return return_type_symbol;
       
 13670                 
       
 13671             }
       
 13672             
       
 13673             ERROR;
       
 13674         }
       
 13675         
       
 13676     }/*function_sqrt*/
       
 13677     break;
       
 13678 
       
 13679 /****
       
 13680  *LN
       
 13681  */
       
 13682     case function_ln :
       
 13683     {
       
 13684         symbol_c *last_type_symbol = NULL;
       
 13685 
       
 13686         {
       
 13687             identifier_c param_name("IN");
       
 13688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13690             
       
 13691             /* Get the value from a foo(<param_value>) style call */
       
 13692             if (IN_param_value == NULL)
       
 13693               IN_param_value = function_call_param_iterator.next();
       
 13694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13696             
       
 13697             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13698             {
       
 13699         
       
 13700                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13701                 return return_type_symbol;
       
 13702                 
       
 13703             }
       
 13704             
       
 13705             ERROR;
       
 13706         }
       
 13707         
       
 13708     }/*function_ln*/
       
 13709     break;
       
 13710 
       
 13711 /****
       
 13712  *LOG
       
 13713  */
       
 13714     case function_log :
       
 13715     {
       
 13716         symbol_c *last_type_symbol = NULL;
       
 13717 
       
 13718         {
       
 13719             identifier_c param_name("IN");
       
 13720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13722             
       
 13723             /* Get the value from a foo(<param_value>) style call */
       
 13724             if (IN_param_value == NULL)
       
 13725               IN_param_value = function_call_param_iterator.next();
       
 13726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13728             
       
 13729             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13730             {
       
 13731         
       
 13732                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13733                 return return_type_symbol;
       
 13734                 
       
 13735             }
       
 13736             
       
 13737             ERROR;
       
 13738         }
       
 13739         
       
 13740     }/*function_log*/
       
 13741     break;
       
 13742 
       
 13743 /****
       
 13744  *EXP
       
 13745  */
       
 13746     case function_exp :
       
 13747     {
       
 13748         symbol_c *last_type_symbol = NULL;
       
 13749 
       
 13750         {
       
 13751             identifier_c param_name("IN");
       
 13752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13754             
       
 13755             /* Get the value from a foo(<param_value>) style call */
       
 13756             if (IN_param_value == NULL)
       
 13757               IN_param_value = function_call_param_iterator.next();
       
 13758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13760             
       
 13761             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13762             {
       
 13763         
       
 13764                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13765                 return return_type_symbol;
       
 13766                 
       
 13767             }
       
 13768             
       
 13769             ERROR;
       
 13770         }
       
 13771         
       
 13772     }/*function_exp*/
       
 13773     break;
       
 13774 
       
 13775 /****
       
 13776  *SIN
       
 13777  */
       
 13778     case function_sin :
       
 13779     {
       
 13780         symbol_c *last_type_symbol = NULL;
       
 13781 
       
 13782         {
       
 13783             identifier_c param_name("IN");
       
 13784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13786             
       
 13787             /* Get the value from a foo(<param_value>) style call */
       
 13788             if (IN_param_value == NULL)
       
 13789               IN_param_value = function_call_param_iterator.next();
       
 13790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13792             
       
 13793             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13794             {
       
 13795         
       
 13796                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13797                 return return_type_symbol;
       
 13798                 
       
 13799             }
       
 13800             
       
 13801             ERROR;
       
 13802         }
       
 13803         
       
 13804     }/*function_sin*/
       
 13805     break;
       
 13806 
       
 13807 /****
       
 13808  *COS
       
 13809  */
       
 13810     case function_cos :
       
 13811     {
       
 13812         symbol_c *last_type_symbol = NULL;
       
 13813 
       
 13814         {
       
 13815             identifier_c param_name("IN");
       
 13816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13818             
       
 13819             /* Get the value from a foo(<param_value>) style call */
       
 13820             if (IN_param_value == NULL)
       
 13821               IN_param_value = function_call_param_iterator.next();
       
 13822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13824             
       
 13825             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13826             {
       
 13827         
       
 13828                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13829                 return return_type_symbol;
       
 13830                 
       
 13831             }
       
 13832             
       
 13833             ERROR;
       
 13834         }
       
 13835         
       
 13836     }/*function_cos*/
       
 13837     break;
       
 13838 
       
 13839 /****
       
 13840  *TAN
       
 13841  */
       
 13842     case function_tan :
       
 13843     {
       
 13844         symbol_c *last_type_symbol = NULL;
       
 13845 
       
 13846         {
       
 13847             identifier_c param_name("IN");
       
 13848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13850             
       
 13851             /* Get the value from a foo(<param_value>) style call */
       
 13852             if (IN_param_value == NULL)
       
 13853               IN_param_value = function_call_param_iterator.next();
       
 13854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13856             
       
 13857             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13858             {
       
 13859         
       
 13860                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13861                 return return_type_symbol;
       
 13862                 
       
 13863             }
       
 13864             
       
 13865             ERROR;
       
 13866         }
       
 13867         
       
 13868     }/*function_tan*/
       
 13869     break;
       
 13870 
       
 13871 /****
       
 13872  *ASIN
       
 13873  */
       
 13874     case function_asin :
       
 13875     {
       
 13876         symbol_c *last_type_symbol = NULL;
       
 13877 
       
 13878         {
       
 13879             identifier_c param_name("IN");
       
 13880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13882             
       
 13883             /* Get the value from a foo(<param_value>) style call */
       
 13884             if (IN_param_value == NULL)
       
 13885               IN_param_value = function_call_param_iterator.next();
       
 13886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13888             
       
 13889             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13890             {
       
 13891         
       
 13892                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13893                 return return_type_symbol;
       
 13894                 
       
 13895             }
       
 13896             
       
 13897             ERROR;
       
 13898         }
       
 13899         
       
 13900     }/*function_asin*/
       
 13901     break;
       
 13902 
       
 13903 /****
       
 13904  *ACOS
       
 13905  */
       
 13906     case function_acos :
       
 13907     {
       
 13908         symbol_c *last_type_symbol = NULL;
       
 13909 
       
 13910         {
       
 13911             identifier_c param_name("IN");
       
 13912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13914             
       
 13915             /* Get the value from a foo(<param_value>) style call */
       
 13916             if (IN_param_value == NULL)
       
 13917               IN_param_value = function_call_param_iterator.next();
       
 13918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13920             
       
 13921             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13922             {
       
 13923         
       
 13924                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13925                 return return_type_symbol;
       
 13926                 
       
 13927             }
       
 13928             
       
 13929             ERROR;
       
 13930         }
       
 13931         
       
 13932     }/*function_acos*/
       
 13933     break;
       
 13934 
       
 13935 /****
       
 13936  *ATAN
       
 13937  */
       
 13938     case function_atan :
       
 13939     {
       
 13940         symbol_c *last_type_symbol = NULL;
       
 13941 
       
 13942         {
       
 13943             identifier_c param_name("IN");
       
 13944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13946             
       
 13947             /* Get the value from a foo(<param_value>) style call */
       
 13948             if (IN_param_value == NULL)
       
 13949               IN_param_value = function_call_param_iterator.next();
       
 13950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13952             
       
 13953             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13954             {
       
 13955         
       
 13956                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13957                 return return_type_symbol;
       
 13958                 
       
 13959             }
       
 13960             
       
 13961             ERROR;
       
 13962         }
       
 13963         
       
 13964     }/*function_atan*/
       
 13965     break;
       
 13966 
       
 13967 /****
       
 13968  *ADD
       
 13969  */
       
 13970     case function_add :
       
 13971     {
       
 13972         symbol_c *last_type_symbol = NULL;
       
 13973 
       
 13974         {
       
 13975             identifier_c param_name("IN1");
       
 13976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13977             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13978             
       
 13979             /* Get the value from a foo(<param_value>) style call */
       
 13980             if (IN1_param_value == NULL)
       
 13981               IN1_param_value = function_call_param_iterator.next();
       
 13982             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13983             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 ;
       
 13984             
       
 13985             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 13986             {
       
 13987         
       
 13988                 {
       
 13989                     identifier_c param_name("IN2");
       
 13990                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13991                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13992                     
       
 13993                     /* Get the value from a foo(<param_value>) style call */
       
 13994                     if (IN2_param_value == NULL)
       
 13995                       IN2_param_value = function_call_param_iterator.next();
       
 13996                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13997                     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 ;
       
 13998                     
       
 13999                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14000                     {
       
 14001                 
       
 14002                         symbol_c * return_type_symbol = last_type_symbol;
       
 14003                         return return_type_symbol;
       
 14004                         
       
 14005                     }
       
 14006                     
       
 14007                     ERROR;
       
 14008                 }
       
 14009                 
       
 14010             }
       
 14011             
       
 14012             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14013             {
       
 14014         
       
 14015                 {
       
 14016                     identifier_c param_name("IN2");
       
 14017                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14018                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14019                     
       
 14020                     /* Get the value from a foo(<param_value>) style call */
       
 14021                     if (IN2_param_value == NULL)
       
 14022                       IN2_param_value = function_call_param_iterator.next();
       
 14023                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14024                     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 ;
       
 14025                     
       
 14026                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14027                     {
       
 14028                 
       
 14029                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14030                         return return_type_symbol;
       
 14031                         
       
 14032                     }
       
 14033                     
       
 14034                     ERROR;
       
 14035                 }
       
 14036                 
       
 14037             }
       
 14038             
       
 14039             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 14040             {
       
 14041         
       
 14042                 {
       
 14043                     identifier_c param_name("IN2");
       
 14044                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14045                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14046                     
       
 14047                     /* Get the value from a foo(<param_value>) style call */
       
 14048                     if (IN2_param_value == NULL)
       
 14049                       IN2_param_value = function_call_param_iterator.next();
       
 14050                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14051                     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 ;
       
 14052                     
       
 14053                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14054                     {
       
 14055                 
       
 14056                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14057                         return return_type_symbol;
       
 14058                         
       
 14059                     }
       
 14060                     
       
 14061                     ERROR;
       
 14062                 }
       
 14063                 
       
 14064             }
       
 14065             
       
 14066             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14067             {
       
 14068         
       
 14069                 {
       
 14070                     identifier_c param_name("IN2");
       
 14071                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14072                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14073                     
       
 14074                     /* Get the value from a foo(<param_value>) style call */
       
 14075                     if (IN2_param_value == NULL)
       
 14076                       IN2_param_value = function_call_param_iterator.next();
       
 14077                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14078                     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 ;
       
 14079                     
       
 14080                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14081                     {
       
 14082                 
       
 14083                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14084                         return return_type_symbol;
       
 14085                         
       
 14086                     }
       
 14087                     
       
 14088                     ERROR;
       
 14089                 }
       
 14090                 
       
 14091             }
       
 14092             
       
 14093             ERROR;
       
 14094         }
       
 14095         
       
 14096     }/*function_add*/
       
 14097     break;
       
 14098 
       
 14099 /****
       
 14100  *MUL
       
 14101  */
       
 14102     case function_mul :
       
 14103     {
       
 14104         symbol_c *last_type_symbol = NULL;
       
 14105 
       
 14106         {
       
 14107             identifier_c param_name("IN1");
       
 14108             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14109             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14110             
       
 14111             /* Get the value from a foo(<param_value>) style call */
       
 14112             if (IN1_param_value == NULL)
       
 14113               IN1_param_value = function_call_param_iterator.next();
       
 14114             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14115             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 ;
       
 14116             
       
 14117             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 14118             {
       
 14119         
       
 14120                 {
       
 14121                     identifier_c param_name("IN2");
       
 14122                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14123                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14124                     
       
 14125                     /* Get the value from a foo(<param_value>) style call */
       
 14126                     if (IN2_param_value == NULL)
       
 14127                       IN2_param_value = function_call_param_iterator.next();
       
 14128                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14129                     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 ;
       
 14130                     
       
 14131                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14132                     {
       
 14133                 
       
 14134                         symbol_c * return_type_symbol = last_type_symbol;
       
 14135                         return return_type_symbol;
       
 14136                         
       
 14137                     }
       
 14138                     
       
 14139                     ERROR;
       
 14140                 }
       
 14141                 
       
 14142             }
       
 14143             
       
 14144             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14145             {
       
 14146         
       
 14147                 {
       
 14148                     identifier_c param_name("IN2");
       
 14149                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14150                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14151                     
       
 14152                     /* Get the value from a foo(<param_value>) style call */
       
 14153                     if (IN2_param_value == NULL)
       
 14154                       IN2_param_value = function_call_param_iterator.next();
       
 14155                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14156                     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 ;
       
 14157                     
       
 14158                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14159                     {
       
 14160                 
       
 14161                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14162                         return return_type_symbol;
       
 14163                         
       
 14164                     }
       
 14165                     
       
 14166                     ERROR;
       
 14167                 }
       
 14168                 
       
 14169             }
       
 14170             
       
 14171             ERROR;
       
 14172         }
       
 14173         
       
 14174     }/*function_mul*/
       
 14175     break;
       
 14176 
       
 14177 /****
       
 14178  *SUB
       
 14179  */
       
 14180     case function_sub :
       
 14181     {
       
 14182         symbol_c *last_type_symbol = NULL;
       
 14183 
       
 14184         {
       
 14185             identifier_c param_name("IN1");
       
 14186             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14187             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14188             
       
 14189             /* Get the value from a foo(<param_value>) style call */
       
 14190             if (IN1_param_value == NULL)
       
 14191               IN1_param_value = function_call_param_iterator.next();
       
 14192             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14193             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 ;
       
 14194             
       
 14195             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 14196             {
       
 14197         
       
 14198                 {
       
 14199                     identifier_c param_name("IN2");
       
 14200                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14201                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14202                     
       
 14203                     /* Get the value from a foo(<param_value>) style call */
       
 14204                     if (IN2_param_value == NULL)
       
 14205                       IN2_param_value = function_call_param_iterator.next();
       
 14206                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14207                     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 ;
       
 14208                     
       
 14209                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14210                     {
       
 14211                 
       
 14212                         symbol_c * return_type_symbol = last_type_symbol;
       
 14213                         return return_type_symbol;
       
 14214                         
       
 14215                     }
       
 14216                     
       
 14217                     ERROR;
       
 14218                 }
       
 14219                 
       
 14220             }
       
 14221             
       
 14222             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 14223             {
       
 14224         
       
 14225                 {
       
 14226                     identifier_c param_name("IN2");
       
 14227                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14228                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14229                     
       
 14230                     /* Get the value from a foo(<param_value>) style call */
       
 14231                     if (IN2_param_value == NULL)
       
 14232                       IN2_param_value = function_call_param_iterator.next();
       
 14233                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14234                     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 ;
       
 14235                     
       
 14236                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 14237                     {
       
 14238                 
       
 14239                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14240                         return return_type_symbol;
       
 14241                         
       
 14242                     }
       
 14243                     
       
 14244                     ERROR;
       
 14245                 }
       
 14246                 
       
 14247             }
       
 14248             
       
 14249             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14250             {
       
 14251         
       
 14252                 {
       
 14253                     identifier_c param_name("IN2");
       
 14254                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14255                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14256                     
       
 14257                     /* Get the value from a foo(<param_value>) style call */
       
 14258                     if (IN2_param_value == NULL)
       
 14259                       IN2_param_value = function_call_param_iterator.next();
       
 14260                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14261                     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 ;
       
 14262                     
       
 14263                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14264                     {
       
 14265                 
       
 14266                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14267                         return return_type_symbol;
       
 14268                         
       
 14269                     }
       
 14270                     
       
 14271                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14272                     {
       
 14273                 
       
 14274                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14275                         return return_type_symbol;
       
 14276                         
       
 14277                     }
       
 14278                     
       
 14279                     ERROR;
       
 14280                 }
       
 14281                 
       
 14282             }
       
 14283             
       
 14284             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 14285             {
       
 14286         
       
 14287                 {
       
 14288                     identifier_c param_name("IN2");
       
 14289                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14290                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14291                     
       
 14292                     /* Get the value from a foo(<param_value>) style call */
       
 14293                     if (IN2_param_value == NULL)
       
 14294                       IN2_param_value = function_call_param_iterator.next();
       
 14295                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14296                     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 ;
       
 14297                     
       
 14298                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 14299                     {
       
 14300                 
       
 14301                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14302                         return return_type_symbol;
       
 14303                         
       
 14304                     }
       
 14305                     
       
 14306                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14307                     {
       
 14308                 
       
 14309                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14310                         return return_type_symbol;
       
 14311                         
       
 14312                     }
       
 14313                     
       
 14314                     ERROR;
       
 14315                 }
       
 14316                 
       
 14317             }
       
 14318             
       
 14319             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14320             {
       
 14321         
       
 14322                 {
       
 14323                     identifier_c param_name("IN2");
       
 14324                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14325                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14326                     
       
 14327                     /* Get the value from a foo(<param_value>) style call */
       
 14328                     if (IN2_param_value == NULL)
       
 14329                       IN2_param_value = function_call_param_iterator.next();
       
 14330                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14331                     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 ;
       
 14332                     
       
 14333                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14334                     {
       
 14335                 
       
 14336                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14337                         return return_type_symbol;
       
 14338                         
       
 14339                     }
       
 14340                     
       
 14341                     ERROR;
       
 14342                 }
       
 14343                 
       
 14344             }
       
 14345             
       
 14346             ERROR;
       
 14347         }
       
 14348         
       
 14349     }/*function_sub*/
       
 14350     break;
       
 14351 
       
 14352 /****
       
 14353  *DIV
       
 14354  */
       
 14355     case function_div :
       
 14356     {
       
 14357         symbol_c *last_type_symbol = NULL;
       
 14358 
       
 14359         {
       
 14360             identifier_c param_name("IN1");
       
 14361             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14362             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14363             
       
 14364             /* Get the value from a foo(<param_value>) style call */
       
 14365             if (IN1_param_value == NULL)
       
 14366               IN1_param_value = function_call_param_iterator.next();
       
 14367             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14368             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 ;
       
 14369             
       
 14370             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 14371             {
       
 14372         
       
 14373                 {
       
 14374                     identifier_c param_name("IN2");
       
 14375                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14376                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14377                     
       
 14378                     /* Get the value from a foo(<param_value>) style call */
       
 14379                     if (IN2_param_value == NULL)
       
 14380                       IN2_param_value = function_call_param_iterator.next();
       
 14381                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14382                     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 ;
       
 14383                     
       
 14384                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14385                     {
       
 14386                 
       
 14387                         symbol_c * return_type_symbol = last_type_symbol;
       
 14388                         return return_type_symbol;
       
 14389                         
       
 14390                     }
       
 14391                     
       
 14392                     ERROR;
       
 14393                 }
       
 14394                 
       
 14395             }
       
 14396             
       
 14397             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14398             {
       
 14399         
       
 14400                 {
       
 14401                     identifier_c param_name("IN2");
       
 14402                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14403                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14404                     
       
 14405                     /* Get the value from a foo(<param_value>) style call */
       
 14406                     if (IN2_param_value == NULL)
       
 14407                       IN2_param_value = function_call_param_iterator.next();
       
 14408                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14409                     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 ;
       
 14410                     
       
 14411                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14412                     {
       
 14413                 
       
 14414                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14415                         return return_type_symbol;
       
 14416                         
       
 14417                     }
       
 14418                     
       
 14419                     ERROR;
       
 14420                 }
       
 14421                 
       
 14422             }
       
 14423             
       
 14424             ERROR;
       
 14425         }
       
 14426         
       
 14427     }/*function_div*/
       
 14428     break;
       
 14429 
       
 14430 /****
       
 14431  *MOD
       
 14432  */
       
 14433     case function_mod :
       
 14434     {
       
 14435         symbol_c *last_type_symbol = NULL;
       
 14436 
       
 14437         {
       
 14438             identifier_c param_name("IN1");
       
 14439             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14440             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14441             
       
 14442             /* Get the value from a foo(<param_value>) style call */
       
 14443             if (IN1_param_value == NULL)
       
 14444               IN1_param_value = function_call_param_iterator.next();
       
 14445             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14446             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 ;
       
 14447             
       
 14448             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 14449             {
       
 14450         
       
 14451                 {
       
 14452                     identifier_c param_name("IN2");
       
 14453                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14454                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14455                     
       
 14456                     /* Get the value from a foo(<param_value>) style call */
       
 14457                     if (IN2_param_value == NULL)
       
 14458                       IN2_param_value = function_call_param_iterator.next();
       
 14459                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14460                     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 ;
       
 14461                     
       
 14462                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14463                     {
       
 14464                 
       
 14465                         symbol_c * return_type_symbol = last_type_symbol;
       
 14466                         return return_type_symbol;
       
 14467                         
       
 14468                     }
       
 14469                     
       
 14470                     ERROR;
       
 14471                 }
       
 14472                 
       
 14473             }
       
 14474             
       
 14475             ERROR;
       
 14476         }
       
 14477         
       
 14478     }/*function_mod*/
       
 14479     break;
       
 14480 
       
 14481 /****
       
 14482  *EXPT
       
 14483  */
       
 14484     case function_expt :
       
 14485     {
       
 14486         symbol_c *last_type_symbol = NULL;
       
 14487 
       
 14488         {
       
 14489             identifier_c param_name("IN1");
       
 14490             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14491             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14492             
       
 14493             /* Get the value from a foo(<param_value>) style call */
       
 14494             if (IN1_param_value == NULL)
       
 14495               IN1_param_value = function_call_param_iterator.next();
       
 14496             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14497             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             
       
 14499             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 14500             {
       
 14501         
       
 14502                 {
       
 14503                     identifier_c param_name("IN2");
       
 14504                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14505                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14506                     
       
 14507                     /* Get the value from a foo(<param_value>) style call */
       
 14508                     if (IN2_param_value == NULL)
       
 14509                       IN2_param_value = function_call_param_iterator.next();
       
 14510                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14511                     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                     
       
 14513                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 14514                     {
       
 14515                 
       
 14516                         symbol_c * return_type_symbol = last_type_symbol;
       
 14517                         return return_type_symbol;
       
 14518                         
       
 14519                     }
       
 14520                     
       
 14521                     ERROR;
       
 14522                 }
       
 14523                 
       
 14524             }
       
 14525             
       
 14526             ERROR;
       
 14527         }
       
 14528         
       
 14529     }/*function_expt*/
       
 14530     break;
       
 14531 
       
 14532 /****
       
 14533  *MOVE
       
 14534  */
       
 14535     case function_move :
       
 14536     {
       
 14537         symbol_c *last_type_symbol = NULL;
       
 14538 
       
 14539         {
       
 14540             identifier_c param_name("IN");
       
 14541             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14542             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14543             
       
 14544             /* Get the value from a foo(<param_value>) style call */
       
 14545             if (IN_param_value == NULL)
       
 14546               IN_param_value = function_call_param_iterator.next();
       
 14547             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14548             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14549             
       
 14550             if(search_expression_type->is_num_type(IN_type_symbol))
       
 14551             {
       
 14552         
       
 14553                 symbol_c * return_type_symbol = last_type_symbol;
       
 14554                 return return_type_symbol;
       
 14555                 
       
 14556             }
       
 14557             
       
 14558             ERROR;
       
 14559         }
       
 14560         
       
 14561     }/*function_move*/
       
 14562     break;
       
 14563 
       
 14564 /****
       
 14565  *SHL
       
 14566  */
       
 14567     case function_shl :
       
 14568     {
       
 14569         symbol_c *last_type_symbol = NULL;
       
 14570 
       
 14571         {
       
 14572             identifier_c param_name("IN");
       
 14573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14575             
       
 14576             /* Get the value from a foo(<param_value>) style call */
       
 14577             if (IN_param_value == NULL)
       
 14578               IN_param_value = function_call_param_iterator.next();
       
 14579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14581             
       
 14582             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14583             {
       
 14584         
       
 14585                 {
       
 14586                     identifier_c param_name("N");
       
 14587                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14588                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14589                     
       
 14590                     /* Get the value from a foo(<param_value>) style call */
       
 14591                     if (N_param_value == NULL)
       
 14592                       N_param_value = function_call_param_iterator.next();
       
 14593                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14594                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14595                     
       
 14596                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 14597                     {
       
 14598                 
       
 14599                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14600                         return return_type_symbol;
       
 14601                         
       
 14602                     }
       
 14603                     
       
 14604                     ERROR;
       
 14605                 }
       
 14606                 
       
 14607             }
       
 14608             
       
 14609             ERROR;
       
 14610         }
       
 14611         
       
 14612     }/*function_shl*/
       
 14613     break;
       
 14614 
       
 14615 /****
       
 14616  *SHR
       
 14617  */
       
 14618     case function_shr :
       
 14619     {
       
 14620         symbol_c *last_type_symbol = NULL;
       
 14621 
       
 14622         {
       
 14623             identifier_c param_name("IN");
       
 14624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14626             
       
 14627             /* Get the value from a foo(<param_value>) style call */
       
 14628             if (IN_param_value == NULL)
       
 14629               IN_param_value = function_call_param_iterator.next();
       
 14630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14632             
       
 14633             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14634             {
       
 14635         
       
 14636                 {
       
 14637                     identifier_c param_name("N");
       
 14638                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14639                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14640                     
       
 14641                     /* Get the value from a foo(<param_value>) style call */
       
 14642                     if (N_param_value == NULL)
       
 14643                       N_param_value = function_call_param_iterator.next();
       
 14644                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14645                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14646                     
       
 14647                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 14648                     {
       
 14649                 
       
 14650                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14651                         return return_type_symbol;
       
 14652                         
       
 14653                     }
       
 14654                     
       
 14655                     ERROR;
       
 14656                 }
       
 14657                 
       
 14658             }
       
 14659             
       
 14660             ERROR;
       
 14661         }
       
 14662         
       
 14663     }/*function_shr*/
       
 14664     break;
       
 14665 
       
 14666 /****
       
 14667  *ROR
       
 14668  */
       
 14669     case function_ror :
       
 14670     {
       
 14671         symbol_c *last_type_symbol = NULL;
       
 14672 
       
 14673         {
       
 14674             identifier_c param_name("IN");
       
 14675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14676             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14677             
       
 14678             /* Get the value from a foo(<param_value>) style call */
       
 14679             if (IN_param_value == NULL)
       
 14680               IN_param_value = function_call_param_iterator.next();
       
 14681             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14682             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14683             
       
 14684             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14685             {
       
 14686         
       
 14687                 {
       
 14688                     identifier_c param_name("N");
       
 14689                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14690                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14691                     
       
 14692                     /* Get the value from a foo(<param_value>) style call */
       
 14693                     if (N_param_value == NULL)
       
 14694                       N_param_value = function_call_param_iterator.next();
       
 14695                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14696                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14697                     
       
 14698                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 14699                     {
       
 14700                 
       
 14701                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14702                         return return_type_symbol;
       
 14703                         
       
 14704                     }
       
 14705                     
       
 14706                     ERROR;
       
 14707                 }
       
 14708                 
       
 14709             }
       
 14710             
       
 14711             ERROR;
       
 14712         }
       
 14713         
       
 14714     }/*function_ror*/
       
 14715     break;
       
 14716 
       
 14717 /****
       
 14718  *ROL
       
 14719  */
       
 14720     case function_rol :
       
 14721     {
       
 14722         symbol_c *last_type_symbol = NULL;
       
 14723 
       
 14724         {
       
 14725             identifier_c param_name("IN");
       
 14726             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14727             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14728             
       
 14729             /* Get the value from a foo(<param_value>) style call */
       
 14730             if (IN_param_value == NULL)
       
 14731               IN_param_value = function_call_param_iterator.next();
       
 14732             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14733             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14734             
       
 14735             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14736             {
       
 14737         
       
 14738                 {
       
 14739                     identifier_c param_name("N");
       
 14740                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14741                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14742                     
       
 14743                     /* Get the value from a foo(<param_value>) style call */
       
 14744                     if (N_param_value == NULL)
       
 14745                       N_param_value = function_call_param_iterator.next();
       
 14746                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14747                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14748                     
       
 14749                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 14750                     {
       
 14751                 
       
 14752                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14753                         return return_type_symbol;
       
 14754                         
       
 14755                     }
       
 14756                     
       
 14757                     ERROR;
       
 14758                 }
       
 14759                 
       
 14760             }
       
 14761             
       
 14762             ERROR;
       
 14763         }
       
 14764         
       
 14765     }/*function_rol*/
       
 14766     break;
       
 14767 
       
 14768 /****
       
 14769  *AND
       
 14770  */
       
 14771     case function_and :
       
 14772     {
       
 14773         symbol_c *last_type_symbol = NULL;
       
 14774 
       
 14775         {
       
 14776             identifier_c param_name("IN1");
       
 14777             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14778             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14779             
       
 14780             /* Get the value from a foo(<param_value>) style call */
       
 14781             if (IN1_param_value == NULL)
       
 14782               IN1_param_value = function_call_param_iterator.next();
       
 14783             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14784             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 ;
       
 14785             
       
 14786             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 14787             {
       
 14788         
       
 14789                 {
       
 14790                     identifier_c param_name("IN2");
       
 14791                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14792                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14793                     
       
 14794                     /* Get the value from a foo(<param_value>) style call */
       
 14795                     if (IN2_param_value == NULL)
       
 14796                       IN2_param_value = function_call_param_iterator.next();
       
 14797                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14798                     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 ;
       
 14799                     
       
 14800                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 14801                     {
       
 14802                 
       
 14803                         symbol_c * return_type_symbol = last_type_symbol;
       
 14804                         return return_type_symbol;
       
 14805                         
       
 14806                     }
       
 14807                     
       
 14808                     ERROR;
       
 14809                 }
       
 14810                 
       
 14811             }
       
 14812             
       
 14813             ERROR;
       
 14814         }
       
 14815         
       
 14816     }/*function_and*/
       
 14817     break;
       
 14818 
       
 14819 /****
       
 14820  *OR
       
 14821  */
       
 14822     case function_or :
       
 14823     {
       
 14824         symbol_c *last_type_symbol = NULL;
       
 14825 
       
 14826         {
       
 14827             identifier_c param_name("IN1");
       
 14828             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14829             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14830             
       
 14831             /* Get the value from a foo(<param_value>) style call */
       
 14832             if (IN1_param_value == NULL)
       
 14833               IN1_param_value = function_call_param_iterator.next();
       
 14834             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14835             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 ;
       
 14836             
       
 14837             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 14838             {
       
 14839         
       
 14840                 {
       
 14841                     identifier_c param_name("IN2");
       
 14842                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14843                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14844                     
       
 14845                     /* Get the value from a foo(<param_value>) style call */
       
 14846                     if (IN2_param_value == NULL)
       
 14847                       IN2_param_value = function_call_param_iterator.next();
       
 14848                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14849                     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 ;
       
 14850                     
       
 14851                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 14852                     {
       
 14853                 
       
 14854                         symbol_c * return_type_symbol = last_type_symbol;
       
 14855                         return return_type_symbol;
       
 14856                         
       
 14857                     }
       
 14858                     
       
 14859                     ERROR;
       
 14860                 }
       
 14861                 
       
 14862             }
       
 14863             
       
 14864             ERROR;
       
 14865         }
       
 14866         
       
 14867     }/*function_or*/
       
 14868     break;
       
 14869 
       
 14870 /****
       
 14871  *XOR
       
 14872  */
       
 14873     case function_xor :
       
 14874     {
       
 14875         symbol_c *last_type_symbol = NULL;
       
 14876 
       
 14877         {
       
 14878             identifier_c param_name("IN1");
       
 14879             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14880             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14881             
       
 14882             /* Get the value from a foo(<param_value>) style call */
       
 14883             if (IN1_param_value == NULL)
       
 14884               IN1_param_value = function_call_param_iterator.next();
       
 14885             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14886             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 ;
       
 14887             
       
 14888             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 14889             {
       
 14890         
       
 14891                 {
       
 14892                     identifier_c param_name("IN2");
       
 14893                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14894                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14895                     
       
 14896                     /* Get the value from a foo(<param_value>) style call */
       
 14897                     if (IN2_param_value == NULL)
       
 14898                       IN2_param_value = function_call_param_iterator.next();
       
 14899                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14900                     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 ;
       
 14901                     
       
 14902                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 14903                     {
       
 14904                 
       
 14905                         symbol_c * return_type_symbol = last_type_symbol;
       
 14906                         return return_type_symbol;
       
 14907                         
       
 14908                     }
       
 14909                     
       
 14910                     ERROR;
       
 14911                 }
       
 14912                 
       
 14913             }
       
 14914             
       
 14915             ERROR;
       
 14916         }
       
 14917         
       
 14918     }/*function_xor*/
       
 14919     break;
       
 14920 
       
 14921 /****
       
 14922  *NOT
       
 14923  */
       
 14924     case function_not :
       
 14925     {
       
 14926         symbol_c *last_type_symbol = NULL;
       
 14927 
       
 14928         {
       
 14929             identifier_c param_name("IN");
       
 14930             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14931             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14932             
       
 14933             /* Get the value from a foo(<param_value>) style call */
       
 14934             if (IN_param_value == NULL)
       
 14935               IN_param_value = function_call_param_iterator.next();
       
 14936             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14937             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14938             
       
 14939             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14940             {
       
 14941         
       
 14942                 symbol_c * return_type_symbol = IN_type_symbol;
       
 14943                 return return_type_symbol;
       
 14944                 
       
 14945             }
       
 14946             
       
 14947             ERROR;
       
 14948         }
       
 14949         
       
 14950     }/*function_not*/
       
 14951     break;
       
 14952 
       
 14953 /****
       
 14954  *SEL
       
 14955  */
       
 14956     case function_sel :
       
 14957     {
       
 14958         symbol_c *last_type_symbol = NULL;
       
 14959 
       
 14960         {
       
 14961             identifier_c param_name("G");
       
 14962             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14963             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
       
 14964             
       
 14965             /* Get the value from a foo(<param_value>) style call */
       
 14966             if (G_param_value == NULL)
       
 14967               G_param_value = function_call_param_iterator.next();
       
 14968             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
       
 14969             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 ;
       
 14970             
       
 14971             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14972             {
       
 14973         
       
 14974                 {
       
 14975                     identifier_c param_name("IN0");
       
 14976                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14977                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 14978                     
       
 14979                     /* Get the value from a foo(<param_value>) style call */
       
 14980                     if (IN0_param_value == NULL)
       
 14981                       IN0_param_value = function_call_param_iterator.next();
       
 14982                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 14983                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 14984                     
       
 14985                     
       
 14986                     {
       
 14987                 
       
 14988                         {
       
 14989                             identifier_c param_name("IN1");
       
 14990                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14991                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14992                             
       
 14993                             /* Get the value from a foo(<param_value>) style call */
       
 14994                             if (IN1_param_value == NULL)
       
 14995                               IN1_param_value = function_call_param_iterator.next();
       
 14996                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14997                             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 ;
       
 14998                             
       
 14999                             
       
 15000                             {
       
 15001                         
       
 15002                                 symbol_c * return_type_symbol = last_type_symbol;
       
 15003                                 return return_type_symbol;
       
 15004                                 
       
 15005                             }
       
 15006                             
       
 15007                             ERROR;
       
 15008                         }
       
 15009                         
       
 15010                     }
       
 15011                     
       
 15012                     ERROR;
       
 15013                 }
       
 15014                 
       
 15015             }
       
 15016             
       
 15017             ERROR;
       
 15018         }
       
 15019         
       
 15020     }/*function_sel*/
       
 15021     break;
       
 15022 
       
 15023 /****
       
 15024  *MAX
       
 15025  */
       
 15026     case function_max :
       
 15027     {
       
 15028         symbol_c *last_type_symbol = NULL;
       
 15029 
       
 15030         {
       
 15031             identifier_c param_name("IN1");
       
 15032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15033             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15034             
       
 15035             /* Get the value from a foo(<param_value>) style call */
       
 15036             if (IN1_param_value == NULL)
       
 15037               IN1_param_value = function_call_param_iterator.next();
       
 15038             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15039             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 ;
       
 15040             
       
 15041             
       
 15042             {
       
 15043         
       
 15044                 {
       
 15045                     identifier_c param_name("IN2");
       
 15046                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15047                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15048                     
       
 15049                     /* Get the value from a foo(<param_value>) style call */
       
 15050                     if (IN2_param_value == NULL)
       
 15051                       IN2_param_value = function_call_param_iterator.next();
       
 15052                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15053                     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 ;
       
 15054                     
       
 15055                     
       
 15056                     {
       
 15057                 
       
 15058                         symbol_c * return_type_symbol = last_type_symbol;
       
 15059                         return return_type_symbol;
       
 15060                         
       
 15061                     }
       
 15062                     
       
 15063                     ERROR;
       
 15064                 }
       
 15065                 
       
 15066             }
       
 15067             
       
 15068             ERROR;
       
 15069         }
       
 15070         
       
 15071     }/*function_max*/
       
 15072     break;
       
 15073 
       
 15074 /****
       
 15075  *MIN
       
 15076  */
       
 15077     case function_min :
       
 15078     {
       
 15079         symbol_c *last_type_symbol = NULL;
       
 15080 
       
 15081         {
       
 15082             identifier_c param_name("IN1");
       
 15083             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15084             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15085             
       
 15086             /* Get the value from a foo(<param_value>) style call */
       
 15087             if (IN1_param_value == NULL)
       
 15088               IN1_param_value = function_call_param_iterator.next();
       
 15089             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15090             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 ;
       
 15091             
       
 15092             
       
 15093             {
       
 15094         
       
 15095                 {
       
 15096                     identifier_c param_name("IN2");
       
 15097                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15098                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15099                     
       
 15100                     /* Get the value from a foo(<param_value>) style call */
       
 15101                     if (IN2_param_value == NULL)
       
 15102                       IN2_param_value = function_call_param_iterator.next();
       
 15103                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15104                     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 ;
       
 15105                     
       
 15106                     
       
 15107                     {
       
 15108                 
       
 15109                         symbol_c * return_type_symbol = last_type_symbol;
       
 15110                         return return_type_symbol;
       
 15111                         
       
 15112                     }
       
 15113                     
       
 15114                     ERROR;
       
 15115                 }
       
 15116                 
       
 15117             }
       
 15118             
       
 15119             ERROR;
       
 15120         }
       
 15121         
       
 15122     }/*function_min*/
       
 15123     break;
       
 15124 
       
 15125 /****
       
 15126  *LIMIT
       
 15127  */
       
 15128     case function_limit :
       
 15129     {
       
 15130         symbol_c *last_type_symbol = NULL;
       
 15131 
       
 15132         {
       
 15133             identifier_c param_name("MN");
       
 15134             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15135             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
       
 15136             
       
 15137             /* Get the value from a foo(<param_value>) style call */
       
 15138             if (MN_param_value == NULL)
       
 15139               MN_param_value = function_call_param_iterator.next();
       
 15140             symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
       
 15141             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
       
 15142             
       
 15143             
       
 15144             {
       
 15145         
       
 15146                 {
       
 15147                     identifier_c param_name("IN");
       
 15148                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15149                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15150                     
       
 15151                     /* Get the value from a foo(<param_value>) style call */
       
 15152                     if (IN_param_value == NULL)
       
 15153                       IN_param_value = function_call_param_iterator.next();
       
 15154                     symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15155                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15156                     
       
 15157                     
       
 15158                     {
       
 15159                 
       
 15160                         {
       
 15161                             identifier_c param_name("MX");
       
 15162                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15163                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 15164                             
       
 15165                             /* Get the value from a foo(<param_value>) style call */
       
 15166                             if (MX_param_value == NULL)
       
 15167                               MX_param_value = function_call_param_iterator.next();
       
 15168                             symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 15169                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
       
 15170                             
       
 15171                             
       
 15172                             {
       
 15173                         
       
 15174                                 symbol_c * return_type_symbol = IN_type_symbol;
       
 15175                                 return return_type_symbol;
       
 15176                                 
       
 15177                             }
       
 15178                             
       
 15179                             ERROR;
       
 15180                         }
       
 15181                         
       
 15182                     }
       
 15183                     
       
 15184                     ERROR;
       
 15185                 }
       
 15186                 
       
 15187             }
       
 15188             
       
 15189             ERROR;
       
 15190         }
       
 15191         
       
 15192     }/*function_limit*/
       
 15193     break;
       
 15194 
       
 15195 /****
       
 15196  *MUX
       
 15197  */
       
 15198     case function_mux :
       
 15199     {
       
 15200         symbol_c *last_type_symbol = NULL;
       
 15201 
       
 15202         {
       
 15203             identifier_c param_name("K");
       
 15204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15205             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
       
 15206             
       
 15207             /* Get the value from a foo(<param_value>) style call */
       
 15208             if (K_param_value == NULL)
       
 15209               K_param_value = function_call_param_iterator.next();
       
 15210             symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
       
 15211             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
       
 15212             
       
 15213             if(search_expression_type->is_integer_type(K_type_symbol))
       
 15214             {
       
 15215         
       
 15216                 {
       
 15217                     identifier_c param_name("IN0");
       
 15218                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15219                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 15220                     
       
 15221                     /* Get the value from a foo(<param_value>) style call */
       
 15222                     if (IN0_param_value == NULL)
       
 15223                       IN0_param_value = function_call_param_iterator.next();
       
 15224                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 15225                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 15226                     
       
 15227                     
       
 15228                     {
       
 15229                 
       
 15230                         {
       
 15231                             identifier_c param_name("IN1");
       
 15232                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15233                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15234                             
       
 15235                             /* Get the value from a foo(<param_value>) style call */
       
 15236                             if (IN1_param_value == NULL)
       
 15237                               IN1_param_value = function_call_param_iterator.next();
       
 15238                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15239                             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 ;
       
 15240                             
       
 15241                             
       
 15242                             {
       
 15243                         
       
 15244                                 symbol_c * return_type_symbol = last_type_symbol;
       
 15245                                 return return_type_symbol;
       
 15246                                 
       
 15247                             }
       
 15248                             
       
 15249                             ERROR;
       
 15250                         }
       
 15251                         
       
 15252                     }
       
 15253                     
       
 15254                     ERROR;
       
 15255                 }
       
 15256                 
       
 15257             }
       
 15258             
       
 15259             ERROR;
       
 15260         }
       
 15261         
       
 15262     }/*function_mux*/
       
 15263     break;
       
 15264 
       
 15265 /****
       
 15266  *GT
       
 15267  */
       
 15268     case function_gt :
       
 15269     {
       
 15270         symbol_c *last_type_symbol = NULL;
       
 15271 
       
 15272         {
       
 15273             identifier_c param_name("IN1");
       
 15274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15275             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15276             
       
 15277             /* Get the value from a foo(<param_value>) style call */
       
 15278             if (IN1_param_value == NULL)
       
 15279               IN1_param_value = function_call_param_iterator.next();
       
 15280             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15281             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 ;
       
 15282             
       
 15283             
       
 15284             {
       
 15285         
       
 15286                 {
       
 15287                     identifier_c param_name("IN2");
       
 15288                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15289                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15290                     
       
 15291                     /* Get the value from a foo(<param_value>) style call */
       
 15292                     if (IN2_param_value == NULL)
       
 15293                       IN2_param_value = function_call_param_iterator.next();
       
 15294                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15295                     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 ;
       
 15296                     
       
 15297                     
       
 15298                     {
       
 15299                 
       
 15300                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15301                         return return_type_symbol;
       
 15302                         
       
 15303                     }
       
 15304                     
       
 15305                     ERROR;
       
 15306                 }
       
 15307                 
       
 15308             }
       
 15309             
       
 15310             ERROR;
       
 15311         }
       
 15312         
       
 15313     }/*function_gt*/
       
 15314     break;
       
 15315 
       
 15316 /****
       
 15317  *GE
       
 15318  */
       
 15319     case function_ge :
       
 15320     {
       
 15321         symbol_c *last_type_symbol = NULL;
       
 15322 
       
 15323         {
       
 15324             identifier_c param_name("IN1");
       
 15325             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15326             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15327             
       
 15328             /* Get the value from a foo(<param_value>) style call */
       
 15329             if (IN1_param_value == NULL)
       
 15330               IN1_param_value = function_call_param_iterator.next();
       
 15331             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15332             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 ;
       
 15333             
       
 15334             
       
 15335             {
       
 15336         
       
 15337                 {
       
 15338                     identifier_c param_name("IN2");
       
 15339                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15340                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15341                     
       
 15342                     /* Get the value from a foo(<param_value>) style call */
       
 15343                     if (IN2_param_value == NULL)
       
 15344                       IN2_param_value = function_call_param_iterator.next();
       
 15345                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15346                     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 ;
       
 15347                     
       
 15348                     
       
 15349                     {
       
 15350                 
       
 15351                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15352                         return return_type_symbol;
       
 15353                         
       
 15354                     }
       
 15355                     
       
 15356                     ERROR;
       
 15357                 }
       
 15358                 
       
 15359             }
       
 15360             
       
 15361             ERROR;
       
 15362         }
       
 15363         
       
 15364     }/*function_ge*/
       
 15365     break;
       
 15366 
       
 15367 /****
       
 15368  *EQ
       
 15369  */
       
 15370     case function_eq :
       
 15371     {
       
 15372         symbol_c *last_type_symbol = NULL;
       
 15373 
       
 15374         {
       
 15375             identifier_c param_name("IN1");
       
 15376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15377             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15378             
       
 15379             /* Get the value from a foo(<param_value>) style call */
       
 15380             if (IN1_param_value == NULL)
       
 15381               IN1_param_value = function_call_param_iterator.next();
       
 15382             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15383             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 ;
       
 15384             
       
 15385             
       
 15386             {
       
 15387         
       
 15388                 {
       
 15389                     identifier_c param_name("IN2");
       
 15390                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15391                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15392                     
       
 15393                     /* Get the value from a foo(<param_value>) style call */
       
 15394                     if (IN2_param_value == NULL)
       
 15395                       IN2_param_value = function_call_param_iterator.next();
       
 15396                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15397                     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 ;
       
 15398                     
       
 15399                     
       
 15400                     {
       
 15401                 
       
 15402                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15403                         return return_type_symbol;
       
 15404                         
       
 15405                     }
       
 15406                     
       
 15407                     ERROR;
       
 15408                 }
       
 15409                 
       
 15410             }
       
 15411             
       
 15412             ERROR;
       
 15413         }
       
 15414         
       
 15415     }/*function_eq*/
       
 15416     break;
       
 15417 
       
 15418 /****
       
 15419  *LT
       
 15420  */
       
 15421     case function_lt :
       
 15422     {
       
 15423         symbol_c *last_type_symbol = NULL;
       
 15424 
       
 15425         {
       
 15426             identifier_c param_name("IN1");
       
 15427             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15428             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15429             
       
 15430             /* Get the value from a foo(<param_value>) style call */
       
 15431             if (IN1_param_value == NULL)
       
 15432               IN1_param_value = function_call_param_iterator.next();
       
 15433             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15434             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 ;
       
 15435             
       
 15436             
       
 15437             {
       
 15438         
       
 15439                 {
       
 15440                     identifier_c param_name("IN2");
       
 15441                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15442                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15443                     
       
 15444                     /* Get the value from a foo(<param_value>) style call */
       
 15445                     if (IN2_param_value == NULL)
       
 15446                       IN2_param_value = function_call_param_iterator.next();
       
 15447                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15448                     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 ;
       
 15449                     
       
 15450                     
       
 15451                     {
       
 15452                 
       
 15453                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15454                         return return_type_symbol;
       
 15455                         
       
 15456                     }
       
 15457                     
       
 15458                     ERROR;
       
 15459                 }
       
 15460                 
       
 15461             }
       
 15462             
       
 15463             ERROR;
       
 15464         }
       
 15465         
       
 15466     }/*function_lt*/
       
 15467     break;
       
 15468 
       
 15469 /****
       
 15470  *LE
       
 15471  */
       
 15472     case function_le :
       
 15473     {
       
 15474         symbol_c *last_type_symbol = NULL;
       
 15475 
       
 15476         {
       
 15477             identifier_c param_name("IN1");
       
 15478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15479             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15480             
       
 15481             /* Get the value from a foo(<param_value>) style call */
       
 15482             if (IN1_param_value == NULL)
       
 15483               IN1_param_value = function_call_param_iterator.next();
       
 15484             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15485             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 ;
       
 15486             
       
 15487             
       
 15488             {
       
 15489         
       
 15490                 {
       
 15491                     identifier_c param_name("IN2");
       
 15492                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15493                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15494                     
       
 15495                     /* Get the value from a foo(<param_value>) style call */
       
 15496                     if (IN2_param_value == NULL)
       
 15497                       IN2_param_value = function_call_param_iterator.next();
       
 15498                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15499                     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 ;
       
 15500                     
       
 15501                     
       
 15502                     {
       
 15503                 
       
 15504                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15505                         return return_type_symbol;
       
 15506                         
       
 15507                     }
       
 15508                     
       
 15509                     ERROR;
       
 15510                 }
       
 15511                 
       
 15512             }
       
 15513             
       
 15514             ERROR;
       
 15515         }
       
 15516         
       
 15517     }/*function_le*/
       
 15518     break;
       
 15519 
       
 15520 /****
       
 15521  *NE
       
 15522  */
       
 15523     case function_ne :
       
 15524     {
       
 15525         symbol_c *last_type_symbol = NULL;
       
 15526 
       
 15527         {
       
 15528             identifier_c param_name("IN1");
       
 15529             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15530             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15531             
       
 15532             /* Get the value from a foo(<param_value>) style call */
       
 15533             if (IN1_param_value == NULL)
       
 15534               IN1_param_value = function_call_param_iterator.next();
       
 15535             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15536             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 ;
       
 15537             
       
 15538             
       
 15539             {
       
 15540         
       
 15541                 {
       
 15542                     identifier_c param_name("IN2");
       
 15543                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15544                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15545                     
       
 15546                     /* Get the value from a foo(<param_value>) style call */
       
 15547                     if (IN2_param_value == NULL)
       
 15548                       IN2_param_value = function_call_param_iterator.next();
       
 15549                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15550                     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 ;
       
 15551                     
       
 15552                     
       
 15553                     {
       
 15554                 
       
 15555                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15556                         return return_type_symbol;
       
 15557                         
       
 15558                     }
       
 15559                     
       
 15560                     ERROR;
       
 15561                 }
       
 15562                 
       
 15563             }
       
 15564             
       
 15565             ERROR;
       
 15566         }
       
 15567         
       
 15568     }/*function_ne*/
       
 15569     break;
       
 15570 
       
 15571 /****
       
 15572  *LEN
       
 15573  */
       
 15574     case function_len :
       
 15575     {
       
 15576         symbol_c *last_type_symbol = NULL;
       
 15577 
       
 15578         {
       
 15579             identifier_c param_name("IN");
       
 15580             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15581             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15582             
       
 15583             /* Get the value from a foo(<param_value>) style call */
       
 15584             if (IN_param_value == NULL)
       
 15585               IN_param_value = function_call_param_iterator.next();
       
 15586             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15587             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15588             
       
 15589             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15590             {
       
 15591         
       
 15592                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15593                 return return_type_symbol;
       
 15594                 
       
 15595             }
       
 15596             
       
 15597             ERROR;
       
 15598         }
       
 15599         
       
 15600     }/*function_len*/
       
 15601     break;
       
 15602 
       
 15603 /****
       
 15604  *LEFT
       
 15605  */
       
 15606     case function_left :
       
 15607     {
       
 15608         symbol_c *last_type_symbol = NULL;
       
 15609 
       
 15610         {
       
 15611             identifier_c param_name("IN");
       
 15612             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15613             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15614             
       
 15615             /* Get the value from a foo(<param_value>) style call */
       
 15616             if (IN_param_value == NULL)
       
 15617               IN_param_value = function_call_param_iterator.next();
       
 15618             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15619             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15620             
       
 15621             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15622             {
       
 15623         
       
 15624                 {
       
 15625                     identifier_c param_name("L");
       
 15626                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15627                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15628                     
       
 15629                     /* Get the value from a foo(<param_value>) style call */
       
 15630                     if (L_param_value == NULL)
       
 15631                       L_param_value = function_call_param_iterator.next();
       
 15632                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15633                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15634                     
       
 15635                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15636                     {
       
 15637                 
       
 15638                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15639                         return return_type_symbol;
       
 15640                         
       
 15641                     }
       
 15642                     
       
 15643                     ERROR;
       
 15644                 }
       
 15645                 
       
 15646             }
       
 15647             
       
 15648             ERROR;
       
 15649         }
       
 15650         
       
 15651     }/*function_left*/
       
 15652     break;
       
 15653 
       
 15654 /****
       
 15655  *RIGHT
       
 15656  */
       
 15657     case function_right :
       
 15658     {
       
 15659         symbol_c *last_type_symbol = NULL;
       
 15660 
       
 15661         {
       
 15662             identifier_c param_name("IN");
       
 15663             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15664             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15665             
       
 15666             /* Get the value from a foo(<param_value>) style call */
       
 15667             if (IN_param_value == NULL)
       
 15668               IN_param_value = function_call_param_iterator.next();
       
 15669             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15670             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15671             
       
 15672             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15673             {
       
 15674         
       
 15675                 {
       
 15676                     identifier_c param_name("L");
       
 15677                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15678                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15679                     
       
 15680                     /* Get the value from a foo(<param_value>) style call */
       
 15681                     if (L_param_value == NULL)
       
 15682                       L_param_value = function_call_param_iterator.next();
       
 15683                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15684                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15685                     
       
 15686                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15687                     {
       
 15688                 
       
 15689                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15690                         return return_type_symbol;
       
 15691                         
       
 15692                     }
       
 15693                     
       
 15694                     ERROR;
       
 15695                 }
       
 15696                 
       
 15697             }
       
 15698             
       
 15699             ERROR;
       
 15700         }
       
 15701         
       
 15702     }/*function_right*/
       
 15703     break;
       
 15704 
       
 15705 /****
       
 15706  *MID
       
 15707  */
       
 15708     case function_mid :
       
 15709     {
       
 15710         symbol_c *last_type_symbol = NULL;
       
 15711 
       
 15712         {
       
 15713             identifier_c param_name("IN");
       
 15714             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15715             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15716             
       
 15717             /* Get the value from a foo(<param_value>) style call */
       
 15718             if (IN_param_value == NULL)
       
 15719               IN_param_value = function_call_param_iterator.next();
       
 15720             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15721             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15722             
       
 15723             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15724             {
       
 15725         
       
 15726                 {
       
 15727                     identifier_c param_name("L");
       
 15728                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15729                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15730                     
       
 15731                     /* Get the value from a foo(<param_value>) style call */
       
 15732                     if (L_param_value == NULL)
       
 15733                       L_param_value = function_call_param_iterator.next();
       
 15734                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15735                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15736                     
       
 15737                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15738                     {
       
 15739                 
       
 15740                         {
       
 15741                             identifier_c param_name("P");
       
 15742                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15743                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 15744                             
       
 15745                             /* Get the value from a foo(<param_value>) style call */
       
 15746                             if (P_param_value == NULL)
       
 15747                               P_param_value = function_call_param_iterator.next();
       
 15748                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 15749                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 15750                             
       
 15751                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15752                             {
       
 15753                         
       
 15754                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15755                                 return return_type_symbol;
       
 15756                                 
       
 15757                             }
       
 15758                             
       
 15759                             ERROR;
       
 15760                         }
       
 15761                         
       
 15762                     }
       
 15763                     
       
 15764                     ERROR;
       
 15765                 }
       
 15766                 
       
 15767             }
       
 15768             
       
 15769             ERROR;
       
 15770         }
       
 15771         
       
 15772     }/*function_mid*/
       
 15773     break;
       
 15774 
       
 15775 /****
       
 15776  *CONCAT
       
 15777  */
       
 15778     case function_concat :
       
 15779     {
       
 15780         symbol_c *last_type_symbol = NULL;
       
 15781 
       
 15782         {
       
 15783             identifier_c param_name("IN1");
       
 15784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15785             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15786             
       
 15787             /* Get the value from a foo(<param_value>) style call */
       
 15788             if (IN1_param_value == NULL)
       
 15789               IN1_param_value = function_call_param_iterator.next();
       
 15790             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15791             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 ;
       
 15792             
       
 15793             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 15794             {
       
 15795         
       
 15796                 {
       
 15797                     identifier_c param_name("IN2");
       
 15798                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15799                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15800                     
       
 15801                     /* Get the value from a foo(<param_value>) style call */
       
 15802                     if (IN2_param_value == NULL)
       
 15803                       IN2_param_value = function_call_param_iterator.next();
       
 15804                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15805                     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 ;
       
 15806                     
       
 15807                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 15808                     {
       
 15809                 
       
 15810                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15811                         return return_type_symbol;
       
 15812                         
       
 15813                     }
       
 15814                     
       
 15815                     ERROR;
       
 15816                 }
       
 15817                 
       
 15818             }
       
 15819             
       
 15820             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15821             {
       
 15822         
       
 15823                 {
       
 15824                     identifier_c param_name("IN2");
       
 15825                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15826                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15827                     
       
 15828                     /* Get the value from a foo(<param_value>) style call */
       
 15829                     if (IN2_param_value == NULL)
       
 15830                       IN2_param_value = function_call_param_iterator.next();
       
 15831                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15832                     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 ;
       
 15833                     
       
 15834                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15835                     {
       
 15836                 
       
 15837                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15838                         return return_type_symbol;
       
 15839                         
       
 15840                     }
       
 15841                     
       
 15842                     ERROR;
       
 15843                 }
       
 15844                 
       
 15845             }
       
 15846             
       
 15847             ERROR;
       
 15848         }
       
 15849         
       
 15850     }/*function_concat*/
       
 15851     break;
       
 15852 
       
 15853 /****
       
 15854  *INSERT
       
 15855  */
       
 15856     case function_insert :
       
 15857     {
       
 15858         symbol_c *last_type_symbol = NULL;
       
 15859 
       
 15860         {
       
 15861             identifier_c param_name("IN1");
       
 15862             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15863             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15864             
       
 15865             /* Get the value from a foo(<param_value>) style call */
       
 15866             if (IN1_param_value == NULL)
       
 15867               IN1_param_value = function_call_param_iterator.next();
       
 15868             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15869             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 ;
       
 15870             
       
 15871             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15872             {
       
 15873         
       
 15874                 {
       
 15875                     identifier_c param_name("IN2");
       
 15876                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15877                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15878                     
       
 15879                     /* Get the value from a foo(<param_value>) style call */
       
 15880                     if (IN2_param_value == NULL)
       
 15881                       IN2_param_value = function_call_param_iterator.next();
       
 15882                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15883                     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 ;
       
 15884                     
       
 15885                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15886                     {
       
 15887                 
       
 15888                         {
       
 15889                             identifier_c param_name("P");
       
 15890                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15891                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 15892                             
       
 15893                             /* Get the value from a foo(<param_value>) style call */
       
 15894                             if (P_param_value == NULL)
       
 15895                               P_param_value = function_call_param_iterator.next();
       
 15896                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 15897                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 15898                             
       
 15899                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15900                             {
       
 15901                         
       
 15902                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15903                                 return return_type_symbol;
       
 15904                                 
       
 15905                             }
       
 15906                             
       
 15907                             ERROR;
       
 15908                         }
       
 15909                         
       
 15910                     }
       
 15911                     
       
 15912                     ERROR;
       
 15913                 }
       
 15914                 
       
 15915             }
       
 15916             
       
 15917             ERROR;
       
 15918         }
       
 15919         
       
 15920     }/*function_insert*/
       
 15921     break;
       
 15922 
       
 15923 /****
       
 15924  *DELETE
       
 15925  */
       
 15926     case function_delete :
       
 15927     {
       
 15928         symbol_c *last_type_symbol = NULL;
       
 15929 
       
 15930         {
       
 15931             identifier_c param_name("IN");
       
 15932             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15933             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15934             
       
 15935             /* Get the value from a foo(<param_value>) style call */
       
 15936             if (IN_param_value == NULL)
       
 15937               IN_param_value = function_call_param_iterator.next();
       
 15938             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15939             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15940             
       
 15941             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 15942             {
       
 15943         
       
 15944                 {
       
 15945                     identifier_c param_name("L");
       
 15946                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15947                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15948                     
       
 15949                     /* Get the value from a foo(<param_value>) style call */
       
 15950                     if (L_param_value == NULL)
       
 15951                       L_param_value = function_call_param_iterator.next();
       
 15952                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15953                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15954                     
       
 15955                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15956                     {
       
 15957                 
       
 15958                         {
       
 15959                             identifier_c param_name("P");
       
 15960                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15961                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 15962                             
       
 15963                             /* Get the value from a foo(<param_value>) style call */
       
 15964                             if (P_param_value == NULL)
       
 15965                               P_param_value = function_call_param_iterator.next();
       
 15966                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 15967                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 15968                             
       
 15969                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15970                             {
       
 15971                         
       
 15972                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15973                                 return return_type_symbol;
       
 15974                                 
       
 15975                             }
       
 15976                             
       
 15977                             ERROR;
       
 15978                         }
       
 15979                         
       
 15980                     }
       
 15981                     
       
 15982                     ERROR;
       
 15983                 }
       
 15984                 
       
 15985             }
       
 15986             
       
 15987             ERROR;
       
 15988         }
       
 15989         
       
 15990     }/*function_delete*/
       
 15991     break;
       
 15992 
       
 15993 /****
       
 15994  *REPLACE
       
 15995  */
       
 15996     case function_replace :
       
 15997     {
       
 15998         symbol_c *last_type_symbol = NULL;
       
 15999 
       
 16000         {
       
 16001             identifier_c param_name("IN1");
       
 16002             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16003             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16004             
       
 16005             /* Get the value from a foo(<param_value>) style call */
       
 16006             if (IN1_param_value == NULL)
       
 16007               IN1_param_value = function_call_param_iterator.next();
       
 16008             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16009             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 ;
       
 16010             
       
 16011             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 16012             {
       
 16013         
       
 16014                 {
       
 16015                     identifier_c param_name("IN2");
       
 16016                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16017                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16018                     
       
 16019                     /* Get the value from a foo(<param_value>) style call */
       
 16020                     if (IN2_param_value == NULL)
       
 16021                       IN2_param_value = function_call_param_iterator.next();
       
 16022                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16023                     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 ;
       
 16024                     
       
 16025                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 16026                     {
       
 16027                 
       
 16028                         {
       
 16029                             identifier_c param_name("L");
       
 16030                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16031                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 16032                             
       
 16033                             /* Get the value from a foo(<param_value>) style call */
       
 16034                             if (L_param_value == NULL)
       
 16035                               L_param_value = function_call_param_iterator.next();
       
 16036                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 16037                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 16038                             
       
 16039                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 16040                             {
       
 16041                         
       
 16042                                 {
       
 16043                                     identifier_c param_name("P");
       
 16044                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16045                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 16046                                     
       
 16047                                     /* Get the value from a foo(<param_value>) style call */
       
 16048                                     if (P_param_value == NULL)
       
 16049                                       P_param_value = function_call_param_iterator.next();
       
 16050                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 16051                                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 16052                                     
       
 16053                                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 16054                                     {
       
 16055                                 
       
 16056                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16057                                         return return_type_symbol;
       
 16058                                         
       
 16059                                     }
       
 16060                                     
       
 16061                                     ERROR;
       
 16062                                 }
       
 16063                                 
       
 16064                             }
       
 16065                             
       
 16066                             ERROR;
       
 16067                         }
       
 16068                         
       
 16069                     }
       
 16070                     
       
 16071                     ERROR;
       
 16072                 }
       
 16073                 
       
 16074             }
       
 16075             
       
 16076             ERROR;
       
 16077         }
       
 16078         
       
 16079     }/*function_replace*/
       
 16080     break;
       
 16081 
       
 16082 /****
       
 16083  *FIND
       
 16084  */
       
 16085     case function_find :
       
 16086     {
       
 16087         symbol_c *last_type_symbol = NULL;
       
 16088 
       
 16089         {
       
 16090             identifier_c param_name("IN1");
       
 16091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16092             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16093             
       
 16094             /* Get the value from a foo(<param_value>) style call */
       
 16095             if (IN1_param_value == NULL)
       
 16096               IN1_param_value = function_call_param_iterator.next();
       
 16097             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16098             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 ;
       
 16099             
       
 16100             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 16101             {
       
 16102         
       
 16103                 {
       
 16104                     identifier_c param_name("IN2");
       
 16105                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16106                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16107                     
       
 16108                     /* Get the value from a foo(<param_value>) style call */
       
 16109                     if (IN2_param_value == NULL)
       
 16110                       IN2_param_value = function_call_param_iterator.next();
       
 16111                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16112                     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 ;
       
 16113                     
       
 16114                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 16115                     {
       
 16116                 
       
 16117                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16118                         return return_type_symbol;
       
 16119                         
       
 16120                     }
       
 16121                     
       
 16122                     ERROR;
       
 16123                 }
       
 16124                 
       
 16125             }
       
 16126             
       
 16127             ERROR;
       
 16128         }
       
 16129         
       
 16130     }/*function_find*/
       
 16131     break;
       
 16132 
       
 16133     case function_none :
       
 16134     ERROR;
       
 16135   }
       
 16136   return NULL;
       
 16137 }
       
 16138 
       
 16139 void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type) {
       
 16140   
       
 16141   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
       
 16142   function_call_param_iterator_c function_call_param_iterator(symbol);  
       
 16143   search_expression_type_c* search_expression_type = this;
       
 16144 
       
 16145   switch(current_function_type){
       
 16146 
       
 16147 /****
       
 16148  *REAL_TO_LREAL
       
 16149  */
       
 16150     case function_real_to_lreal :
       
 16151     {
       
 16152         symbol_c *last_type_symbol = NULL;
       
 16153 
       
 16154         {
       
 16155             symbol_c *IN_type_symbol = param_data_type;
       
 16156             last_type_symbol = param_data_type;
       
 16157             
       
 16158             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16159             {
       
 16160         
       
 16161                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16162                 return return_type_symbol;
       
 16163                 
       
 16164             }
       
 16165             
       
 16166             ERROR;
       
 16167         }
       
 16168         
       
 16169     }/*function_real_to_lreal*/
       
 16170     break;
       
 16171 
       
 16172 /****
       
 16173  *REAL_TO_SINT
       
 16174  */
       
 16175     case function_real_to_sint :
       
 16176     {
       
 16177         symbol_c *last_type_symbol = NULL;
       
 16178 
       
 16179         {
       
 16180             symbol_c *IN_type_symbol = param_data_type;
       
 16181             last_type_symbol = param_data_type;
       
 16182             
       
 16183             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16184             {
       
 16185         
       
 16186                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16187                 return return_type_symbol;
       
 16188                 
       
 16189             }
       
 16190             
       
 16191             ERROR;
       
 16192         }
       
 16193         
       
 16194     }/*function_real_to_sint*/
       
 16195     break;
       
 16196 
       
 16197 /****
       
 16198  *REAL_TO_INT
       
 16199  */
       
 16200     case function_real_to_int :
       
 16201     {
       
 16202         symbol_c *last_type_symbol = NULL;
       
 16203 
       
 16204         {
       
 16205             symbol_c *IN_type_symbol = param_data_type;
       
 16206             last_type_symbol = param_data_type;
       
 16207             
       
 16208             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16209             {
       
 16210         
       
 16211                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16212                 return return_type_symbol;
       
 16213                 
       
 16214             }
       
 16215             
       
 16216             ERROR;
       
 16217         }
       
 16218         
       
 16219     }/*function_real_to_int*/
       
 16220     break;
   103 
 16221 
   104 /****
 16222 /****
   105  *REAL_TO_DINT
 16223  *REAL_TO_DINT
   106  */
 16224  */
   107 	case function_real_to_dint :
 16225     case function_real_to_dint :
   108 	{
 16226     {
   109 		symbol_c *last_type_symbol = NULL;
 16227         symbol_c *last_type_symbol = NULL;
   110 
 16228 
   111 		{
 16229         {
   112 			identifier_c param_name("IN");
 16230             symbol_c *IN_type_symbol = param_data_type;
   113 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16231             last_type_symbol = param_data_type;
   114 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16232             
   115 			
 16233             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   116 			/* Get the value from a foo(<param_value>) style call */
 16234             {
   117 			if (IN_param_value == NULL)
 16235         
   118 			  IN_param_value = function_call_param_iterator.next();
 16236                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   119 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16237                 return return_type_symbol;
   120 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16238                 
   121 			
 16239             }
   122 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16240             
   123 			{
 16241             ERROR;
   124 		
 16242         }
   125 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 16243         
   126 				return return_type_symbol;
 16244     }/*function_real_to_dint*/
   127 				
 16245     break;
   128 			}
 16246 
   129 			
 16247 /****
   130 			ERROR;
 16248  *REAL_TO_LINT
   131 		}
 16249  */
   132 		
 16250     case function_real_to_lint :
   133 	}/*function_real_to_dint*/
 16251     {
   134 	break;
 16252         symbol_c *last_type_symbol = NULL;
       
 16253 
       
 16254         {
       
 16255             symbol_c *IN_type_symbol = param_data_type;
       
 16256             last_type_symbol = param_data_type;
       
 16257             
       
 16258             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16259             {
       
 16260         
       
 16261                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16262                 return return_type_symbol;
       
 16263                 
       
 16264             }
       
 16265             
       
 16266             ERROR;
       
 16267         }
       
 16268         
       
 16269     }/*function_real_to_lint*/
       
 16270     break;
       
 16271 
       
 16272 /****
       
 16273  *REAL_TO_USINT
       
 16274  */
       
 16275     case function_real_to_usint :
       
 16276     {
       
 16277         symbol_c *last_type_symbol = NULL;
       
 16278 
       
 16279         {
       
 16280             symbol_c *IN_type_symbol = param_data_type;
       
 16281             last_type_symbol = param_data_type;
       
 16282             
       
 16283             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16284             {
       
 16285         
       
 16286                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16287                 return return_type_symbol;
       
 16288                 
       
 16289             }
       
 16290             
       
 16291             ERROR;
       
 16292         }
       
 16293         
       
 16294     }/*function_real_to_usint*/
       
 16295     break;
       
 16296 
       
 16297 /****
       
 16298  *REAL_TO_UINT
       
 16299  */
       
 16300     case function_real_to_uint :
       
 16301     {
       
 16302         symbol_c *last_type_symbol = NULL;
       
 16303 
       
 16304         {
       
 16305             symbol_c *IN_type_symbol = param_data_type;
       
 16306             last_type_symbol = param_data_type;
       
 16307             
       
 16308             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16309             {
       
 16310         
       
 16311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16312                 return return_type_symbol;
       
 16313                 
       
 16314             }
       
 16315             
       
 16316             ERROR;
       
 16317         }
       
 16318         
       
 16319     }/*function_real_to_uint*/
       
 16320     break;
       
 16321 
       
 16322 /****
       
 16323  *REAL_TO_UDINT
       
 16324  */
       
 16325     case function_real_to_udint :
       
 16326     {
       
 16327         symbol_c *last_type_symbol = NULL;
       
 16328 
       
 16329         {
       
 16330             symbol_c *IN_type_symbol = param_data_type;
       
 16331             last_type_symbol = param_data_type;
       
 16332             
       
 16333             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16334             {
       
 16335         
       
 16336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16337                 return return_type_symbol;
       
 16338                 
       
 16339             }
       
 16340             
       
 16341             ERROR;
       
 16342         }
       
 16343         
       
 16344     }/*function_real_to_udint*/
       
 16345     break;
       
 16346 
       
 16347 /****
       
 16348  *REAL_TO_ULINT
       
 16349  */
       
 16350     case function_real_to_ulint :
       
 16351     {
       
 16352         symbol_c *last_type_symbol = NULL;
       
 16353 
       
 16354         {
       
 16355             symbol_c *IN_type_symbol = param_data_type;
       
 16356             last_type_symbol = param_data_type;
       
 16357             
       
 16358             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16359             {
       
 16360         
       
 16361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16362                 return return_type_symbol;
       
 16363                 
       
 16364             }
       
 16365             
       
 16366             ERROR;
       
 16367         }
       
 16368         
       
 16369     }/*function_real_to_ulint*/
       
 16370     break;
       
 16371 
       
 16372 /****
       
 16373  *REAL_TO_TIME
       
 16374  */
       
 16375     case function_real_to_time :
       
 16376     {
       
 16377         symbol_c *last_type_symbol = NULL;
       
 16378 
       
 16379         {
       
 16380             symbol_c *IN_type_symbol = param_data_type;
       
 16381             last_type_symbol = param_data_type;
       
 16382             
       
 16383             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16384             {
       
 16385         
       
 16386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16387                 return return_type_symbol;
       
 16388                 
       
 16389             }
       
 16390             
       
 16391             ERROR;
       
 16392         }
       
 16393         
       
 16394     }/*function_real_to_time*/
       
 16395     break;
       
 16396 
       
 16397 /****
       
 16398  *REAL_TO_BOOL
       
 16399  */
       
 16400     case function_real_to_bool :
       
 16401     {
       
 16402         symbol_c *last_type_symbol = NULL;
       
 16403 
       
 16404         {
       
 16405             symbol_c *IN_type_symbol = param_data_type;
       
 16406             last_type_symbol = param_data_type;
       
 16407             
       
 16408             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16409             {
       
 16410         
       
 16411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16412                 return return_type_symbol;
       
 16413                 
       
 16414             }
       
 16415             
       
 16416             ERROR;
       
 16417         }
       
 16418         
       
 16419     }/*function_real_to_bool*/
       
 16420     break;
       
 16421 
       
 16422 /****
       
 16423  *REAL_TO_BYTE
       
 16424  */
       
 16425     case function_real_to_byte :
       
 16426     {
       
 16427         symbol_c *last_type_symbol = NULL;
       
 16428 
       
 16429         {
       
 16430             symbol_c *IN_type_symbol = param_data_type;
       
 16431             last_type_symbol = param_data_type;
       
 16432             
       
 16433             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16434             {
       
 16435         
       
 16436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16437                 return return_type_symbol;
       
 16438                 
       
 16439             }
       
 16440             
       
 16441             ERROR;
       
 16442         }
       
 16443         
       
 16444     }/*function_real_to_byte*/
       
 16445     break;
       
 16446 
       
 16447 /****
       
 16448  *REAL_TO_WORD
       
 16449  */
       
 16450     case function_real_to_word :
       
 16451     {
       
 16452         symbol_c *last_type_symbol = NULL;
       
 16453 
       
 16454         {
       
 16455             symbol_c *IN_type_symbol = param_data_type;
       
 16456             last_type_symbol = param_data_type;
       
 16457             
       
 16458             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16459             {
       
 16460         
       
 16461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16462                 return return_type_symbol;
       
 16463                 
       
 16464             }
       
 16465             
       
 16466             ERROR;
       
 16467         }
       
 16468         
       
 16469     }/*function_real_to_word*/
       
 16470     break;
       
 16471 
       
 16472 /****
       
 16473  *REAL_TO_DWORD
       
 16474  */
       
 16475     case function_real_to_dword :
       
 16476     {
       
 16477         symbol_c *last_type_symbol = NULL;
       
 16478 
       
 16479         {
       
 16480             symbol_c *IN_type_symbol = param_data_type;
       
 16481             last_type_symbol = param_data_type;
       
 16482             
       
 16483             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16484             {
       
 16485         
       
 16486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16487                 return return_type_symbol;
       
 16488                 
       
 16489             }
       
 16490             
       
 16491             ERROR;
       
 16492         }
       
 16493         
       
 16494     }/*function_real_to_dword*/
       
 16495     break;
       
 16496 
       
 16497 /****
       
 16498  *REAL_TO_LWORD
       
 16499  */
       
 16500     case function_real_to_lword :
       
 16501     {
       
 16502         symbol_c *last_type_symbol = NULL;
       
 16503 
       
 16504         {
       
 16505             symbol_c *IN_type_symbol = param_data_type;
       
 16506             last_type_symbol = param_data_type;
       
 16507             
       
 16508             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16509             {
       
 16510         
       
 16511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16512                 return return_type_symbol;
       
 16513                 
       
 16514             }
       
 16515             
       
 16516             ERROR;
       
 16517         }
       
 16518         
       
 16519     }/*function_real_to_lword*/
       
 16520     break;
       
 16521 
       
 16522 /****
       
 16523  *REAL_TO_STRING
       
 16524  */
       
 16525     case function_real_to_string :
       
 16526     {
       
 16527         symbol_c *last_type_symbol = NULL;
       
 16528 
       
 16529         {
       
 16530             symbol_c *IN_type_symbol = param_data_type;
       
 16531             last_type_symbol = param_data_type;
       
 16532             
       
 16533             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16534             {
       
 16535         
       
 16536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16537                 return return_type_symbol;
       
 16538                 
       
 16539             }
       
 16540             
       
 16541             ERROR;
       
 16542         }
       
 16543         
       
 16544     }/*function_real_to_string*/
       
 16545     break;
       
 16546 
       
 16547 /****
       
 16548  *REAL_TO_WSTRING
       
 16549  */
       
 16550     case function_real_to_wstring :
       
 16551     {
       
 16552         symbol_c *last_type_symbol = NULL;
       
 16553 
       
 16554         {
       
 16555             symbol_c *IN_type_symbol = param_data_type;
       
 16556             last_type_symbol = param_data_type;
       
 16557             
       
 16558             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 16559             {
       
 16560         
       
 16561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 16562                 return return_type_symbol;
       
 16563                 
       
 16564             }
       
 16565             
       
 16566             ERROR;
       
 16567         }
       
 16568         
       
 16569     }/*function_real_to_wstring*/
       
 16570     break;
   135 
 16571 
   136 /****
 16572 /****
   137  *REAL_TO_DATE
 16573  *REAL_TO_DATE
   138  */
 16574  */
   139 	case function_real_to_date :
 16575     case function_real_to_date :
   140 	{
 16576     {
   141 		symbol_c *last_type_symbol = NULL;
 16577         symbol_c *last_type_symbol = NULL;
   142 
 16578 
   143 		{
 16579         {
   144 			identifier_c param_name("IN");
 16580             symbol_c *IN_type_symbol = param_data_type;
   145 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16581             last_type_symbol = param_data_type;
   146 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16582             
   147 			
 16583             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   148 			/* Get the value from a foo(<param_value>) style call */
 16584             {
   149 			if (IN_param_value == NULL)
 16585         
   150 			  IN_param_value = function_call_param_iterator.next();
 16586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   151 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16587                 return return_type_symbol;
   152 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16588                 
   153 			
 16589             }
   154 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16590             
   155 			{
 16591             ERROR;
   156 		
 16592         }
   157 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16593         
   158 				return return_type_symbol;
 16594     }/*function_real_to_date*/
   159 				
 16595     break;
   160 			}
 16596 
   161 			
 16597 /****
   162 			ERROR;
 16598  *REAL_TO_TOD
   163 		}
 16599  */
   164 		
 16600     case function_real_to_tod :
   165 	}/*function_real_to_date*/
 16601     {
   166 	break;
 16602         symbol_c *last_type_symbol = NULL;
   167 
 16603 
   168 /****
 16604         {
   169  *REAL_TO_DWORD
 16605             symbol_c *IN_type_symbol = param_data_type;
   170  */
 16606             last_type_symbol = param_data_type;
   171 	case function_real_to_dword :
 16607             
   172 	{
 16608             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   173 		symbol_c *last_type_symbol = NULL;
 16609             {
   174 
 16610         
   175 		{
 16611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   176 			identifier_c param_name("IN");
 16612                 return return_type_symbol;
   177 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16613                 
   178 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16614             }
   179 			
 16615             
   180 			/* Get the value from a foo(<param_value>) style call */
 16616             ERROR;
   181 			if (IN_param_value == NULL)
 16617         }
   182 			  IN_param_value = function_call_param_iterator.next();
 16618         
   183 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16619     }/*function_real_to_tod*/
   184 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16620     break;
   185 			
       
   186 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   187 			{
       
   188 		
       
   189 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   190 				return return_type_symbol;
       
   191 				
       
   192 			}
       
   193 			
       
   194 			ERROR;
       
   195 		}
       
   196 		
       
   197 	}/*function_real_to_dword*/
       
   198 	break;
       
   199 
 16621 
   200 /****
 16622 /****
   201  *REAL_TO_DT
 16623  *REAL_TO_DT
   202  */
 16624  */
   203 	case function_real_to_dt :
 16625     case function_real_to_dt :
   204 	{
 16626     {
   205 		symbol_c *last_type_symbol = NULL;
 16627         symbol_c *last_type_symbol = NULL;
   206 
 16628 
   207 		{
 16629         {
   208 			identifier_c param_name("IN");
 16630             symbol_c *IN_type_symbol = param_data_type;
   209 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16631             last_type_symbol = param_data_type;
   210 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16632             
   211 			
 16633             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   212 			/* Get the value from a foo(<param_value>) style call */
 16634             {
   213 			if (IN_param_value == NULL)
 16635         
   214 			  IN_param_value = function_call_param_iterator.next();
 16636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   215 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16637                 return return_type_symbol;
   216 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16638                 
   217 			
 16639             }
   218 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16640             
   219 			{
 16641             ERROR;
   220 		
 16642         }
   221 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16643         
   222 				return return_type_symbol;
 16644     }/*function_real_to_dt*/
   223 				
 16645     break;
   224 			}
 16646 
   225 			
 16647 /****
   226 			ERROR;
 16648  *LREAL_TO_REAL
   227 		}
 16649  */
   228 		
 16650     case function_lreal_to_real :
   229 	}/*function_real_to_dt*/
 16651     {
   230 	break;
 16652         symbol_c *last_type_symbol = NULL;
   231 
 16653 
   232 /****
 16654         {
   233  *REAL_TO_TOD
 16655             symbol_c *IN_type_symbol = param_data_type;
   234  */
 16656             last_type_symbol = param_data_type;
   235 	case function_real_to_tod :
 16657             
   236 	{
 16658             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   237 		symbol_c *last_type_symbol = NULL;
 16659             {
   238 
 16660         
   239 		{
 16661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   240 			identifier_c param_name("IN");
 16662                 return return_type_symbol;
   241 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16663                 
   242 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16664             }
   243 			
 16665             
   244 			/* Get the value from a foo(<param_value>) style call */
 16666             ERROR;
   245 			if (IN_param_value == NULL)
 16667         }
   246 			  IN_param_value = function_call_param_iterator.next();
 16668         
   247 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16669     }/*function_lreal_to_real*/
   248 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16670     break;
   249 			
 16671 
   250 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16672 /****
   251 			{
 16673  *LREAL_TO_SINT
   252 		
 16674  */
   253 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16675     case function_lreal_to_sint :
   254 				return return_type_symbol;
 16676     {
   255 				
 16677         symbol_c *last_type_symbol = NULL;
   256 			}
 16678 
   257 			
 16679         {
   258 			ERROR;
 16680             symbol_c *IN_type_symbol = param_data_type;
   259 		}
 16681             last_type_symbol = param_data_type;
   260 		
 16682             
   261 	}/*function_real_to_tod*/
 16683             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   262 	break;
 16684             {
   263 
 16685         
   264 /****
 16686                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
   265  *REAL_TO_UDINT
 16687                 return return_type_symbol;
   266  */
 16688                 
   267 	case function_real_to_udint :
 16689             }
   268 	{
 16690             
   269 		symbol_c *last_type_symbol = NULL;
 16691             ERROR;
   270 
 16692         }
   271 		{
 16693         
   272 			identifier_c param_name("IN");
 16694     }/*function_lreal_to_sint*/
   273 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16695     break;
   274 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16696 
   275 			
 16697 /****
   276 			/* Get the value from a foo(<param_value>) style call */
 16698  *LREAL_TO_INT
   277 			if (IN_param_value == NULL)
 16699  */
   278 			  IN_param_value = function_call_param_iterator.next();
 16700     case function_lreal_to_int :
   279 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16701     {
   280 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16702         symbol_c *last_type_symbol = NULL;
   281 			
 16703 
   282 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16704         {
   283 			{
 16705             symbol_c *IN_type_symbol = param_data_type;
   284 		
 16706             last_type_symbol = param_data_type;
   285 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16707             
   286 				return return_type_symbol;
 16708             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   287 				
 16709             {
   288 			}
 16710         
   289 			
 16711                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   290 			ERROR;
 16712                 return return_type_symbol;
   291 		}
 16713                 
   292 		
 16714             }
   293 	}/*function_real_to_udint*/
 16715             
   294 	break;
 16716             ERROR;
   295 
 16717         }
   296 /****
 16718         
   297  *REAL_TO_WORD
 16719     }/*function_lreal_to_int*/
   298  */
 16720     break;
   299 	case function_real_to_word :
 16721 
   300 	{
 16722 /****
   301 		symbol_c *last_type_symbol = NULL;
 16723  *LREAL_TO_DINT
   302 
 16724  */
   303 		{
 16725     case function_lreal_to_dint :
   304 			identifier_c param_name("IN");
 16726     {
   305 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16727         symbol_c *last_type_symbol = NULL;
   306 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16728 
   307 			
 16729         {
   308 			/* Get the value from a foo(<param_value>) style call */
 16730             symbol_c *IN_type_symbol = param_data_type;
   309 			if (IN_param_value == NULL)
 16731             last_type_symbol = param_data_type;
   310 			  IN_param_value = function_call_param_iterator.next();
 16732             
   311 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16733             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   312 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16734             {
   313 			
 16735         
   314 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16736                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   315 			{
 16737                 return return_type_symbol;
   316 		
 16738                 
   317 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16739             }
   318 				return return_type_symbol;
 16740             
   319 				
 16741             ERROR;
   320 			}
 16742         }
   321 			
 16743         
   322 			ERROR;
 16744     }/*function_lreal_to_dint*/
   323 		}
 16745     break;
   324 		
 16746 
   325 	}/*function_real_to_word*/
 16747 /****
   326 	break;
 16748  *LREAL_TO_LINT
   327 
 16749  */
   328 /****
 16750     case function_lreal_to_lint :
   329  *REAL_TO_WSTRING
 16751     {
   330  */
 16752         symbol_c *last_type_symbol = NULL;
   331 	case function_real_to_wstring :
 16753 
   332 	{
 16754         {
   333 		symbol_c *last_type_symbol = NULL;
 16755             symbol_c *IN_type_symbol = param_data_type;
   334 
 16756             last_type_symbol = param_data_type;
   335 		{
 16757             
   336 			identifier_c param_name("IN");
 16758             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   337 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16759             {
   338 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16760         
   339 			
 16761                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   340 			/* Get the value from a foo(<param_value>) style call */
 16762                 return return_type_symbol;
   341 			if (IN_param_value == NULL)
 16763                 
   342 			  IN_param_value = function_call_param_iterator.next();
 16764             }
   343 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16765             
   344 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16766             ERROR;
   345 			
 16767         }
   346 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16768         
   347 			{
 16769     }/*function_lreal_to_lint*/
   348 		
 16770     break;
   349 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 16771 
   350 				return return_type_symbol;
 16772 /****
   351 				
 16773  *LREAL_TO_USINT
   352 			}
 16774  */
   353 			
 16775     case function_lreal_to_usint :
   354 			ERROR;
 16776     {
   355 		}
 16777         symbol_c *last_type_symbol = NULL;
   356 		
 16778 
   357 	}/*function_real_to_wstring*/
 16779         {
   358 	break;
 16780             symbol_c *IN_type_symbol = param_data_type;
   359 
 16781             last_type_symbol = param_data_type;
   360 /****
 16782             
   361  *REAL_TO_STRING
 16783             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   362  */
 16784             {
   363 	case function_real_to_string :
 16785         
   364 	{
 16786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   365 		symbol_c *last_type_symbol = NULL;
 16787                 return return_type_symbol;
   366 
 16788                 
   367 		{
 16789             }
   368 			identifier_c param_name("IN");
 16790             
   369 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16791             ERROR;
   370 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16792         }
   371 			
 16793         
   372 			/* Get the value from a foo(<param_value>) style call */
 16794     }/*function_lreal_to_usint*/
   373 			if (IN_param_value == NULL)
 16795     break;
   374 			  IN_param_value = function_call_param_iterator.next();
 16796 
   375 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16797 /****
   376 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16798  *LREAL_TO_UINT
   377 			
 16799  */
   378 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16800     case function_lreal_to_uint :
   379 			{
 16801     {
   380 		
 16802         symbol_c *last_type_symbol = NULL;
   381 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16803 
   382 				return return_type_symbol;
 16804         {
   383 				
 16805             symbol_c *IN_type_symbol = param_data_type;
   384 			}
 16806             last_type_symbol = param_data_type;
   385 			
 16807             
   386 			ERROR;
 16808             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   387 		}
 16809             {
   388 		
 16810         
   389 	}/*function_real_to_string*/
 16811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   390 	break;
 16812                 return return_type_symbol;
   391 
 16813                 
   392 /****
 16814             }
   393  *REAL_TO_LWORD
 16815             
   394  */
 16816             ERROR;
   395 	case function_real_to_lword :
 16817         }
   396 	{
 16818         
   397 		symbol_c *last_type_symbol = NULL;
 16819     }/*function_lreal_to_uint*/
   398 
 16820     break;
   399 		{
 16821 
   400 			identifier_c param_name("IN");
 16822 /****
   401 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16823  *LREAL_TO_UDINT
   402 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16824  */
   403 			
 16825     case function_lreal_to_udint :
   404 			/* Get the value from a foo(<param_value>) style call */
 16826     {
   405 			if (IN_param_value == NULL)
 16827         symbol_c *last_type_symbol = NULL;
   406 			  IN_param_value = function_call_param_iterator.next();
 16828 
   407 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16829         {
   408 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16830             symbol_c *IN_type_symbol = param_data_type;
   409 			
 16831             last_type_symbol = param_data_type;
   410 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16832             
   411 			{
 16833             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   412 		
 16834             {
   413 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 16835         
   414 				return return_type_symbol;
 16836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   415 				
 16837                 return return_type_symbol;
   416 			}
 16838                 
   417 			
 16839             }
   418 			ERROR;
 16840             
   419 		}
 16841             ERROR;
   420 		
 16842         }
   421 	}/*function_real_to_lword*/
 16843         
   422 	break;
 16844     }/*function_lreal_to_udint*/
   423 
 16845     break;
   424 /****
 16846 
   425  *REAL_TO_UINT
 16847 /****
   426  */
 16848  *LREAL_TO_ULINT
   427 	case function_real_to_uint :
 16849  */
   428 	{
 16850     case function_lreal_to_ulint :
   429 		symbol_c *last_type_symbol = NULL;
 16851     {
   430 
 16852         symbol_c *last_type_symbol = NULL;
   431 		{
 16853 
   432 			identifier_c param_name("IN");
 16854         {
   433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16855             symbol_c *IN_type_symbol = param_data_type;
   434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16856             last_type_symbol = param_data_type;
   435 			
 16857             
   436 			/* Get the value from a foo(<param_value>) style call */
 16858             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   437 			if (IN_param_value == NULL)
 16859             {
   438 			  IN_param_value = function_call_param_iterator.next();
 16860         
   439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16862                 return return_type_symbol;
   441 			
 16863                 
   442 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16864             }
   443 			{
 16865             
   444 		
 16866             ERROR;
   445 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16867         }
   446 				return return_type_symbol;
 16868         
   447 				
 16869     }/*function_lreal_to_ulint*/
   448 			}
 16870     break;
   449 			
 16871 
   450 			ERROR;
 16872 /****
   451 		}
 16873  *LREAL_TO_TIME
   452 		
 16874  */
   453 	}/*function_real_to_uint*/
 16875     case function_lreal_to_time :
   454 	break;
 16876     {
   455 
 16877         symbol_c *last_type_symbol = NULL;
   456 /****
 16878 
   457  *REAL_TO_LREAL
 16879         {
   458  */
 16880             symbol_c *IN_type_symbol = param_data_type;
   459 	case function_real_to_lreal :
 16881             last_type_symbol = param_data_type;
   460 	{
 16882             
   461 		symbol_c *last_type_symbol = NULL;
 16883             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   462 
 16884             {
   463 		{
 16885         
   464 			identifier_c param_name("IN");
 16886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   465 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16887                 return return_type_symbol;
   466 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16888                 
   467 			
 16889             }
   468 			/* Get the value from a foo(<param_value>) style call */
 16890             
   469 			if (IN_param_value == NULL)
 16891             ERROR;
   470 			  IN_param_value = function_call_param_iterator.next();
 16892         }
   471 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16893         
   472 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16894     }/*function_lreal_to_time*/
   473 			
 16895     break;
   474 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16896 
   475 			{
 16897 /****
   476 		
 16898  *LREAL_TO_BOOL
   477 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 16899  */
   478 				return return_type_symbol;
 16900     case function_lreal_to_bool :
   479 				
 16901     {
   480 			}
 16902         symbol_c *last_type_symbol = NULL;
   481 			
 16903 
   482 			ERROR;
 16904         {
   483 		}
 16905             symbol_c *IN_type_symbol = param_data_type;
   484 		
 16906             last_type_symbol = param_data_type;
   485 	}/*function_real_to_lreal*/
 16907             
   486 	break;
 16908             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   487 
 16909             {
   488 /****
 16910         
   489  *REAL_TO_BYTE
 16911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   490  */
 16912                 return return_type_symbol;
   491 	case function_real_to_byte :
 16913                 
   492 	{
 16914             }
   493 		symbol_c *last_type_symbol = NULL;
 16915             
   494 
 16916             ERROR;
   495 		{
 16917         }
   496 			identifier_c param_name("IN");
 16918         
   497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16919     }/*function_lreal_to_bool*/
   498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16920     break;
   499 			
 16921 
   500 			/* Get the value from a foo(<param_value>) style call */
 16922 /****
   501 			if (IN_param_value == NULL)
 16923  *LREAL_TO_BYTE
   502 			  IN_param_value = function_call_param_iterator.next();
 16924  */
   503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16925     case function_lreal_to_byte :
   504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16926     {
   505 			
 16927         symbol_c *last_type_symbol = NULL;
   506 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16928 
   507 			{
 16929         {
   508 		
 16930             symbol_c *IN_type_symbol = param_data_type;
   509 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16931             last_type_symbol = param_data_type;
   510 				return return_type_symbol;
 16932             
   511 				
 16933             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   512 			}
 16934             {
   513 			
 16935         
   514 			ERROR;
 16936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   515 		}
 16937                 return return_type_symbol;
   516 		
 16938                 
   517 	}/*function_real_to_byte*/
 16939             }
   518 	break;
 16940             
   519 
 16941             ERROR;
   520 /****
 16942         }
   521  *REAL_TO_USINT
 16943         
   522  */
 16944     }/*function_lreal_to_byte*/
   523 	case function_real_to_usint :
 16945     break;
   524 	{
 16946 
   525 		symbol_c *last_type_symbol = NULL;
 16947 /****
   526 
 16948  *LREAL_TO_WORD
   527 		{
 16949  */
   528 			identifier_c param_name("IN");
 16950     case function_lreal_to_word :
   529 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16951     {
   530 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16952         symbol_c *last_type_symbol = NULL;
   531 			
 16953 
   532 			/* Get the value from a foo(<param_value>) style call */
 16954         {
   533 			if (IN_param_value == NULL)
 16955             symbol_c *IN_type_symbol = param_data_type;
   534 			  IN_param_value = function_call_param_iterator.next();
 16956             last_type_symbol = param_data_type;
   535 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16957             
   536 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16958             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   537 			
 16959             {
   538 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16960         
   539 			{
 16961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   540 		
 16962                 return return_type_symbol;
   541 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16963                 
   542 				return return_type_symbol;
 16964             }
   543 				
 16965             
   544 			}
 16966             ERROR;
   545 			
 16967         }
   546 			ERROR;
 16968         
   547 		}
 16969     }/*function_lreal_to_word*/
   548 		
 16970     break;
   549 	}/*function_real_to_usint*/
 16971 
   550 	break;
 16972 /****
   551 
 16973  *LREAL_TO_DWORD
   552 /****
 16974  */
   553  *REAL_TO_ULINT
 16975     case function_lreal_to_dword :
   554  */
 16976     {
   555 	case function_real_to_ulint :
 16977         symbol_c *last_type_symbol = NULL;
   556 	{
 16978 
   557 		symbol_c *last_type_symbol = NULL;
 16979         {
   558 
 16980             symbol_c *IN_type_symbol = param_data_type;
   559 		{
 16981             last_type_symbol = param_data_type;
   560 			identifier_c param_name("IN");
 16982             
   561 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16983             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   562 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16984             {
   563 			
 16985         
   564 			/* Get the value from a foo(<param_value>) style call */
 16986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   565 			if (IN_param_value == NULL)
 16987                 return return_type_symbol;
   566 			  IN_param_value = function_call_param_iterator.next();
 16988                 
   567 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16989             }
   568 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16990             
   569 			
 16991             ERROR;
   570 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16992         }
   571 			{
 16993         
   572 		
 16994     }/*function_lreal_to_dword*/
   573 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16995     break;
   574 				return return_type_symbol;
 16996 
   575 				
 16997 /****
   576 			}
 16998  *LREAL_TO_LWORD
   577 			
 16999  */
   578 			ERROR;
 17000     case function_lreal_to_lword :
   579 		}
 17001     {
   580 		
 17002         symbol_c *last_type_symbol = NULL;
   581 	}/*function_real_to_ulint*/
 17003 
   582 	break;
 17004         {
   583 
 17005             symbol_c *IN_type_symbol = param_data_type;
   584 /****
 17006             last_type_symbol = param_data_type;
   585  *REAL_TO_BOOL
 17007             
   586  */
 17008             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   587 	case function_real_to_bool :
 17009             {
   588 	{
 17010         
   589 		symbol_c *last_type_symbol = NULL;
 17011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   590 
 17012                 return return_type_symbol;
   591 		{
 17013                 
   592 			identifier_c param_name("IN");
 17014             }
   593 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17015             
   594 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17016             ERROR;
   595 			
 17017         }
   596 			/* Get the value from a foo(<param_value>) style call */
 17018         
   597 			if (IN_param_value == NULL)
 17019     }/*function_lreal_to_lword*/
   598 			  IN_param_value = function_call_param_iterator.next();
 17020     break;
   599 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17021 
   600 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17022 /****
   601 			
 17023  *LREAL_TO_STRING
   602 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 17024  */
   603 			{
 17025     case function_lreal_to_string :
   604 		
 17026     {
   605 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17027         symbol_c *last_type_symbol = NULL;
   606 				return return_type_symbol;
 17028 
   607 				
 17029         {
   608 			}
 17030             symbol_c *IN_type_symbol = param_data_type;
   609 			
 17031             last_type_symbol = param_data_type;
   610 			ERROR;
 17032             
   611 		}
 17033             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   612 		
 17034             {
   613 	}/*function_real_to_bool*/
 17035         
   614 	break;
 17036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   615 
 17037                 return return_type_symbol;
   616 /****
 17038                 
   617  *REAL_TO_TIME
 17039             }
   618  */
 17040             
   619 	case function_real_to_time :
 17041             ERROR;
   620 	{
 17042         }
   621 		symbol_c *last_type_symbol = NULL;
 17043         
   622 
 17044     }/*function_lreal_to_string*/
   623 		{
 17045     break;
   624 			identifier_c param_name("IN");
 17046 
   625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17047 /****
   626 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17048  *LREAL_TO_WSTRING
   627 			
 17049  */
   628 			/* Get the value from a foo(<param_value>) style call */
 17050     case function_lreal_to_wstring :
   629 			if (IN_param_value == NULL)
 17051     {
   630 			  IN_param_value = function_call_param_iterator.next();
 17052         symbol_c *last_type_symbol = NULL;
   631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17053 
   632 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17054         {
   633 			
 17055             symbol_c *IN_type_symbol = param_data_type;
   634 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 17056             last_type_symbol = param_data_type;
   635 			{
 17057             
   636 		
 17058             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   637 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17059             {
   638 				return return_type_symbol;
 17060         
   639 				
 17061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
   640 			}
 17062                 return return_type_symbol;
   641 			
 17063                 
   642 			ERROR;
 17064             }
   643 		}
 17065             
   644 		
 17066             ERROR;
   645 	}/*function_real_to_time*/
 17067         }
   646 	break;
 17068         
   647 
 17069     }/*function_lreal_to_wstring*/
   648 /****
 17070     break;
   649  *REAL_TO_INT
 17071 
   650  */
 17072 /****
   651 	case function_real_to_int :
 17073  *LREAL_TO_DATE
   652 	{
 17074  */
   653 		symbol_c *last_type_symbol = NULL;
 17075     case function_lreal_to_date :
   654 
 17076     {
   655 		{
 17077         symbol_c *last_type_symbol = NULL;
   656 			identifier_c param_name("IN");
 17078 
   657 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17079         {
   658 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17080             symbol_c *IN_type_symbol = param_data_type;
   659 			
 17081             last_type_symbol = param_data_type;
   660 			/* Get the value from a foo(<param_value>) style call */
 17082             
   661 			if (IN_param_value == NULL)
 17083             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   662 			  IN_param_value = function_call_param_iterator.next();
 17084             {
   663 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17085         
   664 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   665 			
 17087                 return return_type_symbol;
   666 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 17088                 
   667 			{
 17089             }
   668 		
 17090             
   669 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17091             ERROR;
   670 				return return_type_symbol;
 17092         }
   671 				
 17093         
   672 			}
 17094     }/*function_lreal_to_date*/
   673 			
 17095     break;
   674 			ERROR;
 17096 
   675 		}
 17097 /****
   676 		
 17098  *LREAL_TO_TOD
   677 	}/*function_real_to_int*/
 17099  */
   678 	break;
 17100     case function_lreal_to_tod :
       
 17101     {
       
 17102         symbol_c *last_type_symbol = NULL;
       
 17103 
       
 17104         {
       
 17105             symbol_c *IN_type_symbol = param_data_type;
       
 17106             last_type_symbol = param_data_type;
       
 17107             
       
 17108             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 17109             {
       
 17110         
       
 17111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17112                 return return_type_symbol;
       
 17113                 
       
 17114             }
       
 17115             
       
 17116             ERROR;
       
 17117         }
       
 17118         
       
 17119     }/*function_lreal_to_tod*/
       
 17120     break;
       
 17121 
       
 17122 /****
       
 17123  *LREAL_TO_DT
       
 17124  */
       
 17125     case function_lreal_to_dt :
       
 17126     {
       
 17127         symbol_c *last_type_symbol = NULL;
       
 17128 
       
 17129         {
       
 17130             symbol_c *IN_type_symbol = param_data_type;
       
 17131             last_type_symbol = param_data_type;
       
 17132             
       
 17133             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 17134             {
       
 17135         
       
 17136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17137                 return return_type_symbol;
       
 17138                 
       
 17139             }
       
 17140             
       
 17141             ERROR;
       
 17142         }
       
 17143         
       
 17144     }/*function_lreal_to_dt*/
       
 17145     break;
   679 
 17146 
   680 /****
 17147 /****
   681  *SINT_TO_REAL
 17148  *SINT_TO_REAL
   682  */
 17149  */
   683 	case function_sint_to_real :
 17150     case function_sint_to_real :
   684 	{
 17151     {
   685 		symbol_c *last_type_symbol = NULL;
 17152         symbol_c *last_type_symbol = NULL;
   686 
 17153 
   687 		{
 17154         {
   688 			identifier_c param_name("IN");
 17155             symbol_c *IN_type_symbol = param_data_type;
   689 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17156             last_type_symbol = param_data_type;
   690 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17157             
   691 			
 17158             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   692 			/* Get the value from a foo(<param_value>) style call */
 17159             {
   693 			if (IN_param_value == NULL)
 17160         
   694 			  IN_param_value = function_call_param_iterator.next();
 17161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   695 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17162                 return return_type_symbol;
   696 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17163                 
   697 			
 17164             }
   698 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17165             
   699 			{
 17166             ERROR;
   700 		
 17167         }
   701 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17168         
   702 				return return_type_symbol;
 17169     }/*function_sint_to_real*/
   703 				
 17170     break;
   704 			}
 17171 
   705 			
 17172 /****
   706 			ERROR;
 17173  *SINT_TO_LREAL
   707 		}
 17174  */
   708 		
 17175     case function_sint_to_lreal :
   709 	}/*function_sint_to_real*/
 17176     {
   710 	break;
 17177         symbol_c *last_type_symbol = NULL;
   711 
 17178 
   712 /****
 17179         {
   713  *SINT_TO_SINT
 17180             symbol_c *IN_type_symbol = param_data_type;
   714  */
 17181             last_type_symbol = param_data_type;
   715 	case function_sint_to_sint :
 17182             
   716 	{
 17183             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   717 		symbol_c *last_type_symbol = NULL;
 17184             {
   718 
 17185         
   719 		{
 17186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   720 			identifier_c param_name("IN");
 17187                 return return_type_symbol;
   721 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17188                 
   722 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17189             }
   723 			
 17190             
   724 			/* Get the value from a foo(<param_value>) style call */
 17191             ERROR;
   725 			if (IN_param_value == NULL)
 17192         }
   726 			  IN_param_value = function_call_param_iterator.next();
 17193         
   727 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17194     }/*function_sint_to_lreal*/
   728 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17195     break;
   729 			
 17196 
   730 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17197 /****
   731 			{
 17198  *SINT_TO_INT
   732 		
 17199  */
   733 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17200     case function_sint_to_int :
   734 				return return_type_symbol;
 17201     {
   735 				
 17202         symbol_c *last_type_symbol = NULL;
   736 			}
 17203 
   737 			
 17204         {
   738 			ERROR;
 17205             symbol_c *IN_type_symbol = param_data_type;
   739 		}
 17206             last_type_symbol = param_data_type;
   740 		
 17207             
   741 	}/*function_sint_to_sint*/
 17208             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   742 	break;
 17209             {
       
 17210         
       
 17211                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17212                 return return_type_symbol;
       
 17213                 
       
 17214             }
       
 17215             
       
 17216             ERROR;
       
 17217         }
       
 17218         
       
 17219     }/*function_sint_to_int*/
       
 17220     break;
       
 17221 
       
 17222 /****
       
 17223  *SINT_TO_DINT
       
 17224  */
       
 17225     case function_sint_to_dint :
       
 17226     {
       
 17227         symbol_c *last_type_symbol = NULL;
       
 17228 
       
 17229         {
       
 17230             symbol_c *IN_type_symbol = param_data_type;
       
 17231             last_type_symbol = param_data_type;
       
 17232             
       
 17233             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17234             {
       
 17235         
       
 17236                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17237                 return return_type_symbol;
       
 17238                 
       
 17239             }
       
 17240             
       
 17241             ERROR;
       
 17242         }
       
 17243         
       
 17244     }/*function_sint_to_dint*/
       
 17245     break;
   743 
 17246 
   744 /****
 17247 /****
   745  *SINT_TO_LINT
 17248  *SINT_TO_LINT
   746  */
 17249  */
   747 	case function_sint_to_lint :
 17250     case function_sint_to_lint :
   748 	{
 17251     {
   749 		symbol_c *last_type_symbol = NULL;
 17252         symbol_c *last_type_symbol = NULL;
   750 
 17253 
   751 		{
 17254         {
   752 			identifier_c param_name("IN");
 17255             symbol_c *IN_type_symbol = param_data_type;
   753 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17256             last_type_symbol = param_data_type;
   754 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17257             
   755 			
 17258             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   756 			/* Get the value from a foo(<param_value>) style call */
 17259             {
   757 			if (IN_param_value == NULL)
 17260         
   758 			  IN_param_value = function_call_param_iterator.next();
 17261                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   759 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17262                 return return_type_symbol;
   760 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17263                 
   761 			
 17264             }
   762 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17265             
   763 			{
 17266             ERROR;
   764 		
 17267         }
   765 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17268         
   766 				return return_type_symbol;
 17269     }/*function_sint_to_lint*/
   767 				
 17270     break;
   768 			}
 17271 
   769 			
 17272 /****
   770 			ERROR;
 17273  *SINT_TO_USINT
   771 		}
 17274  */
   772 		
 17275     case function_sint_to_usint :
   773 	}/*function_sint_to_lint*/
 17276     {
   774 	break;
 17277         symbol_c *last_type_symbol = NULL;
   775 
 17278 
   776 /****
 17279         {
   777  *SINT_TO_DINT
 17280             symbol_c *IN_type_symbol = param_data_type;
   778  */
 17281             last_type_symbol = param_data_type;
   779 	case function_sint_to_dint :
 17282             
   780 	{
 17283             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   781 		symbol_c *last_type_symbol = NULL;
 17284             {
   782 
 17285         
   783 		{
 17286                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   784 			identifier_c param_name("IN");
 17287                 return return_type_symbol;
   785 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17288                 
   786 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17289             }
   787 			
 17290             
   788 			/* Get the value from a foo(<param_value>) style call */
 17291             ERROR;
   789 			if (IN_param_value == NULL)
 17292         }
   790 			  IN_param_value = function_call_param_iterator.next();
 17293         
   791 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17294     }/*function_sint_to_usint*/
   792 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17295     break;
   793 			
 17296 
   794 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17297 /****
   795 			{
 17298  *SINT_TO_UINT
   796 		
 17299  */
   797 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17300     case function_sint_to_uint :
   798 				return return_type_symbol;
 17301     {
   799 				
 17302         symbol_c *last_type_symbol = NULL;
   800 			}
 17303 
   801 			
 17304         {
   802 			ERROR;
 17305             symbol_c *IN_type_symbol = param_data_type;
   803 		}
 17306             last_type_symbol = param_data_type;
   804 		
 17307             
   805 	}/*function_sint_to_dint*/
 17308             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   806 	break;
 17309             {
       
 17310         
       
 17311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17312                 return return_type_symbol;
       
 17313                 
       
 17314             }
       
 17315             
       
 17316             ERROR;
       
 17317         }
       
 17318         
       
 17319     }/*function_sint_to_uint*/
       
 17320     break;
       
 17321 
       
 17322 /****
       
 17323  *SINT_TO_UDINT
       
 17324  */
       
 17325     case function_sint_to_udint :
       
 17326     {
       
 17327         symbol_c *last_type_symbol = NULL;
       
 17328 
       
 17329         {
       
 17330             symbol_c *IN_type_symbol = param_data_type;
       
 17331             last_type_symbol = param_data_type;
       
 17332             
       
 17333             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17334             {
       
 17335         
       
 17336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17337                 return return_type_symbol;
       
 17338                 
       
 17339             }
       
 17340             
       
 17341             ERROR;
       
 17342         }
       
 17343         
       
 17344     }/*function_sint_to_udint*/
       
 17345     break;
       
 17346 
       
 17347 /****
       
 17348  *SINT_TO_ULINT
       
 17349  */
       
 17350     case function_sint_to_ulint :
       
 17351     {
       
 17352         symbol_c *last_type_symbol = NULL;
       
 17353 
       
 17354         {
       
 17355             symbol_c *IN_type_symbol = param_data_type;
       
 17356             last_type_symbol = param_data_type;
       
 17357             
       
 17358             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17359             {
       
 17360         
       
 17361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17362                 return return_type_symbol;
       
 17363                 
       
 17364             }
       
 17365             
       
 17366             ERROR;
       
 17367         }
       
 17368         
       
 17369     }/*function_sint_to_ulint*/
       
 17370     break;
       
 17371 
       
 17372 /****
       
 17373  *SINT_TO_TIME
       
 17374  */
       
 17375     case function_sint_to_time :
       
 17376     {
       
 17377         symbol_c *last_type_symbol = NULL;
       
 17378 
       
 17379         {
       
 17380             symbol_c *IN_type_symbol = param_data_type;
       
 17381             last_type_symbol = param_data_type;
       
 17382             
       
 17383             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17384             {
       
 17385         
       
 17386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17387                 return return_type_symbol;
       
 17388                 
       
 17389             }
       
 17390             
       
 17391             ERROR;
       
 17392         }
       
 17393         
       
 17394     }/*function_sint_to_time*/
       
 17395     break;
       
 17396 
       
 17397 /****
       
 17398  *SINT_TO_BOOL
       
 17399  */
       
 17400     case function_sint_to_bool :
       
 17401     {
       
 17402         symbol_c *last_type_symbol = NULL;
       
 17403 
       
 17404         {
       
 17405             symbol_c *IN_type_symbol = param_data_type;
       
 17406             last_type_symbol = param_data_type;
       
 17407             
       
 17408             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17409             {
       
 17410         
       
 17411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17412                 return return_type_symbol;
       
 17413                 
       
 17414             }
       
 17415             
       
 17416             ERROR;
       
 17417         }
       
 17418         
       
 17419     }/*function_sint_to_bool*/
       
 17420     break;
       
 17421 
       
 17422 /****
       
 17423  *SINT_TO_BYTE
       
 17424  */
       
 17425     case function_sint_to_byte :
       
 17426     {
       
 17427         symbol_c *last_type_symbol = NULL;
       
 17428 
       
 17429         {
       
 17430             symbol_c *IN_type_symbol = param_data_type;
       
 17431             last_type_symbol = param_data_type;
       
 17432             
       
 17433             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17434             {
       
 17435         
       
 17436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17437                 return return_type_symbol;
       
 17438                 
       
 17439             }
       
 17440             
       
 17441             ERROR;
       
 17442         }
       
 17443         
       
 17444     }/*function_sint_to_byte*/
       
 17445     break;
       
 17446 
       
 17447 /****
       
 17448  *SINT_TO_WORD
       
 17449  */
       
 17450     case function_sint_to_word :
       
 17451     {
       
 17452         symbol_c *last_type_symbol = NULL;
       
 17453 
       
 17454         {
       
 17455             symbol_c *IN_type_symbol = param_data_type;
       
 17456             last_type_symbol = param_data_type;
       
 17457             
       
 17458             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17459             {
       
 17460         
       
 17461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17462                 return return_type_symbol;
       
 17463                 
       
 17464             }
       
 17465             
       
 17466             ERROR;
       
 17467         }
       
 17468         
       
 17469     }/*function_sint_to_word*/
       
 17470     break;
       
 17471 
       
 17472 /****
       
 17473  *SINT_TO_DWORD
       
 17474  */
       
 17475     case function_sint_to_dword :
       
 17476     {
       
 17477         symbol_c *last_type_symbol = NULL;
       
 17478 
       
 17479         {
       
 17480             symbol_c *IN_type_symbol = param_data_type;
       
 17481             last_type_symbol = param_data_type;
       
 17482             
       
 17483             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17484             {
       
 17485         
       
 17486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17487                 return return_type_symbol;
       
 17488                 
       
 17489             }
       
 17490             
       
 17491             ERROR;
       
 17492         }
       
 17493         
       
 17494     }/*function_sint_to_dword*/
       
 17495     break;
       
 17496 
       
 17497 /****
       
 17498  *SINT_TO_LWORD
       
 17499  */
       
 17500     case function_sint_to_lword :
       
 17501     {
       
 17502         symbol_c *last_type_symbol = NULL;
       
 17503 
       
 17504         {
       
 17505             symbol_c *IN_type_symbol = param_data_type;
       
 17506             last_type_symbol = param_data_type;
       
 17507             
       
 17508             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17509             {
       
 17510         
       
 17511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17512                 return return_type_symbol;
       
 17513                 
       
 17514             }
       
 17515             
       
 17516             ERROR;
       
 17517         }
       
 17518         
       
 17519     }/*function_sint_to_lword*/
       
 17520     break;
       
 17521 
       
 17522 /****
       
 17523  *SINT_TO_STRING
       
 17524  */
       
 17525     case function_sint_to_string :
       
 17526     {
       
 17527         symbol_c *last_type_symbol = NULL;
       
 17528 
       
 17529         {
       
 17530             symbol_c *IN_type_symbol = param_data_type;
       
 17531             last_type_symbol = param_data_type;
       
 17532             
       
 17533             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17534             {
       
 17535         
       
 17536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17537                 return return_type_symbol;
       
 17538                 
       
 17539             }
       
 17540             
       
 17541             ERROR;
       
 17542         }
       
 17543         
       
 17544     }/*function_sint_to_string*/
       
 17545     break;
       
 17546 
       
 17547 /****
       
 17548  *SINT_TO_WSTRING
       
 17549  */
       
 17550     case function_sint_to_wstring :
       
 17551     {
       
 17552         symbol_c *last_type_symbol = NULL;
       
 17553 
       
 17554         {
       
 17555             symbol_c *IN_type_symbol = param_data_type;
       
 17556             last_type_symbol = param_data_type;
       
 17557             
       
 17558             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17559             {
       
 17560         
       
 17561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 17562                 return return_type_symbol;
       
 17563                 
       
 17564             }
       
 17565             
       
 17566             ERROR;
       
 17567         }
       
 17568         
       
 17569     }/*function_sint_to_wstring*/
       
 17570     break;
   807 
 17571 
   808 /****
 17572 /****
   809  *SINT_TO_DATE
 17573  *SINT_TO_DATE
   810  */
 17574  */
   811 	case function_sint_to_date :
 17575     case function_sint_to_date :
   812 	{
 17576     {
   813 		symbol_c *last_type_symbol = NULL;
 17577         symbol_c *last_type_symbol = NULL;
   814 
 17578 
   815 		{
 17579         {
   816 			identifier_c param_name("IN");
 17580             symbol_c *IN_type_symbol = param_data_type;
   817 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17581             last_type_symbol = param_data_type;
   818 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17582             
   819 			
 17583             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   820 			/* Get the value from a foo(<param_value>) style call */
 17584             {
   821 			if (IN_param_value == NULL)
 17585         
   822 			  IN_param_value = function_call_param_iterator.next();
 17586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   823 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17587                 return return_type_symbol;
   824 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17588                 
   825 			
 17589             }
   826 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17590             
   827 			{
 17591             ERROR;
   828 		
 17592         }
   829 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 17593         
   830 				return return_type_symbol;
 17594     }/*function_sint_to_date*/
   831 				
 17595     break;
   832 			}
 17596 
   833 			
 17597 /****
   834 			ERROR;
 17598  *SINT_TO_TOD
   835 		}
 17599  */
   836 		
 17600     case function_sint_to_tod :
   837 	}/*function_sint_to_date*/
 17601     {
   838 	break;
 17602         symbol_c *last_type_symbol = NULL;
   839 
 17603 
   840 /****
 17604         {
   841  *SINT_TO_DWORD
 17605             symbol_c *IN_type_symbol = param_data_type;
   842  */
 17606             last_type_symbol = param_data_type;
   843 	case function_sint_to_dword :
 17607             
   844 	{
 17608             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   845 		symbol_c *last_type_symbol = NULL;
 17609             {
   846 
 17610         
   847 		{
 17611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   848 			identifier_c param_name("IN");
 17612                 return return_type_symbol;
   849 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17613                 
   850 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17614             }
   851 			
 17615             
   852 			/* Get the value from a foo(<param_value>) style call */
 17616             ERROR;
   853 			if (IN_param_value == NULL)
 17617         }
   854 			  IN_param_value = function_call_param_iterator.next();
 17618         
   855 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17619     }/*function_sint_to_tod*/
   856 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17620     break;
   857 			
       
   858 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   859 			{
       
   860 		
       
   861 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   862 				return return_type_symbol;
       
   863 				
       
   864 			}
       
   865 			
       
   866 			ERROR;
       
   867 		}
       
   868 		
       
   869 	}/*function_sint_to_dword*/
       
   870 	break;
       
   871 
 17621 
   872 /****
 17622 /****
   873  *SINT_TO_DT
 17623  *SINT_TO_DT
   874  */
 17624  */
   875 	case function_sint_to_dt :
 17625     case function_sint_to_dt :
   876 	{
 17626     {
   877 		symbol_c *last_type_symbol = NULL;
 17627         symbol_c *last_type_symbol = NULL;
   878 
 17628 
   879 		{
 17629         {
   880 			identifier_c param_name("IN");
 17630             symbol_c *IN_type_symbol = param_data_type;
   881 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17631             last_type_symbol = param_data_type;
   882 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17632             
   883 			
 17633             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   884 			/* Get the value from a foo(<param_value>) style call */
 17634             {
   885 			if (IN_param_value == NULL)
 17635         
   886 			  IN_param_value = function_call_param_iterator.next();
 17636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   887 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17637                 return return_type_symbol;
   888 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17638                 
   889 			
 17639             }
   890 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17640             
   891 			{
 17641             ERROR;
   892 		
 17642         }
   893 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17643         
   894 				return return_type_symbol;
 17644     }/*function_sint_to_dt*/
   895 				
 17645     break;
   896 			}
 17646 
   897 			
 17647 /****
   898 			ERROR;
 17648  *INT_TO_REAL
   899 		}
 17649  */
   900 		
 17650     case function_int_to_real :
   901 	}/*function_sint_to_dt*/
 17651     {
   902 	break;
 17652         symbol_c *last_type_symbol = NULL;
   903 
 17653 
   904 /****
 17654         {
   905  *SINT_TO_TOD
 17655             symbol_c *IN_type_symbol = param_data_type;
   906  */
 17656             last_type_symbol = param_data_type;
   907 	case function_sint_to_tod :
 17657             
   908 	{
 17658             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
   909 		symbol_c *last_type_symbol = NULL;
 17659             {
   910 
 17660         
   911 		{
 17661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   912 			identifier_c param_name("IN");
 17662                 return return_type_symbol;
   913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17663                 
   914 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17664             }
   915 			
 17665             
   916 			/* Get the value from a foo(<param_value>) style call */
 17666             ERROR;
   917 			if (IN_param_value == NULL)
 17667         }
   918 			  IN_param_value = function_call_param_iterator.next();
 17668         
   919 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17669     }/*function_int_to_real*/
   920 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17670     break;
   921 			
 17671 
   922 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17672 /****
   923 			{
 17673  *INT_TO_LREAL
   924 		
 17674  */
   925 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17675     case function_int_to_lreal :
   926 				return return_type_symbol;
 17676     {
   927 				
 17677         symbol_c *last_type_symbol = NULL;
   928 			}
 17678 
   929 			
 17679         {
   930 			ERROR;
 17680             symbol_c *IN_type_symbol = param_data_type;
   931 		}
 17681             last_type_symbol = param_data_type;
   932 		
 17682             
   933 	}/*function_sint_to_tod*/
 17683             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
   934 	break;
 17684             {
   935 
 17685         
   936 /****
 17686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   937  *SINT_TO_UDINT
 17687                 return return_type_symbol;
   938  */
 17688                 
   939 	case function_sint_to_udint :
 17689             }
   940 	{
 17690             
   941 		symbol_c *last_type_symbol = NULL;
 17691             ERROR;
   942 
 17692         }
   943 		{
 17693         
   944 			identifier_c param_name("IN");
 17694     }/*function_int_to_lreal*/
   945 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17695     break;
   946 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17696 
   947 			
 17697 /****
   948 			/* Get the value from a foo(<param_value>) style call */
 17698  *INT_TO_SINT
   949 			if (IN_param_value == NULL)
 17699  */
   950 			  IN_param_value = function_call_param_iterator.next();
 17700     case function_int_to_sint :
   951 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17701     {
   952 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17702         symbol_c *last_type_symbol = NULL;
   953 			
 17703 
   954 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17704         {
   955 			{
 17705             symbol_c *IN_type_symbol = param_data_type;
   956 		
 17706             last_type_symbol = param_data_type;
   957 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17707             
   958 				return return_type_symbol;
 17708             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
   959 				
 17709             {
   960 			}
 17710         
   961 			
 17711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
   962 			ERROR;
 17712                 return return_type_symbol;
   963 		}
 17713                 
   964 		
 17714             }
   965 	}/*function_sint_to_udint*/
 17715             
   966 	break;
 17716             ERROR;
   967 
 17717         }
   968 /****
 17718         
   969  *SINT_TO_WORD
 17719     }/*function_int_to_sint*/
   970  */
 17720     break;
   971 	case function_sint_to_word :
 17721 
   972 	{
 17722 /****
   973 		symbol_c *last_type_symbol = NULL;
 17723  *INT_TO_DINT
   974 
 17724  */
   975 		{
 17725     case function_int_to_dint :
   976 			identifier_c param_name("IN");
 17726     {
   977 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17727         symbol_c *last_type_symbol = NULL;
   978 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17728 
   979 			
 17729         {
   980 			/* Get the value from a foo(<param_value>) style call */
 17730             symbol_c *IN_type_symbol = param_data_type;
   981 			if (IN_param_value == NULL)
 17731             last_type_symbol = param_data_type;
   982 			  IN_param_value = function_call_param_iterator.next();
 17732             
   983 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17733             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
   984 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17734             {
   985 			
 17735         
   986 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17736                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   987 			{
 17737                 return return_type_symbol;
   988 		
 17738                 
   989 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17739             }
   990 				return return_type_symbol;
 17740             
   991 				
 17741             ERROR;
   992 			}
 17742         }
   993 			
 17743         
   994 			ERROR;
 17744     }/*function_int_to_dint*/
   995 		}
 17745     break;
   996 		
 17746 
   997 	}/*function_sint_to_word*/
 17747 /****
   998 	break;
 17748  *INT_TO_LINT
   999 
 17749  */
  1000 /****
 17750     case function_int_to_lint :
  1001  *SINT_TO_WSTRING
 17751     {
  1002  */
 17752         symbol_c *last_type_symbol = NULL;
  1003 	case function_sint_to_wstring :
 17753 
  1004 	{
 17754         {
  1005 		symbol_c *last_type_symbol = NULL;
 17755             symbol_c *IN_type_symbol = param_data_type;
  1006 
 17756             last_type_symbol = param_data_type;
  1007 		{
 17757             
  1008 			identifier_c param_name("IN");
 17758             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1009 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17759             {
  1010 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17760         
  1011 			
 17761                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1012 			/* Get the value from a foo(<param_value>) style call */
 17762                 return return_type_symbol;
  1013 			if (IN_param_value == NULL)
 17763                 
  1014 			  IN_param_value = function_call_param_iterator.next();
 17764             }
  1015 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17765             
  1016 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17766             ERROR;
  1017 			
 17767         }
  1018 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17768         
  1019 			{
 17769     }/*function_int_to_lint*/
  1020 		
 17770     break;
  1021 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 17771 
  1022 				return return_type_symbol;
 17772 /****
  1023 				
 17773  *INT_TO_USINT
  1024 			}
 17774  */
  1025 			
 17775     case function_int_to_usint :
  1026 			ERROR;
 17776     {
  1027 		}
 17777         symbol_c *last_type_symbol = NULL;
  1028 		
 17778 
  1029 	}/*function_sint_to_wstring*/
 17779         {
  1030 	break;
 17780             symbol_c *IN_type_symbol = param_data_type;
  1031 
 17781             last_type_symbol = param_data_type;
  1032 /****
 17782             
  1033  *SINT_TO_STRING
 17783             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1034  */
 17784             {
  1035 	case function_sint_to_string :
 17785         
  1036 	{
 17786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1037 		symbol_c *last_type_symbol = NULL;
 17787                 return return_type_symbol;
  1038 
 17788                 
  1039 		{
 17789             }
  1040 			identifier_c param_name("IN");
 17790             
  1041 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17791             ERROR;
  1042 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17792         }
  1043 			
 17793         
  1044 			/* Get the value from a foo(<param_value>) style call */
 17794     }/*function_int_to_usint*/
  1045 			if (IN_param_value == NULL)
 17795     break;
  1046 			  IN_param_value = function_call_param_iterator.next();
 17796 
  1047 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17797 /****
  1048 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17798  *INT_TO_UINT
  1049 			
 17799  */
  1050 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17800     case function_int_to_uint :
  1051 			{
 17801     {
  1052 		
 17802         symbol_c *last_type_symbol = NULL;
  1053 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17803 
  1054 				return return_type_symbol;
 17804         {
  1055 				
 17805             symbol_c *IN_type_symbol = param_data_type;
  1056 			}
 17806             last_type_symbol = param_data_type;
  1057 			
 17807             
  1058 			ERROR;
 17808             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1059 		}
 17809             {
  1060 		
 17810         
  1061 	}/*function_sint_to_string*/
 17811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1062 	break;
 17812                 return return_type_symbol;
  1063 
 17813                 
  1064 /****
 17814             }
  1065  *SINT_TO_LWORD
 17815             
  1066  */
 17816             ERROR;
  1067 	case function_sint_to_lword :
 17817         }
  1068 	{
 17818         
  1069 		symbol_c *last_type_symbol = NULL;
 17819     }/*function_int_to_uint*/
  1070 
 17820     break;
  1071 		{
 17821 
  1072 			identifier_c param_name("IN");
 17822 /****
  1073 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17823  *INT_TO_UDINT
  1074 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17824  */
  1075 			
 17825     case function_int_to_udint :
  1076 			/* Get the value from a foo(<param_value>) style call */
 17826     {
  1077 			if (IN_param_value == NULL)
 17827         symbol_c *last_type_symbol = NULL;
  1078 			  IN_param_value = function_call_param_iterator.next();
 17828 
  1079 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17829         {
  1080 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17830             symbol_c *IN_type_symbol = param_data_type;
  1081 			
 17831             last_type_symbol = param_data_type;
  1082 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17832             
  1083 			{
 17833             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1084 		
 17834             {
  1085 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17835         
  1086 				return return_type_symbol;
 17836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1087 				
 17837                 return return_type_symbol;
  1088 			}
 17838                 
  1089 			
 17839             }
  1090 			ERROR;
 17840             
  1091 		}
 17841             ERROR;
  1092 		
 17842         }
  1093 	}/*function_sint_to_lword*/
 17843         
  1094 	break;
 17844     }/*function_int_to_udint*/
  1095 
 17845     break;
  1096 /****
 17846 
  1097  *SINT_TO_UINT
 17847 /****
  1098  */
 17848  *INT_TO_ULINT
  1099 	case function_sint_to_uint :
 17849  */
  1100 	{
 17850     case function_int_to_ulint :
  1101 		symbol_c *last_type_symbol = NULL;
 17851     {
  1102 
 17852         symbol_c *last_type_symbol = NULL;
  1103 		{
 17853 
  1104 			identifier_c param_name("IN");
 17854         {
  1105 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17855             symbol_c *IN_type_symbol = param_data_type;
  1106 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17856             last_type_symbol = param_data_type;
  1107 			
 17857             
  1108 			/* Get the value from a foo(<param_value>) style call */
 17858             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1109 			if (IN_param_value == NULL)
 17859             {
  1110 			  IN_param_value = function_call_param_iterator.next();
 17860         
  1111 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1112 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17862                 return return_type_symbol;
  1113 			
 17863                 
  1114 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17864             }
  1115 			{
 17865             
  1116 		
 17866             ERROR;
  1117 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 17867         }
  1118 				return return_type_symbol;
 17868         
  1119 				
 17869     }/*function_int_to_ulint*/
  1120 			}
 17870     break;
  1121 			
 17871 
  1122 			ERROR;
 17872 /****
  1123 		}
 17873  *INT_TO_TIME
  1124 		
 17874  */
  1125 	}/*function_sint_to_uint*/
 17875     case function_int_to_time :
  1126 	break;
 17876     {
  1127 
 17877         symbol_c *last_type_symbol = NULL;
  1128 /****
 17878 
  1129  *SINT_TO_LREAL
 17879         {
  1130  */
 17880             symbol_c *IN_type_symbol = param_data_type;
  1131 	case function_sint_to_lreal :
 17881             last_type_symbol = param_data_type;
  1132 	{
 17882             
  1133 		symbol_c *last_type_symbol = NULL;
 17883             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1134 
 17884             {
  1135 		{
 17885         
  1136 			identifier_c param_name("IN");
 17886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1137 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17887                 return return_type_symbol;
  1138 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17888                 
  1139 			
 17889             }
  1140 			/* Get the value from a foo(<param_value>) style call */
 17890             
  1141 			if (IN_param_value == NULL)
 17891             ERROR;
  1142 			  IN_param_value = function_call_param_iterator.next();
 17892         }
  1143 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17893         
  1144 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17894     }/*function_int_to_time*/
  1145 			
 17895     break;
  1146 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17896 
  1147 			{
 17897 /****
  1148 		
 17898  *INT_TO_BOOL
  1149 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17899  */
  1150 				return return_type_symbol;
 17900     case function_int_to_bool :
  1151 				
 17901     {
  1152 			}
 17902         symbol_c *last_type_symbol = NULL;
  1153 			
 17903 
  1154 			ERROR;
 17904         {
  1155 		}
 17905             symbol_c *IN_type_symbol = param_data_type;
  1156 		
 17906             last_type_symbol = param_data_type;
  1157 	}/*function_sint_to_lreal*/
 17907             
  1158 	break;
 17908             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1159 
 17909             {
  1160 /****
 17910         
  1161  *SINT_TO_BYTE
 17911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1162  */
 17912                 return return_type_symbol;
  1163 	case function_sint_to_byte :
 17913                 
  1164 	{
 17914             }
  1165 		symbol_c *last_type_symbol = NULL;
 17915             
  1166 
 17916             ERROR;
  1167 		{
 17917         }
  1168 			identifier_c param_name("IN");
 17918         
  1169 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17919     }/*function_int_to_bool*/
  1170 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17920     break;
  1171 			
 17921 
  1172 			/* Get the value from a foo(<param_value>) style call */
 17922 /****
  1173 			if (IN_param_value == NULL)
 17923  *INT_TO_BYTE
  1174 			  IN_param_value = function_call_param_iterator.next();
 17924  */
  1175 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17925     case function_int_to_byte :
  1176 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17926     {
  1177 			
 17927         symbol_c *last_type_symbol = NULL;
  1178 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17928 
  1179 			{
 17929         {
  1180 		
 17930             symbol_c *IN_type_symbol = param_data_type;
  1181 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17931             last_type_symbol = param_data_type;
  1182 				return return_type_symbol;
 17932             
  1183 				
 17933             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1184 			}
 17934             {
  1185 			
 17935         
  1186 			ERROR;
 17936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1187 		}
 17937                 return return_type_symbol;
  1188 		
 17938                 
  1189 	}/*function_sint_to_byte*/
 17939             }
  1190 	break;
 17940             
  1191 
 17941             ERROR;
  1192 /****
 17942         }
  1193  *SINT_TO_USINT
 17943         
  1194  */
 17944     }/*function_int_to_byte*/
  1195 	case function_sint_to_usint :
 17945     break;
  1196 	{
 17946 
  1197 		symbol_c *last_type_symbol = NULL;
 17947 /****
  1198 
 17948  *INT_TO_WORD
  1199 		{
 17949  */
  1200 			identifier_c param_name("IN");
 17950     case function_int_to_word :
  1201 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17951     {
  1202 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17952         symbol_c *last_type_symbol = NULL;
  1203 			
 17953 
  1204 			/* Get the value from a foo(<param_value>) style call */
 17954         {
  1205 			if (IN_param_value == NULL)
 17955             symbol_c *IN_type_symbol = param_data_type;
  1206 			  IN_param_value = function_call_param_iterator.next();
 17956             last_type_symbol = param_data_type;
  1207 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17957             
  1208 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17958             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1209 			
 17959             {
  1210 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17960         
  1211 			{
 17961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1212 		
 17962                 return return_type_symbol;
  1213 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 17963                 
  1214 				return return_type_symbol;
 17964             }
  1215 				
 17965             
  1216 			}
 17966             ERROR;
  1217 			
 17967         }
  1218 			ERROR;
 17968         
  1219 		}
 17969     }/*function_int_to_word*/
  1220 		
 17970     break;
  1221 	}/*function_sint_to_usint*/
 17971 
  1222 	break;
 17972 /****
  1223 
 17973  *INT_TO_DWORD
  1224 /****
 17974  */
  1225  *SINT_TO_ULINT
 17975     case function_int_to_dword :
  1226  */
 17976     {
  1227 	case function_sint_to_ulint :
 17977         symbol_c *last_type_symbol = NULL;
  1228 	{
 17978 
  1229 		symbol_c *last_type_symbol = NULL;
 17979         {
  1230 
 17980             symbol_c *IN_type_symbol = param_data_type;
  1231 		{
 17981             last_type_symbol = param_data_type;
  1232 			identifier_c param_name("IN");
 17982             
  1233 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17983             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1234 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17984             {
  1235 			
 17985         
  1236 			/* Get the value from a foo(<param_value>) style call */
 17986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1237 			if (IN_param_value == NULL)
 17987                 return return_type_symbol;
  1238 			  IN_param_value = function_call_param_iterator.next();
 17988                 
  1239 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17989             }
  1240 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17990             
  1241 			
 17991             ERROR;
  1242 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 17992         }
  1243 			{
 17993         
  1244 		
 17994     }/*function_int_to_dword*/
  1245 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17995     break;
  1246 				return return_type_symbol;
 17996 
  1247 				
 17997 /****
  1248 			}
 17998  *INT_TO_LWORD
  1249 			
 17999  */
  1250 			ERROR;
 18000     case function_int_to_lword :
  1251 		}
 18001     {
  1252 		
 18002         symbol_c *last_type_symbol = NULL;
  1253 	}/*function_sint_to_ulint*/
 18003 
  1254 	break;
 18004         {
  1255 
 18005             symbol_c *IN_type_symbol = param_data_type;
  1256 /****
 18006             last_type_symbol = param_data_type;
  1257  *SINT_TO_BOOL
 18007             
  1258  */
 18008             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1259 	case function_sint_to_bool :
 18009             {
  1260 	{
 18010         
  1261 		symbol_c *last_type_symbol = NULL;
 18011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1262 
 18012                 return return_type_symbol;
  1263 		{
 18013                 
  1264 			identifier_c param_name("IN");
 18014             }
  1265 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18015             
  1266 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18016             ERROR;
  1267 			
 18017         }
  1268 			/* Get the value from a foo(<param_value>) style call */
 18018         
  1269 			if (IN_param_value == NULL)
 18019     }/*function_int_to_lword*/
  1270 			  IN_param_value = function_call_param_iterator.next();
 18020     break;
  1271 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18021 
  1272 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18022 /****
  1273 			
 18023  *INT_TO_STRING
  1274 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 18024  */
  1275 			{
 18025     case function_int_to_string :
  1276 		
 18026     {
  1277 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18027         symbol_c *last_type_symbol = NULL;
  1278 				return return_type_symbol;
 18028 
  1279 				
 18029         {
  1280 			}
 18030             symbol_c *IN_type_symbol = param_data_type;
  1281 			
 18031             last_type_symbol = param_data_type;
  1282 			ERROR;
 18032             
  1283 		}
 18033             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1284 		
 18034             {
  1285 	}/*function_sint_to_bool*/
 18035         
  1286 	break;
 18036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1287 
 18037                 return return_type_symbol;
  1288 /****
 18038                 
  1289  *SINT_TO_TIME
 18039             }
  1290  */
 18040             
  1291 	case function_sint_to_time :
 18041             ERROR;
  1292 	{
 18042         }
  1293 		symbol_c *last_type_symbol = NULL;
 18043         
  1294 
 18044     }/*function_int_to_string*/
  1295 		{
 18045     break;
  1296 			identifier_c param_name("IN");
 18046 
  1297 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18047 /****
  1298 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18048  *INT_TO_WSTRING
  1299 			
 18049  */
  1300 			/* Get the value from a foo(<param_value>) style call */
 18050     case function_int_to_wstring :
  1301 			if (IN_param_value == NULL)
 18051     {
  1302 			  IN_param_value = function_call_param_iterator.next();
 18052         symbol_c *last_type_symbol = NULL;
  1303 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18053 
  1304 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18054         {
  1305 			
 18055             symbol_c *IN_type_symbol = param_data_type;
  1306 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 18056             last_type_symbol = param_data_type;
  1307 			{
 18057             
  1308 		
 18058             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1309 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 18059             {
  1310 				return return_type_symbol;
 18060         
  1311 				
 18061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  1312 			}
 18062                 return return_type_symbol;
  1313 			
 18063                 
  1314 			ERROR;
 18064             }
  1315 		}
 18065             
  1316 		
 18066             ERROR;
  1317 	}/*function_sint_to_time*/
 18067         }
  1318 	break;
 18068         
  1319 
 18069     }/*function_int_to_wstring*/
  1320 /****
 18070     break;
  1321  *SINT_TO_INT
 18071 
  1322  */
 18072 /****
  1323 	case function_sint_to_int :
 18073  *INT_TO_DATE
  1324 	{
 18074  */
  1325 		symbol_c *last_type_symbol = NULL;
 18075     case function_int_to_date :
  1326 
 18076     {
  1327 		{
 18077         symbol_c *last_type_symbol = NULL;
  1328 			identifier_c param_name("IN");
 18078 
  1329 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18079         {
  1330 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18080             symbol_c *IN_type_symbol = param_data_type;
  1331 			
 18081             last_type_symbol = param_data_type;
  1332 			/* Get the value from a foo(<param_value>) style call */
 18082             
  1333 			if (IN_param_value == NULL)
 18083             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1334 			  IN_param_value = function_call_param_iterator.next();
 18084             {
  1335 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18085         
  1336 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1337 			
 18087                 return return_type_symbol;
  1338 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 18088                 
  1339 			{
 18089             }
  1340 		
 18090             
  1341 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18091             ERROR;
  1342 				return return_type_symbol;
 18092         }
  1343 				
 18093         
  1344 			}
 18094     }/*function_int_to_date*/
  1345 			
 18095     break;
  1346 			ERROR;
 18096 
  1347 		}
 18097 /****
  1348 		
 18098  *INT_TO_TOD
  1349 	}/*function_sint_to_int*/
 18099  */
  1350 	break;
 18100     case function_int_to_tod :
       
 18101     {
       
 18102         symbol_c *last_type_symbol = NULL;
       
 18103 
       
 18104         {
       
 18105             symbol_c *IN_type_symbol = param_data_type;
       
 18106             last_type_symbol = param_data_type;
       
 18107             
       
 18108             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 18109             {
       
 18110         
       
 18111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18112                 return return_type_symbol;
       
 18113                 
       
 18114             }
       
 18115             
       
 18116             ERROR;
       
 18117         }
       
 18118         
       
 18119     }/*function_int_to_tod*/
       
 18120     break;
       
 18121 
       
 18122 /****
       
 18123  *INT_TO_DT
       
 18124  */
       
 18125     case function_int_to_dt :
       
 18126     {
       
 18127         symbol_c *last_type_symbol = NULL;
       
 18128 
       
 18129         {
       
 18130             symbol_c *IN_type_symbol = param_data_type;
       
 18131             last_type_symbol = param_data_type;
       
 18132             
       
 18133             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 18134             {
       
 18135         
       
 18136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18137                 return return_type_symbol;
       
 18138                 
       
 18139             }
       
 18140             
       
 18141             ERROR;
       
 18142         }
       
 18143         
       
 18144     }/*function_int_to_dt*/
       
 18145     break;
       
 18146 
       
 18147 /****
       
 18148  *DINT_TO_REAL
       
 18149  */
       
 18150     case function_dint_to_real :
       
 18151     {
       
 18152         symbol_c *last_type_symbol = NULL;
       
 18153 
       
 18154         {
       
 18155             symbol_c *IN_type_symbol = param_data_type;
       
 18156             last_type_symbol = param_data_type;
       
 18157             
       
 18158             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18159             {
       
 18160         
       
 18161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18162                 return return_type_symbol;
       
 18163                 
       
 18164             }
       
 18165             
       
 18166             ERROR;
       
 18167         }
       
 18168         
       
 18169     }/*function_dint_to_real*/
       
 18170     break;
       
 18171 
       
 18172 /****
       
 18173  *DINT_TO_LREAL
       
 18174  */
       
 18175     case function_dint_to_lreal :
       
 18176     {
       
 18177         symbol_c *last_type_symbol = NULL;
       
 18178 
       
 18179         {
       
 18180             symbol_c *IN_type_symbol = param_data_type;
       
 18181             last_type_symbol = param_data_type;
       
 18182             
       
 18183             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18184             {
       
 18185         
       
 18186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18187                 return return_type_symbol;
       
 18188                 
       
 18189             }
       
 18190             
       
 18191             ERROR;
       
 18192         }
       
 18193         
       
 18194     }/*function_dint_to_lreal*/
       
 18195     break;
       
 18196 
       
 18197 /****
       
 18198  *DINT_TO_SINT
       
 18199  */
       
 18200     case function_dint_to_sint :
       
 18201     {
       
 18202         symbol_c *last_type_symbol = NULL;
       
 18203 
       
 18204         {
       
 18205             symbol_c *IN_type_symbol = param_data_type;
       
 18206             last_type_symbol = param_data_type;
       
 18207             
       
 18208             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18209             {
       
 18210         
       
 18211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18212                 return return_type_symbol;
       
 18213                 
       
 18214             }
       
 18215             
       
 18216             ERROR;
       
 18217         }
       
 18218         
       
 18219     }/*function_dint_to_sint*/
       
 18220     break;
       
 18221 
       
 18222 /****
       
 18223  *DINT_TO_INT
       
 18224  */
       
 18225     case function_dint_to_int :
       
 18226     {
       
 18227         symbol_c *last_type_symbol = NULL;
       
 18228 
       
 18229         {
       
 18230             symbol_c *IN_type_symbol = param_data_type;
       
 18231             last_type_symbol = param_data_type;
       
 18232             
       
 18233             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18234             {
       
 18235         
       
 18236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18237                 return return_type_symbol;
       
 18238                 
       
 18239             }
       
 18240             
       
 18241             ERROR;
       
 18242         }
       
 18243         
       
 18244     }/*function_dint_to_int*/
       
 18245     break;
       
 18246 
       
 18247 /****
       
 18248  *DINT_TO_LINT
       
 18249  */
       
 18250     case function_dint_to_lint :
       
 18251     {
       
 18252         symbol_c *last_type_symbol = NULL;
       
 18253 
       
 18254         {
       
 18255             symbol_c *IN_type_symbol = param_data_type;
       
 18256             last_type_symbol = param_data_type;
       
 18257             
       
 18258             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18259             {
       
 18260         
       
 18261                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18262                 return return_type_symbol;
       
 18263                 
       
 18264             }
       
 18265             
       
 18266             ERROR;
       
 18267         }
       
 18268         
       
 18269     }/*function_dint_to_lint*/
       
 18270     break;
       
 18271 
       
 18272 /****
       
 18273  *DINT_TO_USINT
       
 18274  */
       
 18275     case function_dint_to_usint :
       
 18276     {
       
 18277         symbol_c *last_type_symbol = NULL;
       
 18278 
       
 18279         {
       
 18280             symbol_c *IN_type_symbol = param_data_type;
       
 18281             last_type_symbol = param_data_type;
       
 18282             
       
 18283             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18284             {
       
 18285         
       
 18286                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18287                 return return_type_symbol;
       
 18288                 
       
 18289             }
       
 18290             
       
 18291             ERROR;
       
 18292         }
       
 18293         
       
 18294     }/*function_dint_to_usint*/
       
 18295     break;
       
 18296 
       
 18297 /****
       
 18298  *DINT_TO_UINT
       
 18299  */
       
 18300     case function_dint_to_uint :
       
 18301     {
       
 18302         symbol_c *last_type_symbol = NULL;
       
 18303 
       
 18304         {
       
 18305             symbol_c *IN_type_symbol = param_data_type;
       
 18306             last_type_symbol = param_data_type;
       
 18307             
       
 18308             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18309             {
       
 18310         
       
 18311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18312                 return return_type_symbol;
       
 18313                 
       
 18314             }
       
 18315             
       
 18316             ERROR;
       
 18317         }
       
 18318         
       
 18319     }/*function_dint_to_uint*/
       
 18320     break;
       
 18321 
       
 18322 /****
       
 18323  *DINT_TO_UDINT
       
 18324  */
       
 18325     case function_dint_to_udint :
       
 18326     {
       
 18327         symbol_c *last_type_symbol = NULL;
       
 18328 
       
 18329         {
       
 18330             symbol_c *IN_type_symbol = param_data_type;
       
 18331             last_type_symbol = param_data_type;
       
 18332             
       
 18333             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18334             {
       
 18335         
       
 18336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18337                 return return_type_symbol;
       
 18338                 
       
 18339             }
       
 18340             
       
 18341             ERROR;
       
 18342         }
       
 18343         
       
 18344     }/*function_dint_to_udint*/
       
 18345     break;
       
 18346 
       
 18347 /****
       
 18348  *DINT_TO_ULINT
       
 18349  */
       
 18350     case function_dint_to_ulint :
       
 18351     {
       
 18352         symbol_c *last_type_symbol = NULL;
       
 18353 
       
 18354         {
       
 18355             symbol_c *IN_type_symbol = param_data_type;
       
 18356             last_type_symbol = param_data_type;
       
 18357             
       
 18358             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18359             {
       
 18360         
       
 18361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18362                 return return_type_symbol;
       
 18363                 
       
 18364             }
       
 18365             
       
 18366             ERROR;
       
 18367         }
       
 18368         
       
 18369     }/*function_dint_to_ulint*/
       
 18370     break;
       
 18371 
       
 18372 /****
       
 18373  *DINT_TO_TIME
       
 18374  */
       
 18375     case function_dint_to_time :
       
 18376     {
       
 18377         symbol_c *last_type_symbol = NULL;
       
 18378 
       
 18379         {
       
 18380             symbol_c *IN_type_symbol = param_data_type;
       
 18381             last_type_symbol = param_data_type;
       
 18382             
       
 18383             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18384             {
       
 18385         
       
 18386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18387                 return return_type_symbol;
       
 18388                 
       
 18389             }
       
 18390             
       
 18391             ERROR;
       
 18392         }
       
 18393         
       
 18394     }/*function_dint_to_time*/
       
 18395     break;
       
 18396 
       
 18397 /****
       
 18398  *DINT_TO_BOOL
       
 18399  */
       
 18400     case function_dint_to_bool :
       
 18401     {
       
 18402         symbol_c *last_type_symbol = NULL;
       
 18403 
       
 18404         {
       
 18405             symbol_c *IN_type_symbol = param_data_type;
       
 18406             last_type_symbol = param_data_type;
       
 18407             
       
 18408             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18409             {
       
 18410         
       
 18411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18412                 return return_type_symbol;
       
 18413                 
       
 18414             }
       
 18415             
       
 18416             ERROR;
       
 18417         }
       
 18418         
       
 18419     }/*function_dint_to_bool*/
       
 18420     break;
       
 18421 
       
 18422 /****
       
 18423  *DINT_TO_BYTE
       
 18424  */
       
 18425     case function_dint_to_byte :
       
 18426     {
       
 18427         symbol_c *last_type_symbol = NULL;
       
 18428 
       
 18429         {
       
 18430             symbol_c *IN_type_symbol = param_data_type;
       
 18431             last_type_symbol = param_data_type;
       
 18432             
       
 18433             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18434             {
       
 18435         
       
 18436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18437                 return return_type_symbol;
       
 18438                 
       
 18439             }
       
 18440             
       
 18441             ERROR;
       
 18442         }
       
 18443         
       
 18444     }/*function_dint_to_byte*/
       
 18445     break;
       
 18446 
       
 18447 /****
       
 18448  *DINT_TO_WORD
       
 18449  */
       
 18450     case function_dint_to_word :
       
 18451     {
       
 18452         symbol_c *last_type_symbol = NULL;
       
 18453 
       
 18454         {
       
 18455             symbol_c *IN_type_symbol = param_data_type;
       
 18456             last_type_symbol = param_data_type;
       
 18457             
       
 18458             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18459             {
       
 18460         
       
 18461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18462                 return return_type_symbol;
       
 18463                 
       
 18464             }
       
 18465             
       
 18466             ERROR;
       
 18467         }
       
 18468         
       
 18469     }/*function_dint_to_word*/
       
 18470     break;
       
 18471 
       
 18472 /****
       
 18473  *DINT_TO_DWORD
       
 18474  */
       
 18475     case function_dint_to_dword :
       
 18476     {
       
 18477         symbol_c *last_type_symbol = NULL;
       
 18478 
       
 18479         {
       
 18480             symbol_c *IN_type_symbol = param_data_type;
       
 18481             last_type_symbol = param_data_type;
       
 18482             
       
 18483             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18484             {
       
 18485         
       
 18486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18487                 return return_type_symbol;
       
 18488                 
       
 18489             }
       
 18490             
       
 18491             ERROR;
       
 18492         }
       
 18493         
       
 18494     }/*function_dint_to_dword*/
       
 18495     break;
       
 18496 
       
 18497 /****
       
 18498  *DINT_TO_LWORD
       
 18499  */
       
 18500     case function_dint_to_lword :
       
 18501     {
       
 18502         symbol_c *last_type_symbol = NULL;
       
 18503 
       
 18504         {
       
 18505             symbol_c *IN_type_symbol = param_data_type;
       
 18506             last_type_symbol = param_data_type;
       
 18507             
       
 18508             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18509             {
       
 18510         
       
 18511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18512                 return return_type_symbol;
       
 18513                 
       
 18514             }
       
 18515             
       
 18516             ERROR;
       
 18517         }
       
 18518         
       
 18519     }/*function_dint_to_lword*/
       
 18520     break;
       
 18521 
       
 18522 /****
       
 18523  *DINT_TO_STRING
       
 18524  */
       
 18525     case function_dint_to_string :
       
 18526     {
       
 18527         symbol_c *last_type_symbol = NULL;
       
 18528 
       
 18529         {
       
 18530             symbol_c *IN_type_symbol = param_data_type;
       
 18531             last_type_symbol = param_data_type;
       
 18532             
       
 18533             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18534             {
       
 18535         
       
 18536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18537                 return return_type_symbol;
       
 18538                 
       
 18539             }
       
 18540             
       
 18541             ERROR;
       
 18542         }
       
 18543         
       
 18544     }/*function_dint_to_string*/
       
 18545     break;
       
 18546 
       
 18547 /****
       
 18548  *DINT_TO_WSTRING
       
 18549  */
       
 18550     case function_dint_to_wstring :
       
 18551     {
       
 18552         symbol_c *last_type_symbol = NULL;
       
 18553 
       
 18554         {
       
 18555             symbol_c *IN_type_symbol = param_data_type;
       
 18556             last_type_symbol = param_data_type;
       
 18557             
       
 18558             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18559             {
       
 18560         
       
 18561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 18562                 return return_type_symbol;
       
 18563                 
       
 18564             }
       
 18565             
       
 18566             ERROR;
       
 18567         }
       
 18568         
       
 18569     }/*function_dint_to_wstring*/
       
 18570     break;
       
 18571 
       
 18572 /****
       
 18573  *DINT_TO_DATE
       
 18574  */
       
 18575     case function_dint_to_date :
       
 18576     {
       
 18577         symbol_c *last_type_symbol = NULL;
       
 18578 
       
 18579         {
       
 18580             symbol_c *IN_type_symbol = param_data_type;
       
 18581             last_type_symbol = param_data_type;
       
 18582             
       
 18583             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18584             {
       
 18585         
       
 18586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18587                 return return_type_symbol;
       
 18588                 
       
 18589             }
       
 18590             
       
 18591             ERROR;
       
 18592         }
       
 18593         
       
 18594     }/*function_dint_to_date*/
       
 18595     break;
       
 18596 
       
 18597 /****
       
 18598  *DINT_TO_TOD
       
 18599  */
       
 18600     case function_dint_to_tod :
       
 18601     {
       
 18602         symbol_c *last_type_symbol = NULL;
       
 18603 
       
 18604         {
       
 18605             symbol_c *IN_type_symbol = param_data_type;
       
 18606             last_type_symbol = param_data_type;
       
 18607             
       
 18608             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18609             {
       
 18610         
       
 18611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18612                 return return_type_symbol;
       
 18613                 
       
 18614             }
       
 18615             
       
 18616             ERROR;
       
 18617         }
       
 18618         
       
 18619     }/*function_dint_to_tod*/
       
 18620     break;
       
 18621 
       
 18622 /****
       
 18623  *DINT_TO_DT
       
 18624  */
       
 18625     case function_dint_to_dt :
       
 18626     {
       
 18627         symbol_c *last_type_symbol = NULL;
       
 18628 
       
 18629         {
       
 18630             symbol_c *IN_type_symbol = param_data_type;
       
 18631             last_type_symbol = param_data_type;
       
 18632             
       
 18633             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18634             {
       
 18635         
       
 18636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18637                 return return_type_symbol;
       
 18638                 
       
 18639             }
       
 18640             
       
 18641             ERROR;
       
 18642         }
       
 18643         
       
 18644     }/*function_dint_to_dt*/
       
 18645     break;
  1351 
 18646 
  1352 /****
 18647 /****
  1353  *LINT_TO_REAL
 18648  *LINT_TO_REAL
  1354  */
 18649  */
  1355 	case function_lint_to_real :
 18650     case function_lint_to_real :
  1356 	{
 18651     {
  1357 		symbol_c *last_type_symbol = NULL;
 18652         symbol_c *last_type_symbol = NULL;
  1358 
 18653 
  1359 		{
 18654         {
  1360 			identifier_c param_name("IN");
 18655             symbol_c *IN_type_symbol = param_data_type;
  1361 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18656             last_type_symbol = param_data_type;
  1362 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18657             
  1363 			
 18658             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1364 			/* Get the value from a foo(<param_value>) style call */
 18659             {
  1365 			if (IN_param_value == NULL)
 18660         
  1366 			  IN_param_value = function_call_param_iterator.next();
 18661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1367 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18662                 return return_type_symbol;
  1368 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18663                 
  1369 			
 18664             }
  1370 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 18665             
  1371 			{
 18666             ERROR;
  1372 		
 18667         }
  1373 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 18668         
  1374 				return return_type_symbol;
 18669     }/*function_lint_to_real*/
  1375 				
 18670     break;
  1376 			}
 18671 
  1377 			
 18672 /****
  1378 			ERROR;
 18673  *LINT_TO_LREAL
  1379 		}
 18674  */
  1380 		
 18675     case function_lint_to_lreal :
  1381 	}/*function_lint_to_real*/
 18676     {
  1382 	break;
 18677         symbol_c *last_type_symbol = NULL;
       
 18678 
       
 18679         {
       
 18680             symbol_c *IN_type_symbol = param_data_type;
       
 18681             last_type_symbol = param_data_type;
       
 18682             
       
 18683             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18684             {
       
 18685         
       
 18686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18687                 return return_type_symbol;
       
 18688                 
       
 18689             }
       
 18690             
       
 18691             ERROR;
       
 18692         }
       
 18693         
       
 18694     }/*function_lint_to_lreal*/
       
 18695     break;
  1383 
 18696 
  1384 /****
 18697 /****
  1385  *LINT_TO_SINT
 18698  *LINT_TO_SINT
  1386  */
 18699  */
  1387 	case function_lint_to_sint :
 18700     case function_lint_to_sint :
  1388 	{
 18701     {
  1389 		symbol_c *last_type_symbol = NULL;
 18702         symbol_c *last_type_symbol = NULL;
  1390 
 18703 
  1391 		{
 18704         {
  1392 			identifier_c param_name("IN");
 18705             symbol_c *IN_type_symbol = param_data_type;
  1393 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18706             last_type_symbol = param_data_type;
  1394 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18707             
  1395 			
 18708             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1396 			/* Get the value from a foo(<param_value>) style call */
 18709             {
  1397 			if (IN_param_value == NULL)
 18710         
  1398 			  IN_param_value = function_call_param_iterator.next();
 18711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1399 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18712                 return return_type_symbol;
  1400 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18713                 
  1401 			
 18714             }
  1402 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 18715             
  1403 			{
 18716             ERROR;
  1404 		
 18717         }
  1405 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18718         
  1406 				return return_type_symbol;
 18719     }/*function_lint_to_sint*/
  1407 				
 18720     break;
  1408 			}
 18721 
  1409 			
 18722 /****
  1410 			ERROR;
 18723  *LINT_TO_INT
  1411 		}
 18724  */
  1412 		
 18725     case function_lint_to_int :
  1413 	}/*function_lint_to_sint*/
 18726     {
  1414 	break;
 18727         symbol_c *last_type_symbol = NULL;
  1415 
 18728 
  1416 /****
 18729         {
  1417  *LINT_TO_LINT
 18730             symbol_c *IN_type_symbol = param_data_type;
  1418  */
 18731             last_type_symbol = param_data_type;
  1419 	case function_lint_to_lint :
 18732             
  1420 	{
 18733             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1421 		symbol_c *last_type_symbol = NULL;
 18734             {
  1422 
 18735         
  1423 		{
 18736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1424 			identifier_c param_name("IN");
 18737                 return return_type_symbol;
  1425 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18738                 
  1426 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18739             }
  1427 			
 18740             
  1428 			/* Get the value from a foo(<param_value>) style call */
 18741             ERROR;
  1429 			if (IN_param_value == NULL)
 18742         }
  1430 			  IN_param_value = function_call_param_iterator.next();
 18743         
  1431 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18744     }/*function_lint_to_int*/
  1432 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18745     break;
  1433 			
       
  1434 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1435 			{
       
  1436 		
       
  1437 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1438 				return return_type_symbol;
       
  1439 				
       
  1440 			}
       
  1441 			
       
  1442 			ERROR;
       
  1443 		}
       
  1444 		
       
  1445 	}/*function_lint_to_lint*/
       
  1446 	break;
       
  1447 
 18746 
  1448 /****
 18747 /****
  1449  *LINT_TO_DINT
 18748  *LINT_TO_DINT
  1450  */
 18749  */
  1451 	case function_lint_to_dint :
 18750     case function_lint_to_dint :
  1452 	{
 18751     {
  1453 		symbol_c *last_type_symbol = NULL;
 18752         symbol_c *last_type_symbol = NULL;
  1454 
 18753 
  1455 		{
 18754         {
  1456 			identifier_c param_name("IN");
 18755             symbol_c *IN_type_symbol = param_data_type;
  1457 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18756             last_type_symbol = param_data_type;
  1458 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18757             
  1459 			
 18758             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1460 			/* Get the value from a foo(<param_value>) style call */
 18759             {
  1461 			if (IN_param_value == NULL)
 18760         
  1462 			  IN_param_value = function_call_param_iterator.next();
 18761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1463 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18762                 return return_type_symbol;
  1464 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18763                 
  1465 			
 18764             }
  1466 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 18765             
  1467 			{
 18766             ERROR;
  1468 		
 18767         }
  1469 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 18768         
  1470 				return return_type_symbol;
 18769     }/*function_lint_to_dint*/
  1471 				
 18770     break;
  1472 			}
 18771 
  1473 			
 18772 /****
  1474 			ERROR;
 18773  *LINT_TO_USINT
  1475 		}
 18774  */
  1476 		
 18775     case function_lint_to_usint :
  1477 	}/*function_lint_to_dint*/
 18776     {
  1478 	break;
 18777         symbol_c *last_type_symbol = NULL;
       
 18778 
       
 18779         {
       
 18780             symbol_c *IN_type_symbol = param_data_type;
       
 18781             last_type_symbol = param_data_type;
       
 18782             
       
 18783             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18784             {
       
 18785         
       
 18786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18787                 return return_type_symbol;
       
 18788                 
       
 18789             }
       
 18790             
       
 18791             ERROR;
       
 18792         }
       
 18793         
       
 18794     }/*function_lint_to_usint*/
       
 18795     break;
       
 18796 
       
 18797 /****
       
 18798  *LINT_TO_UINT
       
 18799  */
       
 18800     case function_lint_to_uint :
       
 18801     {
       
 18802         symbol_c *last_type_symbol = NULL;
       
 18803 
       
 18804         {
       
 18805             symbol_c *IN_type_symbol = param_data_type;
       
 18806             last_type_symbol = param_data_type;
       
 18807             
       
 18808             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18809             {
       
 18810         
       
 18811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18812                 return return_type_symbol;
       
 18813                 
       
 18814             }
       
 18815             
       
 18816             ERROR;
       
 18817         }
       
 18818         
       
 18819     }/*function_lint_to_uint*/
       
 18820     break;
       
 18821 
       
 18822 /****
       
 18823  *LINT_TO_UDINT
       
 18824  */
       
 18825     case function_lint_to_udint :
       
 18826     {
       
 18827         symbol_c *last_type_symbol = NULL;
       
 18828 
       
 18829         {
       
 18830             symbol_c *IN_type_symbol = param_data_type;
       
 18831             last_type_symbol = param_data_type;
       
 18832             
       
 18833             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18834             {
       
 18835         
       
 18836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18837                 return return_type_symbol;
       
 18838                 
       
 18839             }
       
 18840             
       
 18841             ERROR;
       
 18842         }
       
 18843         
       
 18844     }/*function_lint_to_udint*/
       
 18845     break;
       
 18846 
       
 18847 /****
       
 18848  *LINT_TO_ULINT
       
 18849  */
       
 18850     case function_lint_to_ulint :
       
 18851     {
       
 18852         symbol_c *last_type_symbol = NULL;
       
 18853 
       
 18854         {
       
 18855             symbol_c *IN_type_symbol = param_data_type;
       
 18856             last_type_symbol = param_data_type;
       
 18857             
       
 18858             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18859             {
       
 18860         
       
 18861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18862                 return return_type_symbol;
       
 18863                 
       
 18864             }
       
 18865             
       
 18866             ERROR;
       
 18867         }
       
 18868         
       
 18869     }/*function_lint_to_ulint*/
       
 18870     break;
       
 18871 
       
 18872 /****
       
 18873  *LINT_TO_TIME
       
 18874  */
       
 18875     case function_lint_to_time :
       
 18876     {
       
 18877         symbol_c *last_type_symbol = NULL;
       
 18878 
       
 18879         {
       
 18880             symbol_c *IN_type_symbol = param_data_type;
       
 18881             last_type_symbol = param_data_type;
       
 18882             
       
 18883             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18884             {
       
 18885         
       
 18886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18887                 return return_type_symbol;
       
 18888                 
       
 18889             }
       
 18890             
       
 18891             ERROR;
       
 18892         }
       
 18893         
       
 18894     }/*function_lint_to_time*/
       
 18895     break;
       
 18896 
       
 18897 /****
       
 18898  *LINT_TO_BOOL
       
 18899  */
       
 18900     case function_lint_to_bool :
       
 18901     {
       
 18902         symbol_c *last_type_symbol = NULL;
       
 18903 
       
 18904         {
       
 18905             symbol_c *IN_type_symbol = param_data_type;
       
 18906             last_type_symbol = param_data_type;
       
 18907             
       
 18908             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18909             {
       
 18910         
       
 18911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18912                 return return_type_symbol;
       
 18913                 
       
 18914             }
       
 18915             
       
 18916             ERROR;
       
 18917         }
       
 18918         
       
 18919     }/*function_lint_to_bool*/
       
 18920     break;
       
 18921 
       
 18922 /****
       
 18923  *LINT_TO_BYTE
       
 18924  */
       
 18925     case function_lint_to_byte :
       
 18926     {
       
 18927         symbol_c *last_type_symbol = NULL;
       
 18928 
       
 18929         {
       
 18930             symbol_c *IN_type_symbol = param_data_type;
       
 18931             last_type_symbol = param_data_type;
       
 18932             
       
 18933             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18934             {
       
 18935         
       
 18936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18937                 return return_type_symbol;
       
 18938                 
       
 18939             }
       
 18940             
       
 18941             ERROR;
       
 18942         }
       
 18943         
       
 18944     }/*function_lint_to_byte*/
       
 18945     break;
       
 18946 
       
 18947 /****
       
 18948  *LINT_TO_WORD
       
 18949  */
       
 18950     case function_lint_to_word :
       
 18951     {
       
 18952         symbol_c *last_type_symbol = NULL;
       
 18953 
       
 18954         {
       
 18955             symbol_c *IN_type_symbol = param_data_type;
       
 18956             last_type_symbol = param_data_type;
       
 18957             
       
 18958             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18959             {
       
 18960         
       
 18961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18962                 return return_type_symbol;
       
 18963                 
       
 18964             }
       
 18965             
       
 18966             ERROR;
       
 18967         }
       
 18968         
       
 18969     }/*function_lint_to_word*/
       
 18970     break;
       
 18971 
       
 18972 /****
       
 18973  *LINT_TO_DWORD
       
 18974  */
       
 18975     case function_lint_to_dword :
       
 18976     {
       
 18977         symbol_c *last_type_symbol = NULL;
       
 18978 
       
 18979         {
       
 18980             symbol_c *IN_type_symbol = param_data_type;
       
 18981             last_type_symbol = param_data_type;
       
 18982             
       
 18983             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18984             {
       
 18985         
       
 18986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18987                 return return_type_symbol;
       
 18988                 
       
 18989             }
       
 18990             
       
 18991             ERROR;
       
 18992         }
       
 18993         
       
 18994     }/*function_lint_to_dword*/
       
 18995     break;
       
 18996 
       
 18997 /****
       
 18998  *LINT_TO_LWORD
       
 18999  */
       
 19000     case function_lint_to_lword :
       
 19001     {
       
 19002         symbol_c *last_type_symbol = NULL;
       
 19003 
       
 19004         {
       
 19005             symbol_c *IN_type_symbol = param_data_type;
       
 19006             last_type_symbol = param_data_type;
       
 19007             
       
 19008             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19009             {
       
 19010         
       
 19011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19012                 return return_type_symbol;
       
 19013                 
       
 19014             }
       
 19015             
       
 19016             ERROR;
       
 19017         }
       
 19018         
       
 19019     }/*function_lint_to_lword*/
       
 19020     break;
       
 19021 
       
 19022 /****
       
 19023  *LINT_TO_STRING
       
 19024  */
       
 19025     case function_lint_to_string :
       
 19026     {
       
 19027         symbol_c *last_type_symbol = NULL;
       
 19028 
       
 19029         {
       
 19030             symbol_c *IN_type_symbol = param_data_type;
       
 19031             last_type_symbol = param_data_type;
       
 19032             
       
 19033             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19034             {
       
 19035         
       
 19036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19037                 return return_type_symbol;
       
 19038                 
       
 19039             }
       
 19040             
       
 19041             ERROR;
       
 19042         }
       
 19043         
       
 19044     }/*function_lint_to_string*/
       
 19045     break;
       
 19046 
       
 19047 /****
       
 19048  *LINT_TO_WSTRING
       
 19049  */
       
 19050     case function_lint_to_wstring :
       
 19051     {
       
 19052         symbol_c *last_type_symbol = NULL;
       
 19053 
       
 19054         {
       
 19055             symbol_c *IN_type_symbol = param_data_type;
       
 19056             last_type_symbol = param_data_type;
       
 19057             
       
 19058             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19059             {
       
 19060         
       
 19061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 19062                 return return_type_symbol;
       
 19063                 
       
 19064             }
       
 19065             
       
 19066             ERROR;
       
 19067         }
       
 19068         
       
 19069     }/*function_lint_to_wstring*/
       
 19070     break;
  1479 
 19071 
  1480 /****
 19072 /****
  1481  *LINT_TO_DATE
 19073  *LINT_TO_DATE
  1482  */
 19074  */
  1483 	case function_lint_to_date :
 19075     case function_lint_to_date :
  1484 	{
 19076     {
  1485 		symbol_c *last_type_symbol = NULL;
 19077         symbol_c *last_type_symbol = NULL;
  1486 
 19078 
  1487 		{
 19079         {
  1488 			identifier_c param_name("IN");
 19080             symbol_c *IN_type_symbol = param_data_type;
  1489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19081             last_type_symbol = param_data_type;
  1490 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19082             
  1491 			
 19083             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1492 			/* Get the value from a foo(<param_value>) style call */
 19084             {
  1493 			if (IN_param_value == NULL)
 19085         
  1494 			  IN_param_value = function_call_param_iterator.next();
 19086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1495 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19087                 return return_type_symbol;
  1496 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19088                 
  1497 			
 19089             }
  1498 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19090             
  1499 			{
 19091             ERROR;
  1500 		
 19092         }
  1501 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19093         
  1502 				return return_type_symbol;
 19094     }/*function_lint_to_date*/
  1503 				
 19095     break;
  1504 			}
 19096 
  1505 			
 19097 /****
  1506 			ERROR;
 19098  *LINT_TO_TOD
  1507 		}
 19099  */
  1508 		
 19100     case function_lint_to_tod :
  1509 	}/*function_lint_to_date*/
 19101     {
  1510 	break;
 19102         symbol_c *last_type_symbol = NULL;
  1511 
 19103 
  1512 /****
 19104         {
  1513  *LINT_TO_DWORD
 19105             symbol_c *IN_type_symbol = param_data_type;
  1514  */
 19106             last_type_symbol = param_data_type;
  1515 	case function_lint_to_dword :
 19107             
  1516 	{
 19108             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1517 		symbol_c *last_type_symbol = NULL;
 19109             {
  1518 
 19110         
  1519 		{
 19111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1520 			identifier_c param_name("IN");
 19112                 return return_type_symbol;
  1521 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19113                 
  1522 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19114             }
  1523 			
 19115             
  1524 			/* Get the value from a foo(<param_value>) style call */
 19116             ERROR;
  1525 			if (IN_param_value == NULL)
 19117         }
  1526 			  IN_param_value = function_call_param_iterator.next();
 19118         
  1527 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19119     }/*function_lint_to_tod*/
  1528 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19120     break;
  1529 			
       
  1530 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1531 			{
       
  1532 		
       
  1533 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1534 				return return_type_symbol;
       
  1535 				
       
  1536 			}
       
  1537 			
       
  1538 			ERROR;
       
  1539 		}
       
  1540 		
       
  1541 	}/*function_lint_to_dword*/
       
  1542 	break;
       
  1543 
 19121 
  1544 /****
 19122 /****
  1545  *LINT_TO_DT
 19123  *LINT_TO_DT
  1546  */
 19124  */
  1547 	case function_lint_to_dt :
 19125     case function_lint_to_dt :
  1548 	{
 19126     {
  1549 		symbol_c *last_type_symbol = NULL;
 19127         symbol_c *last_type_symbol = NULL;
  1550 
 19128 
  1551 		{
 19129         {
  1552 			identifier_c param_name("IN");
 19130             symbol_c *IN_type_symbol = param_data_type;
  1553 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19131             last_type_symbol = param_data_type;
  1554 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19132             
  1555 			
 19133             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1556 			/* Get the value from a foo(<param_value>) style call */
 19134             {
  1557 			if (IN_param_value == NULL)
 19135         
  1558 			  IN_param_value = function_call_param_iterator.next();
 19136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1559 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19137                 return return_type_symbol;
  1560 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19138                 
  1561 			
 19139             }
  1562 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19140             
  1563 			{
 19141             ERROR;
  1564 		
 19142         }
  1565 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19143         
  1566 				return return_type_symbol;
 19144     }/*function_lint_to_dt*/
  1567 				
 19145     break;
  1568 			}
 19146 
  1569 			
 19147 /****
  1570 			ERROR;
 19148  *USINT_TO_REAL
  1571 		}
 19149  */
  1572 		
 19150     case function_usint_to_real :
  1573 	}/*function_lint_to_dt*/
 19151     {
  1574 	break;
 19152         symbol_c *last_type_symbol = NULL;
  1575 
 19153 
  1576 /****
 19154         {
  1577  *LINT_TO_TOD
 19155             symbol_c *IN_type_symbol = param_data_type;
  1578  */
 19156             last_type_symbol = param_data_type;
  1579 	case function_lint_to_tod :
 19157             
  1580 	{
 19158             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1581 		symbol_c *last_type_symbol = NULL;
 19159             {
  1582 
 19160         
  1583 		{
 19161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1584 			identifier_c param_name("IN");
 19162                 return return_type_symbol;
  1585 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19163                 
  1586 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19164             }
  1587 			
 19165             
  1588 			/* Get the value from a foo(<param_value>) style call */
 19166             ERROR;
  1589 			if (IN_param_value == NULL)
 19167         }
  1590 			  IN_param_value = function_call_param_iterator.next();
 19168         
  1591 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19169     }/*function_usint_to_real*/
  1592 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19170     break;
  1593 			
 19171 
  1594 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19172 /****
  1595 			{
 19173  *USINT_TO_LREAL
  1596 		
 19174  */
  1597 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19175     case function_usint_to_lreal :
  1598 				return return_type_symbol;
 19176     {
  1599 				
 19177         symbol_c *last_type_symbol = NULL;
  1600 			}
 19178 
  1601 			
 19179         {
  1602 			ERROR;
 19180             symbol_c *IN_type_symbol = param_data_type;
  1603 		}
 19181             last_type_symbol = param_data_type;
  1604 		
 19182             
  1605 	}/*function_lint_to_tod*/
 19183             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1606 	break;
 19184             {
  1607 
 19185         
  1608 /****
 19186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1609  *LINT_TO_UDINT
 19187                 return return_type_symbol;
  1610  */
 19188                 
  1611 	case function_lint_to_udint :
 19189             }
  1612 	{
 19190             
  1613 		symbol_c *last_type_symbol = NULL;
 19191             ERROR;
  1614 
 19192         }
  1615 		{
 19193         
  1616 			identifier_c param_name("IN");
 19194     }/*function_usint_to_lreal*/
  1617 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19195     break;
  1618 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19196 
  1619 			
 19197 /****
  1620 			/* Get the value from a foo(<param_value>) style call */
 19198  *USINT_TO_SINT
  1621 			if (IN_param_value == NULL)
 19199  */
  1622 			  IN_param_value = function_call_param_iterator.next();
 19200     case function_usint_to_sint :
  1623 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19201     {
  1624 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19202         symbol_c *last_type_symbol = NULL;
  1625 			
 19203 
  1626 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19204         {
  1627 			{
 19205             symbol_c *IN_type_symbol = param_data_type;
  1628 		
 19206             last_type_symbol = param_data_type;
  1629 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19207             
  1630 				return return_type_symbol;
 19208             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1631 				
 19209             {
  1632 			}
 19210         
  1633 			
 19211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1634 			ERROR;
 19212                 return return_type_symbol;
  1635 		}
 19213                 
  1636 		
 19214             }
  1637 	}/*function_lint_to_udint*/
 19215             
  1638 	break;
 19216             ERROR;
  1639 
 19217         }
  1640 /****
 19218         
  1641  *LINT_TO_WORD
 19219     }/*function_usint_to_sint*/
  1642  */
 19220     break;
  1643 	case function_lint_to_word :
 19221 
  1644 	{
 19222 /****
  1645 		symbol_c *last_type_symbol = NULL;
 19223  *USINT_TO_INT
  1646 
 19224  */
  1647 		{
 19225     case function_usint_to_int :
  1648 			identifier_c param_name("IN");
 19226     {
  1649 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19227         symbol_c *last_type_symbol = NULL;
  1650 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19228 
  1651 			
 19229         {
  1652 			/* Get the value from a foo(<param_value>) style call */
 19230             symbol_c *IN_type_symbol = param_data_type;
  1653 			if (IN_param_value == NULL)
 19231             last_type_symbol = param_data_type;
  1654 			  IN_param_value = function_call_param_iterator.next();
 19232             
  1655 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19233             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1656 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19234             {
  1657 			
 19235         
  1658 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1659 			{
 19237                 return return_type_symbol;
  1660 		
 19238                 
  1661 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19239             }
  1662 				return return_type_symbol;
 19240             
  1663 				
 19241             ERROR;
  1664 			}
 19242         }
  1665 			
 19243         
  1666 			ERROR;
 19244     }/*function_usint_to_int*/
  1667 		}
 19245     break;
  1668 		
 19246 
  1669 	}/*function_lint_to_word*/
 19247 /****
  1670 	break;
 19248  *USINT_TO_DINT
  1671 
 19249  */
  1672 /****
 19250     case function_usint_to_dint :
  1673  *LINT_TO_WSTRING
 19251     {
  1674  */
 19252         symbol_c *last_type_symbol = NULL;
  1675 	case function_lint_to_wstring :
 19253 
  1676 	{
 19254         {
  1677 		symbol_c *last_type_symbol = NULL;
 19255             symbol_c *IN_type_symbol = param_data_type;
  1678 
 19256             last_type_symbol = param_data_type;
  1679 		{
 19257             
  1680 			identifier_c param_name("IN");
 19258             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1681 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19259             {
  1682 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19260         
  1683 			
 19261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1684 			/* Get the value from a foo(<param_value>) style call */
 19262                 return return_type_symbol;
  1685 			if (IN_param_value == NULL)
 19263                 
  1686 			  IN_param_value = function_call_param_iterator.next();
 19264             }
  1687 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19265             
  1688 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19266             ERROR;
  1689 			
 19267         }
  1690 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19268         
  1691 			{
 19269     }/*function_usint_to_dint*/
  1692 		
 19270     break;
  1693 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 19271 
  1694 				return return_type_symbol;
 19272 /****
  1695 				
 19273  *USINT_TO_LINT
  1696 			}
 19274  */
  1697 			
 19275     case function_usint_to_lint :
  1698 			ERROR;
 19276     {
  1699 		}
 19277         symbol_c *last_type_symbol = NULL;
  1700 		
 19278 
  1701 	}/*function_lint_to_wstring*/
 19279         {
  1702 	break;
 19280             symbol_c *IN_type_symbol = param_data_type;
  1703 
 19281             last_type_symbol = param_data_type;
  1704 /****
 19282             
  1705  *LINT_TO_STRING
 19283             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1706  */
 19284             {
  1707 	case function_lint_to_string :
 19285         
  1708 	{
 19286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1709 		symbol_c *last_type_symbol = NULL;
 19287                 return return_type_symbol;
  1710 
 19288                 
  1711 		{
 19289             }
  1712 			identifier_c param_name("IN");
 19290             
  1713 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19291             ERROR;
  1714 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19292         }
  1715 			
 19293         
  1716 			/* Get the value from a foo(<param_value>) style call */
 19294     }/*function_usint_to_lint*/
  1717 			if (IN_param_value == NULL)
 19295     break;
  1718 			  IN_param_value = function_call_param_iterator.next();
 19296 
  1719 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19297 /****
  1720 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19298  *USINT_TO_UINT
  1721 			
 19299  */
  1722 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19300     case function_usint_to_uint :
  1723 			{
 19301     {
  1724 		
 19302         symbol_c *last_type_symbol = NULL;
  1725 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19303 
  1726 				return return_type_symbol;
 19304         {
  1727 				
 19305             symbol_c *IN_type_symbol = param_data_type;
  1728 			}
 19306             last_type_symbol = param_data_type;
  1729 			
 19307             
  1730 			ERROR;
 19308             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1731 		}
 19309             {
  1732 		
 19310         
  1733 	}/*function_lint_to_string*/
 19311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1734 	break;
 19312                 return return_type_symbol;
  1735 
 19313                 
  1736 /****
 19314             }
  1737  *LINT_TO_LWORD
 19315             
  1738  */
 19316             ERROR;
  1739 	case function_lint_to_lword :
 19317         }
  1740 	{
 19318         
  1741 		symbol_c *last_type_symbol = NULL;
 19319     }/*function_usint_to_uint*/
  1742 
 19320     break;
  1743 		{
 19321 
  1744 			identifier_c param_name("IN");
 19322 /****
  1745 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19323  *USINT_TO_UDINT
  1746 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19324  */
  1747 			
 19325     case function_usint_to_udint :
  1748 			/* Get the value from a foo(<param_value>) style call */
 19326     {
  1749 			if (IN_param_value == NULL)
 19327         symbol_c *last_type_symbol = NULL;
  1750 			  IN_param_value = function_call_param_iterator.next();
 19328 
  1751 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19329         {
  1752 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19330             symbol_c *IN_type_symbol = param_data_type;
  1753 			
 19331             last_type_symbol = param_data_type;
  1754 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19332             
  1755 			{
 19333             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1756 		
 19334             {
  1757 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 19335         
  1758 				return return_type_symbol;
 19336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1759 				
 19337                 return return_type_symbol;
  1760 			}
 19338                 
  1761 			
 19339             }
  1762 			ERROR;
 19340             
  1763 		}
 19341             ERROR;
  1764 		
 19342         }
  1765 	}/*function_lint_to_lword*/
 19343         
  1766 	break;
 19344     }/*function_usint_to_udint*/
  1767 
 19345     break;
  1768 /****
 19346 
  1769  *LINT_TO_UINT
 19347 /****
  1770  */
 19348  *USINT_TO_ULINT
  1771 	case function_lint_to_uint :
 19349  */
  1772 	{
 19350     case function_usint_to_ulint :
  1773 		symbol_c *last_type_symbol = NULL;
 19351     {
  1774 
 19352         symbol_c *last_type_symbol = NULL;
  1775 		{
 19353 
  1776 			identifier_c param_name("IN");
 19354         {
  1777 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19355             symbol_c *IN_type_symbol = param_data_type;
  1778 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19356             last_type_symbol = param_data_type;
  1779 			
 19357             
  1780 			/* Get the value from a foo(<param_value>) style call */
 19358             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1781 			if (IN_param_value == NULL)
 19359             {
  1782 			  IN_param_value = function_call_param_iterator.next();
 19360         
  1783 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1784 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19362                 return return_type_symbol;
  1785 			
 19363                 
  1786 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19364             }
  1787 			{
 19365             
  1788 		
 19366             ERROR;
  1789 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 19367         }
  1790 				return return_type_symbol;
 19368         
  1791 				
 19369     }/*function_usint_to_ulint*/
  1792 			}
 19370     break;
  1793 			
 19371 
  1794 			ERROR;
 19372 /****
  1795 		}
 19373  *USINT_TO_TIME
  1796 		
 19374  */
  1797 	}/*function_lint_to_uint*/
 19375     case function_usint_to_time :
  1798 	break;
 19376     {
  1799 
 19377         symbol_c *last_type_symbol = NULL;
  1800 /****
 19378 
  1801  *LINT_TO_LREAL
 19379         {
  1802  */
 19380             symbol_c *IN_type_symbol = param_data_type;
  1803 	case function_lint_to_lreal :
 19381             last_type_symbol = param_data_type;
  1804 	{
 19382             
  1805 		symbol_c *last_type_symbol = NULL;
 19383             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1806 
 19384             {
  1807 		{
 19385         
  1808 			identifier_c param_name("IN");
 19386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1809 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19387                 return return_type_symbol;
  1810 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19388                 
  1811 			
 19389             }
  1812 			/* Get the value from a foo(<param_value>) style call */
 19390             
  1813 			if (IN_param_value == NULL)
 19391             ERROR;
  1814 			  IN_param_value = function_call_param_iterator.next();
 19392         }
  1815 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19393         
  1816 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19394     }/*function_usint_to_time*/
  1817 			
 19395     break;
  1818 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19396 
  1819 			{
 19397 /****
  1820 		
 19398  *USINT_TO_BOOL
  1821 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 19399  */
  1822 				return return_type_symbol;
 19400     case function_usint_to_bool :
  1823 				
 19401     {
  1824 			}
 19402         symbol_c *last_type_symbol = NULL;
  1825 			
 19403 
  1826 			ERROR;
 19404         {
  1827 		}
 19405             symbol_c *IN_type_symbol = param_data_type;
  1828 		
 19406             last_type_symbol = param_data_type;
  1829 	}/*function_lint_to_lreal*/
 19407             
  1830 	break;
 19408             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1831 
 19409             {
  1832 /****
 19410         
  1833  *LINT_TO_BYTE
 19411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1834  */
 19412                 return return_type_symbol;
  1835 	case function_lint_to_byte :
 19413                 
  1836 	{
 19414             }
  1837 		symbol_c *last_type_symbol = NULL;
 19415             
  1838 
 19416             ERROR;
  1839 		{
 19417         }
  1840 			identifier_c param_name("IN");
 19418         
  1841 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19419     }/*function_usint_to_bool*/
  1842 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19420     break;
  1843 			
 19421 
  1844 			/* Get the value from a foo(<param_value>) style call */
 19422 /****
  1845 			if (IN_param_value == NULL)
 19423  *USINT_TO_BYTE
  1846 			  IN_param_value = function_call_param_iterator.next();
 19424  */
  1847 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19425     case function_usint_to_byte :
  1848 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19426     {
  1849 			
 19427         symbol_c *last_type_symbol = NULL;
  1850 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19428 
  1851 			{
 19429         {
  1852 		
 19430             symbol_c *IN_type_symbol = param_data_type;
  1853 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 19431             last_type_symbol = param_data_type;
  1854 				return return_type_symbol;
 19432             
  1855 				
 19433             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1856 			}
 19434             {
  1857 			
 19435         
  1858 			ERROR;
 19436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1859 		}
 19437                 return return_type_symbol;
  1860 		
 19438                 
  1861 	}/*function_lint_to_byte*/
 19439             }
  1862 	break;
 19440             
  1863 
 19441             ERROR;
  1864 /****
 19442         }
  1865  *LINT_TO_USINT
 19443         
  1866  */
 19444     }/*function_usint_to_byte*/
  1867 	case function_lint_to_usint :
 19445     break;
  1868 	{
 19446 
  1869 		symbol_c *last_type_symbol = NULL;
 19447 /****
  1870 
 19448  *USINT_TO_WORD
  1871 		{
 19449  */
  1872 			identifier_c param_name("IN");
 19450     case function_usint_to_word :
  1873 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19451     {
  1874 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19452         symbol_c *last_type_symbol = NULL;
  1875 			
 19453 
  1876 			/* Get the value from a foo(<param_value>) style call */
 19454         {
  1877 			if (IN_param_value == NULL)
 19455             symbol_c *IN_type_symbol = param_data_type;
  1878 			  IN_param_value = function_call_param_iterator.next();
 19456             last_type_symbol = param_data_type;
  1879 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19457             
  1880 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19458             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1881 			
 19459             {
  1882 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19460         
  1883 			{
 19461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1884 		
 19462                 return return_type_symbol;
  1885 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 19463                 
  1886 				return return_type_symbol;
 19464             }
  1887 				
 19465             
  1888 			}
 19466             ERROR;
  1889 			
 19467         }
  1890 			ERROR;
 19468         
  1891 		}
 19469     }/*function_usint_to_word*/
  1892 		
 19470     break;
  1893 	}/*function_lint_to_usint*/
 19471 
  1894 	break;
 19472 /****
  1895 
 19473  *USINT_TO_DWORD
  1896 /****
 19474  */
  1897  *LINT_TO_ULINT
 19475     case function_usint_to_dword :
  1898  */
 19476     {
  1899 	case function_lint_to_ulint :
 19477         symbol_c *last_type_symbol = NULL;
  1900 	{
 19478 
  1901 		symbol_c *last_type_symbol = NULL;
 19479         {
  1902 
 19480             symbol_c *IN_type_symbol = param_data_type;
  1903 		{
 19481             last_type_symbol = param_data_type;
  1904 			identifier_c param_name("IN");
 19482             
  1905 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19483             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1906 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19484             {
  1907 			
 19485         
  1908 			/* Get the value from a foo(<param_value>) style call */
 19486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1909 			if (IN_param_value == NULL)
 19487                 return return_type_symbol;
  1910 			  IN_param_value = function_call_param_iterator.next();
 19488                 
  1911 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19489             }
  1912 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19490             
  1913 			
 19491             ERROR;
  1914 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19492         }
  1915 			{
 19493         
  1916 		
 19494     }/*function_usint_to_dword*/
  1917 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19495     break;
  1918 				return return_type_symbol;
 19496 
  1919 				
 19497 /****
  1920 			}
 19498  *USINT_TO_LWORD
  1921 			
 19499  */
  1922 			ERROR;
 19500     case function_usint_to_lword :
  1923 		}
 19501     {
  1924 		
 19502         symbol_c *last_type_symbol = NULL;
  1925 	}/*function_lint_to_ulint*/
 19503 
  1926 	break;
 19504         {
  1927 
 19505             symbol_c *IN_type_symbol = param_data_type;
  1928 /****
 19506             last_type_symbol = param_data_type;
  1929  *LINT_TO_BOOL
 19507             
  1930  */
 19508             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1931 	case function_lint_to_bool :
 19509             {
  1932 	{
 19510         
  1933 		symbol_c *last_type_symbol = NULL;
 19511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1934 
 19512                 return return_type_symbol;
  1935 		{
 19513                 
  1936 			identifier_c param_name("IN");
 19514             }
  1937 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19515             
  1938 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19516             ERROR;
  1939 			
 19517         }
  1940 			/* Get the value from a foo(<param_value>) style call */
 19518         
  1941 			if (IN_param_value == NULL)
 19519     }/*function_usint_to_lword*/
  1942 			  IN_param_value = function_call_param_iterator.next();
 19520     break;
  1943 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19521 
  1944 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19522 /****
  1945 			
 19523  *USINT_TO_STRING
  1946 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19524  */
  1947 			{
 19525     case function_usint_to_string :
  1948 		
 19526     {
  1949 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19527         symbol_c *last_type_symbol = NULL;
  1950 				return return_type_symbol;
 19528 
  1951 				
 19529         {
  1952 			}
 19530             symbol_c *IN_type_symbol = param_data_type;
  1953 			
 19531             last_type_symbol = param_data_type;
  1954 			ERROR;
 19532             
  1955 		}
 19533             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1956 		
 19534             {
  1957 	}/*function_lint_to_bool*/
 19535         
  1958 	break;
 19536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1959 
 19537                 return return_type_symbol;
  1960 /****
 19538                 
  1961  *LINT_TO_TIME
 19539             }
  1962  */
 19540             
  1963 	case function_lint_to_time :
 19541             ERROR;
  1964 	{
 19542         }
  1965 		symbol_c *last_type_symbol = NULL;
 19543         
  1966 
 19544     }/*function_usint_to_string*/
  1967 		{
 19545     break;
  1968 			identifier_c param_name("IN");
 19546 
  1969 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19547 /****
  1970 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19548  *USINT_TO_WSTRING
  1971 			
 19549  */
  1972 			/* Get the value from a foo(<param_value>) style call */
 19550     case function_usint_to_wstring :
  1973 			if (IN_param_value == NULL)
 19551     {
  1974 			  IN_param_value = function_call_param_iterator.next();
 19552         symbol_c *last_type_symbol = NULL;
  1975 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19553 
  1976 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19554         {
  1977 			
 19555             symbol_c *IN_type_symbol = param_data_type;
  1978 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19556             last_type_symbol = param_data_type;
  1979 			{
 19557             
  1980 		
 19558             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1981 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 19559             {
  1982 				return return_type_symbol;
 19560         
  1983 				
 19561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  1984 			}
 19562                 return return_type_symbol;
  1985 			
 19563                 
  1986 			ERROR;
 19564             }
  1987 		}
 19565             
  1988 		
 19566             ERROR;
  1989 	}/*function_lint_to_time*/
 19567         }
  1990 	break;
 19568         
  1991 
 19569     }/*function_usint_to_wstring*/
  1992 /****
 19570     break;
  1993  *LINT_TO_INT
 19571 
  1994  */
 19572 /****
  1995 	case function_lint_to_int :
 19573  *USINT_TO_DATE
  1996 	{
 19574  */
  1997 		symbol_c *last_type_symbol = NULL;
 19575     case function_usint_to_date :
  1998 
 19576     {
  1999 		{
 19577         symbol_c *last_type_symbol = NULL;
  2000 			identifier_c param_name("IN");
 19578 
  2001 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19579         {
  2002 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19580             symbol_c *IN_type_symbol = param_data_type;
  2003 			
 19581             last_type_symbol = param_data_type;
  2004 			/* Get the value from a foo(<param_value>) style call */
 19582             
  2005 			if (IN_param_value == NULL)
 19583             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2006 			  IN_param_value = function_call_param_iterator.next();
 19584             {
  2007 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19585         
  2008 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2009 			
 19587                 return return_type_symbol;
  2010 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 19588                 
  2011 			{
 19589             }
  2012 		
 19590             
  2013 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19591             ERROR;
  2014 				return return_type_symbol;
 19592         }
  2015 				
 19593         
  2016 			}
 19594     }/*function_usint_to_date*/
  2017 			
 19595     break;
  2018 			ERROR;
 19596 
  2019 		}
 19597 /****
  2020 		
 19598  *USINT_TO_TOD
  2021 	}/*function_lint_to_int*/
 19599  */
  2022 	break;
 19600     case function_usint_to_tod :
  2023 
 19601     {
  2024 /****
 19602         symbol_c *last_type_symbol = NULL;
  2025  *DINT_TO_REAL
 19603 
  2026  */
 19604         {
  2027 	case function_dint_to_real :
 19605             symbol_c *IN_type_symbol = param_data_type;
  2028 	{
 19606             last_type_symbol = param_data_type;
  2029 		symbol_c *last_type_symbol = NULL;
 19607             
  2030 
 19608             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2031 		{
 19609             {
  2032 			identifier_c param_name("IN");
 19610         
  2033 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2034 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19612                 return return_type_symbol;
  2035 			
 19613                 
  2036 			/* Get the value from a foo(<param_value>) style call */
 19614             }
  2037 			if (IN_param_value == NULL)
 19615             
  2038 			  IN_param_value = function_call_param_iterator.next();
 19616             ERROR;
  2039 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19617         }
  2040 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19618         
  2041 			
 19619     }/*function_usint_to_tod*/
  2042 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19620     break;
  2043 			{
 19621 
  2044 		
 19622 /****
  2045 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 19623  *USINT_TO_DT
  2046 				return return_type_symbol;
 19624  */
  2047 				
 19625     case function_usint_to_dt :
  2048 			}
 19626     {
  2049 			
 19627         symbol_c *last_type_symbol = NULL;
  2050 			ERROR;
 19628 
  2051 		}
 19629         {
  2052 		
 19630             symbol_c *IN_type_symbol = param_data_type;
  2053 	}/*function_dint_to_real*/
 19631             last_type_symbol = param_data_type;
  2054 	break;
 19632             
  2055 
 19633             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2056 /****
 19634             {
  2057  *DINT_TO_SINT
 19635         
  2058  */
 19636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2059 	case function_dint_to_sint :
 19637                 return return_type_symbol;
  2060 	{
 19638                 
  2061 		symbol_c *last_type_symbol = NULL;
 19639             }
  2062 
 19640             
  2063 		{
 19641             ERROR;
  2064 			identifier_c param_name("IN");
 19642         }
  2065 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19643         
  2066 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19644     }/*function_usint_to_dt*/
  2067 			
 19645     break;
  2068 			/* Get the value from a foo(<param_value>) style call */
 19646 
  2069 			if (IN_param_value == NULL)
 19647 /****
  2070 			  IN_param_value = function_call_param_iterator.next();
 19648  *UINT_TO_REAL
  2071 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19649  */
  2072 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19650     case function_uint_to_real :
  2073 			
 19651     {
  2074 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19652         symbol_c *last_type_symbol = NULL;
  2075 			{
 19653 
  2076 		
 19654         {
  2077 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 19655             symbol_c *IN_type_symbol = param_data_type;
  2078 				return return_type_symbol;
 19656             last_type_symbol = param_data_type;
  2079 				
 19657             
  2080 			}
 19658             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2081 			
 19659             {
  2082 			ERROR;
 19660         
  2083 		}
 19661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2084 		
 19662                 return return_type_symbol;
  2085 	}/*function_dint_to_sint*/
 19663                 
  2086 	break;
 19664             }
  2087 
 19665             
  2088 /****
 19666             ERROR;
  2089  *DINT_TO_LINT
 19667         }
  2090  */
 19668         
  2091 	case function_dint_to_lint :
 19669     }/*function_uint_to_real*/
  2092 	{
 19670     break;
  2093 		symbol_c *last_type_symbol = NULL;
 19671 
  2094 
 19672 /****
  2095 		{
 19673  *UINT_TO_LREAL
  2096 			identifier_c param_name("IN");
 19674  */
  2097 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19675     case function_uint_to_lreal :
  2098 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19676     {
  2099 			
 19677         symbol_c *last_type_symbol = NULL;
  2100 			/* Get the value from a foo(<param_value>) style call */
 19678 
  2101 			if (IN_param_value == NULL)
 19679         {
  2102 			  IN_param_value = function_call_param_iterator.next();
 19680             symbol_c *IN_type_symbol = param_data_type;
  2103 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19681             last_type_symbol = param_data_type;
  2104 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19682             
  2105 			
 19683             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2106 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19684             {
  2107 			{
 19685         
  2108 		
 19686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2109 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 19687                 return return_type_symbol;
  2110 				return return_type_symbol;
 19688                 
  2111 				
 19689             }
  2112 			}
 19690             
  2113 			
 19691             ERROR;
  2114 			ERROR;
 19692         }
  2115 		}
 19693         
  2116 		
 19694     }/*function_uint_to_lreal*/
  2117 	}/*function_dint_to_lint*/
 19695     break;
  2118 	break;
 19696 
  2119 
 19697 /****
  2120 /****
 19698  *UINT_TO_SINT
  2121  *DINT_TO_DINT
 19699  */
  2122  */
 19700     case function_uint_to_sint :
  2123 	case function_dint_to_dint :
 19701     {
  2124 	{
 19702         symbol_c *last_type_symbol = NULL;
  2125 		symbol_c *last_type_symbol = NULL;
 19703 
  2126 
 19704         {
  2127 		{
 19705             symbol_c *IN_type_symbol = param_data_type;
  2128 			identifier_c param_name("IN");
 19706             last_type_symbol = param_data_type;
  2129 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19707             
  2130 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19708             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2131 			
 19709             {
  2132 			/* Get the value from a foo(<param_value>) style call */
 19710         
  2133 			if (IN_param_value == NULL)
 19711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2134 			  IN_param_value = function_call_param_iterator.next();
 19712                 return return_type_symbol;
  2135 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19713                 
  2136 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19714             }
  2137 			
 19715             
  2138 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19716             ERROR;
  2139 			{
 19717         }
  2140 		
 19718         
  2141 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 19719     }/*function_uint_to_sint*/
  2142 				return return_type_symbol;
 19720     break;
  2143 				
 19721 
  2144 			}
 19722 /****
  2145 			
 19723  *UINT_TO_INT
  2146 			ERROR;
 19724  */
  2147 		}
 19725     case function_uint_to_int :
  2148 		
 19726     {
  2149 	}/*function_dint_to_dint*/
 19727         symbol_c *last_type_symbol = NULL;
  2150 	break;
 19728 
  2151 
 19729         {
  2152 /****
 19730             symbol_c *IN_type_symbol = param_data_type;
  2153  *DINT_TO_DATE
 19731             last_type_symbol = param_data_type;
  2154  */
 19732             
  2155 	case function_dint_to_date :
 19733             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2156 	{
 19734             {
  2157 		symbol_c *last_type_symbol = NULL;
 19735         
  2158 
 19736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2159 		{
 19737                 return return_type_symbol;
  2160 			identifier_c param_name("IN");
 19738                 
  2161 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19739             }
  2162 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19740             
  2163 			
 19741             ERROR;
  2164 			/* Get the value from a foo(<param_value>) style call */
 19742         }
  2165 			if (IN_param_value == NULL)
 19743         
  2166 			  IN_param_value = function_call_param_iterator.next();
 19744     }/*function_uint_to_int*/
  2167 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19745     break;
  2168 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19746 
  2169 			
 19747 /****
  2170 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19748  *UINT_TO_DINT
  2171 			{
 19749  */
  2172 		
 19750     case function_uint_to_dint :
  2173 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19751     {
  2174 				return return_type_symbol;
 19752         symbol_c *last_type_symbol = NULL;
  2175 				
 19753 
  2176 			}
 19754         {
  2177 			
 19755             symbol_c *IN_type_symbol = param_data_type;
  2178 			ERROR;
 19756             last_type_symbol = param_data_type;
  2179 		}
 19757             
  2180 		
 19758             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2181 	}/*function_dint_to_date*/
 19759             {
  2182 	break;
 19760         
  2183 
 19761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2184 /****
 19762                 return return_type_symbol;
  2185  *DINT_TO_DWORD
 19763                 
  2186  */
 19764             }
  2187 	case function_dint_to_dword :
 19765             
  2188 	{
 19766             ERROR;
  2189 		symbol_c *last_type_symbol = NULL;
 19767         }
  2190 
 19768         
  2191 		{
 19769     }/*function_uint_to_dint*/
  2192 			identifier_c param_name("IN");
 19770     break;
  2193 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19771 
  2194 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19772 /****
  2195 			
 19773  *UINT_TO_LINT
  2196 			/* Get the value from a foo(<param_value>) style call */
 19774  */
  2197 			if (IN_param_value == NULL)
 19775     case function_uint_to_lint :
  2198 			  IN_param_value = function_call_param_iterator.next();
 19776     {
  2199 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19777         symbol_c *last_type_symbol = NULL;
  2200 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19778 
  2201 			
 19779         {
  2202 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19780             symbol_c *IN_type_symbol = param_data_type;
  2203 			{
 19781             last_type_symbol = param_data_type;
  2204 		
 19782             
  2205 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 19783             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2206 				return return_type_symbol;
 19784             {
  2207 				
 19785         
  2208 			}
 19786                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2209 			
 19787                 return return_type_symbol;
  2210 			ERROR;
 19788                 
  2211 		}
 19789             }
  2212 		
 19790             
  2213 	}/*function_dint_to_dword*/
 19791             ERROR;
  2214 	break;
 19792         }
  2215 
 19793         
  2216 /****
 19794     }/*function_uint_to_lint*/
  2217  *DINT_TO_DT
 19795     break;
  2218  */
 19796 
  2219 	case function_dint_to_dt :
 19797 /****
  2220 	{
 19798  *UINT_TO_USINT
  2221 		symbol_c *last_type_symbol = NULL;
 19799  */
  2222 
 19800     case function_uint_to_usint :
  2223 		{
 19801     {
  2224 			identifier_c param_name("IN");
 19802         symbol_c *last_type_symbol = NULL;
  2225 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19803 
  2226 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19804         {
  2227 			
 19805             symbol_c *IN_type_symbol = param_data_type;
  2228 			/* Get the value from a foo(<param_value>) style call */
 19806             last_type_symbol = param_data_type;
  2229 			if (IN_param_value == NULL)
 19807             
  2230 			  IN_param_value = function_call_param_iterator.next();
 19808             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2231 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19809             {
  2232 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19810         
  2233 			
 19811                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2234 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19812                 return return_type_symbol;
  2235 			{
 19813                 
  2236 		
 19814             }
  2237 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19815             
  2238 				return return_type_symbol;
 19816             ERROR;
  2239 				
 19817         }
  2240 			}
 19818         
  2241 			
 19819     }/*function_uint_to_usint*/
  2242 			ERROR;
 19820     break;
  2243 		}
 19821 
  2244 		
 19822 /****
  2245 	}/*function_dint_to_dt*/
 19823  *UINT_TO_UDINT
  2246 	break;
 19824  */
  2247 
 19825     case function_uint_to_udint :
  2248 /****
 19826     {
  2249  *DINT_TO_TOD
 19827         symbol_c *last_type_symbol = NULL;
  2250  */
 19828 
  2251 	case function_dint_to_tod :
 19829         {
  2252 	{
 19830             symbol_c *IN_type_symbol = param_data_type;
  2253 		symbol_c *last_type_symbol = NULL;
 19831             last_type_symbol = param_data_type;
  2254 
 19832             
  2255 		{
 19833             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2256 			identifier_c param_name("IN");
 19834             {
  2257 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19835         
  2258 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2259 			
 19837                 return return_type_symbol;
  2260 			/* Get the value from a foo(<param_value>) style call */
 19838                 
  2261 			if (IN_param_value == NULL)
 19839             }
  2262 			  IN_param_value = function_call_param_iterator.next();
 19840             
  2263 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19841             ERROR;
  2264 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19842         }
  2265 			
 19843         
  2266 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19844     }/*function_uint_to_udint*/
  2267 			{
 19845     break;
  2268 		
 19846 
  2269 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19847 /****
  2270 				return return_type_symbol;
 19848  *UINT_TO_ULINT
  2271 				
 19849  */
  2272 			}
 19850     case function_uint_to_ulint :
  2273 			
 19851     {
  2274 			ERROR;
 19852         symbol_c *last_type_symbol = NULL;
  2275 		}
 19853 
  2276 		
 19854         {
  2277 	}/*function_dint_to_tod*/
 19855             symbol_c *IN_type_symbol = param_data_type;
  2278 	break;
 19856             last_type_symbol = param_data_type;
  2279 
 19857             
  2280 /****
 19858             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2281  *DINT_TO_UDINT
 19859             {
  2282  */
 19860         
  2283 	case function_dint_to_udint :
 19861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2284 	{
 19862                 return return_type_symbol;
  2285 		symbol_c *last_type_symbol = NULL;
 19863                 
  2286 
 19864             }
  2287 		{
 19865             
  2288 			identifier_c param_name("IN");
 19866             ERROR;
  2289 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19867         }
  2290 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19868         
  2291 			
 19869     }/*function_uint_to_ulint*/
  2292 			/* Get the value from a foo(<param_value>) style call */
 19870     break;
  2293 			if (IN_param_value == NULL)
 19871 
  2294 			  IN_param_value = function_call_param_iterator.next();
 19872 /****
  2295 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19873  *UINT_TO_TIME
  2296 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19874  */
  2297 			
 19875     case function_uint_to_time :
  2298 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19876     {
  2299 			{
 19877         symbol_c *last_type_symbol = NULL;
  2300 		
 19878 
  2301 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19879         {
  2302 				return return_type_symbol;
 19880             symbol_c *IN_type_symbol = param_data_type;
  2303 				
 19881             last_type_symbol = param_data_type;
  2304 			}
 19882             
  2305 			
 19883             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2306 			ERROR;
 19884             {
  2307 		}
 19885         
  2308 		
 19886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2309 	}/*function_dint_to_udint*/
 19887                 return return_type_symbol;
  2310 	break;
 19888                 
  2311 
 19889             }
  2312 /****
 19890             
  2313  *DINT_TO_WORD
 19891             ERROR;
  2314  */
 19892         }
  2315 	case function_dint_to_word :
 19893         
  2316 	{
 19894     }/*function_uint_to_time*/
  2317 		symbol_c *last_type_symbol = NULL;
 19895     break;
  2318 
 19896 
  2319 		{
 19897 /****
  2320 			identifier_c param_name("IN");
 19898  *UINT_TO_BOOL
  2321 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19899  */
  2322 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19900     case function_uint_to_bool :
  2323 			
 19901     {
  2324 			/* Get the value from a foo(<param_value>) style call */
 19902         symbol_c *last_type_symbol = NULL;
  2325 			if (IN_param_value == NULL)
 19903 
  2326 			  IN_param_value = function_call_param_iterator.next();
 19904         {
  2327 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19905             symbol_c *IN_type_symbol = param_data_type;
  2328 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19906             last_type_symbol = param_data_type;
  2329 			
 19907             
  2330 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19908             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2331 			{
 19909             {
  2332 		
 19910         
  2333 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2334 				return return_type_symbol;
 19912                 return return_type_symbol;
  2335 				
 19913                 
  2336 			}
 19914             }
  2337 			
 19915             
  2338 			ERROR;
 19916             ERROR;
  2339 		}
 19917         }
  2340 		
 19918         
  2341 	}/*function_dint_to_word*/
 19919     }/*function_uint_to_bool*/
  2342 	break;
 19920     break;
  2343 
 19921 
  2344 /****
 19922 /****
  2345  *DINT_TO_WSTRING
 19923  *UINT_TO_BYTE
  2346  */
 19924  */
  2347 	case function_dint_to_wstring :
 19925     case function_uint_to_byte :
  2348 	{
 19926     {
  2349 		symbol_c *last_type_symbol = NULL;
 19927         symbol_c *last_type_symbol = NULL;
  2350 
 19928 
  2351 		{
 19929         {
  2352 			identifier_c param_name("IN");
 19930             symbol_c *IN_type_symbol = param_data_type;
  2353 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19931             last_type_symbol = param_data_type;
  2354 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19932             
  2355 			
 19933             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2356 			/* Get the value from a foo(<param_value>) style call */
 19934             {
  2357 			if (IN_param_value == NULL)
 19935         
  2358 			  IN_param_value = function_call_param_iterator.next();
 19936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2359 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19937                 return return_type_symbol;
  2360 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19938                 
  2361 			
 19939             }
  2362 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19940             
  2363 			{
 19941             ERROR;
  2364 		
 19942         }
  2365 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 19943         
  2366 				return return_type_symbol;
 19944     }/*function_uint_to_byte*/
  2367 				
 19945     break;
  2368 			}
 19946 
  2369 			
 19947 /****
  2370 			ERROR;
 19948  *UINT_TO_WORD
  2371 		}
 19949  */
  2372 		
 19950     case function_uint_to_word :
  2373 	}/*function_dint_to_wstring*/
 19951     {
  2374 	break;
 19952         symbol_c *last_type_symbol = NULL;
  2375 
 19953 
  2376 /****
 19954         {
  2377  *DINT_TO_STRING
 19955             symbol_c *IN_type_symbol = param_data_type;
  2378  */
 19956             last_type_symbol = param_data_type;
  2379 	case function_dint_to_string :
 19957             
  2380 	{
 19958             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2381 		symbol_c *last_type_symbol = NULL;
 19959             {
  2382 
 19960         
  2383 		{
 19961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2384 			identifier_c param_name("IN");
 19962                 return return_type_symbol;
  2385 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19963                 
  2386 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19964             }
  2387 			
 19965             
  2388 			/* Get the value from a foo(<param_value>) style call */
 19966             ERROR;
  2389 			if (IN_param_value == NULL)
 19967         }
  2390 			  IN_param_value = function_call_param_iterator.next();
 19968         
  2391 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19969     }/*function_uint_to_word*/
  2392 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19970     break;
  2393 			
 19971 
  2394 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 19972 /****
  2395 			{
 19973  *UINT_TO_DWORD
  2396 		
 19974  */
  2397 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19975     case function_uint_to_dword :
  2398 				return return_type_symbol;
 19976     {
  2399 				
 19977         symbol_c *last_type_symbol = NULL;
  2400 			}
 19978 
  2401 			
 19979         {
  2402 			ERROR;
 19980             symbol_c *IN_type_symbol = param_data_type;
  2403 		}
 19981             last_type_symbol = param_data_type;
  2404 		
 19982             
  2405 	}/*function_dint_to_string*/
 19983             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2406 	break;
 19984             {
  2407 
 19985         
  2408 /****
 19986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2409  *DINT_TO_LWORD
 19987                 return return_type_symbol;
  2410  */
 19988                 
  2411 	case function_dint_to_lword :
 19989             }
  2412 	{
 19990             
  2413 		symbol_c *last_type_symbol = NULL;
 19991             ERROR;
  2414 
 19992         }
  2415 		{
 19993         
  2416 			identifier_c param_name("IN");
 19994     }/*function_uint_to_dword*/
  2417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 19995     break;
  2418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19996 
  2419 			
 19997 /****
  2420 			/* Get the value from a foo(<param_value>) style call */
 19998  *UINT_TO_LWORD
  2421 			if (IN_param_value == NULL)
 19999  */
  2422 			  IN_param_value = function_call_param_iterator.next();
 20000     case function_uint_to_lword :
  2423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20001     {
  2424 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20002         symbol_c *last_type_symbol = NULL;
  2425 			
 20003 
  2426 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20004         {
  2427 			{
 20005             symbol_c *IN_type_symbol = param_data_type;
  2428 		
 20006             last_type_symbol = param_data_type;
  2429 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 20007             
  2430 				return return_type_symbol;
 20008             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2431 				
 20009             {
  2432 			}
 20010         
  2433 			
 20011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2434 			ERROR;
 20012                 return return_type_symbol;
  2435 		}
 20013                 
  2436 		
 20014             }
  2437 	}/*function_dint_to_lword*/
 20015             
  2438 	break;
 20016             ERROR;
  2439 
 20017         }
  2440 /****
 20018         
  2441  *DINT_TO_UINT
 20019     }/*function_uint_to_lword*/
  2442  */
 20020     break;
  2443 	case function_dint_to_uint :
 20021 
  2444 	{
 20022 /****
  2445 		symbol_c *last_type_symbol = NULL;
 20023  *UINT_TO_STRING
  2446 
 20024  */
  2447 		{
 20025     case function_uint_to_string :
  2448 			identifier_c param_name("IN");
 20026     {
  2449 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20027         symbol_c *last_type_symbol = NULL;
  2450 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20028 
  2451 			
 20029         {
  2452 			/* Get the value from a foo(<param_value>) style call */
 20030             symbol_c *IN_type_symbol = param_data_type;
  2453 			if (IN_param_value == NULL)
 20031             last_type_symbol = param_data_type;
  2454 			  IN_param_value = function_call_param_iterator.next();
 20032             
  2455 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20033             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2456 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20034             {
  2457 			
 20035         
  2458 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2459 			{
 20037                 return return_type_symbol;
  2460 		
 20038                 
  2461 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 20039             }
  2462 				return return_type_symbol;
 20040             
  2463 				
 20041             ERROR;
  2464 			}
 20042         }
  2465 			
 20043         
  2466 			ERROR;
 20044     }/*function_uint_to_string*/
  2467 		}
 20045     break;
  2468 		
 20046 
  2469 	}/*function_dint_to_uint*/
 20047 /****
  2470 	break;
 20048  *UINT_TO_WSTRING
  2471 
 20049  */
  2472 /****
 20050     case function_uint_to_wstring :
  2473  *DINT_TO_LREAL
 20051     {
  2474  */
 20052         symbol_c *last_type_symbol = NULL;
  2475 	case function_dint_to_lreal :
 20053 
  2476 	{
 20054         {
  2477 		symbol_c *last_type_symbol = NULL;
 20055             symbol_c *IN_type_symbol = param_data_type;
  2478 
 20056             last_type_symbol = param_data_type;
  2479 		{
 20057             
  2480 			identifier_c param_name("IN");
 20058             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2481 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20059             {
  2482 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20060         
  2483 			
 20061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  2484 			/* Get the value from a foo(<param_value>) style call */
 20062                 return return_type_symbol;
  2485 			if (IN_param_value == NULL)
 20063                 
  2486 			  IN_param_value = function_call_param_iterator.next();
 20064             }
  2487 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20065             
  2488 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20066             ERROR;
  2489 			
 20067         }
  2490 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20068         
  2491 			{
 20069     }/*function_uint_to_wstring*/
  2492 		
 20070     break;
  2493 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 20071 
  2494 				return return_type_symbol;
 20072 /****
  2495 				
 20073  *UINT_TO_DATE
  2496 			}
 20074  */
  2497 			
 20075     case function_uint_to_date :
  2498 			ERROR;
 20076     {
  2499 		}
 20077         symbol_c *last_type_symbol = NULL;
  2500 		
 20078 
  2501 	}/*function_dint_to_lreal*/
 20079         {
  2502 	break;
 20080             symbol_c *IN_type_symbol = param_data_type;
  2503 
 20081             last_type_symbol = param_data_type;
  2504 /****
 20082             
  2505  *DINT_TO_BYTE
 20083             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2506  */
 20084             {
  2507 	case function_dint_to_byte :
 20085         
  2508 	{
 20086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2509 		symbol_c *last_type_symbol = NULL;
 20087                 return return_type_symbol;
  2510 
 20088                 
  2511 		{
 20089             }
  2512 			identifier_c param_name("IN");
 20090             
  2513 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20091             ERROR;
  2514 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20092         }
  2515 			
 20093         
  2516 			/* Get the value from a foo(<param_value>) style call */
 20094     }/*function_uint_to_date*/
  2517 			if (IN_param_value == NULL)
 20095     break;
  2518 			  IN_param_value = function_call_param_iterator.next();
 20096 
  2519 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20097 /****
  2520 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20098  *UINT_TO_TOD
  2521 			
 20099  */
  2522 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20100     case function_uint_to_tod :
  2523 			{
 20101     {
  2524 		
 20102         symbol_c *last_type_symbol = NULL;
  2525 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 20103 
  2526 				return return_type_symbol;
 20104         {
  2527 				
 20105             symbol_c *IN_type_symbol = param_data_type;
  2528 			}
 20106             last_type_symbol = param_data_type;
  2529 			
 20107             
  2530 			ERROR;
 20108             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2531 		}
 20109             {
  2532 		
 20110         
  2533 	}/*function_dint_to_byte*/
 20111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2534 	break;
 20112                 return return_type_symbol;
  2535 
 20113                 
  2536 /****
 20114             }
  2537  *DINT_TO_USINT
 20115             
  2538  */
 20116             ERROR;
  2539 	case function_dint_to_usint :
 20117         }
  2540 	{
 20118         
  2541 		symbol_c *last_type_symbol = NULL;
 20119     }/*function_uint_to_tod*/
  2542 
 20120     break;
  2543 		{
 20121 
  2544 			identifier_c param_name("IN");
 20122 /****
  2545 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20123  *UINT_TO_DT
  2546 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20124  */
  2547 			
 20125     case function_uint_to_dt :
  2548 			/* Get the value from a foo(<param_value>) style call */
 20126     {
  2549 			if (IN_param_value == NULL)
 20127         symbol_c *last_type_symbol = NULL;
  2550 			  IN_param_value = function_call_param_iterator.next();
 20128 
  2551 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20129         {
  2552 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20130             symbol_c *IN_type_symbol = param_data_type;
  2553 			
 20131             last_type_symbol = param_data_type;
  2554 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20132             
  2555 			{
 20133             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2556 		
 20134             {
  2557 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 20135         
  2558 				return return_type_symbol;
 20136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2559 				
 20137                 return return_type_symbol;
  2560 			}
 20138                 
  2561 			
 20139             }
  2562 			ERROR;
 20140             
  2563 		}
 20141             ERROR;
  2564 		
 20142         }
  2565 	}/*function_dint_to_usint*/
 20143         
  2566 	break;
 20144     }/*function_uint_to_dt*/
  2567 
 20145     break;
  2568 /****
 20146 
  2569  *DINT_TO_ULINT
 20147 /****
  2570  */
 20148  *UDINT_TO_REAL
  2571 	case function_dint_to_ulint :
 20149  */
  2572 	{
 20150     case function_udint_to_real :
  2573 		symbol_c *last_type_symbol = NULL;
 20151     {
  2574 
 20152         symbol_c *last_type_symbol = NULL;
  2575 		{
 20153 
  2576 			identifier_c param_name("IN");
 20154         {
  2577 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20155             symbol_c *IN_type_symbol = param_data_type;
  2578 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20156             last_type_symbol = param_data_type;
  2579 			
 20157             
  2580 			/* Get the value from a foo(<param_value>) style call */
 20158             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  2581 			if (IN_param_value == NULL)
 20159             {
  2582 			  IN_param_value = function_call_param_iterator.next();
 20160         
  2583 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2584 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20162                 return return_type_symbol;
  2585 			
 20163                 
  2586 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20164             }
  2587 			{
 20165             
  2588 		
 20166             ERROR;
  2589 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 20167         }
  2590 				return return_type_symbol;
 20168         
  2591 				
 20169     }/*function_udint_to_real*/
  2592 			}
 20170     break;
  2593 			
 20171 
  2594 			ERROR;
 20172 /****
  2595 		}
 20173  *UDINT_TO_LREAL
  2596 		
 20174  */
  2597 	}/*function_dint_to_ulint*/
 20175     case function_udint_to_lreal :
  2598 	break;
 20176     {
  2599 
 20177         symbol_c *last_type_symbol = NULL;
  2600 /****
 20178 
  2601  *DINT_TO_BOOL
 20179         {
  2602  */
 20180             symbol_c *IN_type_symbol = param_data_type;
  2603 	case function_dint_to_bool :
 20181             last_type_symbol = param_data_type;
  2604 	{
 20182             
  2605 		symbol_c *last_type_symbol = NULL;
 20183             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  2606 
 20184             {
  2607 		{
 20185         
  2608 			identifier_c param_name("IN");
 20186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2609 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20187                 return return_type_symbol;
  2610 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20188                 
  2611 			
 20189             }
  2612 			/* Get the value from a foo(<param_value>) style call */
 20190             
  2613 			if (IN_param_value == NULL)
 20191             ERROR;
  2614 			  IN_param_value = function_call_param_iterator.next();
 20192         }
  2615 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20193         
  2616 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20194     }/*function_udint_to_lreal*/
  2617 			
 20195     break;
  2618 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20196 
  2619 			{
 20197 /****
  2620 		
 20198  *UDINT_TO_SINT
  2621 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 20199  */
  2622 				return return_type_symbol;
 20200     case function_udint_to_sint :
  2623 				
 20201     {
  2624 			}
 20202         symbol_c *last_type_symbol = NULL;
  2625 			
 20203 
  2626 			ERROR;
 20204         {
  2627 		}
 20205             symbol_c *IN_type_symbol = param_data_type;
  2628 		
 20206             last_type_symbol = param_data_type;
  2629 	}/*function_dint_to_bool*/
 20207             
  2630 	break;
 20208             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  2631 
 20209             {
  2632 /****
 20210         
  2633  *DINT_TO_TIME
 20211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2634  */
 20212                 return return_type_symbol;
  2635 	case function_dint_to_time :
 20213                 
  2636 	{
 20214             }
  2637 		symbol_c *last_type_symbol = NULL;
 20215             
  2638 
 20216             ERROR;
  2639 		{
 20217         }
  2640 			identifier_c param_name("IN");
 20218         
  2641 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20219     }/*function_udint_to_sint*/
  2642 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20220     break;
  2643 			
 20221 
  2644 			/* Get the value from a foo(<param_value>) style call */
 20222 /****
  2645 			if (IN_param_value == NULL)
 20223  *UDINT_TO_INT
  2646 			  IN_param_value = function_call_param_iterator.next();
 20224  */
  2647 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20225     case function_udint_to_int :
  2648 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20226     {
  2649 			
 20227         symbol_c *last_type_symbol = NULL;
  2650 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20228 
  2651 			{
 20229         {
  2652 		
 20230             symbol_c *IN_type_symbol = param_data_type;
  2653 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 20231             last_type_symbol = param_data_type;
  2654 				return return_type_symbol;
 20232             
  2655 				
 20233             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  2656 			}
 20234             {
  2657 			
 20235         
  2658 			ERROR;
 20236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2659 		}
 20237                 return return_type_symbol;
  2660 		
 20238                 
  2661 	}/*function_dint_to_time*/
 20239             }
  2662 	break;
 20240             
  2663 
 20241             ERROR;
  2664 /****
 20242         }
  2665  *DINT_TO_INT
 20243         
  2666  */
 20244     }/*function_udint_to_int*/
  2667 	case function_dint_to_int :
 20245     break;
  2668 	{
 20246 
  2669 		symbol_c *last_type_symbol = NULL;
 20247 /****
  2670 
 20248  *UDINT_TO_DINT
  2671 		{
 20249  */
  2672 			identifier_c param_name("IN");
 20250     case function_udint_to_dint :
  2673 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 20251     {
  2674 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 20252         symbol_c *last_type_symbol = NULL;
  2675 			
 20253 
  2676 			/* Get the value from a foo(<param_value>) style call */
 20254         {
  2677 			if (IN_param_value == NULL)
 20255             symbol_c *IN_type_symbol = param_data_type;
  2678 			  IN_param_value = function_call_param_iterator.next();
 20256             last_type_symbol = param_data_type;
  2679 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 20257             
  2680 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 20258             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  2681 			
 20259             {
  2682 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 20260         
  2683 			{
 20261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2684 		
 20262                 return return_type_symbol;
  2685 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 20263                 
  2686 				return return_type_symbol;
 20264             }
  2687 				
 20265             
  2688 			}
 20266             ERROR;
  2689 			
 20267         }
  2690 			ERROR;
 20268         
  2691 		}
 20269     }/*function_udint_to_dint*/
  2692 		
 20270     break;
  2693 	}/*function_dint_to_int*/
 20271 
  2694 	break;
 20272 /****
       
 20273  *UDINT_TO_LINT
       
 20274  */
       
 20275     case function_udint_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20284             {
       
 20285         
       
 20286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20287                 return return_type_symbol;
       
 20288                 
       
 20289             }
       
 20290             
       
 20291             ERROR;
       
 20292         }
       
 20293         
       
 20294     }/*function_udint_to_lint*/
       
 20295     break;
       
 20296 
       
 20297 /****
       
 20298  *UDINT_TO_USINT
       
 20299  */
       
 20300     case function_udint_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20309             {
       
 20310         
       
 20311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20312                 return return_type_symbol;
       
 20313                 
       
 20314             }
       
 20315             
       
 20316             ERROR;
       
 20317         }
       
 20318         
       
 20319     }/*function_udint_to_usint*/
       
 20320     break;
       
 20321 
       
 20322 /****
       
 20323  *UDINT_TO_UINT
       
 20324  */
       
 20325     case function_udint_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20334             {
       
 20335         
       
 20336                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20337                 return return_type_symbol;
       
 20338                 
       
 20339             }
       
 20340             
       
 20341             ERROR;
       
 20342         }
       
 20343         
       
 20344     }/*function_udint_to_uint*/
       
 20345     break;
       
 20346 
       
 20347 /****
       
 20348  *UDINT_TO_ULINT
       
 20349  */
       
 20350     case function_udint_to_ulint :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20359             {
       
 20360         
       
 20361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20362                 return return_type_symbol;
       
 20363                 
       
 20364             }
       
 20365             
       
 20366             ERROR;
       
 20367         }
       
 20368         
       
 20369     }/*function_udint_to_ulint*/
       
 20370     break;
       
 20371 
       
 20372 /****
       
 20373  *UDINT_TO_TIME
       
 20374  */
       
 20375     case function_udint_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20384             {
       
 20385         
       
 20386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20387                 return return_type_symbol;
       
 20388                 
       
 20389             }
       
 20390             
       
 20391             ERROR;
       
 20392         }
       
 20393         
       
 20394     }/*function_udint_to_time*/
       
 20395     break;
       
 20396 
       
 20397 /****
       
 20398  *UDINT_TO_BOOL
       
 20399  */
       
 20400     case function_udint_to_bool :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20409             {
       
 20410         
       
 20411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20412                 return return_type_symbol;
       
 20413                 
       
 20414             }
       
 20415             
       
 20416             ERROR;
       
 20417         }
       
 20418         
       
 20419     }/*function_udint_to_bool*/
       
 20420     break;
       
 20421 
       
 20422 /****
       
 20423  *UDINT_TO_BYTE
       
 20424  */
       
 20425     case function_udint_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 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_udint_to_byte*/
       
 20445     break;
       
 20446 
       
 20447 /****
       
 20448  *UDINT_TO_WORD
       
 20449  */
       
 20450     case function_udint_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 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_udint_to_word*/
       
 20470     break;
       
 20471 
       
 20472 /****
       
 20473  *UDINT_TO_DWORD
       
 20474  */
       
 20475     case function_udint_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 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_udint_to_dword*/
       
 20495     break;
       
 20496 
       
 20497 /****
       
 20498  *UDINT_TO_LWORD
       
 20499  */
       
 20500     case function_udint_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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 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_udint_to_lword*/
       
 20520     break;
       
 20521 
       
 20522 /****
       
 20523  *UDINT_TO_STRING
       
 20524  */
       
 20525     case function_udint_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20534             {
       
 20535         
       
 20536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20537                 return return_type_symbol;
       
 20538                 
       
 20539             }
       
 20540             
       
 20541             ERROR;
       
 20542         }
       
 20543         
       
 20544     }/*function_udint_to_string*/
       
 20545     break;
       
 20546 
       
 20547 /****
       
 20548  *UDINT_TO_WSTRING
       
 20549  */
       
 20550     case function_udint_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20559             {
       
 20560         
       
 20561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 20562                 return return_type_symbol;
       
 20563                 
       
 20564             }
       
 20565             
       
 20566             ERROR;
       
 20567         }
       
 20568         
       
 20569     }/*function_udint_to_wstring*/
       
 20570     break;
       
 20571 
       
 20572 /****
       
 20573  *UDINT_TO_DATE
       
 20574  */
       
 20575     case function_udint_to_date :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20584             {
       
 20585         
       
 20586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20587                 return return_type_symbol;
       
 20588                 
       
 20589             }
       
 20590             
       
 20591             ERROR;
       
 20592         }
       
 20593         
       
 20594     }/*function_udint_to_date*/
       
 20595     break;
       
 20596 
       
 20597 /****
       
 20598  *UDINT_TO_TOD
       
 20599  */
       
 20600     case function_udint_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20609             {
       
 20610         
       
 20611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20612                 return return_type_symbol;
       
 20613                 
       
 20614             }
       
 20615             
       
 20616             ERROR;
       
 20617         }
       
 20618         
       
 20619     }/*function_udint_to_tod*/
       
 20620     break;
       
 20621 
       
 20622 /****
       
 20623  *UDINT_TO_DT
       
 20624  */
       
 20625     case function_udint_to_dt :
       
 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 (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20634             {
       
 20635         
       
 20636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20637                 return return_type_symbol;
       
 20638                 
       
 20639             }
       
 20640             
       
 20641             ERROR;
       
 20642         }
       
 20643         
       
 20644     }/*function_udint_to_dt*/
       
 20645     break;
       
 20646 
       
 20647 /****
       
 20648  *ULINT_TO_REAL
       
 20649  */
       
 20650     case function_ulint_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20659             {
       
 20660         
       
 20661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20662                 return return_type_symbol;
       
 20663                 
       
 20664             }
       
 20665             
       
 20666             ERROR;
       
 20667         }
       
 20668         
       
 20669     }/*function_ulint_to_real*/
       
 20670     break;
       
 20671 
       
 20672 /****
       
 20673  *ULINT_TO_LREAL
       
 20674  */
       
 20675     case function_ulint_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20684             {
       
 20685         
       
 20686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20687                 return return_type_symbol;
       
 20688                 
       
 20689             }
       
 20690             
       
 20691             ERROR;
       
 20692         }
       
 20693         
       
 20694     }/*function_ulint_to_lreal*/
       
 20695     break;
       
 20696 
       
 20697 /****
       
 20698  *ULINT_TO_SINT
       
 20699  */
       
 20700     case function_ulint_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20709             {
       
 20710         
       
 20711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20712                 return return_type_symbol;
       
 20713                 
       
 20714             }
       
 20715             
       
 20716             ERROR;
       
 20717         }
       
 20718         
       
 20719     }/*function_ulint_to_sint*/
       
 20720     break;
       
 20721 
       
 20722 /****
       
 20723  *ULINT_TO_INT
       
 20724  */
       
 20725     case function_ulint_to_int :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20734             {
       
 20735         
       
 20736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20737                 return return_type_symbol;
       
 20738                 
       
 20739             }
       
 20740             
       
 20741             ERROR;
       
 20742         }
       
 20743         
       
 20744     }/*function_ulint_to_int*/
       
 20745     break;
       
 20746 
       
 20747 /****
       
 20748  *ULINT_TO_DINT
       
 20749  */
       
 20750     case function_ulint_to_dint :
       
 20751     {
       
 20752         symbol_c *last_type_symbol = NULL;
       
 20753 
       
 20754         {
       
 20755             symbol_c *IN_type_symbol = param_data_type;
       
 20756             last_type_symbol = param_data_type;
       
 20757             
       
 20758             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20759             {
       
 20760         
       
 20761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20762                 return return_type_symbol;
       
 20763                 
       
 20764             }
       
 20765             
       
 20766             ERROR;
       
 20767         }
       
 20768         
       
 20769     }/*function_ulint_to_dint*/
       
 20770     break;
       
 20771 
       
 20772 /****
       
 20773  *ULINT_TO_LINT
       
 20774  */
       
 20775     case function_ulint_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20784             {
       
 20785         
       
 20786                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20787                 return return_type_symbol;
       
 20788                 
       
 20789             }
       
 20790             
       
 20791             ERROR;
       
 20792         }
       
 20793         
       
 20794     }/*function_ulint_to_lint*/
       
 20795     break;
       
 20796 
       
 20797 /****
       
 20798  *ULINT_TO_USINT
       
 20799  */
       
 20800     case function_ulint_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20809             {
       
 20810         
       
 20811                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20812                 return return_type_symbol;
       
 20813                 
       
 20814             }
       
 20815             
       
 20816             ERROR;
       
 20817         }
       
 20818         
       
 20819     }/*function_ulint_to_usint*/
       
 20820     break;
       
 20821 
       
 20822 /****
       
 20823  *ULINT_TO_UINT
       
 20824  */
       
 20825     case function_ulint_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20834             {
       
 20835         
       
 20836                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20837                 return return_type_symbol;
       
 20838                 
       
 20839             }
       
 20840             
       
 20841             ERROR;
       
 20842         }
       
 20843         
       
 20844     }/*function_ulint_to_uint*/
       
 20845     break;
       
 20846 
       
 20847 /****
       
 20848  *ULINT_TO_UDINT
       
 20849  */
       
 20850     case function_ulint_to_udint :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20859             {
       
 20860         
       
 20861                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20862                 return return_type_symbol;
       
 20863                 
       
 20864             }
       
 20865             
       
 20866             ERROR;
       
 20867         }
       
 20868         
       
 20869     }/*function_ulint_to_udint*/
       
 20870     break;
       
 20871 
       
 20872 /****
       
 20873  *ULINT_TO_TIME
       
 20874  */
       
 20875     case function_ulint_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20884             {
       
 20885         
       
 20886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20887                 return return_type_symbol;
       
 20888                 
       
 20889             }
       
 20890             
       
 20891             ERROR;
       
 20892         }
       
 20893         
       
 20894     }/*function_ulint_to_time*/
       
 20895     break;
       
 20896 
       
 20897 /****
       
 20898  *ULINT_TO_BOOL
       
 20899  */
       
 20900     case function_ulint_to_bool :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20909             {
       
 20910         
       
 20911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20912                 return return_type_symbol;
       
 20913                 
       
 20914             }
       
 20915             
       
 20916             ERROR;
       
 20917         }
       
 20918         
       
 20919     }/*function_ulint_to_bool*/
       
 20920     break;
       
 20921 
       
 20922 /****
       
 20923  *ULINT_TO_BYTE
       
 20924  */
       
 20925     case function_ulint_to_byte :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20934             {
       
 20935         
       
 20936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20937                 return return_type_symbol;
       
 20938                 
       
 20939             }
       
 20940             
       
 20941             ERROR;
       
 20942         }
       
 20943         
       
 20944     }/*function_ulint_to_byte*/
       
 20945     break;
       
 20946 
       
 20947 /****
       
 20948  *ULINT_TO_WORD
       
 20949  */
       
 20950     case function_ulint_to_word :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20959             {
       
 20960         
       
 20961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20962                 return return_type_symbol;
       
 20963                 
       
 20964             }
       
 20965             
       
 20966             ERROR;
       
 20967         }
       
 20968         
       
 20969     }/*function_ulint_to_word*/
       
 20970     break;
       
 20971 
       
 20972 /****
       
 20973  *ULINT_TO_DWORD
       
 20974  */
       
 20975     case function_ulint_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20984             {
       
 20985         
       
 20986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20987                 return return_type_symbol;
       
 20988                 
       
 20989             }
       
 20990             
       
 20991             ERROR;
       
 20992         }
       
 20993         
       
 20994     }/*function_ulint_to_dword*/
       
 20995     break;
       
 20996 
       
 20997 /****
       
 20998  *ULINT_TO_LWORD
       
 20999  */
       
 21000     case function_ulint_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21009             {
       
 21010         
       
 21011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21012                 return return_type_symbol;
       
 21013                 
       
 21014             }
       
 21015             
       
 21016             ERROR;
       
 21017         }
       
 21018         
       
 21019     }/*function_ulint_to_lword*/
       
 21020     break;
       
 21021 
       
 21022 /****
       
 21023  *ULINT_TO_STRING
       
 21024  */
       
 21025     case function_ulint_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21034             {
       
 21035         
       
 21036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21037                 return return_type_symbol;
       
 21038                 
       
 21039             }
       
 21040             
       
 21041             ERROR;
       
 21042         }
       
 21043         
       
 21044     }/*function_ulint_to_string*/
       
 21045     break;
       
 21046 
       
 21047 /****
       
 21048  *ULINT_TO_WSTRING
       
 21049  */
       
 21050     case function_ulint_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21059             {
       
 21060         
       
 21061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21062                 return return_type_symbol;
       
 21063                 
       
 21064             }
       
 21065             
       
 21066             ERROR;
       
 21067         }
       
 21068         
       
 21069     }/*function_ulint_to_wstring*/
       
 21070     break;
       
 21071 
       
 21072 /****
       
 21073  *ULINT_TO_DATE
       
 21074  */
       
 21075     case function_ulint_to_date :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21084             {
       
 21085         
       
 21086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21087                 return return_type_symbol;
       
 21088                 
       
 21089             }
       
 21090             
       
 21091             ERROR;
       
 21092         }
       
 21093         
       
 21094     }/*function_ulint_to_date*/
       
 21095     break;
       
 21096 
       
 21097 /****
       
 21098  *ULINT_TO_TOD
       
 21099  */
       
 21100     case function_ulint_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21109             {
       
 21110         
       
 21111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21112                 return return_type_symbol;
       
 21113                 
       
 21114             }
       
 21115             
       
 21116             ERROR;
       
 21117         }
       
 21118         
       
 21119     }/*function_ulint_to_tod*/
       
 21120     break;
       
 21121 
       
 21122 /****
       
 21123  *ULINT_TO_DT
       
 21124  */
       
 21125     case function_ulint_to_dt :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21134             {
       
 21135         
       
 21136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21137                 return return_type_symbol;
       
 21138                 
       
 21139             }
       
 21140             
       
 21141             ERROR;
       
 21142         }
       
 21143         
       
 21144     }/*function_ulint_to_dt*/
       
 21145     break;
       
 21146 
       
 21147 /****
       
 21148  *TIME_TO_REAL
       
 21149  */
       
 21150     case function_time_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21159             {
       
 21160         
       
 21161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21162                 return return_type_symbol;
       
 21163                 
       
 21164             }
       
 21165             
       
 21166             ERROR;
       
 21167         }
       
 21168         
       
 21169     }/*function_time_to_real*/
       
 21170     break;
       
 21171 
       
 21172 /****
       
 21173  *TIME_TO_LREAL
       
 21174  */
       
 21175     case function_time_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21184             {
       
 21185         
       
 21186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21187                 return return_type_symbol;
       
 21188                 
       
 21189             }
       
 21190             
       
 21191             ERROR;
       
 21192         }
       
 21193         
       
 21194     }/*function_time_to_lreal*/
       
 21195     break;
       
 21196 
       
 21197 /****
       
 21198  *TIME_TO_SINT
       
 21199  */
       
 21200     case function_time_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21209             {
       
 21210         
       
 21211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21212                 return return_type_symbol;
       
 21213                 
       
 21214             }
       
 21215             
       
 21216             ERROR;
       
 21217         }
       
 21218         
       
 21219     }/*function_time_to_sint*/
       
 21220     break;
       
 21221 
       
 21222 /****
       
 21223  *TIME_TO_INT
       
 21224  */
       
 21225     case function_time_to_int :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21234             {
       
 21235         
       
 21236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21237                 return return_type_symbol;
       
 21238                 
       
 21239             }
       
 21240             
       
 21241             ERROR;
       
 21242         }
       
 21243         
       
 21244     }/*function_time_to_int*/
       
 21245     break;
       
 21246 
       
 21247 /****
       
 21248  *TIME_TO_DINT
       
 21249  */
       
 21250     case function_time_to_dint :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21259             {
       
 21260         
       
 21261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21262                 return return_type_symbol;
       
 21263                 
       
 21264             }
       
 21265             
       
 21266             ERROR;
       
 21267         }
       
 21268         
       
 21269     }/*function_time_to_dint*/
       
 21270     break;
       
 21271 
       
 21272 /****
       
 21273  *TIME_TO_LINT
       
 21274  */
       
 21275     case function_time_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21284             {
       
 21285         
       
 21286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21287                 return return_type_symbol;
       
 21288                 
       
 21289             }
       
 21290             
       
 21291             ERROR;
       
 21292         }
       
 21293         
       
 21294     }/*function_time_to_lint*/
       
 21295     break;
       
 21296 
       
 21297 /****
       
 21298  *TIME_TO_USINT
       
 21299  */
       
 21300     case function_time_to_usint :
       
 21301     {
       
 21302         symbol_c *last_type_symbol = NULL;
       
 21303 
       
 21304         {
       
 21305             symbol_c *IN_type_symbol = param_data_type;
       
 21306             last_type_symbol = param_data_type;
       
 21307             
       
 21308             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21309             {
       
 21310         
       
 21311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21312                 return return_type_symbol;
       
 21313                 
       
 21314             }
       
 21315             
       
 21316             ERROR;
       
 21317         }
       
 21318         
       
 21319     }/*function_time_to_usint*/
       
 21320     break;
       
 21321 
       
 21322 /****
       
 21323  *TIME_TO_UINT
       
 21324  */
       
 21325     case function_time_to_uint :
       
 21326     {
       
 21327         symbol_c *last_type_symbol = NULL;
       
 21328 
       
 21329         {
       
 21330             symbol_c *IN_type_symbol = param_data_type;
       
 21331             last_type_symbol = param_data_type;
       
 21332             
       
 21333             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21334             {
       
 21335         
       
 21336                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21337                 return return_type_symbol;
       
 21338                 
       
 21339             }
       
 21340             
       
 21341             ERROR;
       
 21342         }
       
 21343         
       
 21344     }/*function_time_to_uint*/
       
 21345     break;
       
 21346 
       
 21347 /****
       
 21348  *TIME_TO_UDINT
       
 21349  */
       
 21350     case function_time_to_udint :
       
 21351     {
       
 21352         symbol_c *last_type_symbol = NULL;
       
 21353 
       
 21354         {
       
 21355             symbol_c *IN_type_symbol = param_data_type;
       
 21356             last_type_symbol = param_data_type;
       
 21357             
       
 21358             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21359             {
       
 21360         
       
 21361                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21362                 return return_type_symbol;
       
 21363                 
       
 21364             }
       
 21365             
       
 21366             ERROR;
       
 21367         }
       
 21368         
       
 21369     }/*function_time_to_udint*/
       
 21370     break;
       
 21371 
       
 21372 /****
       
 21373  *TIME_TO_ULINT
       
 21374  */
       
 21375     case function_time_to_ulint :
       
 21376     {
       
 21377         symbol_c *last_type_symbol = NULL;
       
 21378 
       
 21379         {
       
 21380             symbol_c *IN_type_symbol = param_data_type;
       
 21381             last_type_symbol = param_data_type;
       
 21382             
       
 21383             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21384             {
       
 21385         
       
 21386                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21387                 return return_type_symbol;
       
 21388                 
       
 21389             }
       
 21390             
       
 21391             ERROR;
       
 21392         }
       
 21393         
       
 21394     }/*function_time_to_ulint*/
       
 21395     break;
       
 21396 
       
 21397 /****
       
 21398  *TIME_TO_BOOL
       
 21399  */
       
 21400     case function_time_to_bool :
       
 21401     {
       
 21402         symbol_c *last_type_symbol = NULL;
       
 21403 
       
 21404         {
       
 21405             symbol_c *IN_type_symbol = param_data_type;
       
 21406             last_type_symbol = param_data_type;
       
 21407             
       
 21408             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21409             {
       
 21410         
       
 21411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21412                 return return_type_symbol;
       
 21413                 
       
 21414             }
       
 21415             
       
 21416             ERROR;
       
 21417         }
       
 21418         
       
 21419     }/*function_time_to_bool*/
       
 21420     break;
       
 21421 
       
 21422 /****
       
 21423  *TIME_TO_BYTE
       
 21424  */
       
 21425     case function_time_to_byte :
       
 21426     {
       
 21427         symbol_c *last_type_symbol = NULL;
       
 21428 
       
 21429         {
       
 21430             symbol_c *IN_type_symbol = param_data_type;
       
 21431             last_type_symbol = param_data_type;
       
 21432             
       
 21433             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21434             {
       
 21435         
       
 21436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21437                 return return_type_symbol;
       
 21438                 
       
 21439             }
       
 21440             
       
 21441             ERROR;
       
 21442         }
       
 21443         
       
 21444     }/*function_time_to_byte*/
       
 21445     break;
       
 21446 
       
 21447 /****
       
 21448  *TIME_TO_WORD
       
 21449  */
       
 21450     case function_time_to_word :
       
 21451     {
       
 21452         symbol_c *last_type_symbol = NULL;
       
 21453 
       
 21454         {
       
 21455             symbol_c *IN_type_symbol = param_data_type;
       
 21456             last_type_symbol = param_data_type;
       
 21457             
       
 21458             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21459             {
       
 21460         
       
 21461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21462                 return return_type_symbol;
       
 21463                 
       
 21464             }
       
 21465             
       
 21466             ERROR;
       
 21467         }
       
 21468         
       
 21469     }/*function_time_to_word*/
       
 21470     break;
       
 21471 
       
 21472 /****
       
 21473  *TIME_TO_DWORD
       
 21474  */
       
 21475     case function_time_to_dword :
       
 21476     {
       
 21477         symbol_c *last_type_symbol = NULL;
       
 21478 
       
 21479         {
       
 21480             symbol_c *IN_type_symbol = param_data_type;
       
 21481             last_type_symbol = param_data_type;
       
 21482             
       
 21483             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21484             {
       
 21485         
       
 21486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21487                 return return_type_symbol;
       
 21488                 
       
 21489             }
       
 21490             
       
 21491             ERROR;
       
 21492         }
       
 21493         
       
 21494     }/*function_time_to_dword*/
       
 21495     break;
       
 21496 
       
 21497 /****
       
 21498  *TIME_TO_LWORD
       
 21499  */
       
 21500     case function_time_to_lword :
       
 21501     {
       
 21502         symbol_c *last_type_symbol = NULL;
       
 21503 
       
 21504         {
       
 21505             symbol_c *IN_type_symbol = param_data_type;
       
 21506             last_type_symbol = param_data_type;
       
 21507             
       
 21508             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21509             {
       
 21510         
       
 21511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21512                 return return_type_symbol;
       
 21513                 
       
 21514             }
       
 21515             
       
 21516             ERROR;
       
 21517         }
       
 21518         
       
 21519     }/*function_time_to_lword*/
       
 21520     break;
       
 21521 
       
 21522 /****
       
 21523  *TIME_TO_STRING
       
 21524  */
       
 21525     case function_time_to_string :
       
 21526     {
       
 21527         symbol_c *last_type_symbol = NULL;
       
 21528 
       
 21529         {
       
 21530             symbol_c *IN_type_symbol = param_data_type;
       
 21531             last_type_symbol = param_data_type;
       
 21532             
       
 21533             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21534             {
       
 21535         
       
 21536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21537                 return return_type_symbol;
       
 21538                 
       
 21539             }
       
 21540             
       
 21541             ERROR;
       
 21542         }
       
 21543         
       
 21544     }/*function_time_to_string*/
       
 21545     break;
       
 21546 
       
 21547 /****
       
 21548  *TIME_TO_WSTRING
       
 21549  */
       
 21550     case function_time_to_wstring :
       
 21551     {
       
 21552         symbol_c *last_type_symbol = NULL;
       
 21553 
       
 21554         {
       
 21555             symbol_c *IN_type_symbol = param_data_type;
       
 21556             last_type_symbol = param_data_type;
       
 21557             
       
 21558             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21559             {
       
 21560         
       
 21561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21562                 return return_type_symbol;
       
 21563                 
       
 21564             }
       
 21565             
       
 21566             ERROR;
       
 21567         }
       
 21568         
       
 21569     }/*function_time_to_wstring*/
       
 21570     break;
       
 21571 
       
 21572 /****
       
 21573  *BOOL_TO_REAL
       
 21574  */
       
 21575     case function_bool_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21584             {
       
 21585         
       
 21586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21587                 return return_type_symbol;
       
 21588                 
       
 21589             }
       
 21590             
       
 21591             ERROR;
       
 21592         }
       
 21593         
       
 21594     }/*function_bool_to_real*/
       
 21595     break;
       
 21596 
       
 21597 /****
       
 21598  *BOOL_TO_LREAL
       
 21599  */
       
 21600     case function_bool_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21609             {
       
 21610         
       
 21611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21612                 return return_type_symbol;
       
 21613                 
       
 21614             }
       
 21615             
       
 21616             ERROR;
       
 21617         }
       
 21618         
       
 21619     }/*function_bool_to_lreal*/
       
 21620     break;
       
 21621 
       
 21622 /****
       
 21623  *BOOL_TO_SINT
       
 21624  */
       
 21625     case function_bool_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21634             {
       
 21635         
       
 21636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21637                 return return_type_symbol;
       
 21638                 
       
 21639             }
       
 21640             
       
 21641             ERROR;
       
 21642         }
       
 21643         
       
 21644     }/*function_bool_to_sint*/
       
 21645     break;
       
 21646 
       
 21647 /****
       
 21648  *BOOL_TO_INT
       
 21649  */
       
 21650     case function_bool_to_int :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21659             {
       
 21660         
       
 21661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21662                 return return_type_symbol;
       
 21663                 
       
 21664             }
       
 21665             
       
 21666             ERROR;
       
 21667         }
       
 21668         
       
 21669     }/*function_bool_to_int*/
       
 21670     break;
       
 21671 
       
 21672 /****
       
 21673  *BOOL_TO_DINT
       
 21674  */
       
 21675     case function_bool_to_dint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21684             {
       
 21685         
       
 21686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21687                 return return_type_symbol;
       
 21688                 
       
 21689             }
       
 21690             
       
 21691             ERROR;
       
 21692         }
       
 21693         
       
 21694     }/*function_bool_to_dint*/
       
 21695     break;
       
 21696 
       
 21697 /****
       
 21698  *BOOL_TO_LINT
       
 21699  */
       
 21700     case function_bool_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21709             {
       
 21710         
       
 21711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21712                 return return_type_symbol;
       
 21713                 
       
 21714             }
       
 21715             
       
 21716             ERROR;
       
 21717         }
       
 21718         
       
 21719     }/*function_bool_to_lint*/
       
 21720     break;
       
 21721 
       
 21722 /****
       
 21723  *BOOL_TO_USINT
       
 21724  */
       
 21725     case function_bool_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21734             {
       
 21735         
       
 21736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21737                 return return_type_symbol;
       
 21738                 
       
 21739             }
       
 21740             
       
 21741             ERROR;
       
 21742         }
       
 21743         
       
 21744     }/*function_bool_to_usint*/
       
 21745     break;
       
 21746 
       
 21747 /****
       
 21748  *BOOL_TO_UINT
       
 21749  */
       
 21750     case function_bool_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21759             {
       
 21760         
       
 21761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21762                 return return_type_symbol;
       
 21763                 
       
 21764             }
       
 21765             
       
 21766             ERROR;
       
 21767         }
       
 21768         
       
 21769     }/*function_bool_to_uint*/
       
 21770     break;
       
 21771 
       
 21772 /****
       
 21773  *BOOL_TO_UDINT
       
 21774  */
       
 21775     case function_bool_to_udint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21784             {
       
 21785         
       
 21786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21787                 return return_type_symbol;
       
 21788                 
       
 21789             }
       
 21790             
       
 21791             ERROR;
       
 21792         }
       
 21793         
       
 21794     }/*function_bool_to_udint*/
       
 21795     break;
       
 21796 
       
 21797 /****
       
 21798  *BOOL_TO_ULINT
       
 21799  */
       
 21800     case function_bool_to_ulint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21809             {
       
 21810         
       
 21811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21812                 return return_type_symbol;
       
 21813                 
       
 21814             }
       
 21815             
       
 21816             ERROR;
       
 21817         }
       
 21818         
       
 21819     }/*function_bool_to_ulint*/
       
 21820     break;
       
 21821 
       
 21822 /****
       
 21823  *BOOL_TO_TIME
       
 21824  */
       
 21825     case function_bool_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21834             {
       
 21835         
       
 21836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21837                 return return_type_symbol;
       
 21838                 
       
 21839             }
       
 21840             
       
 21841             ERROR;
       
 21842         }
       
 21843         
       
 21844     }/*function_bool_to_time*/
       
 21845     break;
       
 21846 
       
 21847 /****
       
 21848  *BOOL_TO_BYTE
       
 21849  */
       
 21850     case function_bool_to_byte :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21859             {
       
 21860         
       
 21861                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21862                 return return_type_symbol;
       
 21863                 
       
 21864             }
       
 21865             
       
 21866             ERROR;
       
 21867         }
       
 21868         
       
 21869     }/*function_bool_to_byte*/
       
 21870     break;
       
 21871 
       
 21872 /****
       
 21873  *BOOL_TO_WORD
       
 21874  */
       
 21875     case function_bool_to_word :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21884             {
       
 21885         
       
 21886                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21887                 return return_type_symbol;
       
 21888                 
       
 21889             }
       
 21890             
       
 21891             ERROR;
       
 21892         }
       
 21893         
       
 21894     }/*function_bool_to_word*/
       
 21895     break;
       
 21896 
       
 21897 /****
       
 21898  *BOOL_TO_DWORD
       
 21899  */
       
 21900     case function_bool_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21909             {
       
 21910         
       
 21911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21912                 return return_type_symbol;
       
 21913                 
       
 21914             }
       
 21915             
       
 21916             ERROR;
       
 21917         }
       
 21918         
       
 21919     }/*function_bool_to_dword*/
       
 21920     break;
       
 21921 
       
 21922 /****
       
 21923  *BOOL_TO_LWORD
       
 21924  */
       
 21925     case function_bool_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21934             {
       
 21935         
       
 21936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21937                 return return_type_symbol;
       
 21938                 
       
 21939             }
       
 21940             
       
 21941             ERROR;
       
 21942         }
       
 21943         
       
 21944     }/*function_bool_to_lword*/
       
 21945     break;
       
 21946 
       
 21947 /****
       
 21948  *BOOL_TO_STRING
       
 21949  */
       
 21950     case function_bool_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21959             {
       
 21960         
       
 21961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21962                 return return_type_symbol;
       
 21963                 
       
 21964             }
       
 21965             
       
 21966             ERROR;
       
 21967         }
       
 21968         
       
 21969     }/*function_bool_to_string*/
       
 21970     break;
       
 21971 
       
 21972 /****
       
 21973  *BOOL_TO_WSTRING
       
 21974  */
       
 21975     case function_bool_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21984             {
       
 21985         
       
 21986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21987                 return return_type_symbol;
       
 21988                 
       
 21989             }
       
 21990             
       
 21991             ERROR;
       
 21992         }
       
 21993         
       
 21994     }/*function_bool_to_wstring*/
       
 21995     break;
       
 21996 
       
 21997 /****
       
 21998  *BOOL_TO_DATE
       
 21999  */
       
 22000     case function_bool_to_date :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22009             {
       
 22010         
       
 22011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22012                 return return_type_symbol;
       
 22013                 
       
 22014             }
       
 22015             
       
 22016             ERROR;
       
 22017         }
       
 22018         
       
 22019     }/*function_bool_to_date*/
       
 22020     break;
       
 22021 
       
 22022 /****
       
 22023  *BOOL_TO_TOD
       
 22024  */
       
 22025     case function_bool_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22034             {
       
 22035         
       
 22036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22037                 return return_type_symbol;
       
 22038                 
       
 22039             }
       
 22040             
       
 22041             ERROR;
       
 22042         }
       
 22043         
       
 22044     }/*function_bool_to_tod*/
       
 22045     break;
       
 22046 
       
 22047 /****
       
 22048  *BOOL_TO_DT
       
 22049  */
       
 22050     case function_bool_to_dt :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22059             {
       
 22060         
       
 22061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22062                 return return_type_symbol;
       
 22063                 
       
 22064             }
       
 22065             
       
 22066             ERROR;
       
 22067         }
       
 22068         
       
 22069     }/*function_bool_to_dt*/
       
 22070     break;
       
 22071 
       
 22072 /****
       
 22073  *BYTE_TO_REAL
       
 22074  */
       
 22075     case function_byte_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22084             {
       
 22085         
       
 22086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22087                 return return_type_symbol;
       
 22088                 
       
 22089             }
       
 22090             
       
 22091             ERROR;
       
 22092         }
       
 22093         
       
 22094     }/*function_byte_to_real*/
       
 22095     break;
       
 22096 
       
 22097 /****
       
 22098  *BYTE_TO_LREAL
       
 22099  */
       
 22100     case function_byte_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22109             {
       
 22110         
       
 22111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22112                 return return_type_symbol;
       
 22113                 
       
 22114             }
       
 22115             
       
 22116             ERROR;
       
 22117         }
       
 22118         
       
 22119     }/*function_byte_to_lreal*/
       
 22120     break;
       
 22121 
       
 22122 /****
       
 22123  *BYTE_TO_SINT
       
 22124  */
       
 22125     case function_byte_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22134             {
       
 22135         
       
 22136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22137                 return return_type_symbol;
       
 22138                 
       
 22139             }
       
 22140             
       
 22141             ERROR;
       
 22142         }
       
 22143         
       
 22144     }/*function_byte_to_sint*/
       
 22145     break;
       
 22146 
       
 22147 /****
       
 22148  *BYTE_TO_INT
       
 22149  */
       
 22150     case function_byte_to_int :
       
 22151     {
       
 22152         symbol_c *last_type_symbol = NULL;
       
 22153 
       
 22154         {
       
 22155             symbol_c *IN_type_symbol = param_data_type;
       
 22156             last_type_symbol = param_data_type;
       
 22157             
       
 22158             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22159             {
       
 22160         
       
 22161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22162                 return return_type_symbol;
       
 22163                 
       
 22164             }
       
 22165             
       
 22166             ERROR;
       
 22167         }
       
 22168         
       
 22169     }/*function_byte_to_int*/
       
 22170     break;
       
 22171 
       
 22172 /****
       
 22173  *BYTE_TO_DINT
       
 22174  */
       
 22175     case function_byte_to_dint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22184             {
       
 22185         
       
 22186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22187                 return return_type_symbol;
       
 22188                 
       
 22189             }
       
 22190             
       
 22191             ERROR;
       
 22192         }
       
 22193         
       
 22194     }/*function_byte_to_dint*/
       
 22195     break;
       
 22196 
       
 22197 /****
       
 22198  *BYTE_TO_LINT
       
 22199  */
       
 22200     case function_byte_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22209             {
       
 22210         
       
 22211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22212                 return return_type_symbol;
       
 22213                 
       
 22214             }
       
 22215             
       
 22216             ERROR;
       
 22217         }
       
 22218         
       
 22219     }/*function_byte_to_lint*/
       
 22220     break;
       
 22221 
       
 22222 /****
       
 22223  *BYTE_TO_USINT
       
 22224  */
       
 22225     case function_byte_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22234             {
       
 22235         
       
 22236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22237                 return return_type_symbol;
       
 22238                 
       
 22239             }
       
 22240             
       
 22241             ERROR;
       
 22242         }
       
 22243         
       
 22244     }/*function_byte_to_usint*/
       
 22245     break;
       
 22246 
       
 22247 /****
       
 22248  *BYTE_TO_UINT
       
 22249  */
       
 22250     case function_byte_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22259             {
       
 22260         
       
 22261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22262                 return return_type_symbol;
       
 22263                 
       
 22264             }
       
 22265             
       
 22266             ERROR;
       
 22267         }
       
 22268         
       
 22269     }/*function_byte_to_uint*/
       
 22270     break;
       
 22271 
       
 22272 /****
       
 22273  *BYTE_TO_UDINT
       
 22274  */
       
 22275     case function_byte_to_udint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22284             {
       
 22285         
       
 22286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22287                 return return_type_symbol;
       
 22288                 
       
 22289             }
       
 22290             
       
 22291             ERROR;
       
 22292         }
       
 22293         
       
 22294     }/*function_byte_to_udint*/
       
 22295     break;
       
 22296 
       
 22297 /****
       
 22298  *BYTE_TO_ULINT
       
 22299  */
       
 22300     case function_byte_to_ulint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22309             {
       
 22310         
       
 22311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22312                 return return_type_symbol;
       
 22313                 
       
 22314             }
       
 22315             
       
 22316             ERROR;
       
 22317         }
       
 22318         
       
 22319     }/*function_byte_to_ulint*/
       
 22320     break;
       
 22321 
       
 22322 /****
       
 22323  *BYTE_TO_TIME
       
 22324  */
       
 22325     case function_byte_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22334             {
       
 22335         
       
 22336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22337                 return return_type_symbol;
       
 22338                 
       
 22339             }
       
 22340             
       
 22341             ERROR;
       
 22342         }
       
 22343         
       
 22344     }/*function_byte_to_time*/
       
 22345     break;
       
 22346 
       
 22347 /****
       
 22348  *BYTE_TO_BOOL
       
 22349  */
       
 22350     case function_byte_to_bool :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22359             {
       
 22360         
       
 22361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22362                 return return_type_symbol;
       
 22363                 
       
 22364             }
       
 22365             
       
 22366             ERROR;
       
 22367         }
       
 22368         
       
 22369     }/*function_byte_to_bool*/
       
 22370     break;
       
 22371 
       
 22372 /****
       
 22373  *BYTE_TO_WORD
       
 22374  */
       
 22375     case function_byte_to_word :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22384             {
       
 22385         
       
 22386                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22387                 return return_type_symbol;
       
 22388                 
       
 22389             }
       
 22390             
       
 22391             ERROR;
       
 22392         }
       
 22393         
       
 22394     }/*function_byte_to_word*/
       
 22395     break;
       
 22396 
       
 22397 /****
       
 22398  *BYTE_TO_DWORD
       
 22399  */
       
 22400     case function_byte_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22409             {
       
 22410         
       
 22411                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22412                 return return_type_symbol;
       
 22413                 
       
 22414             }
       
 22415             
       
 22416             ERROR;
       
 22417         }
       
 22418         
       
 22419     }/*function_byte_to_dword*/
       
 22420     break;
       
 22421 
       
 22422 /****
       
 22423  *BYTE_TO_LWORD
       
 22424  */
       
 22425     case function_byte_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22434             {
       
 22435         
       
 22436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22437                 return return_type_symbol;
       
 22438                 
       
 22439             }
       
 22440             
       
 22441             ERROR;
       
 22442         }
       
 22443         
       
 22444     }/*function_byte_to_lword*/
       
 22445     break;
       
 22446 
       
 22447 /****
       
 22448  *BYTE_TO_STRING
       
 22449  */
       
 22450     case function_byte_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22459             {
       
 22460         
       
 22461                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22462                 return return_type_symbol;
       
 22463                 
       
 22464             }
       
 22465             
       
 22466             ERROR;
       
 22467         }
       
 22468         
       
 22469     }/*function_byte_to_string*/
       
 22470     break;
       
 22471 
       
 22472 /****
       
 22473  *BYTE_TO_WSTRING
       
 22474  */
       
 22475     case function_byte_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22484             {
       
 22485         
       
 22486                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 22487                 return return_type_symbol;
       
 22488                 
       
 22489             }
       
 22490             
       
 22491             ERROR;
       
 22492         }
       
 22493         
       
 22494     }/*function_byte_to_wstring*/
       
 22495     break;
       
 22496 
       
 22497 /****
       
 22498  *BYTE_TO_DATE
       
 22499  */
       
 22500     case function_byte_to_date :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22509             {
       
 22510         
       
 22511                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22512                 return return_type_symbol;
       
 22513                 
       
 22514             }
       
 22515             
       
 22516             ERROR;
       
 22517         }
       
 22518         
       
 22519     }/*function_byte_to_date*/
       
 22520     break;
       
 22521 
       
 22522 /****
       
 22523  *BYTE_TO_TOD
       
 22524  */
       
 22525     case function_byte_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22534             {
       
 22535         
       
 22536                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22537                 return return_type_symbol;
       
 22538                 
       
 22539             }
       
 22540             
       
 22541             ERROR;
       
 22542         }
       
 22543         
       
 22544     }/*function_byte_to_tod*/
       
 22545     break;
       
 22546 
       
 22547 /****
       
 22548  *BYTE_TO_DT
       
 22549  */
       
 22550     case function_byte_to_dt :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22559             {
       
 22560         
       
 22561                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22562                 return return_type_symbol;
       
 22563                 
       
 22564             }
       
 22565             
       
 22566             ERROR;
       
 22567         }
       
 22568         
       
 22569     }/*function_byte_to_dt*/
       
 22570     break;
       
 22571 
       
 22572 /****
       
 22573  *WORD_TO_REAL
       
 22574  */
       
 22575     case function_word_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22584             {
       
 22585         
       
 22586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22587                 return return_type_symbol;
       
 22588                 
       
 22589             }
       
 22590             
       
 22591             ERROR;
       
 22592         }
       
 22593         
       
 22594     }/*function_word_to_real*/
       
 22595     break;
       
 22596 
       
 22597 /****
       
 22598  *WORD_TO_LREAL
       
 22599  */
       
 22600     case function_word_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22609             {
       
 22610         
       
 22611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22612                 return return_type_symbol;
       
 22613                 
       
 22614             }
       
 22615             
       
 22616             ERROR;
       
 22617         }
       
 22618         
       
 22619     }/*function_word_to_lreal*/
       
 22620     break;
       
 22621 
       
 22622 /****
       
 22623  *WORD_TO_SINT
       
 22624  */
       
 22625     case function_word_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22634             {
       
 22635         
       
 22636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22637                 return return_type_symbol;
       
 22638                 
       
 22639             }
       
 22640             
       
 22641             ERROR;
       
 22642         }
       
 22643         
       
 22644     }/*function_word_to_sint*/
       
 22645     break;
       
 22646 
       
 22647 /****
       
 22648  *WORD_TO_INT
       
 22649  */
       
 22650     case function_word_to_int :
       
 22651     {
       
 22652         symbol_c *last_type_symbol = NULL;
       
 22653 
       
 22654         {
       
 22655             symbol_c *IN_type_symbol = param_data_type;
       
 22656             last_type_symbol = param_data_type;
       
 22657             
       
 22658             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22659             {
       
 22660         
       
 22661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22662                 return return_type_symbol;
       
 22663                 
       
 22664             }
       
 22665             
       
 22666             ERROR;
       
 22667         }
       
 22668         
       
 22669     }/*function_word_to_int*/
       
 22670     break;
       
 22671 
       
 22672 /****
       
 22673  *WORD_TO_DINT
       
 22674  */
       
 22675     case function_word_to_dint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22684             {
       
 22685         
       
 22686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22687                 return return_type_symbol;
       
 22688                 
       
 22689             }
       
 22690             
       
 22691             ERROR;
       
 22692         }
       
 22693         
       
 22694     }/*function_word_to_dint*/
       
 22695     break;
       
 22696 
       
 22697 /****
       
 22698  *WORD_TO_LINT
       
 22699  */
       
 22700     case function_word_to_lint :
       
 22701     {
       
 22702         symbol_c *last_type_symbol = NULL;
       
 22703 
       
 22704         {
       
 22705             symbol_c *IN_type_symbol = param_data_type;
       
 22706             last_type_symbol = param_data_type;
       
 22707             
       
 22708             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22709             {
       
 22710         
       
 22711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22712                 return return_type_symbol;
       
 22713                 
       
 22714             }
       
 22715             
       
 22716             ERROR;
       
 22717         }
       
 22718         
       
 22719     }/*function_word_to_lint*/
       
 22720     break;
       
 22721 
       
 22722 /****
       
 22723  *WORD_TO_USINT
       
 22724  */
       
 22725     case function_word_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22734             {
       
 22735         
       
 22736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22737                 return return_type_symbol;
       
 22738                 
       
 22739             }
       
 22740             
       
 22741             ERROR;
       
 22742         }
       
 22743         
       
 22744     }/*function_word_to_usint*/
       
 22745     break;
       
 22746 
       
 22747 /****
       
 22748  *WORD_TO_UINT
       
 22749  */
       
 22750     case function_word_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22759             {
       
 22760         
       
 22761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22762                 return return_type_symbol;
       
 22763                 
       
 22764             }
       
 22765             
       
 22766             ERROR;
       
 22767         }
       
 22768         
       
 22769     }/*function_word_to_uint*/
       
 22770     break;
       
 22771 
       
 22772 /****
       
 22773  *WORD_TO_UDINT
       
 22774  */
       
 22775     case function_word_to_udint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22784             {
       
 22785         
       
 22786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22787                 return return_type_symbol;
       
 22788                 
       
 22789             }
       
 22790             
       
 22791             ERROR;
       
 22792         }
       
 22793         
       
 22794     }/*function_word_to_udint*/
       
 22795     break;
       
 22796 
       
 22797 /****
       
 22798  *WORD_TO_ULINT
       
 22799  */
       
 22800     case function_word_to_ulint :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22809             {
       
 22810         
       
 22811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22812                 return return_type_symbol;
       
 22813                 
       
 22814             }
       
 22815             
       
 22816             ERROR;
       
 22817         }
       
 22818         
       
 22819     }/*function_word_to_ulint*/
       
 22820     break;
       
 22821 
       
 22822 /****
       
 22823  *WORD_TO_TIME
       
 22824  */
       
 22825     case function_word_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22834             {
       
 22835         
       
 22836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22837                 return return_type_symbol;
       
 22838                 
       
 22839             }
       
 22840             
       
 22841             ERROR;
       
 22842         }
       
 22843         
       
 22844     }/*function_word_to_time*/
       
 22845     break;
       
 22846 
       
 22847 /****
       
 22848  *WORD_TO_BOOL
       
 22849  */
       
 22850     case function_word_to_bool :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22859             {
       
 22860         
       
 22861                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22862                 return return_type_symbol;
       
 22863                 
       
 22864             }
       
 22865             
       
 22866             ERROR;
       
 22867         }
       
 22868         
       
 22869     }/*function_word_to_bool*/
       
 22870     break;
       
 22871 
       
 22872 /****
       
 22873  *WORD_TO_BYTE
       
 22874  */
       
 22875     case function_word_to_byte :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22884             {
       
 22885         
       
 22886                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22887                 return return_type_symbol;
       
 22888                 
       
 22889             }
       
 22890             
       
 22891             ERROR;
       
 22892         }
       
 22893         
       
 22894     }/*function_word_to_byte*/
       
 22895     break;
       
 22896 
       
 22897 /****
       
 22898  *WORD_TO_DWORD
       
 22899  */
       
 22900     case function_word_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22909             {
       
 22910         
       
 22911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22912                 return return_type_symbol;
       
 22913                 
       
 22914             }
       
 22915             
       
 22916             ERROR;
       
 22917         }
       
 22918         
       
 22919     }/*function_word_to_dword*/
       
 22920     break;
       
 22921 
       
 22922 /****
       
 22923  *WORD_TO_LWORD
       
 22924  */
       
 22925     case function_word_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22934             {
       
 22935         
       
 22936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22937                 return return_type_symbol;
       
 22938                 
       
 22939             }
       
 22940             
       
 22941             ERROR;
       
 22942         }
       
 22943         
       
 22944     }/*function_word_to_lword*/
       
 22945     break;
       
 22946 
       
 22947 /****
       
 22948  *WORD_TO_STRING
       
 22949  */
       
 22950     case function_word_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22959             {
       
 22960         
       
 22961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22962                 return return_type_symbol;
       
 22963                 
       
 22964             }
       
 22965             
       
 22966             ERROR;
       
 22967         }
       
 22968         
       
 22969     }/*function_word_to_string*/
       
 22970     break;
       
 22971 
       
 22972 /****
       
 22973  *WORD_TO_WSTRING
       
 22974  */
       
 22975     case function_word_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22984             {
       
 22985         
       
 22986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 22987                 return return_type_symbol;
       
 22988                 
       
 22989             }
       
 22990             
       
 22991             ERROR;
       
 22992         }
       
 22993         
       
 22994     }/*function_word_to_wstring*/
       
 22995     break;
       
 22996 
       
 22997 /****
       
 22998  *WORD_TO_DATE
       
 22999  */
       
 23000     case function_word_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 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_word_to_date*/
       
 23020     break;
       
 23021 
       
 23022 /****
       
 23023  *WORD_TO_TOD
       
 23024  */
       
 23025     case function_word_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 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_word_to_tod*/
       
 23045     break;
       
 23046 
       
 23047 /****
       
 23048  *WORD_TO_DT
       
 23049  */
       
 23050     case function_word_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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 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_word_to_dt*/
       
 23070     break;
       
 23071 
       
 23072 /****
       
 23073  *DWORD_TO_REAL
       
 23074  */
       
 23075     case function_dword_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23084             {
       
 23085         
       
 23086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23087                 return return_type_symbol;
       
 23088                 
       
 23089             }
       
 23090             
       
 23091             ERROR;
       
 23092         }
       
 23093         
       
 23094     }/*function_dword_to_real*/
       
 23095     break;
       
 23096 
       
 23097 /****
       
 23098  *DWORD_TO_LREAL
       
 23099  */
       
 23100     case function_dword_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23109             {
       
 23110         
       
 23111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23112                 return return_type_symbol;
       
 23113                 
       
 23114             }
       
 23115             
       
 23116             ERROR;
       
 23117         }
       
 23118         
       
 23119     }/*function_dword_to_lreal*/
       
 23120     break;
       
 23121 
       
 23122 /****
       
 23123  *DWORD_TO_SINT
       
 23124  */
       
 23125     case function_dword_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23134             {
       
 23135         
       
 23136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23137                 return return_type_symbol;
       
 23138                 
       
 23139             }
       
 23140             
       
 23141             ERROR;
       
 23142         }
       
 23143         
       
 23144     }/*function_dword_to_sint*/
       
 23145     break;
       
 23146 
       
 23147 /****
       
 23148  *DWORD_TO_INT
       
 23149  */
       
 23150     case function_dword_to_int :
       
 23151     {
       
 23152         symbol_c *last_type_symbol = NULL;
       
 23153 
       
 23154         {
       
 23155             symbol_c *IN_type_symbol = param_data_type;
       
 23156             last_type_symbol = param_data_type;
       
 23157             
       
 23158             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23159             {
       
 23160         
       
 23161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23162                 return return_type_symbol;
       
 23163                 
       
 23164             }
       
 23165             
       
 23166             ERROR;
       
 23167         }
       
 23168         
       
 23169     }/*function_dword_to_int*/
       
 23170     break;
       
 23171 
       
 23172 /****
       
 23173  *DWORD_TO_DINT
       
 23174  */
       
 23175     case function_dword_to_dint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23184             {
       
 23185         
       
 23186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23187                 return return_type_symbol;
       
 23188                 
       
 23189             }
       
 23190             
       
 23191             ERROR;
       
 23192         }
       
 23193         
       
 23194     }/*function_dword_to_dint*/
       
 23195     break;
       
 23196 
       
 23197 /****
       
 23198  *DWORD_TO_LINT
       
 23199  */
       
 23200     case function_dword_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23209             {
       
 23210         
       
 23211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23212                 return return_type_symbol;
       
 23213                 
       
 23214             }
       
 23215             
       
 23216             ERROR;
       
 23217         }
       
 23218         
       
 23219     }/*function_dword_to_lint*/
       
 23220     break;
       
 23221 
       
 23222 /****
       
 23223  *DWORD_TO_USINT
       
 23224  */
       
 23225     case function_dword_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23234             {
       
 23235         
       
 23236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23237                 return return_type_symbol;
       
 23238                 
       
 23239             }
       
 23240             
       
 23241             ERROR;
       
 23242         }
       
 23243         
       
 23244     }/*function_dword_to_usint*/
       
 23245     break;
       
 23246 
       
 23247 /****
       
 23248  *DWORD_TO_UINT
       
 23249  */
       
 23250     case function_dword_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23259             {
       
 23260         
       
 23261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23262                 return return_type_symbol;
       
 23263                 
       
 23264             }
       
 23265             
       
 23266             ERROR;
       
 23267         }
       
 23268         
       
 23269     }/*function_dword_to_uint*/
       
 23270     break;
       
 23271 
       
 23272 /****
       
 23273  *DWORD_TO_UDINT
       
 23274  */
       
 23275     case function_dword_to_udint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23284             {
       
 23285         
       
 23286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23287                 return return_type_symbol;
       
 23288                 
       
 23289             }
       
 23290             
       
 23291             ERROR;
       
 23292         }
       
 23293         
       
 23294     }/*function_dword_to_udint*/
       
 23295     break;
       
 23296 
       
 23297 /****
       
 23298  *DWORD_TO_ULINT
       
 23299  */
       
 23300     case function_dword_to_ulint :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23309             {
       
 23310         
       
 23311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23312                 return return_type_symbol;
       
 23313                 
       
 23314             }
       
 23315             
       
 23316             ERROR;
       
 23317         }
       
 23318         
       
 23319     }/*function_dword_to_ulint*/
       
 23320     break;
       
 23321 
       
 23322 /****
       
 23323  *DWORD_TO_TIME
       
 23324  */
       
 23325     case function_dword_to_time :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23334             {
       
 23335         
       
 23336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23337                 return return_type_symbol;
       
 23338                 
       
 23339             }
       
 23340             
       
 23341             ERROR;
       
 23342         }
       
 23343         
       
 23344     }/*function_dword_to_time*/
       
 23345     break;
       
 23346 
       
 23347 /****
       
 23348  *DWORD_TO_BOOL
       
 23349  */
       
 23350     case function_dword_to_bool :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23359             {
       
 23360         
       
 23361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23362                 return return_type_symbol;
       
 23363                 
       
 23364             }
       
 23365             
       
 23366             ERROR;
       
 23367         }
       
 23368         
       
 23369     }/*function_dword_to_bool*/
       
 23370     break;
       
 23371 
       
 23372 /****
       
 23373  *DWORD_TO_BYTE
       
 23374  */
       
 23375     case function_dword_to_byte :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23384             {
       
 23385         
       
 23386                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23387                 return return_type_symbol;
       
 23388                 
       
 23389             }
       
 23390             
       
 23391             ERROR;
       
 23392         }
       
 23393         
       
 23394     }/*function_dword_to_byte*/
       
 23395     break;
       
 23396 
       
 23397 /****
       
 23398  *DWORD_TO_WORD
       
 23399  */
       
 23400     case function_dword_to_word :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23409             {
       
 23410         
       
 23411                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23412                 return return_type_symbol;
       
 23413                 
       
 23414             }
       
 23415             
       
 23416             ERROR;
       
 23417         }
       
 23418         
       
 23419     }/*function_dword_to_word*/
       
 23420     break;
       
 23421 
       
 23422 /****
       
 23423  *DWORD_TO_LWORD
       
 23424  */
       
 23425     case function_dword_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23434             {
       
 23435         
       
 23436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23437                 return return_type_symbol;
       
 23438                 
       
 23439             }
       
 23440             
       
 23441             ERROR;
       
 23442         }
       
 23443         
       
 23444     }/*function_dword_to_lword*/
       
 23445     break;
       
 23446 
       
 23447 /****
       
 23448  *DWORD_TO_STRING
       
 23449  */
       
 23450     case function_dword_to_string :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23459             {
       
 23460         
       
 23461                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23462                 return return_type_symbol;
       
 23463                 
       
 23464             }
       
 23465             
       
 23466             ERROR;
       
 23467         }
       
 23468         
       
 23469     }/*function_dword_to_string*/
       
 23470     break;
       
 23471 
       
 23472 /****
       
 23473  *DWORD_TO_WSTRING
       
 23474  */
       
 23475     case function_dword_to_wstring :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23484             {
       
 23485         
       
 23486                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 23487                 return return_type_symbol;
       
 23488                 
       
 23489             }
       
 23490             
       
 23491             ERROR;
       
 23492         }
       
 23493         
       
 23494     }/*function_dword_to_wstring*/
       
 23495     break;
       
 23496 
       
 23497 /****
       
 23498  *DWORD_TO_DATE
       
 23499  */
       
 23500     case function_dword_to_date :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23509             {
       
 23510         
       
 23511                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23512                 return return_type_symbol;
       
 23513                 
       
 23514             }
       
 23515             
       
 23516             ERROR;
       
 23517         }
       
 23518         
       
 23519     }/*function_dword_to_date*/
       
 23520     break;
       
 23521 
       
 23522 /****
       
 23523  *DWORD_TO_TOD
       
 23524  */
       
 23525     case function_dword_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23534             {
       
 23535         
       
 23536                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23537                 return return_type_symbol;
       
 23538                 
       
 23539             }
       
 23540             
       
 23541             ERROR;
       
 23542         }
       
 23543         
       
 23544     }/*function_dword_to_tod*/
       
 23545     break;
       
 23546 
       
 23547 /****
       
 23548  *DWORD_TO_DT
       
 23549  */
       
 23550     case function_dword_to_dt :
       
 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 (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23559             {
       
 23560         
       
 23561                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23562                 return return_type_symbol;
       
 23563                 
       
 23564             }
       
 23565             
       
 23566             ERROR;
       
 23567         }
       
 23568         
       
 23569     }/*function_dword_to_dt*/
       
 23570     break;
       
 23571 
       
 23572 /****
       
 23573  *LWORD_TO_REAL
       
 23574  */
       
 23575     case function_lword_to_real :
       
 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23584             {
       
 23585         
       
 23586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23587                 return return_type_symbol;
       
 23588                 
       
 23589             }
       
 23590             
       
 23591             ERROR;
       
 23592         }
       
 23593         
       
 23594     }/*function_lword_to_real*/
       
 23595     break;
       
 23596 
       
 23597 /****
       
 23598  *LWORD_TO_LREAL
       
 23599  */
       
 23600     case function_lword_to_lreal :
       
 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23609             {
       
 23610         
       
 23611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23612                 return return_type_symbol;
       
 23613                 
       
 23614             }
       
 23615             
       
 23616             ERROR;
       
 23617         }
       
 23618         
       
 23619     }/*function_lword_to_lreal*/
       
 23620     break;
       
 23621 
       
 23622 /****
       
 23623  *LWORD_TO_SINT
       
 23624  */
       
 23625     case function_lword_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23634             {
       
 23635         
       
 23636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23637                 return return_type_symbol;
       
 23638                 
       
 23639             }
       
 23640             
       
 23641             ERROR;
       
 23642         }
       
 23643         
       
 23644     }/*function_lword_to_sint*/
       
 23645     break;
       
 23646 
       
 23647 /****
       
 23648  *LWORD_TO_INT
       
 23649  */
       
 23650     case function_lword_to_int :
       
 23651     {
       
 23652         symbol_c *last_type_symbol = NULL;
       
 23653 
       
 23654         {
       
 23655             symbol_c *IN_type_symbol = param_data_type;
       
 23656             last_type_symbol = param_data_type;
       
 23657             
       
 23658             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23659             {
       
 23660         
       
 23661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23662                 return return_type_symbol;
       
 23663                 
       
 23664             }
       
 23665             
       
 23666             ERROR;
       
 23667         }
       
 23668         
       
 23669     }/*function_lword_to_int*/
       
 23670     break;
       
 23671 
       
 23672 /****
       
 23673  *LWORD_TO_DINT
       
 23674  */
       
 23675     case function_lword_to_dint :
       
 23676     {
       
 23677         symbol_c *last_type_symbol = NULL;
       
 23678 
       
 23679         {
       
 23680             symbol_c *IN_type_symbol = param_data_type;
       
 23681             last_type_symbol = param_data_type;
       
 23682             
       
 23683             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23684             {
       
 23685         
       
 23686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23687                 return return_type_symbol;
       
 23688                 
       
 23689             }
       
 23690             
       
 23691             ERROR;
       
 23692         }
       
 23693         
       
 23694     }/*function_lword_to_dint*/
       
 23695     break;
       
 23696 
       
 23697 /****
       
 23698  *LWORD_TO_LINT
       
 23699  */
       
 23700     case function_lword_to_lint :
       
 23701     {
       
 23702         symbol_c *last_type_symbol = NULL;
       
 23703 
       
 23704         {
       
 23705             symbol_c *IN_type_symbol = param_data_type;
       
 23706             last_type_symbol = param_data_type;
       
 23707             
       
 23708             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23709             {
       
 23710         
       
 23711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23712                 return return_type_symbol;
       
 23713                 
       
 23714             }
       
 23715             
       
 23716             ERROR;
       
 23717         }
       
 23718         
       
 23719     }/*function_lword_to_lint*/
       
 23720     break;
       
 23721 
       
 23722 /****
       
 23723  *LWORD_TO_USINT
       
 23724  */
       
 23725     case function_lword_to_usint :
       
 23726     {
       
 23727         symbol_c *last_type_symbol = NULL;
       
 23728 
       
 23729         {
       
 23730             symbol_c *IN_type_symbol = param_data_type;
       
 23731             last_type_symbol = param_data_type;
       
 23732             
       
 23733             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23734             {
       
 23735         
       
 23736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23737                 return return_type_symbol;
       
 23738                 
       
 23739             }
       
 23740             
       
 23741             ERROR;
       
 23742         }
       
 23743         
       
 23744     }/*function_lword_to_usint*/
       
 23745     break;
       
 23746 
       
 23747 /****
       
 23748  *LWORD_TO_UINT
       
 23749  */
       
 23750     case function_lword_to_uint :
       
 23751     {
       
 23752         symbol_c *last_type_symbol = NULL;
       
 23753 
       
 23754         {
       
 23755             symbol_c *IN_type_symbol = param_data_type;
       
 23756             last_type_symbol = param_data_type;
       
 23757             
       
 23758             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23759             {
       
 23760         
       
 23761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23762                 return return_type_symbol;
       
 23763                 
       
 23764             }
       
 23765             
       
 23766             ERROR;
       
 23767         }
       
 23768         
       
 23769     }/*function_lword_to_uint*/
       
 23770     break;
       
 23771 
       
 23772 /****
       
 23773  *LWORD_TO_UDINT
       
 23774  */
       
 23775     case function_lword_to_udint :
       
 23776     {
       
 23777         symbol_c *last_type_symbol = NULL;
       
 23778 
       
 23779         {
       
 23780             symbol_c *IN_type_symbol = param_data_type;
       
 23781             last_type_symbol = param_data_type;
       
 23782             
       
 23783             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23784             {
       
 23785         
       
 23786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23787                 return return_type_symbol;
       
 23788                 
       
 23789             }
       
 23790             
       
 23791             ERROR;
       
 23792         }
       
 23793         
       
 23794     }/*function_lword_to_udint*/
       
 23795     break;
       
 23796 
       
 23797 /****
       
 23798  *LWORD_TO_ULINT
       
 23799  */
       
 23800     case function_lword_to_ulint :
       
 23801     {
       
 23802         symbol_c *last_type_symbol = NULL;
       
 23803 
       
 23804         {
       
 23805             symbol_c *IN_type_symbol = param_data_type;
       
 23806             last_type_symbol = param_data_type;
       
 23807             
       
 23808             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23809             {
       
 23810         
       
 23811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23812                 return return_type_symbol;
       
 23813                 
       
 23814             }
       
 23815             
       
 23816             ERROR;
       
 23817         }
       
 23818         
       
 23819     }/*function_lword_to_ulint*/
       
 23820     break;
       
 23821 
       
 23822 /****
       
 23823  *LWORD_TO_TIME
       
 23824  */
       
 23825     case function_lword_to_time :
       
 23826     {
       
 23827         symbol_c *last_type_symbol = NULL;
       
 23828 
       
 23829         {
       
 23830             symbol_c *IN_type_symbol = param_data_type;
       
 23831             last_type_symbol = param_data_type;
       
 23832             
       
 23833             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23834             {
       
 23835         
       
 23836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23837                 return return_type_symbol;
       
 23838                 
       
 23839             }
       
 23840             
       
 23841             ERROR;
       
 23842         }
       
 23843         
       
 23844     }/*function_lword_to_time*/
       
 23845     break;
       
 23846 
       
 23847 /****
       
 23848  *LWORD_TO_BOOL
       
 23849  */
       
 23850     case function_lword_to_bool :
       
 23851     {
       
 23852         symbol_c *last_type_symbol = NULL;
       
 23853 
       
 23854         {
       
 23855             symbol_c *IN_type_symbol = param_data_type;
       
 23856             last_type_symbol = param_data_type;
       
 23857             
       
 23858             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23859             {
       
 23860         
       
 23861                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23862                 return return_type_symbol;
       
 23863                 
       
 23864             }
       
 23865             
       
 23866             ERROR;
       
 23867         }
       
 23868         
       
 23869     }/*function_lword_to_bool*/
       
 23870     break;
       
 23871 
       
 23872 /****
       
 23873  *LWORD_TO_BYTE
       
 23874  */
       
 23875     case function_lword_to_byte :
       
 23876     {
       
 23877         symbol_c *last_type_symbol = NULL;
       
 23878 
       
 23879         {
       
 23880             symbol_c *IN_type_symbol = param_data_type;
       
 23881             last_type_symbol = param_data_type;
       
 23882             
       
 23883             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23884             {
       
 23885         
       
 23886                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23887                 return return_type_symbol;
       
 23888                 
       
 23889             }
       
 23890             
       
 23891             ERROR;
       
 23892         }
       
 23893         
       
 23894     }/*function_lword_to_byte*/
       
 23895     break;
       
 23896 
       
 23897 /****
       
 23898  *LWORD_TO_WORD
       
 23899  */
       
 23900     case function_lword_to_word :
       
 23901     {
       
 23902         symbol_c *last_type_symbol = NULL;
       
 23903 
       
 23904         {
       
 23905             symbol_c *IN_type_symbol = param_data_type;
       
 23906             last_type_symbol = param_data_type;
       
 23907             
       
 23908             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23909             {
       
 23910         
       
 23911                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23912                 return return_type_symbol;
       
 23913                 
       
 23914             }
       
 23915             
       
 23916             ERROR;
       
 23917         }
       
 23918         
       
 23919     }/*function_lword_to_word*/
       
 23920     break;
       
 23921 
       
 23922 /****
       
 23923  *LWORD_TO_DWORD
       
 23924  */
       
 23925     case function_lword_to_dword :
       
 23926     {
       
 23927         symbol_c *last_type_symbol = NULL;
       
 23928 
       
 23929         {
       
 23930             symbol_c *IN_type_symbol = param_data_type;
       
 23931             last_type_symbol = param_data_type;
       
 23932             
       
 23933             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23934             {
       
 23935         
       
 23936                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23937                 return return_type_symbol;
       
 23938                 
       
 23939             }
       
 23940             
       
 23941             ERROR;
       
 23942         }
       
 23943         
       
 23944     }/*function_lword_to_dword*/
       
 23945     break;
       
 23946 
       
 23947 /****
       
 23948  *LWORD_TO_STRING
       
 23949  */
       
 23950     case function_lword_to_string :
       
 23951     {
       
 23952         symbol_c *last_type_symbol = NULL;
       
 23953 
       
 23954         {
       
 23955             symbol_c *IN_type_symbol = param_data_type;
       
 23956             last_type_symbol = param_data_type;
       
 23957             
       
 23958             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23959             {
       
 23960         
       
 23961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23962                 return return_type_symbol;
       
 23963                 
       
 23964             }
       
 23965             
       
 23966             ERROR;
       
 23967         }
       
 23968         
       
 23969     }/*function_lword_to_string*/
       
 23970     break;
       
 23971 
       
 23972 /****
       
 23973  *LWORD_TO_WSTRING
       
 23974  */
       
 23975     case function_lword_to_wstring :
       
 23976     {
       
 23977         symbol_c *last_type_symbol = NULL;
       
 23978 
       
 23979         {
       
 23980             symbol_c *IN_type_symbol = param_data_type;
       
 23981             last_type_symbol = param_data_type;
       
 23982             
       
 23983             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23984             {
       
 23985         
       
 23986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 23987                 return return_type_symbol;
       
 23988                 
       
 23989             }
       
 23990             
       
 23991             ERROR;
       
 23992         }
       
 23993         
       
 23994     }/*function_lword_to_wstring*/
       
 23995     break;
       
 23996 
       
 23997 /****
       
 23998  *LWORD_TO_DATE
       
 23999  */
       
 24000     case function_lword_to_date :
       
 24001     {
       
 24002         symbol_c *last_type_symbol = NULL;
       
 24003 
       
 24004         {
       
 24005             symbol_c *IN_type_symbol = param_data_type;
       
 24006             last_type_symbol = param_data_type;
       
 24007             
       
 24008             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24009             {
       
 24010         
       
 24011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24012                 return return_type_symbol;
       
 24013                 
       
 24014             }
       
 24015             
       
 24016             ERROR;
       
 24017         }
       
 24018         
       
 24019     }/*function_lword_to_date*/
       
 24020     break;
       
 24021 
       
 24022 /****
       
 24023  *LWORD_TO_TOD
       
 24024  */
       
 24025     case function_lword_to_tod :
       
 24026     {
       
 24027         symbol_c *last_type_symbol = NULL;
       
 24028 
       
 24029         {
       
 24030             symbol_c *IN_type_symbol = param_data_type;
       
 24031             last_type_symbol = param_data_type;
       
 24032             
       
 24033             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24034             {
       
 24035         
       
 24036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24037                 return return_type_symbol;
       
 24038                 
       
 24039             }
       
 24040             
       
 24041             ERROR;
       
 24042         }
       
 24043         
       
 24044     }/*function_lword_to_tod*/
       
 24045     break;
       
 24046 
       
 24047 /****
       
 24048  *LWORD_TO_DT
       
 24049  */
       
 24050     case function_lword_to_dt :
       
 24051     {
       
 24052         symbol_c *last_type_symbol = NULL;
       
 24053 
       
 24054         {
       
 24055             symbol_c *IN_type_symbol = param_data_type;
       
 24056             last_type_symbol = param_data_type;
       
 24057             
       
 24058             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24059             {
       
 24060         
       
 24061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24062                 return return_type_symbol;
       
 24063                 
       
 24064             }
       
 24065             
       
 24066             ERROR;
       
 24067         }
       
 24068         
       
 24069     }/*function_lword_to_dt*/
       
 24070     break;
       
 24071 
       
 24072 /****
       
 24073  *STRING_TO_REAL
       
 24074  */
       
 24075     case function_string_to_real :
       
 24076     {
       
 24077         symbol_c *last_type_symbol = NULL;
       
 24078 
       
 24079         {
       
 24080             symbol_c *IN_type_symbol = param_data_type;
       
 24081             last_type_symbol = param_data_type;
       
 24082             
       
 24083             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24084             {
       
 24085         
       
 24086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24087                 return return_type_symbol;
       
 24088                 
       
 24089             }
       
 24090             
       
 24091             ERROR;
       
 24092         }
       
 24093         
       
 24094     }/*function_string_to_real*/
       
 24095     break;
       
 24096 
       
 24097 /****
       
 24098  *STRING_TO_LREAL
       
 24099  */
       
 24100     case function_string_to_lreal :
       
 24101     {
       
 24102         symbol_c *last_type_symbol = NULL;
       
 24103 
       
 24104         {
       
 24105             symbol_c *IN_type_symbol = param_data_type;
       
 24106             last_type_symbol = param_data_type;
       
 24107             
       
 24108             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24109             {
       
 24110         
       
 24111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24112                 return return_type_symbol;
       
 24113                 
       
 24114             }
       
 24115             
       
 24116             ERROR;
       
 24117         }
       
 24118         
       
 24119     }/*function_string_to_lreal*/
       
 24120     break;
       
 24121 
       
 24122 /****
       
 24123  *STRING_TO_SINT
       
 24124  */
       
 24125     case function_string_to_sint :
       
 24126     {
       
 24127         symbol_c *last_type_symbol = NULL;
       
 24128 
       
 24129         {
       
 24130             symbol_c *IN_type_symbol = param_data_type;
       
 24131             last_type_symbol = param_data_type;
       
 24132             
       
 24133             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24134             {
       
 24135         
       
 24136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24137                 return return_type_symbol;
       
 24138                 
       
 24139             }
       
 24140             
       
 24141             ERROR;
       
 24142         }
       
 24143         
       
 24144     }/*function_string_to_sint*/
       
 24145     break;
       
 24146 
       
 24147 /****
       
 24148  *STRING_TO_INT
       
 24149  */
       
 24150     case function_string_to_int :
       
 24151     {
       
 24152         symbol_c *last_type_symbol = NULL;
       
 24153 
       
 24154         {
       
 24155             symbol_c *IN_type_symbol = param_data_type;
       
 24156             last_type_symbol = param_data_type;
       
 24157             
       
 24158             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24159             {
       
 24160         
       
 24161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24162                 return return_type_symbol;
       
 24163                 
       
 24164             }
       
 24165             
       
 24166             ERROR;
       
 24167         }
       
 24168         
       
 24169     }/*function_string_to_int*/
       
 24170     break;
       
 24171 
       
 24172 /****
       
 24173  *STRING_TO_DINT
       
 24174  */
       
 24175     case function_string_to_dint :
       
 24176     {
       
 24177         symbol_c *last_type_symbol = NULL;
       
 24178 
       
 24179         {
       
 24180             symbol_c *IN_type_symbol = param_data_type;
       
 24181             last_type_symbol = param_data_type;
       
 24182             
       
 24183             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24184             {
       
 24185         
       
 24186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24187                 return return_type_symbol;
       
 24188                 
       
 24189             }
       
 24190             
       
 24191             ERROR;
       
 24192         }
       
 24193         
       
 24194     }/*function_string_to_dint*/
       
 24195     break;
       
 24196 
       
 24197 /****
       
 24198  *STRING_TO_LINT
       
 24199  */
       
 24200     case function_string_to_lint :
       
 24201     {
       
 24202         symbol_c *last_type_symbol = NULL;
       
 24203 
       
 24204         {
       
 24205             symbol_c *IN_type_symbol = param_data_type;
       
 24206             last_type_symbol = param_data_type;
       
 24207             
       
 24208             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24209             {
       
 24210         
       
 24211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24212                 return return_type_symbol;
       
 24213                 
       
 24214             }
       
 24215             
       
 24216             ERROR;
       
 24217         }
       
 24218         
       
 24219     }/*function_string_to_lint*/
       
 24220     break;
       
 24221 
       
 24222 /****
       
 24223  *STRING_TO_USINT
       
 24224  */
       
 24225     case function_string_to_usint :
       
 24226     {
       
 24227         symbol_c *last_type_symbol = NULL;
       
 24228 
       
 24229         {
       
 24230             symbol_c *IN_type_symbol = param_data_type;
       
 24231             last_type_symbol = param_data_type;
       
 24232             
       
 24233             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24234             {
       
 24235         
       
 24236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24237                 return return_type_symbol;
       
 24238                 
       
 24239             }
       
 24240             
       
 24241             ERROR;
       
 24242         }
       
 24243         
       
 24244     }/*function_string_to_usint*/
       
 24245     break;
       
 24246 
       
 24247 /****
       
 24248  *STRING_TO_UINT
       
 24249  */
       
 24250     case function_string_to_uint :
       
 24251     {
       
 24252         symbol_c *last_type_symbol = NULL;
       
 24253 
       
 24254         {
       
 24255             symbol_c *IN_type_symbol = param_data_type;
       
 24256             last_type_symbol = param_data_type;
       
 24257             
       
 24258             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24259             {
       
 24260         
       
 24261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24262                 return return_type_symbol;
       
 24263                 
       
 24264             }
       
 24265             
       
 24266             ERROR;
       
 24267         }
       
 24268         
       
 24269     }/*function_string_to_uint*/
       
 24270     break;
       
 24271 
       
 24272 /****
       
 24273  *STRING_TO_UDINT
       
 24274  */
       
 24275     case function_string_to_udint :
       
 24276     {
       
 24277         symbol_c *last_type_symbol = NULL;
       
 24278 
       
 24279         {
       
 24280             symbol_c *IN_type_symbol = param_data_type;
       
 24281             last_type_symbol = param_data_type;
       
 24282             
       
 24283             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24284             {
       
 24285         
       
 24286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24287                 return return_type_symbol;
       
 24288                 
       
 24289             }
       
 24290             
       
 24291             ERROR;
       
 24292         }
       
 24293         
       
 24294     }/*function_string_to_udint*/
       
 24295     break;
       
 24296 
       
 24297 /****
       
 24298  *STRING_TO_ULINT
       
 24299  */
       
 24300     case function_string_to_ulint :
       
 24301     {
       
 24302         symbol_c *last_type_symbol = NULL;
       
 24303 
       
 24304         {
       
 24305             symbol_c *IN_type_symbol = param_data_type;
       
 24306             last_type_symbol = param_data_type;
       
 24307             
       
 24308             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24309             {
       
 24310         
       
 24311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24312                 return return_type_symbol;
       
 24313                 
       
 24314             }
       
 24315             
       
 24316             ERROR;
       
 24317         }
       
 24318         
       
 24319     }/*function_string_to_ulint*/
       
 24320     break;
       
 24321 
       
 24322 /****
       
 24323  *STRING_TO_TIME
       
 24324  */
       
 24325     case function_string_to_time :
       
 24326     {
       
 24327         symbol_c *last_type_symbol = NULL;
       
 24328 
       
 24329         {
       
 24330             symbol_c *IN_type_symbol = param_data_type;
       
 24331             last_type_symbol = param_data_type;
       
 24332             
       
 24333             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24334             {
       
 24335         
       
 24336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24337                 return return_type_symbol;
       
 24338                 
       
 24339             }
       
 24340             
       
 24341             ERROR;
       
 24342         }
       
 24343         
       
 24344     }/*function_string_to_time*/
       
 24345     break;
       
 24346 
       
 24347 /****
       
 24348  *STRING_TO_BOOL
       
 24349  */
       
 24350     case function_string_to_bool :
       
 24351     {
       
 24352         symbol_c *last_type_symbol = NULL;
       
 24353 
       
 24354         {
       
 24355             symbol_c *IN_type_symbol = param_data_type;
       
 24356             last_type_symbol = param_data_type;
       
 24357             
       
 24358             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24359             {
       
 24360         
       
 24361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24362                 return return_type_symbol;
       
 24363                 
       
 24364             }
       
 24365             
       
 24366             ERROR;
       
 24367         }
       
 24368         
       
 24369     }/*function_string_to_bool*/
       
 24370     break;
       
 24371 
       
 24372 /****
       
 24373  *STRING_TO_BYTE
       
 24374  */
       
 24375     case function_string_to_byte :
       
 24376     {
       
 24377         symbol_c *last_type_symbol = NULL;
       
 24378 
       
 24379         {
       
 24380             symbol_c *IN_type_symbol = param_data_type;
       
 24381             last_type_symbol = param_data_type;
       
 24382             
       
 24383             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24384             {
       
 24385         
       
 24386                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24387                 return return_type_symbol;
       
 24388                 
       
 24389             }
       
 24390             
       
 24391             ERROR;
       
 24392         }
       
 24393         
       
 24394     }/*function_string_to_byte*/
       
 24395     break;
       
 24396 
       
 24397 /****
       
 24398  *STRING_TO_WORD
       
 24399  */
       
 24400     case function_string_to_word :
       
 24401     {
       
 24402         symbol_c *last_type_symbol = NULL;
       
 24403 
       
 24404         {
       
 24405             symbol_c *IN_type_symbol = param_data_type;
       
 24406             last_type_symbol = param_data_type;
       
 24407             
       
 24408             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24409             {
       
 24410         
       
 24411                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24412                 return return_type_symbol;
       
 24413                 
       
 24414             }
       
 24415             
       
 24416             ERROR;
       
 24417         }
       
 24418         
       
 24419     }/*function_string_to_word*/
       
 24420     break;
       
 24421 
       
 24422 /****
       
 24423  *STRING_TO_DWORD
       
 24424  */
       
 24425     case function_string_to_dword :
       
 24426     {
       
 24427         symbol_c *last_type_symbol = NULL;
       
 24428 
       
 24429         {
       
 24430             symbol_c *IN_type_symbol = param_data_type;
       
 24431             last_type_symbol = param_data_type;
       
 24432             
       
 24433             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24434             {
       
 24435         
       
 24436                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24437                 return return_type_symbol;
       
 24438                 
       
 24439             }
       
 24440             
       
 24441             ERROR;
       
 24442         }
       
 24443         
       
 24444     }/*function_string_to_dword*/
       
 24445     break;
       
 24446 
       
 24447 /****
       
 24448  *STRING_TO_LWORD
       
 24449  */
       
 24450     case function_string_to_lword :
       
 24451     {
       
 24452         symbol_c *last_type_symbol = NULL;
       
 24453 
       
 24454         {
       
 24455             symbol_c *IN_type_symbol = param_data_type;
       
 24456             last_type_symbol = param_data_type;
       
 24457             
       
 24458             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24459             {
       
 24460         
       
 24461                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24462                 return return_type_symbol;
       
 24463                 
       
 24464             }
       
 24465             
       
 24466             ERROR;
       
 24467         }
       
 24468         
       
 24469     }/*function_string_to_lword*/
       
 24470     break;
       
 24471 
       
 24472 /****
       
 24473  *STRING_TO_DATE
       
 24474  */
       
 24475     case function_string_to_date :
       
 24476     {
       
 24477         symbol_c *last_type_symbol = NULL;
       
 24478 
       
 24479         {
       
 24480             symbol_c *IN_type_symbol = param_data_type;
       
 24481             last_type_symbol = param_data_type;
       
 24482             
       
 24483             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24484             {
       
 24485         
       
 24486                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24487                 return return_type_symbol;
       
 24488                 
       
 24489             }
       
 24490             
       
 24491             ERROR;
       
 24492         }
       
 24493         
       
 24494     }/*function_string_to_date*/
       
 24495     break;
       
 24496 
       
 24497 /****
       
 24498  *STRING_TO_TOD
       
 24499  */
       
 24500     case function_string_to_tod :
       
 24501     {
       
 24502         symbol_c *last_type_symbol = NULL;
       
 24503 
       
 24504         {
       
 24505             symbol_c *IN_type_symbol = param_data_type;
       
 24506             last_type_symbol = param_data_type;
       
 24507             
       
 24508             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24509             {
       
 24510         
       
 24511                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24512                 return return_type_symbol;
       
 24513                 
       
 24514             }
       
 24515             
       
 24516             ERROR;
       
 24517         }
       
 24518         
       
 24519     }/*function_string_to_tod*/
       
 24520     break;
       
 24521 
       
 24522 /****
       
 24523  *STRING_TO_DT
       
 24524  */
       
 24525     case function_string_to_dt :
       
 24526     {
       
 24527         symbol_c *last_type_symbol = NULL;
       
 24528 
       
 24529         {
       
 24530             symbol_c *IN_type_symbol = param_data_type;
       
 24531             last_type_symbol = param_data_type;
       
 24532             
       
 24533             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24534             {
       
 24535         
       
 24536                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24537                 return return_type_symbol;
       
 24538                 
       
 24539             }
       
 24540             
       
 24541             ERROR;
       
 24542         }
       
 24543         
       
 24544     }/*function_string_to_dt*/
       
 24545     break;
       
 24546 
       
 24547 /****
       
 24548  *WSTRING_TO_REAL
       
 24549  */
       
 24550     case function_wstring_to_real :
       
 24551     {
       
 24552         symbol_c *last_type_symbol = NULL;
       
 24553 
       
 24554         {
       
 24555             symbol_c *IN_type_symbol = param_data_type;
       
 24556             last_type_symbol = param_data_type;
       
 24557             
       
 24558             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24559             {
       
 24560         
       
 24561                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24562                 return return_type_symbol;
       
 24563                 
       
 24564             }
       
 24565             
       
 24566             ERROR;
       
 24567         }
       
 24568         
       
 24569     }/*function_wstring_to_real*/
       
 24570     break;
       
 24571 
       
 24572 /****
       
 24573  *WSTRING_TO_LREAL
       
 24574  */
       
 24575     case function_wstring_to_lreal :
       
 24576     {
       
 24577         symbol_c *last_type_symbol = NULL;
       
 24578 
       
 24579         {
       
 24580             symbol_c *IN_type_symbol = param_data_type;
       
 24581             last_type_symbol = param_data_type;
       
 24582             
       
 24583             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24584             {
       
 24585         
       
 24586                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24587                 return return_type_symbol;
       
 24588                 
       
 24589             }
       
 24590             
       
 24591             ERROR;
       
 24592         }
       
 24593         
       
 24594     }/*function_wstring_to_lreal*/
       
 24595     break;
       
 24596 
       
 24597 /****
       
 24598  *WSTRING_TO_SINT
       
 24599  */
       
 24600     case function_wstring_to_sint :
       
 24601     {
       
 24602         symbol_c *last_type_symbol = NULL;
       
 24603 
       
 24604         {
       
 24605             symbol_c *IN_type_symbol = param_data_type;
       
 24606             last_type_symbol = param_data_type;
       
 24607             
       
 24608             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24609             {
       
 24610         
       
 24611                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24612                 return return_type_symbol;
       
 24613                 
       
 24614             }
       
 24615             
       
 24616             ERROR;
       
 24617         }
       
 24618         
       
 24619     }/*function_wstring_to_sint*/
       
 24620     break;
       
 24621 
       
 24622 /****
       
 24623  *WSTRING_TO_INT
       
 24624  */
       
 24625     case function_wstring_to_int :
       
 24626     {
       
 24627         symbol_c *last_type_symbol = NULL;
       
 24628 
       
 24629         {
       
 24630             symbol_c *IN_type_symbol = param_data_type;
       
 24631             last_type_symbol = param_data_type;
       
 24632             
       
 24633             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24634             {
       
 24635         
       
 24636                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24637                 return return_type_symbol;
       
 24638                 
       
 24639             }
       
 24640             
       
 24641             ERROR;
       
 24642         }
       
 24643         
       
 24644     }/*function_wstring_to_int*/
       
 24645     break;
       
 24646 
       
 24647 /****
       
 24648  *WSTRING_TO_DINT
       
 24649  */
       
 24650     case function_wstring_to_dint :
       
 24651     {
       
 24652         symbol_c *last_type_symbol = NULL;
       
 24653 
       
 24654         {
       
 24655             symbol_c *IN_type_symbol = param_data_type;
       
 24656             last_type_symbol = param_data_type;
       
 24657             
       
 24658             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24659             {
       
 24660         
       
 24661                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24662                 return return_type_symbol;
       
 24663                 
       
 24664             }
       
 24665             
       
 24666             ERROR;
       
 24667         }
       
 24668         
       
 24669     }/*function_wstring_to_dint*/
       
 24670     break;
       
 24671 
       
 24672 /****
       
 24673  *WSTRING_TO_LINT
       
 24674  */
       
 24675     case function_wstring_to_lint :
       
 24676     {
       
 24677         symbol_c *last_type_symbol = NULL;
       
 24678 
       
 24679         {
       
 24680             symbol_c *IN_type_symbol = param_data_type;
       
 24681             last_type_symbol = param_data_type;
       
 24682             
       
 24683             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24684             {
       
 24685         
       
 24686                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24687                 return return_type_symbol;
       
 24688                 
       
 24689             }
       
 24690             
       
 24691             ERROR;
       
 24692         }
       
 24693         
       
 24694     }/*function_wstring_to_lint*/
       
 24695     break;
       
 24696 
       
 24697 /****
       
 24698  *WSTRING_TO_USINT
       
 24699  */
       
 24700     case function_wstring_to_usint :
       
 24701     {
       
 24702         symbol_c *last_type_symbol = NULL;
       
 24703 
       
 24704         {
       
 24705             symbol_c *IN_type_symbol = param_data_type;
       
 24706             last_type_symbol = param_data_type;
       
 24707             
       
 24708             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24709             {
       
 24710         
       
 24711                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24712                 return return_type_symbol;
       
 24713                 
       
 24714             }
       
 24715             
       
 24716             ERROR;
       
 24717         }
       
 24718         
       
 24719     }/*function_wstring_to_usint*/
       
 24720     break;
       
 24721 
       
 24722 /****
       
 24723  *WSTRING_TO_UINT
       
 24724  */
       
 24725     case function_wstring_to_uint :
       
 24726     {
       
 24727         symbol_c *last_type_symbol = NULL;
       
 24728 
       
 24729         {
       
 24730             symbol_c *IN_type_symbol = param_data_type;
       
 24731             last_type_symbol = param_data_type;
       
 24732             
       
 24733             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24734             {
       
 24735         
       
 24736                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24737                 return return_type_symbol;
       
 24738                 
       
 24739             }
       
 24740             
       
 24741             ERROR;
       
 24742         }
       
 24743         
       
 24744     }/*function_wstring_to_uint*/
       
 24745     break;
       
 24746 
       
 24747 /****
       
 24748  *WSTRING_TO_UDINT
       
 24749  */
       
 24750     case function_wstring_to_udint :
       
 24751     {
       
 24752         symbol_c *last_type_symbol = NULL;
       
 24753 
       
 24754         {
       
 24755             symbol_c *IN_type_symbol = param_data_type;
       
 24756             last_type_symbol = param_data_type;
       
 24757             
       
 24758             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24759             {
       
 24760         
       
 24761                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24762                 return return_type_symbol;
       
 24763                 
       
 24764             }
       
 24765             
       
 24766             ERROR;
       
 24767         }
       
 24768         
       
 24769     }/*function_wstring_to_udint*/
       
 24770     break;
       
 24771 
       
 24772 /****
       
 24773  *WSTRING_TO_ULINT
       
 24774  */
       
 24775     case function_wstring_to_ulint :
       
 24776     {
       
 24777         symbol_c *last_type_symbol = NULL;
       
 24778 
       
 24779         {
       
 24780             symbol_c *IN_type_symbol = param_data_type;
       
 24781             last_type_symbol = param_data_type;
       
 24782             
       
 24783             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24784             {
       
 24785         
       
 24786                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24787                 return return_type_symbol;
       
 24788                 
       
 24789             }
       
 24790             
       
 24791             ERROR;
       
 24792         }
       
 24793         
       
 24794     }/*function_wstring_to_ulint*/
       
 24795     break;
       
 24796 
       
 24797 /****
       
 24798  *WSTRING_TO_TIME
       
 24799  */
       
 24800     case function_wstring_to_time :
       
 24801     {
       
 24802         symbol_c *last_type_symbol = NULL;
       
 24803 
       
 24804         {
       
 24805             symbol_c *IN_type_symbol = param_data_type;
       
 24806             last_type_symbol = param_data_type;
       
 24807             
       
 24808             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24809             {
       
 24810         
       
 24811                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24812                 return return_type_symbol;
       
 24813                 
       
 24814             }
       
 24815             
       
 24816             ERROR;
       
 24817         }
       
 24818         
       
 24819     }/*function_wstring_to_time*/
       
 24820     break;
       
 24821 
       
 24822 /****
       
 24823  *WSTRING_TO_BOOL
       
 24824  */
       
 24825     case function_wstring_to_bool :
       
 24826     {
       
 24827         symbol_c *last_type_symbol = NULL;
       
 24828 
       
 24829         {
       
 24830             symbol_c *IN_type_symbol = param_data_type;
       
 24831             last_type_symbol = param_data_type;
       
 24832             
       
 24833             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24834             {
       
 24835         
       
 24836                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24837                 return return_type_symbol;
       
 24838                 
       
 24839             }
       
 24840             
       
 24841             ERROR;
       
 24842         }
       
 24843         
       
 24844     }/*function_wstring_to_bool*/
       
 24845     break;
       
 24846 
       
 24847 /****
       
 24848  *WSTRING_TO_BYTE
       
 24849  */
       
 24850     case function_wstring_to_byte :
       
 24851     {
       
 24852         symbol_c *last_type_symbol = NULL;
       
 24853 
       
 24854         {
       
 24855             symbol_c *IN_type_symbol = param_data_type;
       
 24856             last_type_symbol = param_data_type;
       
 24857             
       
 24858             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24859             {
       
 24860         
       
 24861                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24862                 return return_type_symbol;
       
 24863                 
       
 24864             }
       
 24865             
       
 24866             ERROR;
       
 24867         }
       
 24868         
       
 24869     }/*function_wstring_to_byte*/
       
 24870     break;
       
 24871 
       
 24872 /****
       
 24873  *WSTRING_TO_WORD
       
 24874  */
       
 24875     case function_wstring_to_word :
       
 24876     {
       
 24877         symbol_c *last_type_symbol = NULL;
       
 24878 
       
 24879         {
       
 24880             symbol_c *IN_type_symbol = param_data_type;
       
 24881             last_type_symbol = param_data_type;
       
 24882             
       
 24883             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24884             {
       
 24885         
       
 24886                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24887                 return return_type_symbol;
       
 24888                 
       
 24889             }
       
 24890             
       
 24891             ERROR;
       
 24892         }
       
 24893         
       
 24894     }/*function_wstring_to_word*/
       
 24895     break;
       
 24896 
       
 24897 /****
       
 24898  *WSTRING_TO_DWORD
       
 24899  */
       
 24900     case function_wstring_to_dword :
       
 24901     {
       
 24902         symbol_c *last_type_symbol = NULL;
       
 24903 
       
 24904         {
       
 24905             symbol_c *IN_type_symbol = param_data_type;
       
 24906             last_type_symbol = param_data_type;
       
 24907             
       
 24908             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24909             {
       
 24910         
       
 24911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24912                 return return_type_symbol;
       
 24913                 
       
 24914             }
       
 24915             
       
 24916             ERROR;
       
 24917         }
       
 24918         
       
 24919     }/*function_wstring_to_dword*/
       
 24920     break;
       
 24921 
       
 24922 /****
       
 24923  *WSTRING_TO_LWORD
       
 24924  */
       
 24925     case function_wstring_to_lword :
       
 24926     {
       
 24927         symbol_c *last_type_symbol = NULL;
       
 24928 
       
 24929         {
       
 24930             symbol_c *IN_type_symbol = param_data_type;
       
 24931             last_type_symbol = param_data_type;
       
 24932             
       
 24933             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24934             {
       
 24935         
       
 24936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24937                 return return_type_symbol;
       
 24938                 
       
 24939             }
       
 24940             
       
 24941             ERROR;
       
 24942         }
       
 24943         
       
 24944     }/*function_wstring_to_lword*/
       
 24945     break;
       
 24946 
       
 24947 /****
       
 24948  *WSTRING_TO_DATE
       
 24949  */
       
 24950     case function_wstring_to_date :
       
 24951     {
       
 24952         symbol_c *last_type_symbol = NULL;
       
 24953 
       
 24954         {
       
 24955             symbol_c *IN_type_symbol = param_data_type;
       
 24956             last_type_symbol = param_data_type;
       
 24957             
       
 24958             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24959             {
       
 24960         
       
 24961                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24962                 return return_type_symbol;
       
 24963                 
       
 24964             }
       
 24965             
       
 24966             ERROR;
       
 24967         }
       
 24968         
       
 24969     }/*function_wstring_to_date*/
       
 24970     break;
       
 24971 
       
 24972 /****
       
 24973  *WSTRING_TO_TOD
       
 24974  */
       
 24975     case function_wstring_to_tod :
       
 24976     {
       
 24977         symbol_c *last_type_symbol = NULL;
       
 24978 
       
 24979         {
       
 24980             symbol_c *IN_type_symbol = param_data_type;
       
 24981             last_type_symbol = param_data_type;
       
 24982             
       
 24983             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24984             {
       
 24985         
       
 24986                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24987                 return return_type_symbol;
       
 24988                 
       
 24989             }
       
 24990             
       
 24991             ERROR;
       
 24992         }
       
 24993         
       
 24994     }/*function_wstring_to_tod*/
       
 24995     break;
       
 24996 
       
 24997 /****
       
 24998  *WSTRING_TO_DT
       
 24999  */
       
 25000     case function_wstring_to_dt :
       
 25001     {
       
 25002         symbol_c *last_type_symbol = NULL;
       
 25003 
       
 25004         {
       
 25005             symbol_c *IN_type_symbol = param_data_type;
       
 25006             last_type_symbol = param_data_type;
       
 25007             
       
 25008             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 25009             {
       
 25010         
       
 25011                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 25012                 return return_type_symbol;
       
 25013                 
       
 25014             }
       
 25015             
       
 25016             ERROR;
       
 25017         }
       
 25018         
       
 25019     }/*function_wstring_to_dt*/
       
 25020     break;
  2695 
 25021 
  2696 /****
 25022 /****
  2697  *DATE_TO_REAL
 25023  *DATE_TO_REAL
  2698  */
 25024  */
  2699 	case function_date_to_real :
 25025     case function_date_to_real :
  2700 	{
 25026     {
  2701 		symbol_c *last_type_symbol = NULL;
 25027         symbol_c *last_type_symbol = NULL;
  2702 
 25028 
  2703 		{
 25029         {
  2704 			identifier_c param_name("IN");
 25030             symbol_c *IN_type_symbol = param_data_type;
  2705 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25031             last_type_symbol = param_data_type;
  2706 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25032             
  2707 			
 25033             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2708 			/* Get the value from a foo(<param_value>) style call */
 25034             {
  2709 			if (IN_param_value == NULL)
 25035         
  2710 			  IN_param_value = function_call_param_iterator.next();
 25036                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2711 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25037                 return return_type_symbol;
  2712 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25038                 
  2713 			
 25039             }
  2714 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25040             
  2715 			{
 25041             ERROR;
  2716 		
 25042         }
  2717 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 25043         
  2718 				return return_type_symbol;
 25044     }/*function_date_to_real*/
  2719 				
 25045     break;
  2720 			}
 25046 
  2721 			
 25047 /****
  2722 			ERROR;
 25048  *DATE_TO_LREAL
  2723 		}
 25049  */
  2724 		
 25050     case function_date_to_lreal :
  2725 	}/*function_date_to_real*/
 25051     {
  2726 	break;
 25052         symbol_c *last_type_symbol = NULL;
       
 25053 
       
 25054         {
       
 25055             symbol_c *IN_type_symbol = param_data_type;
       
 25056             last_type_symbol = param_data_type;
       
 25057             
       
 25058             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25059             {
       
 25060         
       
 25061                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25062                 return return_type_symbol;
       
 25063                 
       
 25064             }
       
 25065             
       
 25066             ERROR;
       
 25067         }
       
 25068         
       
 25069     }/*function_date_to_lreal*/
       
 25070     break;
  2727 
 25071 
  2728 /****
 25072 /****
  2729  *DATE_TO_SINT
 25073  *DATE_TO_SINT
  2730  */
 25074  */
  2731 	case function_date_to_sint :
 25075     case function_date_to_sint :
  2732 	{
 25076     {
  2733 		symbol_c *last_type_symbol = NULL;
 25077         symbol_c *last_type_symbol = NULL;
  2734 
 25078 
  2735 		{
 25079         {
  2736 			identifier_c param_name("IN");
 25080             symbol_c *IN_type_symbol = param_data_type;
  2737 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25081             last_type_symbol = param_data_type;
  2738 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25082             
  2739 			
 25083             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2740 			/* Get the value from a foo(<param_value>) style call */
 25084             {
  2741 			if (IN_param_value == NULL)
 25085         
  2742 			  IN_param_value = function_call_param_iterator.next();
 25086                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2743 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25087                 return return_type_symbol;
  2744 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25088                 
  2745 			
 25089             }
  2746 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25090             
  2747 			{
 25091             ERROR;
  2748 		
 25092         }
  2749 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 25093         
  2750 				return return_type_symbol;
 25094     }/*function_date_to_sint*/
  2751 				
 25095     break;
  2752 			}
 25096 
  2753 			
 25097 /****
  2754 			ERROR;
 25098  *DATE_TO_INT
  2755 		}
 25099  */
  2756 		
 25100     case function_date_to_int :
  2757 	}/*function_date_to_sint*/
 25101     {
  2758 	break;
 25102         symbol_c *last_type_symbol = NULL;
       
 25103 
       
 25104         {
       
 25105             symbol_c *IN_type_symbol = param_data_type;
       
 25106             last_type_symbol = param_data_type;
       
 25107             
       
 25108             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25109             {
       
 25110         
       
 25111                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25112                 return return_type_symbol;
       
 25113                 
       
 25114             }
       
 25115             
       
 25116             ERROR;
       
 25117         }
       
 25118         
       
 25119     }/*function_date_to_int*/
       
 25120     break;
       
 25121 
       
 25122 /****
       
 25123  *DATE_TO_DINT
       
 25124  */
       
 25125     case function_date_to_dint :
       
 25126     {
       
 25127         symbol_c *last_type_symbol = NULL;
       
 25128 
       
 25129         {
       
 25130             symbol_c *IN_type_symbol = param_data_type;
       
 25131             last_type_symbol = param_data_type;
       
 25132             
       
 25133             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25134             {
       
 25135         
       
 25136                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25137                 return return_type_symbol;
       
 25138                 
       
 25139             }
       
 25140             
       
 25141             ERROR;
       
 25142         }
       
 25143         
       
 25144     }/*function_date_to_dint*/
       
 25145     break;
  2759 
 25146 
  2760 /****
 25147 /****
  2761  *DATE_TO_LINT
 25148  *DATE_TO_LINT
  2762  */
 25149  */
  2763 	case function_date_to_lint :
 25150     case function_date_to_lint :
  2764 	{
 25151     {
  2765 		symbol_c *last_type_symbol = NULL;
 25152         symbol_c *last_type_symbol = NULL;
  2766 
 25153 
  2767 		{
 25154         {
  2768 			identifier_c param_name("IN");
 25155             symbol_c *IN_type_symbol = param_data_type;
  2769 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25156             last_type_symbol = param_data_type;
  2770 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25157             
  2771 			
 25158             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2772 			/* Get the value from a foo(<param_value>) style call */
 25159             {
  2773 			if (IN_param_value == NULL)
 25160         
  2774 			  IN_param_value = function_call_param_iterator.next();
 25161                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2775 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25162                 return return_type_symbol;
  2776 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25163                 
  2777 			
 25164             }
  2778 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25165             
  2779 			{
 25166             ERROR;
  2780 		
 25167         }
  2781 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 25168         
  2782 				return return_type_symbol;
 25169     }/*function_date_to_lint*/
  2783 				
 25170     break;
  2784 			}
 25171 
  2785 			
 25172 /****
  2786 			ERROR;
 25173  *DATE_TO_USINT
  2787 		}
 25174  */
  2788 		
 25175     case function_date_to_usint :
  2789 	}/*function_date_to_lint*/
 25176     {
  2790 	break;
 25177         symbol_c *last_type_symbol = NULL;
  2791 
 25178 
  2792 /****
 25179         {
  2793  *DATE_TO_DINT
 25180             symbol_c *IN_type_symbol = param_data_type;
  2794  */
 25181             last_type_symbol = param_data_type;
  2795 	case function_date_to_dint :
 25182             
  2796 	{
 25183             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2797 		symbol_c *last_type_symbol = NULL;
 25184             {
  2798 
 25185         
  2799 		{
 25186                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2800 			identifier_c param_name("IN");
 25187                 return return_type_symbol;
  2801 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25188                 
  2802 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25189             }
  2803 			
 25190             
  2804 			/* Get the value from a foo(<param_value>) style call */
 25191             ERROR;
  2805 			if (IN_param_value == NULL)
 25192         }
  2806 			  IN_param_value = function_call_param_iterator.next();
 25193         
  2807 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25194     }/*function_date_to_usint*/
  2808 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25195     break;
  2809 			
 25196 
  2810 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25197 /****
  2811 			{
 25198  *DATE_TO_UINT
  2812 		
 25199  */
  2813 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 25200     case function_date_to_uint :
  2814 				return return_type_symbol;
 25201     {
  2815 				
 25202         symbol_c *last_type_symbol = NULL;
  2816 			}
 25203 
  2817 			
 25204         {
  2818 			ERROR;
 25205             symbol_c *IN_type_symbol = param_data_type;
  2819 		}
 25206             last_type_symbol = param_data_type;
  2820 		
 25207             
  2821 	}/*function_date_to_dint*/
 25208             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2822 	break;
 25209             {
  2823 
 25210         
  2824 /****
 25211                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2825  *DATE_TO_DATE
 25212                 return return_type_symbol;
  2826  */
 25213                 
  2827 	case function_date_to_date :
 25214             }
  2828 	{
 25215             
  2829 		symbol_c *last_type_symbol = NULL;
 25216             ERROR;
  2830 
 25217         }
  2831 		{
 25218         
  2832 			identifier_c param_name("IN");
 25219     }/*function_date_to_uint*/
  2833 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25220     break;
  2834 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25221 
  2835 			
 25222 /****
  2836 			/* Get the value from a foo(<param_value>) style call */
 25223  *DATE_TO_UDINT
  2837 			if (IN_param_value == NULL)
 25224  */
  2838 			  IN_param_value = function_call_param_iterator.next();
 25225     case function_date_to_udint :
  2839 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25226     {
  2840 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25227         symbol_c *last_type_symbol = NULL;
  2841 			
 25228 
  2842 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25229         {
  2843 			{
 25230             symbol_c *IN_type_symbol = param_data_type;
  2844 		
 25231             last_type_symbol = param_data_type;
  2845 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 25232             
  2846 				return return_type_symbol;
 25233             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2847 				
 25234             {
  2848 			}
 25235         
  2849 			
 25236                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2850 			ERROR;
 25237                 return return_type_symbol;
  2851 		}
 25238                 
  2852 		
 25239             }
  2853 	}/*function_date_to_date*/
 25240             
  2854 	break;
 25241             ERROR;
       
 25242         }
       
 25243         
       
 25244     }/*function_date_to_udint*/
       
 25245     break;
       
 25246 
       
 25247 /****
       
 25248  *DATE_TO_ULINT
       
 25249  */
       
 25250     case function_date_to_ulint :
       
 25251     {
       
 25252         symbol_c *last_type_symbol = NULL;
       
 25253 
       
 25254         {
       
 25255             symbol_c *IN_type_symbol = param_data_type;
       
 25256             last_type_symbol = param_data_type;
       
 25257             
       
 25258             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25259             {
       
 25260         
       
 25261                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 25262                 return return_type_symbol;
       
 25263                 
       
 25264             }
       
 25265             
       
 25266             ERROR;
       
 25267         }
       
 25268         
       
 25269     }/*function_date_to_ulint*/
       
 25270     break;
       
 25271 
       
 25272 /****
       
 25273  *DATE_TO_BOOL
       
 25274  */
       
 25275     case function_date_to_bool :
       
 25276     {
       
 25277         symbol_c *last_type_symbol = NULL;
       
 25278 
       
 25279         {
       
 25280             symbol_c *IN_type_symbol = param_data_type;
       
 25281             last_type_symbol = param_data_type;
       
 25282             
       
 25283             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25284             {
       
 25285         
       
 25286                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25287                 return return_type_symbol;
       
 25288                 
       
 25289             }
       
 25290             
       
 25291             ERROR;
       
 25292         }
       
 25293         
       
 25294     }/*function_date_to_bool*/
       
 25295     break;
       
 25296 
       
 25297 /****
       
 25298  *DATE_TO_BYTE
       
 25299  */
       
 25300     case function_date_to_byte :
       
 25301     {
       
 25302         symbol_c *last_type_symbol = NULL;
       
 25303 
       
 25304         {
       
 25305             symbol_c *IN_type_symbol = param_data_type;
       
 25306             last_type_symbol = param_data_type;
       
 25307             
       
 25308             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25309             {
       
 25310         
       
 25311                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 25312                 return return_type_symbol;
       
 25313                 
       
 25314             }
       
 25315             
       
 25316             ERROR;
       
 25317         }
       
 25318         
       
 25319     }/*function_date_to_byte*/
       
 25320     break;
       
 25321 
       
 25322 /****
       
 25323  *DATE_TO_WORD
       
 25324  */
       
 25325     case function_date_to_word :
       
 25326     {
       
 25327         symbol_c *last_type_symbol = NULL;
       
 25328 
       
 25329         {
       
 25330             symbol_c *IN_type_symbol = param_data_type;
       
 25331             last_type_symbol = param_data_type;
       
 25332             
       
 25333             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25334             {
       
 25335         
       
 25336                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 25337                 return return_type_symbol;
       
 25338                 
       
 25339             }
       
 25340             
       
 25341             ERROR;
       
 25342         }
       
 25343         
       
 25344     }/*function_date_to_word*/
       
 25345     break;
  2855 
 25346 
  2856 /****
 25347 /****
  2857  *DATE_TO_DWORD
 25348  *DATE_TO_DWORD
  2858  */
 25349  */
  2859 	case function_date_to_dword :
 25350     case function_date_to_dword :
  2860 	{
 25351     {
  2861 		symbol_c *last_type_symbol = NULL;
 25352         symbol_c *last_type_symbol = NULL;
  2862 
 25353 
  2863 		{
 25354         {
  2864 			identifier_c param_name("IN");
 25355             symbol_c *IN_type_symbol = param_data_type;
  2865 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25356             last_type_symbol = param_data_type;
  2866 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25357             
  2867 			
 25358             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2868 			/* Get the value from a foo(<param_value>) style call */
 25359             {
  2869 			if (IN_param_value == NULL)
 25360         
  2870 			  IN_param_value = function_call_param_iterator.next();
 25361                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2871 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25362                 return return_type_symbol;
  2872 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25363                 
  2873 			
 25364             }
  2874 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25365             
  2875 			{
 25366             ERROR;
  2876 		
 25367         }
  2877 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 25368         
  2878 				return return_type_symbol;
 25369     }/*function_date_to_dword*/
  2879 				
 25370     break;
  2880 			}
 25371 
  2881 			
 25372 /****
  2882 			ERROR;
 25373  *DATE_TO_LWORD
  2883 		}
 25374  */
  2884 		
 25375     case function_date_to_lword :
  2885 	}/*function_date_to_dword*/
 25376     {
  2886 	break;
 25377         symbol_c *last_type_symbol = NULL;
  2887 
 25378 
  2888 /****
 25379         {
  2889  *DATE_TO_DT
 25380             symbol_c *IN_type_symbol = param_data_type;
  2890  */
 25381             last_type_symbol = param_data_type;
  2891 	case function_date_to_dt :
 25382             
  2892 	{
 25383             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2893 		symbol_c *last_type_symbol = NULL;
 25384             {
  2894 
 25385         
  2895 		{
 25386                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2896 			identifier_c param_name("IN");
 25387                 return return_type_symbol;
  2897 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25388                 
  2898 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25389             }
  2899 			
 25390             
  2900 			/* Get the value from a foo(<param_value>) style call */
 25391             ERROR;
  2901 			if (IN_param_value == NULL)
 25392         }
  2902 			  IN_param_value = function_call_param_iterator.next();
 25393         
  2903 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25394     }/*function_date_to_lword*/
  2904 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25395     break;
  2905 			
 25396 
  2906 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25397 /****
  2907 			{
 25398  *DATE_TO_STRING
  2908 		
 25399  */
  2909 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 25400     case function_date_to_string :
  2910 				return return_type_symbol;
 25401     {
  2911 				
 25402         symbol_c *last_type_symbol = NULL;
  2912 			}
 25403 
  2913 			
 25404         {
  2914 			ERROR;
 25405             symbol_c *IN_type_symbol = param_data_type;
  2915 		}
 25406             last_type_symbol = param_data_type;
  2916 		
 25407             
  2917 	}/*function_date_to_dt*/
 25408             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  2918 	break;
 25409             {
  2919 
 25410         
  2920 /****
 25411                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2921  *DATE_TO_TOD
 25412                 return return_type_symbol;
  2922  */
 25413                 
  2923 	case function_date_to_tod :
 25414             }
  2924 	{
 25415             
  2925 		symbol_c *last_type_symbol = NULL;
 25416             ERROR;
  2926 
 25417         }
  2927 		{
 25418         
  2928 			identifier_c param_name("IN");
 25419     }/*function_date_to_string*/
  2929 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25420     break;
  2930 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2931 			
       
  2932 			/* Get the value from a foo(<param_value>) style call */
       
  2933 			if (IN_param_value == NULL)
       
  2934 			  IN_param_value = function_call_param_iterator.next();
       
  2935 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2936 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2937 			
       
  2938 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  2939 			{
       
  2940 		
       
  2941 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2942 				return return_type_symbol;
       
  2943 				
       
  2944 			}
       
  2945 			
       
  2946 			ERROR;
       
  2947 		}
       
  2948 		
       
  2949 	}/*function_date_to_tod*/
       
  2950 	break;
       
  2951 
       
  2952 /****
       
  2953  *DATE_TO_UDINT
       
  2954  */
       
  2955 	case function_date_to_udint :
       
  2956 	{
       
  2957 		symbol_c *last_type_symbol = NULL;
       
  2958 
       
  2959 		{
       
  2960 			identifier_c param_name("IN");
       
  2961 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2962 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2963 			
       
  2964 			/* Get the value from a foo(<param_value>) style call */
       
  2965 			if (IN_param_value == NULL)
       
  2966 			  IN_param_value = function_call_param_iterator.next();
       
  2967 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2968 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2969 			
       
  2970 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  2971 			{
       
  2972 		
       
  2973 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2974 				return return_type_symbol;
       
  2975 				
       
  2976 			}
       
  2977 			
       
  2978 			ERROR;
       
  2979 		}
       
  2980 		
       
  2981 	}/*function_date_to_udint*/
       
  2982 	break;
       
  2983 
       
  2984 /****
       
  2985  *DATE_TO_WORD
       
  2986  */
       
  2987 	case function_date_to_word :
       
  2988 	{
       
  2989 		symbol_c *last_type_symbol = NULL;
       
  2990 
       
  2991 		{
       
  2992 			identifier_c param_name("IN");
       
  2993 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2994 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2995 			
       
  2996 			/* Get the value from a foo(<param_value>) style call */
       
  2997 			if (IN_param_value == NULL)
       
  2998 			  IN_param_value = function_call_param_iterator.next();
       
  2999 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3000 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3001 			
       
  3002 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3003 			{
       
  3004 		
       
  3005 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3006 				return return_type_symbol;
       
  3007 				
       
  3008 			}
       
  3009 			
       
  3010 			ERROR;
       
  3011 		}
       
  3012 		
       
  3013 	}/*function_date_to_word*/
       
  3014 	break;
       
  3015 
 25421 
  3016 /****
 25422 /****
  3017  *DATE_TO_WSTRING
 25423  *DATE_TO_WSTRING
  3018  */
 25424  */
  3019 	case function_date_to_wstring :
 25425     case function_date_to_wstring :
  3020 	{
 25426     {
  3021 		symbol_c *last_type_symbol = NULL;
 25427         symbol_c *last_type_symbol = NULL;
  3022 
 25428 
  3023 		{
 25429         {
  3024 			identifier_c param_name("IN");
 25430             symbol_c *IN_type_symbol = param_data_type;
  3025 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25431             last_type_symbol = param_data_type;
  3026 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25432             
  3027 			
 25433             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3028 			/* Get the value from a foo(<param_value>) style call */
 25434             {
  3029 			if (IN_param_value == NULL)
 25435         
  3030 			  IN_param_value = function_call_param_iterator.next();
 25436                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  3031 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25437                 return return_type_symbol;
  3032 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25438                 
  3033 			
 25439             }
  3034 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25440             
  3035 			{
 25441             ERROR;
  3036 		
 25442         }
  3037 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 25443         
  3038 				return return_type_symbol;
 25444     }/*function_date_to_wstring*/
  3039 				
 25445     break;
  3040 			}
 25446 
  3041 			
 25447 /****
  3042 			ERROR;
 25448  *TOD_TO_REAL
  3043 		}
 25449  */
  3044 		
 25450     case function_tod_to_real :
  3045 	}/*function_date_to_wstring*/
 25451     {
  3046 	break;
 25452         symbol_c *last_type_symbol = NULL;
  3047 
 25453 
  3048 /****
 25454         {
  3049  *DATE_TO_STRING
 25455             symbol_c *IN_type_symbol = param_data_type;
  3050  */
 25456             last_type_symbol = param_data_type;
  3051 	case function_date_to_string :
 25457             
  3052 	{
 25458             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3053 		symbol_c *last_type_symbol = NULL;
 25459             {
  3054 
 25460         
  3055 		{
 25461                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3056 			identifier_c param_name("IN");
 25462                 return return_type_symbol;
  3057 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25463                 
  3058 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25464             }
  3059 			
 25465             
  3060 			/* Get the value from a foo(<param_value>) style call */
 25466             ERROR;
  3061 			if (IN_param_value == NULL)
 25467         }
  3062 			  IN_param_value = function_call_param_iterator.next();
 25468         
  3063 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25469     }/*function_tod_to_real*/
  3064 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25470     break;
  3065 			
 25471 
  3066 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25472 /****
  3067 			{
 25473  *TOD_TO_LREAL
  3068 		
 25474  */
  3069 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25475     case function_tod_to_lreal :
  3070 				return return_type_symbol;
 25476     {
  3071 				
 25477         symbol_c *last_type_symbol = NULL;
  3072 			}
 25478 
  3073 			
 25479         {
  3074 			ERROR;
 25480             symbol_c *IN_type_symbol = param_data_type;
  3075 		}
 25481             last_type_symbol = param_data_type;
  3076 		
 25482             
  3077 	}/*function_date_to_string*/
 25483             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3078 	break;
 25484             {
  3079 
 25485         
  3080 /****
 25486                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3081  *DATE_TO_LWORD
 25487                 return return_type_symbol;
  3082  */
 25488                 
  3083 	case function_date_to_lword :
 25489             }
  3084 	{
 25490             
  3085 		symbol_c *last_type_symbol = NULL;
 25491             ERROR;
  3086 
 25492         }
  3087 		{
 25493         
  3088 			identifier_c param_name("IN");
 25494     }/*function_tod_to_lreal*/
  3089 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25495     break;
  3090 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25496 
  3091 			
 25497 /****
  3092 			/* Get the value from a foo(<param_value>) style call */
 25498  *TOD_TO_SINT
  3093 			if (IN_param_value == NULL)
 25499  */
  3094 			  IN_param_value = function_call_param_iterator.next();
 25500     case function_tod_to_sint :
  3095 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25501     {
  3096 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25502         symbol_c *last_type_symbol = NULL;
  3097 			
 25503 
  3098 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25504         {
  3099 			{
 25505             symbol_c *IN_type_symbol = param_data_type;
  3100 		
 25506             last_type_symbol = param_data_type;
  3101 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 25507             
  3102 				return return_type_symbol;
 25508             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3103 				
 25509             {
  3104 			}
 25510         
  3105 			
 25511                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3106 			ERROR;
 25512                 return return_type_symbol;
  3107 		}
 25513                 
  3108 		
 25514             }
  3109 	}/*function_date_to_lword*/
 25515             
  3110 	break;
 25516             ERROR;
  3111 
 25517         }
  3112 /****
 25518         
  3113  *DATE_TO_UINT
 25519     }/*function_tod_to_sint*/
  3114  */
 25520     break;
  3115 	case function_date_to_uint :
 25521 
  3116 	{
 25522 /****
  3117 		symbol_c *last_type_symbol = NULL;
 25523  *TOD_TO_INT
  3118 
 25524  */
  3119 		{
 25525     case function_tod_to_int :
  3120 			identifier_c param_name("IN");
 25526     {
  3121 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25527         symbol_c *last_type_symbol = NULL;
  3122 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25528 
  3123 			
 25529         {
  3124 			/* Get the value from a foo(<param_value>) style call */
 25530             symbol_c *IN_type_symbol = param_data_type;
  3125 			if (IN_param_value == NULL)
 25531             last_type_symbol = param_data_type;
  3126 			  IN_param_value = function_call_param_iterator.next();
 25532             
  3127 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25533             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3128 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25534             {
  3129 			
 25535         
  3130 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25536                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3131 			{
 25537                 return return_type_symbol;
  3132 		
 25538                 
  3133 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 25539             }
  3134 				return return_type_symbol;
 25540             
  3135 				
 25541             ERROR;
  3136 			}
 25542         }
  3137 			
 25543         
  3138 			ERROR;
 25544     }/*function_tod_to_int*/
  3139 		}
 25545     break;
  3140 		
 25546 
  3141 	}/*function_date_to_uint*/
 25547 /****
  3142 	break;
 25548  *TOD_TO_DINT
  3143 
 25549  */
  3144 /****
 25550     case function_tod_to_dint :
  3145  *DATE_TO_LREAL
 25551     {
  3146  */
 25552         symbol_c *last_type_symbol = NULL;
  3147 	case function_date_to_lreal :
 25553 
  3148 	{
 25554         {
  3149 		symbol_c *last_type_symbol = NULL;
 25555             symbol_c *IN_type_symbol = param_data_type;
  3150 
 25556             last_type_symbol = param_data_type;
  3151 		{
 25557             
  3152 			identifier_c param_name("IN");
 25558             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3153 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25559             {
  3154 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25560         
  3155 			
 25561                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3156 			/* Get the value from a foo(<param_value>) style call */
 25562                 return return_type_symbol;
  3157 			if (IN_param_value == NULL)
 25563                 
  3158 			  IN_param_value = function_call_param_iterator.next();
 25564             }
  3159 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25565             
  3160 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25566             ERROR;
  3161 			
 25567         }
  3162 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25568         
  3163 			{
 25569     }/*function_tod_to_dint*/
  3164 		
 25570     break;
  3165 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 25571 
  3166 				return return_type_symbol;
 25572 /****
  3167 				
 25573  *TOD_TO_LINT
  3168 			}
 25574  */
  3169 			
 25575     case function_tod_to_lint :
  3170 			ERROR;
 25576     {
  3171 		}
 25577         symbol_c *last_type_symbol = NULL;
  3172 		
 25578 
  3173 	}/*function_date_to_lreal*/
 25579         {
  3174 	break;
 25580             symbol_c *IN_type_symbol = param_data_type;
  3175 
 25581             last_type_symbol = param_data_type;
  3176 /****
 25582             
  3177  *DATE_TO_BYTE
 25583             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3178  */
 25584             {
  3179 	case function_date_to_byte :
 25585         
  3180 	{
 25586                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3181 		symbol_c *last_type_symbol = NULL;
 25587                 return return_type_symbol;
  3182 
 25588                 
  3183 		{
 25589             }
  3184 			identifier_c param_name("IN");
 25590             
  3185 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25591             ERROR;
  3186 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25592         }
  3187 			
 25593         
  3188 			/* Get the value from a foo(<param_value>) style call */
 25594     }/*function_tod_to_lint*/
  3189 			if (IN_param_value == NULL)
 25595     break;
  3190 			  IN_param_value = function_call_param_iterator.next();
 25596 
  3191 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25597 /****
  3192 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25598  *TOD_TO_USINT
  3193 			
 25599  */
  3194 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25600     case function_tod_to_usint :
  3195 			{
 25601     {
  3196 		
 25602         symbol_c *last_type_symbol = NULL;
  3197 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 25603 
  3198 				return return_type_symbol;
 25604         {
  3199 				
 25605             symbol_c *IN_type_symbol = param_data_type;
  3200 			}
 25606             last_type_symbol = param_data_type;
  3201 			
 25607             
  3202 			ERROR;
 25608             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3203 		}
 25609             {
  3204 		
 25610         
  3205 	}/*function_date_to_byte*/
 25611                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  3206 	break;
 25612                 return return_type_symbol;
  3207 
 25613                 
  3208 /****
 25614             }
  3209  *DATE_TO_USINT
 25615             
  3210  */
 25616             ERROR;
  3211 	case function_date_to_usint :
 25617         }
  3212 	{
 25618         
  3213 		symbol_c *last_type_symbol = NULL;
 25619     }/*function_tod_to_usint*/
  3214 
 25620     break;
  3215 		{
 25621 
  3216 			identifier_c param_name("IN");
 25622 /****
  3217 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25623  *TOD_TO_UINT
  3218 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25624  */
  3219 			
 25625     case function_tod_to_uint :
  3220 			/* Get the value from a foo(<param_value>) style call */
 25626     {
  3221 			if (IN_param_value == NULL)
 25627         symbol_c *last_type_symbol = NULL;
  3222 			  IN_param_value = function_call_param_iterator.next();
 25628 
  3223 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25629         {
  3224 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25630             symbol_c *IN_type_symbol = param_data_type;
  3225 			
 25631             last_type_symbol = param_data_type;
  3226 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25632             
  3227 			{
 25633             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3228 		
 25634             {
  3229 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 25635         
  3230 				return return_type_symbol;
 25636                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3231 				
 25637                 return return_type_symbol;
  3232 			}
 25638                 
  3233 			
 25639             }
  3234 			ERROR;
 25640             
  3235 		}
 25641             ERROR;
  3236 		
 25642         }
  3237 	}/*function_date_to_usint*/
 25643         
  3238 	break;
 25644     }/*function_tod_to_uint*/
  3239 
 25645     break;
  3240 /****
 25646 
  3241  *DATE_TO_ULINT
 25647 /****
  3242  */
 25648  *TOD_TO_UDINT
  3243 	case function_date_to_ulint :
 25649  */
  3244 	{
 25650     case function_tod_to_udint :
  3245 		symbol_c *last_type_symbol = NULL;
 25651     {
  3246 
 25652         symbol_c *last_type_symbol = NULL;
  3247 		{
 25653 
  3248 			identifier_c param_name("IN");
 25654         {
  3249 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25655             symbol_c *IN_type_symbol = param_data_type;
  3250 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25656             last_type_symbol = param_data_type;
  3251 			
 25657             
  3252 			/* Get the value from a foo(<param_value>) style call */
 25658             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3253 			if (IN_param_value == NULL)
 25659             {
  3254 			  IN_param_value = function_call_param_iterator.next();
 25660         
  3255 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25661                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3256 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25662                 return return_type_symbol;
  3257 			
 25663                 
  3258 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25664             }
  3259 			{
 25665             
  3260 		
 25666             ERROR;
  3261 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 25667         }
  3262 				return return_type_symbol;
 25668         
  3263 				
 25669     }/*function_tod_to_udint*/
  3264 			}
 25670     break;
  3265 			
 25671 
  3266 			ERROR;
 25672 /****
  3267 		}
 25673  *TOD_TO_ULINT
  3268 		
 25674  */
  3269 	}/*function_date_to_ulint*/
 25675     case function_tod_to_ulint :
  3270 	break;
 25676     {
  3271 
 25677         symbol_c *last_type_symbol = NULL;
  3272 /****
 25678 
  3273  *DATE_TO_BOOL
 25679         {
  3274  */
 25680             symbol_c *IN_type_symbol = param_data_type;
  3275 	case function_date_to_bool :
 25681             last_type_symbol = param_data_type;
  3276 	{
 25682             
  3277 		symbol_c *last_type_symbol = NULL;
 25683             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3278 
 25684             {
  3279 		{
 25685         
  3280 			identifier_c param_name("IN");
 25686                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3281 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25687                 return return_type_symbol;
  3282 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25688                 
  3283 			
 25689             }
  3284 			/* Get the value from a foo(<param_value>) style call */
 25690             
  3285 			if (IN_param_value == NULL)
 25691             ERROR;
  3286 			  IN_param_value = function_call_param_iterator.next();
 25692         }
  3287 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25693         
  3288 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25694     }/*function_tod_to_ulint*/
  3289 			
 25695     break;
  3290 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25696 
  3291 			{
 25697 /****
  3292 		
 25698  *TOD_TO_BOOL
  3293 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25699  */
  3294 				return return_type_symbol;
 25700     case function_tod_to_bool :
  3295 				
 25701     {
  3296 			}
 25702         symbol_c *last_type_symbol = NULL;
  3297 			
 25703 
  3298 			ERROR;
 25704         {
  3299 		}
 25705             symbol_c *IN_type_symbol = param_data_type;
  3300 		
 25706             last_type_symbol = param_data_type;
  3301 	}/*function_date_to_bool*/
 25707             
  3302 	break;
 25708             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3303 
 25709             {
  3304 /****
 25710         
  3305  *DATE_TO_TIME
 25711                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3306  */
 25712                 return return_type_symbol;
  3307 	case function_date_to_time :
 25713                 
  3308 	{
 25714             }
  3309 		symbol_c *last_type_symbol = NULL;
 25715             
  3310 
 25716             ERROR;
  3311 		{
 25717         }
  3312 			identifier_c param_name("IN");
 25718         
  3313 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25719     }/*function_tod_to_bool*/
  3314 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25720     break;
  3315 			
 25721 
  3316 			/* Get the value from a foo(<param_value>) style call */
 25722 /****
  3317 			if (IN_param_value == NULL)
 25723  *TOD_TO_BYTE
  3318 			  IN_param_value = function_call_param_iterator.next();
 25724  */
  3319 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25725     case function_tod_to_byte :
  3320 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25726     {
  3321 			
 25727         symbol_c *last_type_symbol = NULL;
  3322 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25728 
  3323 			{
 25729         {
  3324 		
 25730             symbol_c *IN_type_symbol = param_data_type;
  3325 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25731             last_type_symbol = param_data_type;
  3326 				return return_type_symbol;
 25732             
  3327 				
 25733             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3328 			}
 25734             {
  3329 			
 25735         
  3330 			ERROR;
 25736                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3331 		}
 25737                 return return_type_symbol;
  3332 		
 25738                 
  3333 	}/*function_date_to_time*/
 25739             }
  3334 	break;
 25740             
  3335 
 25741             ERROR;
  3336 /****
 25742         }
  3337  *DATE_TO_INT
 25743         
  3338  */
 25744     }/*function_tod_to_byte*/
  3339 	case function_date_to_int :
 25745     break;
  3340 	{
 25746 
  3341 		symbol_c *last_type_symbol = NULL;
 25747 /****
  3342 
 25748  *TOD_TO_WORD
  3343 		{
 25749  */
  3344 			identifier_c param_name("IN");
 25750     case function_tod_to_word :
  3345 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25751     {
  3346 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25752         symbol_c *last_type_symbol = NULL;
  3347 			
 25753 
  3348 			/* Get the value from a foo(<param_value>) style call */
 25754         {
  3349 			if (IN_param_value == NULL)
 25755             symbol_c *IN_type_symbol = param_data_type;
  3350 			  IN_param_value = function_call_param_iterator.next();
 25756             last_type_symbol = param_data_type;
  3351 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25757             
  3352 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25758             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3353 			
 25759             {
  3354 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25760         
  3355 			{
 25761                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3356 		
 25762                 return return_type_symbol;
  3357 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 25763                 
  3358 				return return_type_symbol;
 25764             }
  3359 				
 25765             
  3360 			}
 25766             ERROR;
  3361 			
 25767         }
  3362 			ERROR;
 25768         
  3363 		}
 25769     }/*function_tod_to_word*/
  3364 		
 25770     break;
  3365 	}/*function_date_to_int*/
 25771 
  3366 	break;
 25772 /****
  3367 
 25773  *TOD_TO_DWORD
  3368 /****
 25774  */
  3369  *DWORD_TO_REAL
 25775     case function_tod_to_dword :
  3370  */
 25776     {
  3371 	case function_dword_to_real :
 25777         symbol_c *last_type_symbol = NULL;
  3372 	{
 25778 
  3373 		symbol_c *last_type_symbol = NULL;
 25779         {
  3374 
 25780             symbol_c *IN_type_symbol = param_data_type;
  3375 		{
 25781             last_type_symbol = param_data_type;
  3376 			identifier_c param_name("IN");
 25782             
  3377 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25783             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3378 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25784             {
  3379 			
 25785         
  3380 			/* Get the value from a foo(<param_value>) style call */
 25786                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3381 			if (IN_param_value == NULL)
 25787                 return return_type_symbol;
  3382 			  IN_param_value = function_call_param_iterator.next();
 25788                 
  3383 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25789             }
  3384 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25790             
  3385 			
 25791             ERROR;
  3386 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 25792         }
  3387 			{
 25793         
  3388 		
 25794     }/*function_tod_to_dword*/
  3389 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 25795     break;
  3390 				return return_type_symbol;
 25796 
  3391 				
 25797 /****
  3392 			}
 25798  *TOD_TO_LWORD
  3393 			
 25799  */
  3394 			ERROR;
 25800     case function_tod_to_lword :
  3395 		}
 25801     {
  3396 		
 25802         symbol_c *last_type_symbol = NULL;
  3397 	}/*function_dword_to_real*/
 25803 
  3398 	break;
 25804         {
  3399 
 25805             symbol_c *IN_type_symbol = param_data_type;
  3400 /****
 25806             last_type_symbol = param_data_type;
  3401  *DWORD_TO_SINT
 25807             
  3402  */
 25808             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3403 	case function_dword_to_sint :
 25809             {
  3404 	{
 25810         
  3405 		symbol_c *last_type_symbol = NULL;
 25811                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3406 
 25812                 return return_type_symbol;
  3407 		{
 25813                 
  3408 			identifier_c param_name("IN");
 25814             }
  3409 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25815             
  3410 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25816             ERROR;
  3411 			
 25817         }
  3412 			/* Get the value from a foo(<param_value>) style call */
 25818         
  3413 			if (IN_param_value == NULL)
 25819     }/*function_tod_to_lword*/
  3414 			  IN_param_value = function_call_param_iterator.next();
 25820     break;
  3415 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25821 
  3416 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25822 /****
  3417 			
 25823  *TOD_TO_STRING
  3418 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 25824  */
  3419 			{
 25825     case function_tod_to_string :
  3420 		
 25826     {
  3421 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 25827         symbol_c *last_type_symbol = NULL;
  3422 				return return_type_symbol;
 25828 
  3423 				
 25829         {
  3424 			}
 25830             symbol_c *IN_type_symbol = param_data_type;
  3425 			
 25831             last_type_symbol = param_data_type;
  3426 			ERROR;
 25832             
  3427 		}
 25833             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3428 		
 25834             {
  3429 	}/*function_dword_to_sint*/
 25835         
  3430 	break;
 25836                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3431 
 25837                 return return_type_symbol;
  3432 /****
 25838                 
  3433  *DWORD_TO_LINT
 25839             }
  3434  */
 25840             
  3435 	case function_dword_to_lint :
 25841             ERROR;
  3436 	{
 25842         }
  3437 		symbol_c *last_type_symbol = NULL;
 25843         
  3438 
 25844     }/*function_tod_to_string*/
  3439 		{
 25845     break;
  3440 			identifier_c param_name("IN");
 25846 
  3441 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25847 /****
  3442 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25848  *TOD_TO_WSTRING
  3443 			
 25849  */
  3444 			/* Get the value from a foo(<param_value>) style call */
 25850     case function_tod_to_wstring :
  3445 			if (IN_param_value == NULL)
 25851     {
  3446 			  IN_param_value = function_call_param_iterator.next();
 25852         symbol_c *last_type_symbol = NULL;
  3447 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25853 
  3448 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25854         {
  3449 			
 25855             symbol_c *IN_type_symbol = param_data_type;
  3450 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 25856             last_type_symbol = param_data_type;
  3451 			{
 25857             
  3452 		
 25858             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3453 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 25859             {
  3454 				return return_type_symbol;
 25860         
  3455 				
 25861                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  3456 			}
 25862                 return return_type_symbol;
  3457 			
 25863                 
  3458 			ERROR;
 25864             }
  3459 		}
 25865             
  3460 		
 25866             ERROR;
  3461 	}/*function_dword_to_lint*/
 25867         }
  3462 	break;
 25868         
  3463 
 25869     }/*function_tod_to_wstring*/
  3464 /****
 25870     break;
  3465  *DWORD_TO_DINT
       
  3466  */
       
  3467 	case function_dword_to_dint :
       
  3468 	{
       
  3469 		symbol_c *last_type_symbol = NULL;
       
  3470 
       
  3471 		{
       
  3472 			identifier_c param_name("IN");
       
  3473 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3474 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3475 			
       
  3476 			/* Get the value from a foo(<param_value>) style call */
       
  3477 			if (IN_param_value == NULL)
       
  3478 			  IN_param_value = function_call_param_iterator.next();
       
  3479 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3480 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3481 			
       
  3482 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3483 			{
       
  3484 		
       
  3485 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3486 				return return_type_symbol;
       
  3487 				
       
  3488 			}
       
  3489 			
       
  3490 			ERROR;
       
  3491 		}
       
  3492 		
       
  3493 	}/*function_dword_to_dint*/
       
  3494 	break;
       
  3495 
       
  3496 /****
       
  3497  *DWORD_TO_DATE
       
  3498  */
       
  3499 	case function_dword_to_date :
       
  3500 	{
       
  3501 		symbol_c *last_type_symbol = NULL;
       
  3502 
       
  3503 		{
       
  3504 			identifier_c param_name("IN");
       
  3505 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3506 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3507 			
       
  3508 			/* Get the value from a foo(<param_value>) style call */
       
  3509 			if (IN_param_value == NULL)
       
  3510 			  IN_param_value = function_call_param_iterator.next();
       
  3511 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3512 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3513 			
       
  3514 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3515 			{
       
  3516 		
       
  3517 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3518 				return return_type_symbol;
       
  3519 				
       
  3520 			}
       
  3521 			
       
  3522 			ERROR;
       
  3523 		}
       
  3524 		
       
  3525 	}/*function_dword_to_date*/
       
  3526 	break;
       
  3527 
       
  3528 /****
       
  3529  *DWORD_TO_DWORD
       
  3530  */
       
  3531 	case function_dword_to_dword :
       
  3532 	{
       
  3533 		symbol_c *last_type_symbol = NULL;
       
  3534 
       
  3535 		{
       
  3536 			identifier_c param_name("IN");
       
  3537 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3538 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3539 			
       
  3540 			/* Get the value from a foo(<param_value>) style call */
       
  3541 			if (IN_param_value == NULL)
       
  3542 			  IN_param_value = function_call_param_iterator.next();
       
  3543 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3544 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3545 			
       
  3546 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3547 			{
       
  3548 		
       
  3549 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3550 				return return_type_symbol;
       
  3551 				
       
  3552 			}
       
  3553 			
       
  3554 			ERROR;
       
  3555 		}
       
  3556 		
       
  3557 	}/*function_dword_to_dword*/
       
  3558 	break;
       
  3559 
       
  3560 /****
       
  3561  *DWORD_TO_DT
       
  3562  */
       
  3563 	case function_dword_to_dt :
       
  3564 	{
       
  3565 		symbol_c *last_type_symbol = NULL;
       
  3566 
       
  3567 		{
       
  3568 			identifier_c param_name("IN");
       
  3569 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3570 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3571 			
       
  3572 			/* Get the value from a foo(<param_value>) style call */
       
  3573 			if (IN_param_value == NULL)
       
  3574 			  IN_param_value = function_call_param_iterator.next();
       
  3575 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3576 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3577 			
       
  3578 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3579 			{
       
  3580 		
       
  3581 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3582 				return return_type_symbol;
       
  3583 				
       
  3584 			}
       
  3585 			
       
  3586 			ERROR;
       
  3587 		}
       
  3588 		
       
  3589 	}/*function_dword_to_dt*/
       
  3590 	break;
       
  3591 
       
  3592 /****
       
  3593  *DWORD_TO_TOD
       
  3594  */
       
  3595 	case function_dword_to_tod :
       
  3596 	{
       
  3597 		symbol_c *last_type_symbol = NULL;
       
  3598 
       
  3599 		{
       
  3600 			identifier_c param_name("IN");
       
  3601 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3602 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3603 			
       
  3604 			/* Get the value from a foo(<param_value>) style call */
       
  3605 			if (IN_param_value == NULL)
       
  3606 			  IN_param_value = function_call_param_iterator.next();
       
  3607 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3608 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3609 			
       
  3610 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3611 			{
       
  3612 		
       
  3613 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3614 				return return_type_symbol;
       
  3615 				
       
  3616 			}
       
  3617 			
       
  3618 			ERROR;
       
  3619 		}
       
  3620 		
       
  3621 	}/*function_dword_to_tod*/
       
  3622 	break;
       
  3623 
       
  3624 /****
       
  3625  *DWORD_TO_UDINT
       
  3626  */
       
  3627 	case function_dword_to_udint :
       
  3628 	{
       
  3629 		symbol_c *last_type_symbol = NULL;
       
  3630 
       
  3631 		{
       
  3632 			identifier_c param_name("IN");
       
  3633 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3634 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3635 			
       
  3636 			/* Get the value from a foo(<param_value>) style call */
       
  3637 			if (IN_param_value == NULL)
       
  3638 			  IN_param_value = function_call_param_iterator.next();
       
  3639 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3640 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3641 			
       
  3642 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3643 			{
       
  3644 		
       
  3645 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3646 				return return_type_symbol;
       
  3647 				
       
  3648 			}
       
  3649 			
       
  3650 			ERROR;
       
  3651 		}
       
  3652 		
       
  3653 	}/*function_dword_to_udint*/
       
  3654 	break;
       
  3655 
       
  3656 /****
       
  3657  *DWORD_TO_WORD
       
  3658  */
       
  3659 	case function_dword_to_word :
       
  3660 	{
       
  3661 		symbol_c *last_type_symbol = NULL;
       
  3662 
       
  3663 		{
       
  3664 			identifier_c param_name("IN");
       
  3665 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3666 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3667 			
       
  3668 			/* Get the value from a foo(<param_value>) style call */
       
  3669 			if (IN_param_value == NULL)
       
  3670 			  IN_param_value = function_call_param_iterator.next();
       
  3671 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3672 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3673 			
       
  3674 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3675 			{
       
  3676 		
       
  3677 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3678 				return return_type_symbol;
       
  3679 				
       
  3680 			}
       
  3681 			
       
  3682 			ERROR;
       
  3683 		}
       
  3684 		
       
  3685 	}/*function_dword_to_word*/
       
  3686 	break;
       
  3687 
       
  3688 /****
       
  3689  *DWORD_TO_WSTRING
       
  3690  */
       
  3691 	case function_dword_to_wstring :
       
  3692 	{
       
  3693 		symbol_c *last_type_symbol = NULL;
       
  3694 
       
  3695 		{
       
  3696 			identifier_c param_name("IN");
       
  3697 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3698 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3699 			
       
  3700 			/* Get the value from a foo(<param_value>) style call */
       
  3701 			if (IN_param_value == NULL)
       
  3702 			  IN_param_value = function_call_param_iterator.next();
       
  3703 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3704 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3705 			
       
  3706 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3707 			{
       
  3708 		
       
  3709 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3710 				return return_type_symbol;
       
  3711 				
       
  3712 			}
       
  3713 			
       
  3714 			ERROR;
       
  3715 		}
       
  3716 		
       
  3717 	}/*function_dword_to_wstring*/
       
  3718 	break;
       
  3719 
       
  3720 /****
       
  3721  *DWORD_TO_STRING
       
  3722  */
       
  3723 	case function_dword_to_string :
       
  3724 	{
       
  3725 		symbol_c *last_type_symbol = NULL;
       
  3726 
       
  3727 		{
       
  3728 			identifier_c param_name("IN");
       
  3729 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3730 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3731 			
       
  3732 			/* Get the value from a foo(<param_value>) style call */
       
  3733 			if (IN_param_value == NULL)
       
  3734 			  IN_param_value = function_call_param_iterator.next();
       
  3735 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3736 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3737 			
       
  3738 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3739 			{
       
  3740 		
       
  3741 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3742 				return return_type_symbol;
       
  3743 				
       
  3744 			}
       
  3745 			
       
  3746 			ERROR;
       
  3747 		}
       
  3748 		
       
  3749 	}/*function_dword_to_string*/
       
  3750 	break;
       
  3751 
       
  3752 /****
       
  3753  *DWORD_TO_LWORD
       
  3754  */
       
  3755 	case function_dword_to_lword :
       
  3756 	{
       
  3757 		symbol_c *last_type_symbol = NULL;
       
  3758 
       
  3759 		{
       
  3760 			identifier_c param_name("IN");
       
  3761 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3762 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3763 			
       
  3764 			/* Get the value from a foo(<param_value>) style call */
       
  3765 			if (IN_param_value == NULL)
       
  3766 			  IN_param_value = function_call_param_iterator.next();
       
  3767 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3768 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3769 			
       
  3770 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3771 			{
       
  3772 		
       
  3773 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3774 				return return_type_symbol;
       
  3775 				
       
  3776 			}
       
  3777 			
       
  3778 			ERROR;
       
  3779 		}
       
  3780 		
       
  3781 	}/*function_dword_to_lword*/
       
  3782 	break;
       
  3783 
       
  3784 /****
       
  3785  *DWORD_TO_UINT
       
  3786  */
       
  3787 	case function_dword_to_uint :
       
  3788 	{
       
  3789 		symbol_c *last_type_symbol = NULL;
       
  3790 
       
  3791 		{
       
  3792 			identifier_c param_name("IN");
       
  3793 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3794 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3795 			
       
  3796 			/* Get the value from a foo(<param_value>) style call */
       
  3797 			if (IN_param_value == NULL)
       
  3798 			  IN_param_value = function_call_param_iterator.next();
       
  3799 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3800 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3801 			
       
  3802 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3803 			{
       
  3804 		
       
  3805 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3806 				return return_type_symbol;
       
  3807 				
       
  3808 			}
       
  3809 			
       
  3810 			ERROR;
       
  3811 		}
       
  3812 		
       
  3813 	}/*function_dword_to_uint*/
       
  3814 	break;
       
  3815 
       
  3816 /****
       
  3817  *DWORD_TO_LREAL
       
  3818  */
       
  3819 	case function_dword_to_lreal :
       
  3820 	{
       
  3821 		symbol_c *last_type_symbol = NULL;
       
  3822 
       
  3823 		{
       
  3824 			identifier_c param_name("IN");
       
  3825 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3826 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3827 			
       
  3828 			/* Get the value from a foo(<param_value>) style call */
       
  3829 			if (IN_param_value == NULL)
       
  3830 			  IN_param_value = function_call_param_iterator.next();
       
  3831 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3832 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3833 			
       
  3834 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3835 			{
       
  3836 		
       
  3837 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3838 				return return_type_symbol;
       
  3839 				
       
  3840 			}
       
  3841 			
       
  3842 			ERROR;
       
  3843 		}
       
  3844 		
       
  3845 	}/*function_dword_to_lreal*/
       
  3846 	break;
       
  3847 
       
  3848 /****
       
  3849  *DWORD_TO_BYTE
       
  3850  */
       
  3851 	case function_dword_to_byte :
       
  3852 	{
       
  3853 		symbol_c *last_type_symbol = NULL;
       
  3854 
       
  3855 		{
       
  3856 			identifier_c param_name("IN");
       
  3857 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3858 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3859 			
       
  3860 			/* Get the value from a foo(<param_value>) style call */
       
  3861 			if (IN_param_value == NULL)
       
  3862 			  IN_param_value = function_call_param_iterator.next();
       
  3863 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3864 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3865 			
       
  3866 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3867 			{
       
  3868 		
       
  3869 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3870 				return return_type_symbol;
       
  3871 				
       
  3872 			}
       
  3873 			
       
  3874 			ERROR;
       
  3875 		}
       
  3876 		
       
  3877 	}/*function_dword_to_byte*/
       
  3878 	break;
       
  3879 
       
  3880 /****
       
  3881  *DWORD_TO_USINT
       
  3882  */
       
  3883 	case function_dword_to_usint :
       
  3884 	{
       
  3885 		symbol_c *last_type_symbol = NULL;
       
  3886 
       
  3887 		{
       
  3888 			identifier_c param_name("IN");
       
  3889 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3890 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3891 			
       
  3892 			/* Get the value from a foo(<param_value>) style call */
       
  3893 			if (IN_param_value == NULL)
       
  3894 			  IN_param_value = function_call_param_iterator.next();
       
  3895 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3896 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3897 			
       
  3898 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3899 			{
       
  3900 		
       
  3901 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3902 				return return_type_symbol;
       
  3903 				
       
  3904 			}
       
  3905 			
       
  3906 			ERROR;
       
  3907 		}
       
  3908 		
       
  3909 	}/*function_dword_to_usint*/
       
  3910 	break;
       
  3911 
       
  3912 /****
       
  3913  *DWORD_TO_ULINT
       
  3914  */
       
  3915 	case function_dword_to_ulint :
       
  3916 	{
       
  3917 		symbol_c *last_type_symbol = NULL;
       
  3918 
       
  3919 		{
       
  3920 			identifier_c param_name("IN");
       
  3921 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3922 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3923 			
       
  3924 			/* Get the value from a foo(<param_value>) style call */
       
  3925 			if (IN_param_value == NULL)
       
  3926 			  IN_param_value = function_call_param_iterator.next();
       
  3927 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3928 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3929 			
       
  3930 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3931 			{
       
  3932 		
       
  3933 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3934 				return return_type_symbol;
       
  3935 				
       
  3936 			}
       
  3937 			
       
  3938 			ERROR;
       
  3939 		}
       
  3940 		
       
  3941 	}/*function_dword_to_ulint*/
       
  3942 	break;
       
  3943 
       
  3944 /****
       
  3945  *DWORD_TO_BOOL
       
  3946  */
       
  3947 	case function_dword_to_bool :
       
  3948 	{
       
  3949 		symbol_c *last_type_symbol = NULL;
       
  3950 
       
  3951 		{
       
  3952 			identifier_c param_name("IN");
       
  3953 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3954 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3955 			
       
  3956 			/* Get the value from a foo(<param_value>) style call */
       
  3957 			if (IN_param_value == NULL)
       
  3958 			  IN_param_value = function_call_param_iterator.next();
       
  3959 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3960 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3961 			
       
  3962 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3963 			{
       
  3964 		
       
  3965 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3966 				return return_type_symbol;
       
  3967 				
       
  3968 			}
       
  3969 			
       
  3970 			ERROR;
       
  3971 		}
       
  3972 		
       
  3973 	}/*function_dword_to_bool*/
       
  3974 	break;
       
  3975 
       
  3976 /****
       
  3977  *DWORD_TO_TIME
       
  3978  */
       
  3979 	case function_dword_to_time :
       
  3980 	{
       
  3981 		symbol_c *last_type_symbol = NULL;
       
  3982 
       
  3983 		{
       
  3984 			identifier_c param_name("IN");
       
  3985 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3986 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3987 			
       
  3988 			/* Get the value from a foo(<param_value>) style call */
       
  3989 			if (IN_param_value == NULL)
       
  3990 			  IN_param_value = function_call_param_iterator.next();
       
  3991 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3992 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3993 			
       
  3994 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3995 			{
       
  3996 		
       
  3997 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3998 				return return_type_symbol;
       
  3999 				
       
  4000 			}
       
  4001 			
       
  4002 			ERROR;
       
  4003 		}
       
  4004 		
       
  4005 	}/*function_dword_to_time*/
       
  4006 	break;
       
  4007 
       
  4008 /****
       
  4009  *DWORD_TO_INT
       
  4010  */
       
  4011 	case function_dword_to_int :
       
  4012 	{
       
  4013 		symbol_c *last_type_symbol = NULL;
       
  4014 
       
  4015 		{
       
  4016 			identifier_c param_name("IN");
       
  4017 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4018 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4019 			
       
  4020 			/* Get the value from a foo(<param_value>) style call */
       
  4021 			if (IN_param_value == NULL)
       
  4022 			  IN_param_value = function_call_param_iterator.next();
       
  4023 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4024 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4025 			
       
  4026 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4027 			{
       
  4028 		
       
  4029 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4030 				return return_type_symbol;
       
  4031 				
       
  4032 			}
       
  4033 			
       
  4034 			ERROR;
       
  4035 		}
       
  4036 		
       
  4037 	}/*function_dword_to_int*/
       
  4038 	break;
       
  4039 
 25871 
  4040 /****
 25872 /****
  4041  *DT_TO_REAL
 25873  *DT_TO_REAL
  4042  */
 25874  */
  4043 	case function_dt_to_real :
 25875     case function_dt_to_real :
  4044 	{
 25876     {
  4045 		symbol_c *last_type_symbol = NULL;
 25877         symbol_c *last_type_symbol = NULL;
  4046 
 25878 
  4047 		{
 25879         {
  4048 			identifier_c param_name("IN");
 25880             symbol_c *IN_type_symbol = param_data_type;
  4049 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25881             last_type_symbol = param_data_type;
  4050 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25882             
  4051 			
 25883             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4052 			/* Get the value from a foo(<param_value>) style call */
 25884             {
  4053 			if (IN_param_value == NULL)
 25885         
  4054 			  IN_param_value = function_call_param_iterator.next();
 25886                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4055 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25887                 return return_type_symbol;
  4056 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25888                 
  4057 			
 25889             }
  4058 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 25890             
  4059 			{
 25891             ERROR;
  4060 		
 25892         }
  4061 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 25893         
  4062 				return return_type_symbol;
 25894     }/*function_dt_to_real*/
  4063 				
 25895     break;
  4064 			}
 25896 
  4065 			
 25897 /****
  4066 			ERROR;
 25898  *DT_TO_LREAL
  4067 		}
 25899  */
  4068 		
 25900     case function_dt_to_lreal :
  4069 	}/*function_dt_to_real*/
 25901     {
  4070 	break;
 25902         symbol_c *last_type_symbol = NULL;
       
 25903 
       
 25904         {
       
 25905             symbol_c *IN_type_symbol = param_data_type;
       
 25906             last_type_symbol = param_data_type;
       
 25907             
       
 25908             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25909             {
       
 25910         
       
 25911                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25912                 return return_type_symbol;
       
 25913                 
       
 25914             }
       
 25915             
       
 25916             ERROR;
       
 25917         }
       
 25918         
       
 25919     }/*function_dt_to_lreal*/
       
 25920     break;
  4071 
 25921 
  4072 /****
 25922 /****
  4073  *DT_TO_SINT
 25923  *DT_TO_SINT
  4074  */
 25924  */
  4075 	case function_dt_to_sint :
 25925     case function_dt_to_sint :
  4076 	{
 25926     {
  4077 		symbol_c *last_type_symbol = NULL;
 25927         symbol_c *last_type_symbol = NULL;
  4078 
 25928 
  4079 		{
 25929         {
  4080 			identifier_c param_name("IN");
 25930             symbol_c *IN_type_symbol = param_data_type;
  4081 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 25931             last_type_symbol = param_data_type;
  4082 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 25932             
  4083 			
 25933             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4084 			/* Get the value from a foo(<param_value>) style call */
 25934             {
  4085 			if (IN_param_value == NULL)
 25935         
  4086 			  IN_param_value = function_call_param_iterator.next();
 25936                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4087 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 25937                 return return_type_symbol;
  4088 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 25938                 
  4089 			
 25939             }
  4090 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 25940             
  4091 			{
 25941             ERROR;
  4092 		
 25942         }
  4093 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 25943         
  4094 				return return_type_symbol;
 25944     }/*function_dt_to_sint*/
  4095 				
 25945     break;
  4096 			}
 25946 
  4097 			
 25947 /****
  4098 			ERROR;
 25948  *DT_TO_INT
  4099 		}
 25949  */
  4100 		
 25950     case function_dt_to_int :
  4101 	}/*function_dt_to_sint*/
 25951     {
  4102 	break;
 25952         symbol_c *last_type_symbol = NULL;
       
 25953 
       
 25954         {
       
 25955             symbol_c *IN_type_symbol = param_data_type;
       
 25956             last_type_symbol = param_data_type;
       
 25957             
       
 25958             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25959             {
       
 25960         
       
 25961                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25962                 return return_type_symbol;
       
 25963                 
       
 25964             }
       
 25965             
       
 25966             ERROR;
       
 25967         }
       
 25968         
       
 25969     }/*function_dt_to_int*/
       
 25970     break;
       
 25971 
       
 25972 /****
       
 25973  *DT_TO_DINT
       
 25974  */
       
 25975     case function_dt_to_dint :
       
 25976     {
       
 25977         symbol_c *last_type_symbol = NULL;
       
 25978 
       
 25979         {
       
 25980             symbol_c *IN_type_symbol = param_data_type;
       
 25981             last_type_symbol = param_data_type;
       
 25982             
       
 25983             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25984             {
       
 25985         
       
 25986                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25987                 return return_type_symbol;
       
 25988                 
       
 25989             }
       
 25990             
       
 25991             ERROR;
       
 25992         }
       
 25993         
       
 25994     }/*function_dt_to_dint*/
       
 25995     break;
  4103 
 25996 
  4104 /****
 25997 /****
  4105  *DT_TO_LINT
 25998  *DT_TO_LINT
  4106  */
 25999  */
  4107 	case function_dt_to_lint :
 26000     case function_dt_to_lint :
  4108 	{
 26001     {
  4109 		symbol_c *last_type_symbol = NULL;
 26002         symbol_c *last_type_symbol = NULL;
  4110 
 26003 
  4111 		{
 26004         {
  4112 			identifier_c param_name("IN");
 26005             symbol_c *IN_type_symbol = param_data_type;
  4113 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26006             last_type_symbol = param_data_type;
  4114 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26007             
  4115 			
 26008             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4116 			/* Get the value from a foo(<param_value>) style call */
 26009             {
  4117 			if (IN_param_value == NULL)
 26010         
  4118 			  IN_param_value = function_call_param_iterator.next();
 26011                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4119 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26012                 return return_type_symbol;
  4120 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26013                 
  4121 			
 26014             }
  4122 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26015             
  4123 			{
 26016             ERROR;
  4124 		
 26017         }
  4125 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 26018         
  4126 				return return_type_symbol;
 26019     }/*function_dt_to_lint*/
  4127 				
 26020     break;
  4128 			}
 26021 
  4129 			
 26022 /****
  4130 			ERROR;
 26023  *DT_TO_USINT
  4131 		}
 26024  */
  4132 		
 26025     case function_dt_to_usint :
  4133 	}/*function_dt_to_lint*/
 26026     {
  4134 	break;
 26027         symbol_c *last_type_symbol = NULL;
  4135 
 26028 
  4136 /****
 26029         {
  4137  *DT_TO_DINT
 26030             symbol_c *IN_type_symbol = param_data_type;
  4138  */
 26031             last_type_symbol = param_data_type;
  4139 	case function_dt_to_dint :
 26032             
  4140 	{
 26033             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4141 		symbol_c *last_type_symbol = NULL;
 26034             {
  4142 
 26035         
  4143 		{
 26036                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4144 			identifier_c param_name("IN");
 26037                 return return_type_symbol;
  4145 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26038                 
  4146 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26039             }
  4147 			
 26040             
  4148 			/* Get the value from a foo(<param_value>) style call */
 26041             ERROR;
  4149 			if (IN_param_value == NULL)
 26042         }
  4150 			  IN_param_value = function_call_param_iterator.next();
 26043         
  4151 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26044     }/*function_dt_to_usint*/
  4152 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26045     break;
  4153 			
 26046 
  4154 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26047 /****
  4155 			{
 26048  *DT_TO_UINT
  4156 		
 26049  */
  4157 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 26050     case function_dt_to_uint :
  4158 				return return_type_symbol;
 26051     {
  4159 				
 26052         symbol_c *last_type_symbol = NULL;
  4160 			}
 26053 
  4161 			
 26054         {
  4162 			ERROR;
 26055             symbol_c *IN_type_symbol = param_data_type;
  4163 		}
 26056             last_type_symbol = param_data_type;
  4164 		
 26057             
  4165 	}/*function_dt_to_dint*/
 26058             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4166 	break;
 26059             {
  4167 
 26060         
  4168 /****
 26061                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  4169  *DT_TO_DATE
 26062                 return return_type_symbol;
  4170  */
 26063                 
  4171 	case function_dt_to_date :
 26064             }
  4172 	{
 26065             
  4173 		symbol_c *last_type_symbol = NULL;
 26066             ERROR;
  4174 
 26067         }
  4175 		{
 26068         
  4176 			identifier_c param_name("IN");
 26069     }/*function_dt_to_uint*/
  4177 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26070     break;
  4178 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26071 
  4179 			
 26072 /****
  4180 			/* Get the value from a foo(<param_value>) style call */
 26073  *DT_TO_UDINT
  4181 			if (IN_param_value == NULL)
 26074  */
  4182 			  IN_param_value = function_call_param_iterator.next();
 26075     case function_dt_to_udint :
  4183 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26076     {
  4184 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26077         symbol_c *last_type_symbol = NULL;
  4185 			
 26078 
  4186 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26079         {
  4187 			{
 26080             symbol_c *IN_type_symbol = param_data_type;
  4188 		
 26081             last_type_symbol = param_data_type;
  4189 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 26082             
  4190 				return return_type_symbol;
 26083             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4191 				
 26084             {
  4192 			}
 26085         
  4193 			
 26086                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  4194 			ERROR;
 26087                 return return_type_symbol;
  4195 		}
 26088                 
  4196 		
 26089             }
  4197 	}/*function_dt_to_date*/
 26090             
  4198 	break;
 26091             ERROR;
       
 26092         }
       
 26093         
       
 26094     }/*function_dt_to_udint*/
       
 26095     break;
       
 26096 
       
 26097 /****
       
 26098  *DT_TO_ULINT
       
 26099  */
       
 26100     case function_dt_to_ulint :
       
 26101     {
       
 26102         symbol_c *last_type_symbol = NULL;
       
 26103 
       
 26104         {
       
 26105             symbol_c *IN_type_symbol = param_data_type;
       
 26106             last_type_symbol = param_data_type;
       
 26107             
       
 26108             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26109             {
       
 26110         
       
 26111                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 26112                 return return_type_symbol;
       
 26113                 
       
 26114             }
       
 26115             
       
 26116             ERROR;
       
 26117         }
       
 26118         
       
 26119     }/*function_dt_to_ulint*/
       
 26120     break;
       
 26121 
       
 26122 /****
       
 26123  *DT_TO_BOOL
       
 26124  */
       
 26125     case function_dt_to_bool :
       
 26126     {
       
 26127         symbol_c *last_type_symbol = NULL;
       
 26128 
       
 26129         {
       
 26130             symbol_c *IN_type_symbol = param_data_type;
       
 26131             last_type_symbol = param_data_type;
       
 26132             
       
 26133             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26134             {
       
 26135         
       
 26136                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 26137                 return return_type_symbol;
       
 26138                 
       
 26139             }
       
 26140             
       
 26141             ERROR;
       
 26142         }
       
 26143         
       
 26144     }/*function_dt_to_bool*/
       
 26145     break;
       
 26146 
       
 26147 /****
       
 26148  *DT_TO_BYTE
       
 26149  */
       
 26150     case function_dt_to_byte :
       
 26151     {
       
 26152         symbol_c *last_type_symbol = NULL;
       
 26153 
       
 26154         {
       
 26155             symbol_c *IN_type_symbol = param_data_type;
       
 26156             last_type_symbol = param_data_type;
       
 26157             
       
 26158             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26159             {
       
 26160         
       
 26161                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 26162                 return return_type_symbol;
       
 26163                 
       
 26164             }
       
 26165             
       
 26166             ERROR;
       
 26167         }
       
 26168         
       
 26169     }/*function_dt_to_byte*/
       
 26170     break;
       
 26171 
       
 26172 /****
       
 26173  *DT_TO_WORD
       
 26174  */
       
 26175     case function_dt_to_word :
       
 26176     {
       
 26177         symbol_c *last_type_symbol = NULL;
       
 26178 
       
 26179         {
       
 26180             symbol_c *IN_type_symbol = param_data_type;
       
 26181             last_type_symbol = param_data_type;
       
 26182             
       
 26183             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26184             {
       
 26185         
       
 26186                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 26187                 return return_type_symbol;
       
 26188                 
       
 26189             }
       
 26190             
       
 26191             ERROR;
       
 26192         }
       
 26193         
       
 26194     }/*function_dt_to_word*/
       
 26195     break;
  4199 
 26196 
  4200 /****
 26197 /****
  4201  *DT_TO_DWORD
 26198  *DT_TO_DWORD
  4202  */
 26199  */
  4203 	case function_dt_to_dword :
 26200     case function_dt_to_dword :
  4204 	{
 26201     {
  4205 		symbol_c *last_type_symbol = NULL;
 26202         symbol_c *last_type_symbol = NULL;
  4206 
 26203 
  4207 		{
 26204         {
  4208 			identifier_c param_name("IN");
 26205             symbol_c *IN_type_symbol = param_data_type;
  4209 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26206             last_type_symbol = param_data_type;
  4210 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26207             
  4211 			
 26208             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4212 			/* Get the value from a foo(<param_value>) style call */
 26209             {
  4213 			if (IN_param_value == NULL)
 26210         
  4214 			  IN_param_value = function_call_param_iterator.next();
 26211                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4215 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26212                 return return_type_symbol;
  4216 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26213                 
  4217 			
 26214             }
  4218 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26215             
  4219 			{
 26216             ERROR;
  4220 		
 26217         }
  4221 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 26218         
  4222 				return return_type_symbol;
 26219     }/*function_dt_to_dword*/
  4223 				
 26220     break;
  4224 			}
 26221 
  4225 			
 26222 /****
  4226 			ERROR;
 26223  *DT_TO_LWORD
  4227 		}
 26224  */
  4228 		
 26225     case function_dt_to_lword :
  4229 	}/*function_dt_to_dword*/
 26226     {
  4230 	break;
 26227         symbol_c *last_type_symbol = NULL;
  4231 
 26228 
  4232 /****
 26229         {
  4233  *DT_TO_DT
 26230             symbol_c *IN_type_symbol = param_data_type;
  4234  */
 26231             last_type_symbol = param_data_type;
  4235 	case function_dt_to_dt :
 26232             
  4236 	{
 26233             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4237 		symbol_c *last_type_symbol = NULL;
 26234             {
  4238 
 26235         
  4239 		{
 26236                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4240 			identifier_c param_name("IN");
 26237                 return return_type_symbol;
  4241 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26238                 
  4242 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26239             }
  4243 			
 26240             
  4244 			/* Get the value from a foo(<param_value>) style call */
 26241             ERROR;
  4245 			if (IN_param_value == NULL)
 26242         }
  4246 			  IN_param_value = function_call_param_iterator.next();
 26243         
  4247 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26244     }/*function_dt_to_lword*/
  4248 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26245     break;
  4249 			
 26246 
  4250 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26247 /****
  4251 			{
 26248  *DT_TO_STRING
  4252 		
 26249  */
  4253 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 26250     case function_dt_to_string :
  4254 				return return_type_symbol;
 26251     {
  4255 				
 26252         symbol_c *last_type_symbol = NULL;
  4256 			}
 26253 
  4257 			
 26254         {
  4258 			ERROR;
 26255             symbol_c *IN_type_symbol = param_data_type;
  4259 		}
 26256             last_type_symbol = param_data_type;
  4260 		
 26257             
  4261 	}/*function_dt_to_dt*/
 26258             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4262 	break;
 26259             {
  4263 
 26260         
  4264 /****
 26261                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4265  *DT_TO_TOD
 26262                 return return_type_symbol;
  4266  */
 26263                 
  4267 	case function_dt_to_tod :
 26264             }
  4268 	{
 26265             
  4269 		symbol_c *last_type_symbol = NULL;
 26266             ERROR;
  4270 
 26267         }
  4271 		{
 26268         
  4272 			identifier_c param_name("IN");
 26269     }/*function_dt_to_string*/
  4273 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26270     break;
  4274 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4275 			
       
  4276 			/* Get the value from a foo(<param_value>) style call */
       
  4277 			if (IN_param_value == NULL)
       
  4278 			  IN_param_value = function_call_param_iterator.next();
       
  4279 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4280 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4281 			
       
  4282 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4283 			{
       
  4284 		
       
  4285 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4286 				return return_type_symbol;
       
  4287 				
       
  4288 			}
       
  4289 			
       
  4290 			ERROR;
       
  4291 		}
       
  4292 		
       
  4293 	}/*function_dt_to_tod*/
       
  4294 	break;
       
  4295 
       
  4296 /****
       
  4297  *DT_TO_UDINT
       
  4298  */
       
  4299 	case function_dt_to_udint :
       
  4300 	{
       
  4301 		symbol_c *last_type_symbol = NULL;
       
  4302 
       
  4303 		{
       
  4304 			identifier_c param_name("IN");
       
  4305 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4306 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4307 			
       
  4308 			/* Get the value from a foo(<param_value>) style call */
       
  4309 			if (IN_param_value == NULL)
       
  4310 			  IN_param_value = function_call_param_iterator.next();
       
  4311 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4312 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4313 			
       
  4314 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4315 			{
       
  4316 		
       
  4317 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4318 				return return_type_symbol;
       
  4319 				
       
  4320 			}
       
  4321 			
       
  4322 			ERROR;
       
  4323 		}
       
  4324 		
       
  4325 	}/*function_dt_to_udint*/
       
  4326 	break;
       
  4327 
       
  4328 /****
       
  4329  *DT_TO_WORD
       
  4330  */
       
  4331 	case function_dt_to_word :
       
  4332 	{
       
  4333 		symbol_c *last_type_symbol = NULL;
       
  4334 
       
  4335 		{
       
  4336 			identifier_c param_name("IN");
       
  4337 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4338 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4339 			
       
  4340 			/* Get the value from a foo(<param_value>) style call */
       
  4341 			if (IN_param_value == NULL)
       
  4342 			  IN_param_value = function_call_param_iterator.next();
       
  4343 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4344 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4345 			
       
  4346 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4347 			{
       
  4348 		
       
  4349 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4350 				return return_type_symbol;
       
  4351 				
       
  4352 			}
       
  4353 			
       
  4354 			ERROR;
       
  4355 		}
       
  4356 		
       
  4357 	}/*function_dt_to_word*/
       
  4358 	break;
       
  4359 
 26271 
  4360 /****
 26272 /****
  4361  *DT_TO_WSTRING
 26273  *DT_TO_WSTRING
  4362  */
 26274  */
  4363 	case function_dt_to_wstring :
 26275     case function_dt_to_wstring :
  4364 	{
 26276     {
  4365 		symbol_c *last_type_symbol = NULL;
 26277         symbol_c *last_type_symbol = NULL;
  4366 
 26278 
  4367 		{
 26279         {
  4368 			identifier_c param_name("IN");
 26280             symbol_c *IN_type_symbol = param_data_type;
  4369 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26281             last_type_symbol = param_data_type;
  4370 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26282             
  4371 			
 26283             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4372 			/* Get the value from a foo(<param_value>) style call */
 26284             {
  4373 			if (IN_param_value == NULL)
 26285         
  4374 			  IN_param_value = function_call_param_iterator.next();
 26286                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  4375 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26287                 return return_type_symbol;
  4376 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26288                 
  4377 			
 26289             }
  4378 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26290             
  4379 			{
 26291             ERROR;
  4380 		
 26292         }
  4381 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 26293         
  4382 				return return_type_symbol;
 26294     }/*function_dt_to_wstring*/
  4383 				
 26295     break;
  4384 			}
       
  4385 			
       
  4386 			ERROR;
       
  4387 		}
       
  4388 		
       
  4389 	}/*function_dt_to_wstring*/
       
  4390 	break;
       
  4391 
       
  4392 /****
       
  4393  *DT_TO_STRING
       
  4394  */
       
  4395 	case function_dt_to_string :
       
  4396 	{
       
  4397 		symbol_c *last_type_symbol = NULL;
       
  4398 
       
  4399 		{
       
  4400 			identifier_c param_name("IN");
       
  4401 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4402 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4403 			
       
  4404 			/* Get the value from a foo(<param_value>) style call */
       
  4405 			if (IN_param_value == NULL)
       
  4406 			  IN_param_value = function_call_param_iterator.next();
       
  4407 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4408 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4409 			
       
  4410 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4411 			{
       
  4412 		
       
  4413 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4414 				return return_type_symbol;
       
  4415 				
       
  4416 			}
       
  4417 			
       
  4418 			ERROR;
       
  4419 		}
       
  4420 		
       
  4421 	}/*function_dt_to_string*/
       
  4422 	break;
       
  4423 
       
  4424 /****
       
  4425  *DT_TO_LWORD
       
  4426  */
       
  4427 	case function_dt_to_lword :
       
  4428 	{
       
  4429 		symbol_c *last_type_symbol = NULL;
       
  4430 
       
  4431 		{
       
  4432 			identifier_c param_name("IN");
       
  4433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4435 			
       
  4436 			/* Get the value from a foo(<param_value>) style call */
       
  4437 			if (IN_param_value == NULL)
       
  4438 			  IN_param_value = function_call_param_iterator.next();
       
  4439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4441 			
       
  4442 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4443 			{
       
  4444 		
       
  4445 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4446 				return return_type_symbol;
       
  4447 				
       
  4448 			}
       
  4449 			
       
  4450 			ERROR;
       
  4451 		}
       
  4452 		
       
  4453 	}/*function_dt_to_lword*/
       
  4454 	break;
       
  4455 
       
  4456 /****
       
  4457  *DT_TO_UINT
       
  4458  */
       
  4459 	case function_dt_to_uint :
       
  4460 	{
       
  4461 		symbol_c *last_type_symbol = NULL;
       
  4462 
       
  4463 		{
       
  4464 			identifier_c param_name("IN");
       
  4465 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4466 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4467 			
       
  4468 			/* Get the value from a foo(<param_value>) style call */
       
  4469 			if (IN_param_value == NULL)
       
  4470 			  IN_param_value = function_call_param_iterator.next();
       
  4471 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4472 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4473 			
       
  4474 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4475 			{
       
  4476 		
       
  4477 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4478 				return return_type_symbol;
       
  4479 				
       
  4480 			}
       
  4481 			
       
  4482 			ERROR;
       
  4483 		}
       
  4484 		
       
  4485 	}/*function_dt_to_uint*/
       
  4486 	break;
       
  4487 
       
  4488 /****
       
  4489  *DT_TO_LREAL
       
  4490  */
       
  4491 	case function_dt_to_lreal :
       
  4492 	{
       
  4493 		symbol_c *last_type_symbol = NULL;
       
  4494 
       
  4495 		{
       
  4496 			identifier_c param_name("IN");
       
  4497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4499 			
       
  4500 			/* Get the value from a foo(<param_value>) style call */
       
  4501 			if (IN_param_value == NULL)
       
  4502 			  IN_param_value = function_call_param_iterator.next();
       
  4503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4505 			
       
  4506 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4507 			{
       
  4508 		
       
  4509 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4510 				return return_type_symbol;
       
  4511 				
       
  4512 			}
       
  4513 			
       
  4514 			ERROR;
       
  4515 		}
       
  4516 		
       
  4517 	}/*function_dt_to_lreal*/
       
  4518 	break;
       
  4519 
       
  4520 /****
       
  4521  *DT_TO_BYTE
       
  4522  */
       
  4523 	case function_dt_to_byte :
       
  4524 	{
       
  4525 		symbol_c *last_type_symbol = NULL;
       
  4526 
       
  4527 		{
       
  4528 			identifier_c param_name("IN");
       
  4529 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4530 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4531 			
       
  4532 			/* Get the value from a foo(<param_value>) style call */
       
  4533 			if (IN_param_value == NULL)
       
  4534 			  IN_param_value = function_call_param_iterator.next();
       
  4535 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4536 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4537 			
       
  4538 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4539 			{
       
  4540 		
       
  4541 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4542 				return return_type_symbol;
       
  4543 				
       
  4544 			}
       
  4545 			
       
  4546 			ERROR;
       
  4547 		}
       
  4548 		
       
  4549 	}/*function_dt_to_byte*/
       
  4550 	break;
       
  4551 
       
  4552 /****
       
  4553  *DT_TO_USINT
       
  4554  */
       
  4555 	case function_dt_to_usint :
       
  4556 	{
       
  4557 		symbol_c *last_type_symbol = NULL;
       
  4558 
       
  4559 		{
       
  4560 			identifier_c param_name("IN");
       
  4561 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4562 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4563 			
       
  4564 			/* Get the value from a foo(<param_value>) style call */
       
  4565 			if (IN_param_value == NULL)
       
  4566 			  IN_param_value = function_call_param_iterator.next();
       
  4567 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4568 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4569 			
       
  4570 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4571 			{
       
  4572 		
       
  4573 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4574 				return return_type_symbol;
       
  4575 				
       
  4576 			}
       
  4577 			
       
  4578 			ERROR;
       
  4579 		}
       
  4580 		
       
  4581 	}/*function_dt_to_usint*/
       
  4582 	break;
       
  4583 
       
  4584 /****
       
  4585  *DT_TO_ULINT
       
  4586  */
       
  4587 	case function_dt_to_ulint :
       
  4588 	{
       
  4589 		symbol_c *last_type_symbol = NULL;
       
  4590 
       
  4591 		{
       
  4592 			identifier_c param_name("IN");
       
  4593 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4594 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4595 			
       
  4596 			/* Get the value from a foo(<param_value>) style call */
       
  4597 			if (IN_param_value == NULL)
       
  4598 			  IN_param_value = function_call_param_iterator.next();
       
  4599 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4600 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4601 			
       
  4602 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4603 			{
       
  4604 		
       
  4605 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4606 				return return_type_symbol;
       
  4607 				
       
  4608 			}
       
  4609 			
       
  4610 			ERROR;
       
  4611 		}
       
  4612 		
       
  4613 	}/*function_dt_to_ulint*/
       
  4614 	break;
       
  4615 
       
  4616 /****
       
  4617  *DT_TO_BOOL
       
  4618  */
       
  4619 	case function_dt_to_bool :
       
  4620 	{
       
  4621 		symbol_c *last_type_symbol = NULL;
       
  4622 
       
  4623 		{
       
  4624 			identifier_c param_name("IN");
       
  4625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4626 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4627 			
       
  4628 			/* Get the value from a foo(<param_value>) style call */
       
  4629 			if (IN_param_value == NULL)
       
  4630 			  IN_param_value = function_call_param_iterator.next();
       
  4631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4632 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4633 			
       
  4634 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4635 			{
       
  4636 		
       
  4637 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4638 				return return_type_symbol;
       
  4639 				
       
  4640 			}
       
  4641 			
       
  4642 			ERROR;
       
  4643 		}
       
  4644 		
       
  4645 	}/*function_dt_to_bool*/
       
  4646 	break;
       
  4647 
       
  4648 /****
       
  4649  *DT_TO_TIME
       
  4650  */
       
  4651 	case function_dt_to_time :
       
  4652 	{
       
  4653 		symbol_c *last_type_symbol = NULL;
       
  4654 
       
  4655 		{
       
  4656 			identifier_c param_name("IN");
       
  4657 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4658 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4659 			
       
  4660 			/* Get the value from a foo(<param_value>) style call */
       
  4661 			if (IN_param_value == NULL)
       
  4662 			  IN_param_value = function_call_param_iterator.next();
       
  4663 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4664 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4665 			
       
  4666 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4667 			{
       
  4668 		
       
  4669 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4670 				return return_type_symbol;
       
  4671 				
       
  4672 			}
       
  4673 			
       
  4674 			ERROR;
       
  4675 		}
       
  4676 		
       
  4677 	}/*function_dt_to_time*/
       
  4678 	break;
       
  4679 
       
  4680 /****
       
  4681  *DT_TO_INT
       
  4682  */
       
  4683 	case function_dt_to_int :
       
  4684 	{
       
  4685 		symbol_c *last_type_symbol = NULL;
       
  4686 
       
  4687 		{
       
  4688 			identifier_c param_name("IN");
       
  4689 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4690 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4691 			
       
  4692 			/* Get the value from a foo(<param_value>) style call */
       
  4693 			if (IN_param_value == NULL)
       
  4694 			  IN_param_value = function_call_param_iterator.next();
       
  4695 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4696 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4697 			
       
  4698 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4699 			{
       
  4700 		
       
  4701 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4702 				return return_type_symbol;
       
  4703 				
       
  4704 			}
       
  4705 			
       
  4706 			ERROR;
       
  4707 		}
       
  4708 		
       
  4709 	}/*function_dt_to_int*/
       
  4710 	break;
       
  4711 
       
  4712 /****
       
  4713  *TOD_TO_REAL
       
  4714  */
       
  4715 	case function_tod_to_real :
       
  4716 	{
       
  4717 		symbol_c *last_type_symbol = NULL;
       
  4718 
       
  4719 		{
       
  4720 			identifier_c param_name("IN");
       
  4721 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4722 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4723 			
       
  4724 			/* Get the value from a foo(<param_value>) style call */
       
  4725 			if (IN_param_value == NULL)
       
  4726 			  IN_param_value = function_call_param_iterator.next();
       
  4727 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4728 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4729 			
       
  4730 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4731 			{
       
  4732 		
       
  4733 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4734 				return return_type_symbol;
       
  4735 				
       
  4736 			}
       
  4737 			
       
  4738 			ERROR;
       
  4739 		}
       
  4740 		
       
  4741 	}/*function_tod_to_real*/
       
  4742 	break;
       
  4743 
       
  4744 /****
       
  4745  *TOD_TO_SINT
       
  4746  */
       
  4747 	case function_tod_to_sint :
       
  4748 	{
       
  4749 		symbol_c *last_type_symbol = NULL;
       
  4750 
       
  4751 		{
       
  4752 			identifier_c param_name("IN");
       
  4753 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4754 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4755 			
       
  4756 			/* Get the value from a foo(<param_value>) style call */
       
  4757 			if (IN_param_value == NULL)
       
  4758 			  IN_param_value = function_call_param_iterator.next();
       
  4759 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4760 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4761 			
       
  4762 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4763 			{
       
  4764 		
       
  4765 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4766 				return return_type_symbol;
       
  4767 				
       
  4768 			}
       
  4769 			
       
  4770 			ERROR;
       
  4771 		}
       
  4772 		
       
  4773 	}/*function_tod_to_sint*/
       
  4774 	break;
       
  4775 
       
  4776 /****
       
  4777  *TOD_TO_LINT
       
  4778  */
       
  4779 	case function_tod_to_lint :
       
  4780 	{
       
  4781 		symbol_c *last_type_symbol = NULL;
       
  4782 
       
  4783 		{
       
  4784 			identifier_c param_name("IN");
       
  4785 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4786 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4787 			
       
  4788 			/* Get the value from a foo(<param_value>) style call */
       
  4789 			if (IN_param_value == NULL)
       
  4790 			  IN_param_value = function_call_param_iterator.next();
       
  4791 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4792 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4793 			
       
  4794 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4795 			{
       
  4796 		
       
  4797 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4798 				return return_type_symbol;
       
  4799 				
       
  4800 			}
       
  4801 			
       
  4802 			ERROR;
       
  4803 		}
       
  4804 		
       
  4805 	}/*function_tod_to_lint*/
       
  4806 	break;
       
  4807 
       
  4808 /****
       
  4809  *TOD_TO_DINT
       
  4810  */
       
  4811 	case function_tod_to_dint :
       
  4812 	{
       
  4813 		symbol_c *last_type_symbol = NULL;
       
  4814 
       
  4815 		{
       
  4816 			identifier_c param_name("IN");
       
  4817 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4818 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4819 			
       
  4820 			/* Get the value from a foo(<param_value>) style call */
       
  4821 			if (IN_param_value == NULL)
       
  4822 			  IN_param_value = function_call_param_iterator.next();
       
  4823 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4824 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4825 			
       
  4826 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4827 			{
       
  4828 		
       
  4829 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4830 				return return_type_symbol;
       
  4831 				
       
  4832 			}
       
  4833 			
       
  4834 			ERROR;
       
  4835 		}
       
  4836 		
       
  4837 	}/*function_tod_to_dint*/
       
  4838 	break;
       
  4839 
       
  4840 /****
       
  4841  *TOD_TO_DATE
       
  4842  */
       
  4843 	case function_tod_to_date :
       
  4844 	{
       
  4845 		symbol_c *last_type_symbol = NULL;
       
  4846 
       
  4847 		{
       
  4848 			identifier_c param_name("IN");
       
  4849 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4850 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4851 			
       
  4852 			/* Get the value from a foo(<param_value>) style call */
       
  4853 			if (IN_param_value == NULL)
       
  4854 			  IN_param_value = function_call_param_iterator.next();
       
  4855 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4856 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4857 			
       
  4858 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4859 			{
       
  4860 		
       
  4861 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4862 				return return_type_symbol;
       
  4863 				
       
  4864 			}
       
  4865 			
       
  4866 			ERROR;
       
  4867 		}
       
  4868 		
       
  4869 	}/*function_tod_to_date*/
       
  4870 	break;
       
  4871 
       
  4872 /****
       
  4873  *TOD_TO_DWORD
       
  4874  */
       
  4875 	case function_tod_to_dword :
       
  4876 	{
       
  4877 		symbol_c *last_type_symbol = NULL;
       
  4878 
       
  4879 		{
       
  4880 			identifier_c param_name("IN");
       
  4881 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4882 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4883 			
       
  4884 			/* Get the value from a foo(<param_value>) style call */
       
  4885 			if (IN_param_value == NULL)
       
  4886 			  IN_param_value = function_call_param_iterator.next();
       
  4887 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4888 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4889 			
       
  4890 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4891 			{
       
  4892 		
       
  4893 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4894 				return return_type_symbol;
       
  4895 				
       
  4896 			}
       
  4897 			
       
  4898 			ERROR;
       
  4899 		}
       
  4900 		
       
  4901 	}/*function_tod_to_dword*/
       
  4902 	break;
       
  4903 
       
  4904 /****
       
  4905  *TOD_TO_DT
       
  4906  */
       
  4907 	case function_tod_to_dt :
       
  4908 	{
       
  4909 		symbol_c *last_type_symbol = NULL;
       
  4910 
       
  4911 		{
       
  4912 			identifier_c param_name("IN");
       
  4913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4914 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4915 			
       
  4916 			/* Get the value from a foo(<param_value>) style call */
       
  4917 			if (IN_param_value == NULL)
       
  4918 			  IN_param_value = function_call_param_iterator.next();
       
  4919 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4920 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4921 			
       
  4922 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4923 			{
       
  4924 		
       
  4925 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4926 				return return_type_symbol;
       
  4927 				
       
  4928 			}
       
  4929 			
       
  4930 			ERROR;
       
  4931 		}
       
  4932 		
       
  4933 	}/*function_tod_to_dt*/
       
  4934 	break;
       
  4935 
       
  4936 /****
       
  4937  *TOD_TO_TOD
       
  4938  */
       
  4939 	case function_tod_to_tod :
       
  4940 	{
       
  4941 		symbol_c *last_type_symbol = NULL;
       
  4942 
       
  4943 		{
       
  4944 			identifier_c param_name("IN");
       
  4945 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4946 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4947 			
       
  4948 			/* Get the value from a foo(<param_value>) style call */
       
  4949 			if (IN_param_value == NULL)
       
  4950 			  IN_param_value = function_call_param_iterator.next();
       
  4951 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4952 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4953 			
       
  4954 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4955 			{
       
  4956 		
       
  4957 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4958 				return return_type_symbol;
       
  4959 				
       
  4960 			}
       
  4961 			
       
  4962 			ERROR;
       
  4963 		}
       
  4964 		
       
  4965 	}/*function_tod_to_tod*/
       
  4966 	break;
       
  4967 
       
  4968 /****
       
  4969  *TOD_TO_UDINT
       
  4970  */
       
  4971 	case function_tod_to_udint :
       
  4972 	{
       
  4973 		symbol_c *last_type_symbol = NULL;
       
  4974 
       
  4975 		{
       
  4976 			identifier_c param_name("IN");
       
  4977 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4978 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4979 			
       
  4980 			/* Get the value from a foo(<param_value>) style call */
       
  4981 			if (IN_param_value == NULL)
       
  4982 			  IN_param_value = function_call_param_iterator.next();
       
  4983 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4984 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4985 			
       
  4986 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  4987 			{
       
  4988 		
       
  4989 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4990 				return return_type_symbol;
       
  4991 				
       
  4992 			}
       
  4993 			
       
  4994 			ERROR;
       
  4995 		}
       
  4996 		
       
  4997 	}/*function_tod_to_udint*/
       
  4998 	break;
       
  4999 
       
  5000 /****
       
  5001  *TOD_TO_WORD
       
  5002  */
       
  5003 	case function_tod_to_word :
       
  5004 	{
       
  5005 		symbol_c *last_type_symbol = NULL;
       
  5006 
       
  5007 		{
       
  5008 			identifier_c param_name("IN");
       
  5009 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5010 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5011 			
       
  5012 			/* Get the value from a foo(<param_value>) style call */
       
  5013 			if (IN_param_value == NULL)
       
  5014 			  IN_param_value = function_call_param_iterator.next();
       
  5015 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5016 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5017 			
       
  5018 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5019 			{
       
  5020 		
       
  5021 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5022 				return return_type_symbol;
       
  5023 				
       
  5024 			}
       
  5025 			
       
  5026 			ERROR;
       
  5027 		}
       
  5028 		
       
  5029 	}/*function_tod_to_word*/
       
  5030 	break;
       
  5031 
       
  5032 /****
       
  5033  *TOD_TO_WSTRING
       
  5034  */
       
  5035 	case function_tod_to_wstring :
       
  5036 	{
       
  5037 		symbol_c *last_type_symbol = NULL;
       
  5038 
       
  5039 		{
       
  5040 			identifier_c param_name("IN");
       
  5041 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5042 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5043 			
       
  5044 			/* Get the value from a foo(<param_value>) style call */
       
  5045 			if (IN_param_value == NULL)
       
  5046 			  IN_param_value = function_call_param_iterator.next();
       
  5047 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5048 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5049 			
       
  5050 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5051 			{
       
  5052 		
       
  5053 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5054 				return return_type_symbol;
       
  5055 				
       
  5056 			}
       
  5057 			
       
  5058 			ERROR;
       
  5059 		}
       
  5060 		
       
  5061 	}/*function_tod_to_wstring*/
       
  5062 	break;
       
  5063 
       
  5064 /****
       
  5065  *TOD_TO_STRING
       
  5066  */
       
  5067 	case function_tod_to_string :
       
  5068 	{
       
  5069 		symbol_c *last_type_symbol = NULL;
       
  5070 
       
  5071 		{
       
  5072 			identifier_c param_name("IN");
       
  5073 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5074 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5075 			
       
  5076 			/* Get the value from a foo(<param_value>) style call */
       
  5077 			if (IN_param_value == NULL)
       
  5078 			  IN_param_value = function_call_param_iterator.next();
       
  5079 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5080 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5081 			
       
  5082 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5083 			{
       
  5084 		
       
  5085 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5086 				return return_type_symbol;
       
  5087 				
       
  5088 			}
       
  5089 			
       
  5090 			ERROR;
       
  5091 		}
       
  5092 		
       
  5093 	}/*function_tod_to_string*/
       
  5094 	break;
       
  5095 
       
  5096 /****
       
  5097  *TOD_TO_LWORD
       
  5098  */
       
  5099 	case function_tod_to_lword :
       
  5100 	{
       
  5101 		symbol_c *last_type_symbol = NULL;
       
  5102 
       
  5103 		{
       
  5104 			identifier_c param_name("IN");
       
  5105 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5106 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5107 			
       
  5108 			/* Get the value from a foo(<param_value>) style call */
       
  5109 			if (IN_param_value == NULL)
       
  5110 			  IN_param_value = function_call_param_iterator.next();
       
  5111 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5112 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5113 			
       
  5114 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5115 			{
       
  5116 		
       
  5117 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5118 				return return_type_symbol;
       
  5119 				
       
  5120 			}
       
  5121 			
       
  5122 			ERROR;
       
  5123 		}
       
  5124 		
       
  5125 	}/*function_tod_to_lword*/
       
  5126 	break;
       
  5127 
       
  5128 /****
       
  5129  *TOD_TO_UINT
       
  5130  */
       
  5131 	case function_tod_to_uint :
       
  5132 	{
       
  5133 		symbol_c *last_type_symbol = NULL;
       
  5134 
       
  5135 		{
       
  5136 			identifier_c param_name("IN");
       
  5137 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5138 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5139 			
       
  5140 			/* Get the value from a foo(<param_value>) style call */
       
  5141 			if (IN_param_value == NULL)
       
  5142 			  IN_param_value = function_call_param_iterator.next();
       
  5143 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5144 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5145 			
       
  5146 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5147 			{
       
  5148 		
       
  5149 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5150 				return return_type_symbol;
       
  5151 				
       
  5152 			}
       
  5153 			
       
  5154 			ERROR;
       
  5155 		}
       
  5156 		
       
  5157 	}/*function_tod_to_uint*/
       
  5158 	break;
       
  5159 
       
  5160 /****
       
  5161  *TOD_TO_LREAL
       
  5162  */
       
  5163 	case function_tod_to_lreal :
       
  5164 	{
       
  5165 		symbol_c *last_type_symbol = NULL;
       
  5166 
       
  5167 		{
       
  5168 			identifier_c param_name("IN");
       
  5169 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5170 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5171 			
       
  5172 			/* Get the value from a foo(<param_value>) style call */
       
  5173 			if (IN_param_value == NULL)
       
  5174 			  IN_param_value = function_call_param_iterator.next();
       
  5175 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5176 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5177 			
       
  5178 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5179 			{
       
  5180 		
       
  5181 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5182 				return return_type_symbol;
       
  5183 				
       
  5184 			}
       
  5185 			
       
  5186 			ERROR;
       
  5187 		}
       
  5188 		
       
  5189 	}/*function_tod_to_lreal*/
       
  5190 	break;
       
  5191 
       
  5192 /****
       
  5193  *TOD_TO_BYTE
       
  5194  */
       
  5195 	case function_tod_to_byte :
       
  5196 	{
       
  5197 		symbol_c *last_type_symbol = NULL;
       
  5198 
       
  5199 		{
       
  5200 			identifier_c param_name("IN");
       
  5201 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5202 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5203 			
       
  5204 			/* Get the value from a foo(<param_value>) style call */
       
  5205 			if (IN_param_value == NULL)
       
  5206 			  IN_param_value = function_call_param_iterator.next();
       
  5207 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5208 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5209 			
       
  5210 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5211 			{
       
  5212 		
       
  5213 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5214 				return return_type_symbol;
       
  5215 				
       
  5216 			}
       
  5217 			
       
  5218 			ERROR;
       
  5219 		}
       
  5220 		
       
  5221 	}/*function_tod_to_byte*/
       
  5222 	break;
       
  5223 
       
  5224 /****
       
  5225  *TOD_TO_USINT
       
  5226  */
       
  5227 	case function_tod_to_usint :
       
  5228 	{
       
  5229 		symbol_c *last_type_symbol = NULL;
       
  5230 
       
  5231 		{
       
  5232 			identifier_c param_name("IN");
       
  5233 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5234 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5235 			
       
  5236 			/* Get the value from a foo(<param_value>) style call */
       
  5237 			if (IN_param_value == NULL)
       
  5238 			  IN_param_value = function_call_param_iterator.next();
       
  5239 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5240 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5241 			
       
  5242 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5243 			{
       
  5244 		
       
  5245 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5246 				return return_type_symbol;
       
  5247 				
       
  5248 			}
       
  5249 			
       
  5250 			ERROR;
       
  5251 		}
       
  5252 		
       
  5253 	}/*function_tod_to_usint*/
       
  5254 	break;
       
  5255 
       
  5256 /****
       
  5257  *TOD_TO_ULINT
       
  5258  */
       
  5259 	case function_tod_to_ulint :
       
  5260 	{
       
  5261 		symbol_c *last_type_symbol = NULL;
       
  5262 
       
  5263 		{
       
  5264 			identifier_c param_name("IN");
       
  5265 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5266 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5267 			
       
  5268 			/* Get the value from a foo(<param_value>) style call */
       
  5269 			if (IN_param_value == NULL)
       
  5270 			  IN_param_value = function_call_param_iterator.next();
       
  5271 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5272 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5273 			
       
  5274 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5275 			{
       
  5276 		
       
  5277 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5278 				return return_type_symbol;
       
  5279 				
       
  5280 			}
       
  5281 			
       
  5282 			ERROR;
       
  5283 		}
       
  5284 		
       
  5285 	}/*function_tod_to_ulint*/
       
  5286 	break;
       
  5287 
       
  5288 /****
       
  5289  *TOD_TO_BOOL
       
  5290  */
       
  5291 	case function_tod_to_bool :
       
  5292 	{
       
  5293 		symbol_c *last_type_symbol = NULL;
       
  5294 
       
  5295 		{
       
  5296 			identifier_c param_name("IN");
       
  5297 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5298 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5299 			
       
  5300 			/* Get the value from a foo(<param_value>) style call */
       
  5301 			if (IN_param_value == NULL)
       
  5302 			  IN_param_value = function_call_param_iterator.next();
       
  5303 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5304 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5305 			
       
  5306 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5307 			{
       
  5308 		
       
  5309 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5310 				return return_type_symbol;
       
  5311 				
       
  5312 			}
       
  5313 			
       
  5314 			ERROR;
       
  5315 		}
       
  5316 		
       
  5317 	}/*function_tod_to_bool*/
       
  5318 	break;
       
  5319 
       
  5320 /****
       
  5321  *TOD_TO_TIME
       
  5322  */
       
  5323 	case function_tod_to_time :
       
  5324 	{
       
  5325 		symbol_c *last_type_symbol = NULL;
       
  5326 
       
  5327 		{
       
  5328 			identifier_c param_name("IN");
       
  5329 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5330 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5331 			
       
  5332 			/* Get the value from a foo(<param_value>) style call */
       
  5333 			if (IN_param_value == NULL)
       
  5334 			  IN_param_value = function_call_param_iterator.next();
       
  5335 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5336 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5337 			
       
  5338 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5339 			{
       
  5340 		
       
  5341 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5342 				return return_type_symbol;
       
  5343 				
       
  5344 			}
       
  5345 			
       
  5346 			ERROR;
       
  5347 		}
       
  5348 		
       
  5349 	}/*function_tod_to_time*/
       
  5350 	break;
       
  5351 
       
  5352 /****
       
  5353  *TOD_TO_INT
       
  5354  */
       
  5355 	case function_tod_to_int :
       
  5356 	{
       
  5357 		symbol_c *last_type_symbol = NULL;
       
  5358 
       
  5359 		{
       
  5360 			identifier_c param_name("IN");
       
  5361 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5362 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5363 			
       
  5364 			/* Get the value from a foo(<param_value>) style call */
       
  5365 			if (IN_param_value == NULL)
       
  5366 			  IN_param_value = function_call_param_iterator.next();
       
  5367 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5368 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5369 			
       
  5370 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5371 			{
       
  5372 		
       
  5373 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5374 				return return_type_symbol;
       
  5375 				
       
  5376 			}
       
  5377 			
       
  5378 			ERROR;
       
  5379 		}
       
  5380 		
       
  5381 	}/*function_tod_to_int*/
       
  5382 	break;
       
  5383 
       
  5384 /****
       
  5385  *UDINT_TO_REAL
       
  5386  */
       
  5387 	case function_udint_to_real :
       
  5388 	{
       
  5389 		symbol_c *last_type_symbol = NULL;
       
  5390 
       
  5391 		{
       
  5392 			identifier_c param_name("IN");
       
  5393 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5394 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5395 			
       
  5396 			/* Get the value from a foo(<param_value>) style call */
       
  5397 			if (IN_param_value == NULL)
       
  5398 			  IN_param_value = function_call_param_iterator.next();
       
  5399 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5400 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5401 			
       
  5402 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5403 			{
       
  5404 		
       
  5405 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5406 				return return_type_symbol;
       
  5407 				
       
  5408 			}
       
  5409 			
       
  5410 			ERROR;
       
  5411 		}
       
  5412 		
       
  5413 	}/*function_udint_to_real*/
       
  5414 	break;
       
  5415 
       
  5416 /****
       
  5417  *UDINT_TO_SINT
       
  5418  */
       
  5419 	case function_udint_to_sint :
       
  5420 	{
       
  5421 		symbol_c *last_type_symbol = NULL;
       
  5422 
       
  5423 		{
       
  5424 			identifier_c param_name("IN");
       
  5425 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5426 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5427 			
       
  5428 			/* Get the value from a foo(<param_value>) style call */
       
  5429 			if (IN_param_value == NULL)
       
  5430 			  IN_param_value = function_call_param_iterator.next();
       
  5431 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5432 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5433 			
       
  5434 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5435 			{
       
  5436 		
       
  5437 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5438 				return return_type_symbol;
       
  5439 				
       
  5440 			}
       
  5441 			
       
  5442 			ERROR;
       
  5443 		}
       
  5444 		
       
  5445 	}/*function_udint_to_sint*/
       
  5446 	break;
       
  5447 
       
  5448 /****
       
  5449  *UDINT_TO_LINT
       
  5450  */
       
  5451 	case function_udint_to_lint :
       
  5452 	{
       
  5453 		symbol_c *last_type_symbol = NULL;
       
  5454 
       
  5455 		{
       
  5456 			identifier_c param_name("IN");
       
  5457 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5458 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5459 			
       
  5460 			/* Get the value from a foo(<param_value>) style call */
       
  5461 			if (IN_param_value == NULL)
       
  5462 			  IN_param_value = function_call_param_iterator.next();
       
  5463 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5464 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5465 			
       
  5466 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5467 			{
       
  5468 		
       
  5469 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5470 				return return_type_symbol;
       
  5471 				
       
  5472 			}
       
  5473 			
       
  5474 			ERROR;
       
  5475 		}
       
  5476 		
       
  5477 	}/*function_udint_to_lint*/
       
  5478 	break;
       
  5479 
       
  5480 /****
       
  5481  *UDINT_TO_DINT
       
  5482  */
       
  5483 	case function_udint_to_dint :
       
  5484 	{
       
  5485 		symbol_c *last_type_symbol = NULL;
       
  5486 
       
  5487 		{
       
  5488 			identifier_c param_name("IN");
       
  5489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5490 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5491 			
       
  5492 			/* Get the value from a foo(<param_value>) style call */
       
  5493 			if (IN_param_value == NULL)
       
  5494 			  IN_param_value = function_call_param_iterator.next();
       
  5495 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5496 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5497 			
       
  5498 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5499 			{
       
  5500 		
       
  5501 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5502 				return return_type_symbol;
       
  5503 				
       
  5504 			}
       
  5505 			
       
  5506 			ERROR;
       
  5507 		}
       
  5508 		
       
  5509 	}/*function_udint_to_dint*/
       
  5510 	break;
       
  5511 
       
  5512 /****
       
  5513  *UDINT_TO_DATE
       
  5514  */
       
  5515 	case function_udint_to_date :
       
  5516 	{
       
  5517 		symbol_c *last_type_symbol = NULL;
       
  5518 
       
  5519 		{
       
  5520 			identifier_c param_name("IN");
       
  5521 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5522 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5523 			
       
  5524 			/* Get the value from a foo(<param_value>) style call */
       
  5525 			if (IN_param_value == NULL)
       
  5526 			  IN_param_value = function_call_param_iterator.next();
       
  5527 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5528 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5529 			
       
  5530 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5531 			{
       
  5532 		
       
  5533 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5534 				return return_type_symbol;
       
  5535 				
       
  5536 			}
       
  5537 			
       
  5538 			ERROR;
       
  5539 		}
       
  5540 		
       
  5541 	}/*function_udint_to_date*/
       
  5542 	break;
       
  5543 
       
  5544 /****
       
  5545  *UDINT_TO_DWORD
       
  5546  */
       
  5547 	case function_udint_to_dword :
       
  5548 	{
       
  5549 		symbol_c *last_type_symbol = NULL;
       
  5550 
       
  5551 		{
       
  5552 			identifier_c param_name("IN");
       
  5553 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5554 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5555 			
       
  5556 			/* Get the value from a foo(<param_value>) style call */
       
  5557 			if (IN_param_value == NULL)
       
  5558 			  IN_param_value = function_call_param_iterator.next();
       
  5559 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5560 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5561 			
       
  5562 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5563 			{
       
  5564 		
       
  5565 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5566 				return return_type_symbol;
       
  5567 				
       
  5568 			}
       
  5569 			
       
  5570 			ERROR;
       
  5571 		}
       
  5572 		
       
  5573 	}/*function_udint_to_dword*/
       
  5574 	break;
       
  5575 
       
  5576 /****
       
  5577  *UDINT_TO_DT
       
  5578  */
       
  5579 	case function_udint_to_dt :
       
  5580 	{
       
  5581 		symbol_c *last_type_symbol = NULL;
       
  5582 
       
  5583 		{
       
  5584 			identifier_c param_name("IN");
       
  5585 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5586 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5587 			
       
  5588 			/* Get the value from a foo(<param_value>) style call */
       
  5589 			if (IN_param_value == NULL)
       
  5590 			  IN_param_value = function_call_param_iterator.next();
       
  5591 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5592 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5593 			
       
  5594 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5595 			{
       
  5596 		
       
  5597 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5598 				return return_type_symbol;
       
  5599 				
       
  5600 			}
       
  5601 			
       
  5602 			ERROR;
       
  5603 		}
       
  5604 		
       
  5605 	}/*function_udint_to_dt*/
       
  5606 	break;
       
  5607 
       
  5608 /****
       
  5609  *UDINT_TO_TOD
       
  5610  */
       
  5611 	case function_udint_to_tod :
       
  5612 	{
       
  5613 		symbol_c *last_type_symbol = NULL;
       
  5614 
       
  5615 		{
       
  5616 			identifier_c param_name("IN");
       
  5617 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5618 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5619 			
       
  5620 			/* Get the value from a foo(<param_value>) style call */
       
  5621 			if (IN_param_value == NULL)
       
  5622 			  IN_param_value = function_call_param_iterator.next();
       
  5623 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5624 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5625 			
       
  5626 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5627 			{
       
  5628 		
       
  5629 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5630 				return return_type_symbol;
       
  5631 				
       
  5632 			}
       
  5633 			
       
  5634 			ERROR;
       
  5635 		}
       
  5636 		
       
  5637 	}/*function_udint_to_tod*/
       
  5638 	break;
       
  5639 
       
  5640 /****
       
  5641  *UDINT_TO_UDINT
       
  5642  */
       
  5643 	case function_udint_to_udint :
       
  5644 	{
       
  5645 		symbol_c *last_type_symbol = NULL;
       
  5646 
       
  5647 		{
       
  5648 			identifier_c param_name("IN");
       
  5649 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5650 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5651 			
       
  5652 			/* Get the value from a foo(<param_value>) style call */
       
  5653 			if (IN_param_value == NULL)
       
  5654 			  IN_param_value = function_call_param_iterator.next();
       
  5655 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5656 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5657 			
       
  5658 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5659 			{
       
  5660 		
       
  5661 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5662 				return return_type_symbol;
       
  5663 				
       
  5664 			}
       
  5665 			
       
  5666 			ERROR;
       
  5667 		}
       
  5668 		
       
  5669 	}/*function_udint_to_udint*/
       
  5670 	break;
       
  5671 
       
  5672 /****
       
  5673  *UDINT_TO_WORD
       
  5674  */
       
  5675 	case function_udint_to_word :
       
  5676 	{
       
  5677 		symbol_c *last_type_symbol = NULL;
       
  5678 
       
  5679 		{
       
  5680 			identifier_c param_name("IN");
       
  5681 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5682 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5683 			
       
  5684 			/* Get the value from a foo(<param_value>) style call */
       
  5685 			if (IN_param_value == NULL)
       
  5686 			  IN_param_value = function_call_param_iterator.next();
       
  5687 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5688 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5689 			
       
  5690 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5691 			{
       
  5692 		
       
  5693 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5694 				return return_type_symbol;
       
  5695 				
       
  5696 			}
       
  5697 			
       
  5698 			ERROR;
       
  5699 		}
       
  5700 		
       
  5701 	}/*function_udint_to_word*/
       
  5702 	break;
       
  5703 
       
  5704 /****
       
  5705  *UDINT_TO_WSTRING
       
  5706  */
       
  5707 	case function_udint_to_wstring :
       
  5708 	{
       
  5709 		symbol_c *last_type_symbol = NULL;
       
  5710 
       
  5711 		{
       
  5712 			identifier_c param_name("IN");
       
  5713 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5714 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5715 			
       
  5716 			/* Get the value from a foo(<param_value>) style call */
       
  5717 			if (IN_param_value == NULL)
       
  5718 			  IN_param_value = function_call_param_iterator.next();
       
  5719 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5720 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5721 			
       
  5722 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5723 			{
       
  5724 		
       
  5725 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5726 				return return_type_symbol;
       
  5727 				
       
  5728 			}
       
  5729 			
       
  5730 			ERROR;
       
  5731 		}
       
  5732 		
       
  5733 	}/*function_udint_to_wstring*/
       
  5734 	break;
       
  5735 
       
  5736 /****
       
  5737  *UDINT_TO_STRING
       
  5738  */
       
  5739 	case function_udint_to_string :
       
  5740 	{
       
  5741 		symbol_c *last_type_symbol = NULL;
       
  5742 
       
  5743 		{
       
  5744 			identifier_c param_name("IN");
       
  5745 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5746 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5747 			
       
  5748 			/* Get the value from a foo(<param_value>) style call */
       
  5749 			if (IN_param_value == NULL)
       
  5750 			  IN_param_value = function_call_param_iterator.next();
       
  5751 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5752 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5753 			
       
  5754 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5755 			{
       
  5756 		
       
  5757 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5758 				return return_type_symbol;
       
  5759 				
       
  5760 			}
       
  5761 			
       
  5762 			ERROR;
       
  5763 		}
       
  5764 		
       
  5765 	}/*function_udint_to_string*/
       
  5766 	break;
       
  5767 
       
  5768 /****
       
  5769  *UDINT_TO_LWORD
       
  5770  */
       
  5771 	case function_udint_to_lword :
       
  5772 	{
       
  5773 		symbol_c *last_type_symbol = NULL;
       
  5774 
       
  5775 		{
       
  5776 			identifier_c param_name("IN");
       
  5777 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5778 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5779 			
       
  5780 			/* Get the value from a foo(<param_value>) style call */
       
  5781 			if (IN_param_value == NULL)
       
  5782 			  IN_param_value = function_call_param_iterator.next();
       
  5783 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5784 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5785 			
       
  5786 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5787 			{
       
  5788 		
       
  5789 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5790 				return return_type_symbol;
       
  5791 				
       
  5792 			}
       
  5793 			
       
  5794 			ERROR;
       
  5795 		}
       
  5796 		
       
  5797 	}/*function_udint_to_lword*/
       
  5798 	break;
       
  5799 
       
  5800 /****
       
  5801  *UDINT_TO_UINT
       
  5802  */
       
  5803 	case function_udint_to_uint :
       
  5804 	{
       
  5805 		symbol_c *last_type_symbol = NULL;
       
  5806 
       
  5807 		{
       
  5808 			identifier_c param_name("IN");
       
  5809 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5810 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5811 			
       
  5812 			/* Get the value from a foo(<param_value>) style call */
       
  5813 			if (IN_param_value == NULL)
       
  5814 			  IN_param_value = function_call_param_iterator.next();
       
  5815 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5816 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5817 			
       
  5818 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5819 			{
       
  5820 		
       
  5821 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5822 				return return_type_symbol;
       
  5823 				
       
  5824 			}
       
  5825 			
       
  5826 			ERROR;
       
  5827 		}
       
  5828 		
       
  5829 	}/*function_udint_to_uint*/
       
  5830 	break;
       
  5831 
       
  5832 /****
       
  5833  *UDINT_TO_LREAL
       
  5834  */
       
  5835 	case function_udint_to_lreal :
       
  5836 	{
       
  5837 		symbol_c *last_type_symbol = NULL;
       
  5838 
       
  5839 		{
       
  5840 			identifier_c param_name("IN");
       
  5841 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5842 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5843 			
       
  5844 			/* Get the value from a foo(<param_value>) style call */
       
  5845 			if (IN_param_value == NULL)
       
  5846 			  IN_param_value = function_call_param_iterator.next();
       
  5847 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5848 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5849 			
       
  5850 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5851 			{
       
  5852 		
       
  5853 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5854 				return return_type_symbol;
       
  5855 				
       
  5856 			}
       
  5857 			
       
  5858 			ERROR;
       
  5859 		}
       
  5860 		
       
  5861 	}/*function_udint_to_lreal*/
       
  5862 	break;
       
  5863 
       
  5864 /****
       
  5865  *UDINT_TO_BYTE
       
  5866  */
       
  5867 	case function_udint_to_byte :
       
  5868 	{
       
  5869 		symbol_c *last_type_symbol = NULL;
       
  5870 
       
  5871 		{
       
  5872 			identifier_c param_name("IN");
       
  5873 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5874 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5875 			
       
  5876 			/* Get the value from a foo(<param_value>) style call */
       
  5877 			if (IN_param_value == NULL)
       
  5878 			  IN_param_value = function_call_param_iterator.next();
       
  5879 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5880 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5881 			
       
  5882 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5883 			{
       
  5884 		
       
  5885 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5886 				return return_type_symbol;
       
  5887 				
       
  5888 			}
       
  5889 			
       
  5890 			ERROR;
       
  5891 		}
       
  5892 		
       
  5893 	}/*function_udint_to_byte*/
       
  5894 	break;
       
  5895 
       
  5896 /****
       
  5897  *UDINT_TO_USINT
       
  5898  */
       
  5899 	case function_udint_to_usint :
       
  5900 	{
       
  5901 		symbol_c *last_type_symbol = NULL;
       
  5902 
       
  5903 		{
       
  5904 			identifier_c param_name("IN");
       
  5905 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5906 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5907 			
       
  5908 			/* Get the value from a foo(<param_value>) style call */
       
  5909 			if (IN_param_value == NULL)
       
  5910 			  IN_param_value = function_call_param_iterator.next();
       
  5911 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5912 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5913 			
       
  5914 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5915 			{
       
  5916 		
       
  5917 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5918 				return return_type_symbol;
       
  5919 				
       
  5920 			}
       
  5921 			
       
  5922 			ERROR;
       
  5923 		}
       
  5924 		
       
  5925 	}/*function_udint_to_usint*/
       
  5926 	break;
       
  5927 
       
  5928 /****
       
  5929  *UDINT_TO_ULINT
       
  5930  */
       
  5931 	case function_udint_to_ulint :
       
  5932 	{
       
  5933 		symbol_c *last_type_symbol = NULL;
       
  5934 
       
  5935 		{
       
  5936 			identifier_c param_name("IN");
       
  5937 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5938 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5939 			
       
  5940 			/* Get the value from a foo(<param_value>) style call */
       
  5941 			if (IN_param_value == NULL)
       
  5942 			  IN_param_value = function_call_param_iterator.next();
       
  5943 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5944 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5945 			
       
  5946 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5947 			{
       
  5948 		
       
  5949 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5950 				return return_type_symbol;
       
  5951 				
       
  5952 			}
       
  5953 			
       
  5954 			ERROR;
       
  5955 		}
       
  5956 		
       
  5957 	}/*function_udint_to_ulint*/
       
  5958 	break;
       
  5959 
       
  5960 /****
       
  5961  *UDINT_TO_BOOL
       
  5962  */
       
  5963 	case function_udint_to_bool :
       
  5964 	{
       
  5965 		symbol_c *last_type_symbol = NULL;
       
  5966 
       
  5967 		{
       
  5968 			identifier_c param_name("IN");
       
  5969 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5970 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5971 			
       
  5972 			/* Get the value from a foo(<param_value>) style call */
       
  5973 			if (IN_param_value == NULL)
       
  5974 			  IN_param_value = function_call_param_iterator.next();
       
  5975 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5976 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5977 			
       
  5978 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5979 			{
       
  5980 		
       
  5981 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5982 				return return_type_symbol;
       
  5983 				
       
  5984 			}
       
  5985 			
       
  5986 			ERROR;
       
  5987 		}
       
  5988 		
       
  5989 	}/*function_udint_to_bool*/
       
  5990 	break;
       
  5991 
       
  5992 /****
       
  5993  *UDINT_TO_TIME
       
  5994  */
       
  5995 	case function_udint_to_time :
       
  5996 	{
       
  5997 		symbol_c *last_type_symbol = NULL;
       
  5998 
       
  5999 		{
       
  6000 			identifier_c param_name("IN");
       
  6001 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6002 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6003 			
       
  6004 			/* Get the value from a foo(<param_value>) style call */
       
  6005 			if (IN_param_value == NULL)
       
  6006 			  IN_param_value = function_call_param_iterator.next();
       
  6007 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6008 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6009 			
       
  6010 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6011 			{
       
  6012 		
       
  6013 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6014 				return return_type_symbol;
       
  6015 				
       
  6016 			}
       
  6017 			
       
  6018 			ERROR;
       
  6019 		}
       
  6020 		
       
  6021 	}/*function_udint_to_time*/
       
  6022 	break;
       
  6023 
       
  6024 /****
       
  6025  *UDINT_TO_INT
       
  6026  */
       
  6027 	case function_udint_to_int :
       
  6028 	{
       
  6029 		symbol_c *last_type_symbol = NULL;
       
  6030 
       
  6031 		{
       
  6032 			identifier_c param_name("IN");
       
  6033 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6034 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6035 			
       
  6036 			/* Get the value from a foo(<param_value>) style call */
       
  6037 			if (IN_param_value == NULL)
       
  6038 			  IN_param_value = function_call_param_iterator.next();
       
  6039 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6040 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6041 			
       
  6042 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6043 			{
       
  6044 		
       
  6045 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6046 				return return_type_symbol;
       
  6047 				
       
  6048 			}
       
  6049 			
       
  6050 			ERROR;
       
  6051 		}
       
  6052 		
       
  6053 	}/*function_udint_to_int*/
       
  6054 	break;
       
  6055 
       
  6056 /****
       
  6057  *WORD_TO_REAL
       
  6058  */
       
  6059 	case function_word_to_real :
       
  6060 	{
       
  6061 		symbol_c *last_type_symbol = NULL;
       
  6062 
       
  6063 		{
       
  6064 			identifier_c param_name("IN");
       
  6065 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6066 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6067 			
       
  6068 			/* Get the value from a foo(<param_value>) style call */
       
  6069 			if (IN_param_value == NULL)
       
  6070 			  IN_param_value = function_call_param_iterator.next();
       
  6071 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6072 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6073 			
       
  6074 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6075 			{
       
  6076 		
       
  6077 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6078 				return return_type_symbol;
       
  6079 				
       
  6080 			}
       
  6081 			
       
  6082 			ERROR;
       
  6083 		}
       
  6084 		
       
  6085 	}/*function_word_to_real*/
       
  6086 	break;
       
  6087 
       
  6088 /****
       
  6089  *WORD_TO_SINT
       
  6090  */
       
  6091 	case function_word_to_sint :
       
  6092 	{
       
  6093 		symbol_c *last_type_symbol = NULL;
       
  6094 
       
  6095 		{
       
  6096 			identifier_c param_name("IN");
       
  6097 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6098 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6099 			
       
  6100 			/* Get the value from a foo(<param_value>) style call */
       
  6101 			if (IN_param_value == NULL)
       
  6102 			  IN_param_value = function_call_param_iterator.next();
       
  6103 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6104 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6105 			
       
  6106 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6107 			{
       
  6108 		
       
  6109 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6110 				return return_type_symbol;
       
  6111 				
       
  6112 			}
       
  6113 			
       
  6114 			ERROR;
       
  6115 		}
       
  6116 		
       
  6117 	}/*function_word_to_sint*/
       
  6118 	break;
       
  6119 
       
  6120 /****
       
  6121  *WORD_TO_LINT
       
  6122  */
       
  6123 	case function_word_to_lint :
       
  6124 	{
       
  6125 		symbol_c *last_type_symbol = NULL;
       
  6126 
       
  6127 		{
       
  6128 			identifier_c param_name("IN");
       
  6129 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6130 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6131 			
       
  6132 			/* Get the value from a foo(<param_value>) style call */
       
  6133 			if (IN_param_value == NULL)
       
  6134 			  IN_param_value = function_call_param_iterator.next();
       
  6135 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6136 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6137 			
       
  6138 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6139 			{
       
  6140 		
       
  6141 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6142 				return return_type_symbol;
       
  6143 				
       
  6144 			}
       
  6145 			
       
  6146 			ERROR;
       
  6147 		}
       
  6148 		
       
  6149 	}/*function_word_to_lint*/
       
  6150 	break;
       
  6151 
       
  6152 /****
       
  6153  *WORD_TO_DINT
       
  6154  */
       
  6155 	case function_word_to_dint :
       
  6156 	{
       
  6157 		symbol_c *last_type_symbol = NULL;
       
  6158 
       
  6159 		{
       
  6160 			identifier_c param_name("IN");
       
  6161 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6162 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6163 			
       
  6164 			/* Get the value from a foo(<param_value>) style call */
       
  6165 			if (IN_param_value == NULL)
       
  6166 			  IN_param_value = function_call_param_iterator.next();
       
  6167 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6168 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6169 			
       
  6170 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6171 			{
       
  6172 		
       
  6173 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6174 				return return_type_symbol;
       
  6175 				
       
  6176 			}
       
  6177 			
       
  6178 			ERROR;
       
  6179 		}
       
  6180 		
       
  6181 	}/*function_word_to_dint*/
       
  6182 	break;
       
  6183 
       
  6184 /****
       
  6185  *WORD_TO_DATE
       
  6186  */
       
  6187 	case function_word_to_date :
       
  6188 	{
       
  6189 		symbol_c *last_type_symbol = NULL;
       
  6190 
       
  6191 		{
       
  6192 			identifier_c param_name("IN");
       
  6193 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6194 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6195 			
       
  6196 			/* Get the value from a foo(<param_value>) style call */
       
  6197 			if (IN_param_value == NULL)
       
  6198 			  IN_param_value = function_call_param_iterator.next();
       
  6199 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6200 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6201 			
       
  6202 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6203 			{
       
  6204 		
       
  6205 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6206 				return return_type_symbol;
       
  6207 				
       
  6208 			}
       
  6209 			
       
  6210 			ERROR;
       
  6211 		}
       
  6212 		
       
  6213 	}/*function_word_to_date*/
       
  6214 	break;
       
  6215 
       
  6216 /****
       
  6217  *WORD_TO_DWORD
       
  6218  */
       
  6219 	case function_word_to_dword :
       
  6220 	{
       
  6221 		symbol_c *last_type_symbol = NULL;
       
  6222 
       
  6223 		{
       
  6224 			identifier_c param_name("IN");
       
  6225 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6226 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6227 			
       
  6228 			/* Get the value from a foo(<param_value>) style call */
       
  6229 			if (IN_param_value == NULL)
       
  6230 			  IN_param_value = function_call_param_iterator.next();
       
  6231 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6232 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6233 			
       
  6234 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6235 			{
       
  6236 		
       
  6237 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6238 				return return_type_symbol;
       
  6239 				
       
  6240 			}
       
  6241 			
       
  6242 			ERROR;
       
  6243 		}
       
  6244 		
       
  6245 	}/*function_word_to_dword*/
       
  6246 	break;
       
  6247 
       
  6248 /****
       
  6249  *WORD_TO_DT
       
  6250  */
       
  6251 	case function_word_to_dt :
       
  6252 	{
       
  6253 		symbol_c *last_type_symbol = NULL;
       
  6254 
       
  6255 		{
       
  6256 			identifier_c param_name("IN");
       
  6257 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6258 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6259 			
       
  6260 			/* Get the value from a foo(<param_value>) style call */
       
  6261 			if (IN_param_value == NULL)
       
  6262 			  IN_param_value = function_call_param_iterator.next();
       
  6263 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6264 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6265 			
       
  6266 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6267 			{
       
  6268 		
       
  6269 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6270 				return return_type_symbol;
       
  6271 				
       
  6272 			}
       
  6273 			
       
  6274 			ERROR;
       
  6275 		}
       
  6276 		
       
  6277 	}/*function_word_to_dt*/
       
  6278 	break;
       
  6279 
       
  6280 /****
       
  6281  *WORD_TO_TOD
       
  6282  */
       
  6283 	case function_word_to_tod :
       
  6284 	{
       
  6285 		symbol_c *last_type_symbol = NULL;
       
  6286 
       
  6287 		{
       
  6288 			identifier_c param_name("IN");
       
  6289 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6290 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6291 			
       
  6292 			/* Get the value from a foo(<param_value>) style call */
       
  6293 			if (IN_param_value == NULL)
       
  6294 			  IN_param_value = function_call_param_iterator.next();
       
  6295 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6296 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6297 			
       
  6298 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6299 			{
       
  6300 		
       
  6301 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6302 				return return_type_symbol;
       
  6303 				
       
  6304 			}
       
  6305 			
       
  6306 			ERROR;
       
  6307 		}
       
  6308 		
       
  6309 	}/*function_word_to_tod*/
       
  6310 	break;
       
  6311 
       
  6312 /****
       
  6313  *WORD_TO_UDINT
       
  6314  */
       
  6315 	case function_word_to_udint :
       
  6316 	{
       
  6317 		symbol_c *last_type_symbol = NULL;
       
  6318 
       
  6319 		{
       
  6320 			identifier_c param_name("IN");
       
  6321 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6322 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6323 			
       
  6324 			/* Get the value from a foo(<param_value>) style call */
       
  6325 			if (IN_param_value == NULL)
       
  6326 			  IN_param_value = function_call_param_iterator.next();
       
  6327 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6328 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6329 			
       
  6330 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6331 			{
       
  6332 		
       
  6333 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6334 				return return_type_symbol;
       
  6335 				
       
  6336 			}
       
  6337 			
       
  6338 			ERROR;
       
  6339 		}
       
  6340 		
       
  6341 	}/*function_word_to_udint*/
       
  6342 	break;
       
  6343 
       
  6344 /****
       
  6345  *WORD_TO_WORD
       
  6346  */
       
  6347 	case function_word_to_word :
       
  6348 	{
       
  6349 		symbol_c *last_type_symbol = NULL;
       
  6350 
       
  6351 		{
       
  6352 			identifier_c param_name("IN");
       
  6353 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6354 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6355 			
       
  6356 			/* Get the value from a foo(<param_value>) style call */
       
  6357 			if (IN_param_value == NULL)
       
  6358 			  IN_param_value = function_call_param_iterator.next();
       
  6359 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6360 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6361 			
       
  6362 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6363 			{
       
  6364 		
       
  6365 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6366 				return return_type_symbol;
       
  6367 				
       
  6368 			}
       
  6369 			
       
  6370 			ERROR;
       
  6371 		}
       
  6372 		
       
  6373 	}/*function_word_to_word*/
       
  6374 	break;
       
  6375 
       
  6376 /****
       
  6377  *WORD_TO_WSTRING
       
  6378  */
       
  6379 	case function_word_to_wstring :
       
  6380 	{
       
  6381 		symbol_c *last_type_symbol = NULL;
       
  6382 
       
  6383 		{
       
  6384 			identifier_c param_name("IN");
       
  6385 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6386 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6387 			
       
  6388 			/* Get the value from a foo(<param_value>) style call */
       
  6389 			if (IN_param_value == NULL)
       
  6390 			  IN_param_value = function_call_param_iterator.next();
       
  6391 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6392 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6393 			
       
  6394 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6395 			{
       
  6396 		
       
  6397 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6398 				return return_type_symbol;
       
  6399 				
       
  6400 			}
       
  6401 			
       
  6402 			ERROR;
       
  6403 		}
       
  6404 		
       
  6405 	}/*function_word_to_wstring*/
       
  6406 	break;
       
  6407 
       
  6408 /****
       
  6409  *WORD_TO_STRING
       
  6410  */
       
  6411 	case function_word_to_string :
       
  6412 	{
       
  6413 		symbol_c *last_type_symbol = NULL;
       
  6414 
       
  6415 		{
       
  6416 			identifier_c param_name("IN");
       
  6417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6419 			
       
  6420 			/* Get the value from a foo(<param_value>) style call */
       
  6421 			if (IN_param_value == NULL)
       
  6422 			  IN_param_value = function_call_param_iterator.next();
       
  6423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6424 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6425 			
       
  6426 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6427 			{
       
  6428 		
       
  6429 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6430 				return return_type_symbol;
       
  6431 				
       
  6432 			}
       
  6433 			
       
  6434 			ERROR;
       
  6435 		}
       
  6436 		
       
  6437 	}/*function_word_to_string*/
       
  6438 	break;
       
  6439 
       
  6440 /****
       
  6441  *WORD_TO_LWORD
       
  6442  */
       
  6443 	case function_word_to_lword :
       
  6444 	{
       
  6445 		symbol_c *last_type_symbol = NULL;
       
  6446 
       
  6447 		{
       
  6448 			identifier_c param_name("IN");
       
  6449 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6450 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6451 			
       
  6452 			/* Get the value from a foo(<param_value>) style call */
       
  6453 			if (IN_param_value == NULL)
       
  6454 			  IN_param_value = function_call_param_iterator.next();
       
  6455 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6456 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6457 			
       
  6458 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6459 			{
       
  6460 		
       
  6461 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6462 				return return_type_symbol;
       
  6463 				
       
  6464 			}
       
  6465 			
       
  6466 			ERROR;
       
  6467 		}
       
  6468 		
       
  6469 	}/*function_word_to_lword*/
       
  6470 	break;
       
  6471 
       
  6472 /****
       
  6473  *WORD_TO_UINT
       
  6474  */
       
  6475 	case function_word_to_uint :
       
  6476 	{
       
  6477 		symbol_c *last_type_symbol = NULL;
       
  6478 
       
  6479 		{
       
  6480 			identifier_c param_name("IN");
       
  6481 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6482 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6483 			
       
  6484 			/* Get the value from a foo(<param_value>) style call */
       
  6485 			if (IN_param_value == NULL)
       
  6486 			  IN_param_value = function_call_param_iterator.next();
       
  6487 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6488 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6489 			
       
  6490 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6491 			{
       
  6492 		
       
  6493 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6494 				return return_type_symbol;
       
  6495 				
       
  6496 			}
       
  6497 			
       
  6498 			ERROR;
       
  6499 		}
       
  6500 		
       
  6501 	}/*function_word_to_uint*/
       
  6502 	break;
       
  6503 
       
  6504 /****
       
  6505  *WORD_TO_LREAL
       
  6506  */
       
  6507 	case function_word_to_lreal :
       
  6508 	{
       
  6509 		symbol_c *last_type_symbol = NULL;
       
  6510 
       
  6511 		{
       
  6512 			identifier_c param_name("IN");
       
  6513 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6514 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6515 			
       
  6516 			/* Get the value from a foo(<param_value>) style call */
       
  6517 			if (IN_param_value == NULL)
       
  6518 			  IN_param_value = function_call_param_iterator.next();
       
  6519 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6520 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6521 			
       
  6522 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6523 			{
       
  6524 		
       
  6525 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6526 				return return_type_symbol;
       
  6527 				
       
  6528 			}
       
  6529 			
       
  6530 			ERROR;
       
  6531 		}
       
  6532 		
       
  6533 	}/*function_word_to_lreal*/
       
  6534 	break;
       
  6535 
       
  6536 /****
       
  6537  *WORD_TO_BYTE
       
  6538  */
       
  6539 	case function_word_to_byte :
       
  6540 	{
       
  6541 		symbol_c *last_type_symbol = NULL;
       
  6542 
       
  6543 		{
       
  6544 			identifier_c param_name("IN");
       
  6545 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6546 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6547 			
       
  6548 			/* Get the value from a foo(<param_value>) style call */
       
  6549 			if (IN_param_value == NULL)
       
  6550 			  IN_param_value = function_call_param_iterator.next();
       
  6551 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6552 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6553 			
       
  6554 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6555 			{
       
  6556 		
       
  6557 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6558 				return return_type_symbol;
       
  6559 				
       
  6560 			}
       
  6561 			
       
  6562 			ERROR;
       
  6563 		}
       
  6564 		
       
  6565 	}/*function_word_to_byte*/
       
  6566 	break;
       
  6567 
       
  6568 /****
       
  6569  *WORD_TO_USINT
       
  6570  */
       
  6571 	case function_word_to_usint :
       
  6572 	{
       
  6573 		symbol_c *last_type_symbol = NULL;
       
  6574 
       
  6575 		{
       
  6576 			identifier_c param_name("IN");
       
  6577 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6578 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6579 			
       
  6580 			/* Get the value from a foo(<param_value>) style call */
       
  6581 			if (IN_param_value == NULL)
       
  6582 			  IN_param_value = function_call_param_iterator.next();
       
  6583 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6584 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6585 			
       
  6586 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6587 			{
       
  6588 		
       
  6589 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6590 				return return_type_symbol;
       
  6591 				
       
  6592 			}
       
  6593 			
       
  6594 			ERROR;
       
  6595 		}
       
  6596 		
       
  6597 	}/*function_word_to_usint*/
       
  6598 	break;
       
  6599 
       
  6600 /****
       
  6601  *WORD_TO_ULINT
       
  6602  */
       
  6603 	case function_word_to_ulint :
       
  6604 	{
       
  6605 		symbol_c *last_type_symbol = NULL;
       
  6606 
       
  6607 		{
       
  6608 			identifier_c param_name("IN");
       
  6609 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6610 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6611 			
       
  6612 			/* Get the value from a foo(<param_value>) style call */
       
  6613 			if (IN_param_value == NULL)
       
  6614 			  IN_param_value = function_call_param_iterator.next();
       
  6615 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6616 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6617 			
       
  6618 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6619 			{
       
  6620 		
       
  6621 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6622 				return return_type_symbol;
       
  6623 				
       
  6624 			}
       
  6625 			
       
  6626 			ERROR;
       
  6627 		}
       
  6628 		
       
  6629 	}/*function_word_to_ulint*/
       
  6630 	break;
       
  6631 
       
  6632 /****
       
  6633  *WORD_TO_BOOL
       
  6634  */
       
  6635 	case function_word_to_bool :
       
  6636 	{
       
  6637 		symbol_c *last_type_symbol = NULL;
       
  6638 
       
  6639 		{
       
  6640 			identifier_c param_name("IN");
       
  6641 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6642 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6643 			
       
  6644 			/* Get the value from a foo(<param_value>) style call */
       
  6645 			if (IN_param_value == NULL)
       
  6646 			  IN_param_value = function_call_param_iterator.next();
       
  6647 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6648 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6649 			
       
  6650 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6651 			{
       
  6652 		
       
  6653 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6654 				return return_type_symbol;
       
  6655 				
       
  6656 			}
       
  6657 			
       
  6658 			ERROR;
       
  6659 		}
       
  6660 		
       
  6661 	}/*function_word_to_bool*/
       
  6662 	break;
       
  6663 
       
  6664 /****
       
  6665  *WORD_TO_TIME
       
  6666  */
       
  6667 	case function_word_to_time :
       
  6668 	{
       
  6669 		symbol_c *last_type_symbol = NULL;
       
  6670 
       
  6671 		{
       
  6672 			identifier_c param_name("IN");
       
  6673 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6674 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6675 			
       
  6676 			/* Get the value from a foo(<param_value>) style call */
       
  6677 			if (IN_param_value == NULL)
       
  6678 			  IN_param_value = function_call_param_iterator.next();
       
  6679 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6680 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6681 			
       
  6682 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6683 			{
       
  6684 		
       
  6685 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6686 				return return_type_symbol;
       
  6687 				
       
  6688 			}
       
  6689 			
       
  6690 			ERROR;
       
  6691 		}
       
  6692 		
       
  6693 	}/*function_word_to_time*/
       
  6694 	break;
       
  6695 
       
  6696 /****
       
  6697  *WORD_TO_INT
       
  6698  */
       
  6699 	case function_word_to_int :
       
  6700 	{
       
  6701 		symbol_c *last_type_symbol = NULL;
       
  6702 
       
  6703 		{
       
  6704 			identifier_c param_name("IN");
       
  6705 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6706 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6707 			
       
  6708 			/* Get the value from a foo(<param_value>) style call */
       
  6709 			if (IN_param_value == NULL)
       
  6710 			  IN_param_value = function_call_param_iterator.next();
       
  6711 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6712 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6713 			
       
  6714 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6715 			{
       
  6716 		
       
  6717 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6718 				return return_type_symbol;
       
  6719 				
       
  6720 			}
       
  6721 			
       
  6722 			ERROR;
       
  6723 		}
       
  6724 		
       
  6725 	}/*function_word_to_int*/
       
  6726 	break;
       
  6727 
       
  6728 /****
       
  6729  *WSTRING_TO_REAL
       
  6730  */
       
  6731 	case function_wstring_to_real :
       
  6732 	{
       
  6733 		symbol_c *last_type_symbol = NULL;
       
  6734 
       
  6735 		{
       
  6736 			identifier_c param_name("IN");
       
  6737 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6738 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6739 			
       
  6740 			/* Get the value from a foo(<param_value>) style call */
       
  6741 			if (IN_param_value == NULL)
       
  6742 			  IN_param_value = function_call_param_iterator.next();
       
  6743 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6744 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6745 			
       
  6746 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6747 			{
       
  6748 		
       
  6749 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6750 				return return_type_symbol;
       
  6751 				
       
  6752 			}
       
  6753 			
       
  6754 			ERROR;
       
  6755 		}
       
  6756 		
       
  6757 	}/*function_wstring_to_real*/
       
  6758 	break;
       
  6759 
       
  6760 /****
       
  6761  *WSTRING_TO_SINT
       
  6762  */
       
  6763 	case function_wstring_to_sint :
       
  6764 	{
       
  6765 		symbol_c *last_type_symbol = NULL;
       
  6766 
       
  6767 		{
       
  6768 			identifier_c param_name("IN");
       
  6769 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6770 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6771 			
       
  6772 			/* Get the value from a foo(<param_value>) style call */
       
  6773 			if (IN_param_value == NULL)
       
  6774 			  IN_param_value = function_call_param_iterator.next();
       
  6775 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6776 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6777 			
       
  6778 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6779 			{
       
  6780 		
       
  6781 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6782 				return return_type_symbol;
       
  6783 				
       
  6784 			}
       
  6785 			
       
  6786 			ERROR;
       
  6787 		}
       
  6788 		
       
  6789 	}/*function_wstring_to_sint*/
       
  6790 	break;
       
  6791 
       
  6792 /****
       
  6793  *WSTRING_TO_LINT
       
  6794  */
       
  6795 	case function_wstring_to_lint :
       
  6796 	{
       
  6797 		symbol_c *last_type_symbol = NULL;
       
  6798 
       
  6799 		{
       
  6800 			identifier_c param_name("IN");
       
  6801 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6802 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6803 			
       
  6804 			/* Get the value from a foo(<param_value>) style call */
       
  6805 			if (IN_param_value == NULL)
       
  6806 			  IN_param_value = function_call_param_iterator.next();
       
  6807 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6808 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6809 			
       
  6810 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6811 			{
       
  6812 		
       
  6813 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6814 				return return_type_symbol;
       
  6815 				
       
  6816 			}
       
  6817 			
       
  6818 			ERROR;
       
  6819 		}
       
  6820 		
       
  6821 	}/*function_wstring_to_lint*/
       
  6822 	break;
       
  6823 
       
  6824 /****
       
  6825  *WSTRING_TO_DINT
       
  6826  */
       
  6827 	case function_wstring_to_dint :
       
  6828 	{
       
  6829 		symbol_c *last_type_symbol = NULL;
       
  6830 
       
  6831 		{
       
  6832 			identifier_c param_name("IN");
       
  6833 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6834 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6835 			
       
  6836 			/* Get the value from a foo(<param_value>) style call */
       
  6837 			if (IN_param_value == NULL)
       
  6838 			  IN_param_value = function_call_param_iterator.next();
       
  6839 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6840 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6841 			
       
  6842 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6843 			{
       
  6844 		
       
  6845 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6846 				return return_type_symbol;
       
  6847 				
       
  6848 			}
       
  6849 			
       
  6850 			ERROR;
       
  6851 		}
       
  6852 		
       
  6853 	}/*function_wstring_to_dint*/
       
  6854 	break;
       
  6855 
       
  6856 /****
       
  6857  *WSTRING_TO_DATE
       
  6858  */
       
  6859 	case function_wstring_to_date :
       
  6860 	{
       
  6861 		symbol_c *last_type_symbol = NULL;
       
  6862 
       
  6863 		{
       
  6864 			identifier_c param_name("IN");
       
  6865 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6866 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6867 			
       
  6868 			/* Get the value from a foo(<param_value>) style call */
       
  6869 			if (IN_param_value == NULL)
       
  6870 			  IN_param_value = function_call_param_iterator.next();
       
  6871 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6872 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6873 			
       
  6874 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6875 			{
       
  6876 		
       
  6877 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6878 				return return_type_symbol;
       
  6879 				
       
  6880 			}
       
  6881 			
       
  6882 			ERROR;
       
  6883 		}
       
  6884 		
       
  6885 	}/*function_wstring_to_date*/
       
  6886 	break;
       
  6887 
       
  6888 /****
       
  6889  *WSTRING_TO_DWORD
       
  6890  */
       
  6891 	case function_wstring_to_dword :
       
  6892 	{
       
  6893 		symbol_c *last_type_symbol = NULL;
       
  6894 
       
  6895 		{
       
  6896 			identifier_c param_name("IN");
       
  6897 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6898 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6899 			
       
  6900 			/* Get the value from a foo(<param_value>) style call */
       
  6901 			if (IN_param_value == NULL)
       
  6902 			  IN_param_value = function_call_param_iterator.next();
       
  6903 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6904 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6905 			
       
  6906 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6907 			{
       
  6908 		
       
  6909 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6910 				return return_type_symbol;
       
  6911 				
       
  6912 			}
       
  6913 			
       
  6914 			ERROR;
       
  6915 		}
       
  6916 		
       
  6917 	}/*function_wstring_to_dword*/
       
  6918 	break;
       
  6919 
       
  6920 /****
       
  6921  *WSTRING_TO_DT
       
  6922  */
       
  6923 	case function_wstring_to_dt :
       
  6924 	{
       
  6925 		symbol_c *last_type_symbol = NULL;
       
  6926 
       
  6927 		{
       
  6928 			identifier_c param_name("IN");
       
  6929 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6930 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6931 			
       
  6932 			/* Get the value from a foo(<param_value>) style call */
       
  6933 			if (IN_param_value == NULL)
       
  6934 			  IN_param_value = function_call_param_iterator.next();
       
  6935 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6936 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6937 			
       
  6938 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6939 			{
       
  6940 		
       
  6941 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6942 				return return_type_symbol;
       
  6943 				
       
  6944 			}
       
  6945 			
       
  6946 			ERROR;
       
  6947 		}
       
  6948 		
       
  6949 	}/*function_wstring_to_dt*/
       
  6950 	break;
       
  6951 
       
  6952 /****
       
  6953  *WSTRING_TO_TOD
       
  6954  */
       
  6955 	case function_wstring_to_tod :
       
  6956 	{
       
  6957 		symbol_c *last_type_symbol = NULL;
       
  6958 
       
  6959 		{
       
  6960 			identifier_c param_name("IN");
       
  6961 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6962 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6963 			
       
  6964 			/* Get the value from a foo(<param_value>) style call */
       
  6965 			if (IN_param_value == NULL)
       
  6966 			  IN_param_value = function_call_param_iterator.next();
       
  6967 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6968 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6969 			
       
  6970 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  6971 			{
       
  6972 		
       
  6973 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6974 				return return_type_symbol;
       
  6975 				
       
  6976 			}
       
  6977 			
       
  6978 			ERROR;
       
  6979 		}
       
  6980 		
       
  6981 	}/*function_wstring_to_tod*/
       
  6982 	break;
       
  6983 
       
  6984 /****
       
  6985  *WSTRING_TO_UDINT
       
  6986  */
       
  6987 	case function_wstring_to_udint :
       
  6988 	{
       
  6989 		symbol_c *last_type_symbol = NULL;
       
  6990 
       
  6991 		{
       
  6992 			identifier_c param_name("IN");
       
  6993 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6994 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6995 			
       
  6996 			/* Get the value from a foo(<param_value>) style call */
       
  6997 			if (IN_param_value == NULL)
       
  6998 			  IN_param_value = function_call_param_iterator.next();
       
  6999 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7000 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7001 			
       
  7002 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7003 			{
       
  7004 		
       
  7005 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7006 				return return_type_symbol;
       
  7007 				
       
  7008 			}
       
  7009 			
       
  7010 			ERROR;
       
  7011 		}
       
  7012 		
       
  7013 	}/*function_wstring_to_udint*/
       
  7014 	break;
       
  7015 
       
  7016 /****
       
  7017  *WSTRING_TO_WORD
       
  7018  */
       
  7019 	case function_wstring_to_word :
       
  7020 	{
       
  7021 		symbol_c *last_type_symbol = NULL;
       
  7022 
       
  7023 		{
       
  7024 			identifier_c param_name("IN");
       
  7025 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7026 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7027 			
       
  7028 			/* Get the value from a foo(<param_value>) style call */
       
  7029 			if (IN_param_value == NULL)
       
  7030 			  IN_param_value = function_call_param_iterator.next();
       
  7031 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7032 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7033 			
       
  7034 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7035 			{
       
  7036 		
       
  7037 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7038 				return return_type_symbol;
       
  7039 				
       
  7040 			}
       
  7041 			
       
  7042 			ERROR;
       
  7043 		}
       
  7044 		
       
  7045 	}/*function_wstring_to_word*/
       
  7046 	break;
       
  7047 
       
  7048 /****
       
  7049  *WSTRING_TO_WSTRING
       
  7050  */
       
  7051 	case function_wstring_to_wstring :
       
  7052 	{
       
  7053 		symbol_c *last_type_symbol = NULL;
       
  7054 
       
  7055 		{
       
  7056 			identifier_c param_name("IN");
       
  7057 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7058 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7059 			
       
  7060 			/* Get the value from a foo(<param_value>) style call */
       
  7061 			if (IN_param_value == NULL)
       
  7062 			  IN_param_value = function_call_param_iterator.next();
       
  7063 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7064 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7065 			
       
  7066 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7067 			{
       
  7068 		
       
  7069 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7070 				return return_type_symbol;
       
  7071 				
       
  7072 			}
       
  7073 			
       
  7074 			ERROR;
       
  7075 		}
       
  7076 		
       
  7077 	}/*function_wstring_to_wstring*/
       
  7078 	break;
       
  7079 
       
  7080 /****
       
  7081  *WSTRING_TO_STRING
       
  7082  */
       
  7083 	case function_wstring_to_string :
       
  7084 	{
       
  7085 		symbol_c *last_type_symbol = NULL;
       
  7086 
       
  7087 		{
       
  7088 			identifier_c param_name("IN");
       
  7089 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7090 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7091 			
       
  7092 			/* Get the value from a foo(<param_value>) style call */
       
  7093 			if (IN_param_value == NULL)
       
  7094 			  IN_param_value = function_call_param_iterator.next();
       
  7095 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7096 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7097 			
       
  7098 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7099 			{
       
  7100 		
       
  7101 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7102 				return return_type_symbol;
       
  7103 				
       
  7104 			}
       
  7105 			
       
  7106 			ERROR;
       
  7107 		}
       
  7108 		
       
  7109 	}/*function_wstring_to_string*/
       
  7110 	break;
       
  7111 
       
  7112 /****
       
  7113  *WSTRING_TO_LWORD
       
  7114  */
       
  7115 	case function_wstring_to_lword :
       
  7116 	{
       
  7117 		symbol_c *last_type_symbol = NULL;
       
  7118 
       
  7119 		{
       
  7120 			identifier_c param_name("IN");
       
  7121 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7122 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7123 			
       
  7124 			/* Get the value from a foo(<param_value>) style call */
       
  7125 			if (IN_param_value == NULL)
       
  7126 			  IN_param_value = function_call_param_iterator.next();
       
  7127 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7128 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7129 			
       
  7130 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7131 			{
       
  7132 		
       
  7133 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7134 				return return_type_symbol;
       
  7135 				
       
  7136 			}
       
  7137 			
       
  7138 			ERROR;
       
  7139 		}
       
  7140 		
       
  7141 	}/*function_wstring_to_lword*/
       
  7142 	break;
       
  7143 
       
  7144 /****
       
  7145  *WSTRING_TO_UINT
       
  7146  */
       
  7147 	case function_wstring_to_uint :
       
  7148 	{
       
  7149 		symbol_c *last_type_symbol = NULL;
       
  7150 
       
  7151 		{
       
  7152 			identifier_c param_name("IN");
       
  7153 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7154 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7155 			
       
  7156 			/* Get the value from a foo(<param_value>) style call */
       
  7157 			if (IN_param_value == NULL)
       
  7158 			  IN_param_value = function_call_param_iterator.next();
       
  7159 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7160 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7161 			
       
  7162 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7163 			{
       
  7164 		
       
  7165 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7166 				return return_type_symbol;
       
  7167 				
       
  7168 			}
       
  7169 			
       
  7170 			ERROR;
       
  7171 		}
       
  7172 		
       
  7173 	}/*function_wstring_to_uint*/
       
  7174 	break;
       
  7175 
       
  7176 /****
       
  7177  *WSTRING_TO_LREAL
       
  7178  */
       
  7179 	case function_wstring_to_lreal :
       
  7180 	{
       
  7181 		symbol_c *last_type_symbol = NULL;
       
  7182 
       
  7183 		{
       
  7184 			identifier_c param_name("IN");
       
  7185 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7186 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7187 			
       
  7188 			/* Get the value from a foo(<param_value>) style call */
       
  7189 			if (IN_param_value == NULL)
       
  7190 			  IN_param_value = function_call_param_iterator.next();
       
  7191 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7192 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7193 			
       
  7194 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7195 			{
       
  7196 		
       
  7197 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7198 				return return_type_symbol;
       
  7199 				
       
  7200 			}
       
  7201 			
       
  7202 			ERROR;
       
  7203 		}
       
  7204 		
       
  7205 	}/*function_wstring_to_lreal*/
       
  7206 	break;
       
  7207 
       
  7208 /****
       
  7209  *WSTRING_TO_BYTE
       
  7210  */
       
  7211 	case function_wstring_to_byte :
       
  7212 	{
       
  7213 		symbol_c *last_type_symbol = NULL;
       
  7214 
       
  7215 		{
       
  7216 			identifier_c param_name("IN");
       
  7217 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7218 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7219 			
       
  7220 			/* Get the value from a foo(<param_value>) style call */
       
  7221 			if (IN_param_value == NULL)
       
  7222 			  IN_param_value = function_call_param_iterator.next();
       
  7223 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7224 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7225 			
       
  7226 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7227 			{
       
  7228 		
       
  7229 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7230 				return return_type_symbol;
       
  7231 				
       
  7232 			}
       
  7233 			
       
  7234 			ERROR;
       
  7235 		}
       
  7236 		
       
  7237 	}/*function_wstring_to_byte*/
       
  7238 	break;
       
  7239 
       
  7240 /****
       
  7241  *WSTRING_TO_USINT
       
  7242  */
       
  7243 	case function_wstring_to_usint :
       
  7244 	{
       
  7245 		symbol_c *last_type_symbol = NULL;
       
  7246 
       
  7247 		{
       
  7248 			identifier_c param_name("IN");
       
  7249 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7250 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7251 			
       
  7252 			/* Get the value from a foo(<param_value>) style call */
       
  7253 			if (IN_param_value == NULL)
       
  7254 			  IN_param_value = function_call_param_iterator.next();
       
  7255 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7256 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7257 			
       
  7258 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7259 			{
       
  7260 		
       
  7261 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7262 				return return_type_symbol;
       
  7263 				
       
  7264 			}
       
  7265 			
       
  7266 			ERROR;
       
  7267 		}
       
  7268 		
       
  7269 	}/*function_wstring_to_usint*/
       
  7270 	break;
       
  7271 
       
  7272 /****
       
  7273  *WSTRING_TO_ULINT
       
  7274  */
       
  7275 	case function_wstring_to_ulint :
       
  7276 	{
       
  7277 		symbol_c *last_type_symbol = NULL;
       
  7278 
       
  7279 		{
       
  7280 			identifier_c param_name("IN");
       
  7281 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7282 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7283 			
       
  7284 			/* Get the value from a foo(<param_value>) style call */
       
  7285 			if (IN_param_value == NULL)
       
  7286 			  IN_param_value = function_call_param_iterator.next();
       
  7287 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7288 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7289 			
       
  7290 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7291 			{
       
  7292 		
       
  7293 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7294 				return return_type_symbol;
       
  7295 				
       
  7296 			}
       
  7297 			
       
  7298 			ERROR;
       
  7299 		}
       
  7300 		
       
  7301 	}/*function_wstring_to_ulint*/
       
  7302 	break;
       
  7303 
       
  7304 /****
       
  7305  *WSTRING_TO_BOOL
       
  7306  */
       
  7307 	case function_wstring_to_bool :
       
  7308 	{
       
  7309 		symbol_c *last_type_symbol = NULL;
       
  7310 
       
  7311 		{
       
  7312 			identifier_c param_name("IN");
       
  7313 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7314 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7315 			
       
  7316 			/* Get the value from a foo(<param_value>) style call */
       
  7317 			if (IN_param_value == NULL)
       
  7318 			  IN_param_value = function_call_param_iterator.next();
       
  7319 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7320 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7321 			
       
  7322 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7323 			{
       
  7324 		
       
  7325 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7326 				return return_type_symbol;
       
  7327 				
       
  7328 			}
       
  7329 			
       
  7330 			ERROR;
       
  7331 		}
       
  7332 		
       
  7333 	}/*function_wstring_to_bool*/
       
  7334 	break;
       
  7335 
       
  7336 /****
       
  7337  *WSTRING_TO_TIME
       
  7338  */
       
  7339 	case function_wstring_to_time :
       
  7340 	{
       
  7341 		symbol_c *last_type_symbol = NULL;
       
  7342 
       
  7343 		{
       
  7344 			identifier_c param_name("IN");
       
  7345 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7346 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7347 			
       
  7348 			/* Get the value from a foo(<param_value>) style call */
       
  7349 			if (IN_param_value == NULL)
       
  7350 			  IN_param_value = function_call_param_iterator.next();
       
  7351 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7352 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7353 			
       
  7354 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7355 			{
       
  7356 		
       
  7357 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7358 				return return_type_symbol;
       
  7359 				
       
  7360 			}
       
  7361 			
       
  7362 			ERROR;
       
  7363 		}
       
  7364 		
       
  7365 	}/*function_wstring_to_time*/
       
  7366 	break;
       
  7367 
       
  7368 /****
       
  7369  *WSTRING_TO_INT
       
  7370  */
       
  7371 	case function_wstring_to_int :
       
  7372 	{
       
  7373 		symbol_c *last_type_symbol = NULL;
       
  7374 
       
  7375 		{
       
  7376 			identifier_c param_name("IN");
       
  7377 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7378 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7379 			
       
  7380 			/* Get the value from a foo(<param_value>) style call */
       
  7381 			if (IN_param_value == NULL)
       
  7382 			  IN_param_value = function_call_param_iterator.next();
       
  7383 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7384 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7385 			
       
  7386 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7387 			{
       
  7388 		
       
  7389 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7390 				return return_type_symbol;
       
  7391 				
       
  7392 			}
       
  7393 			
       
  7394 			ERROR;
       
  7395 		}
       
  7396 		
       
  7397 	}/*function_wstring_to_int*/
       
  7398 	break;
       
  7399 
       
  7400 /****
       
  7401  *STRING_TO_REAL
       
  7402  */
       
  7403 	case function_string_to_real :
       
  7404 	{
       
  7405 		symbol_c *last_type_symbol = NULL;
       
  7406 
       
  7407 		{
       
  7408 			identifier_c param_name("IN");
       
  7409 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7410 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7411 			
       
  7412 			/* Get the value from a foo(<param_value>) style call */
       
  7413 			if (IN_param_value == NULL)
       
  7414 			  IN_param_value = function_call_param_iterator.next();
       
  7415 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7416 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7417 			
       
  7418 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7419 			{
       
  7420 		
       
  7421 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7422 				return return_type_symbol;
       
  7423 				
       
  7424 			}
       
  7425 			
       
  7426 			ERROR;
       
  7427 		}
       
  7428 		
       
  7429 	}/*function_string_to_real*/
       
  7430 	break;
       
  7431 
       
  7432 /****
       
  7433  *STRING_TO_SINT
       
  7434  */
       
  7435 	case function_string_to_sint :
       
  7436 	{
       
  7437 		symbol_c *last_type_symbol = NULL;
       
  7438 
       
  7439 		{
       
  7440 			identifier_c param_name("IN");
       
  7441 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7442 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7443 			
       
  7444 			/* Get the value from a foo(<param_value>) style call */
       
  7445 			if (IN_param_value == NULL)
       
  7446 			  IN_param_value = function_call_param_iterator.next();
       
  7447 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7448 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7449 			
       
  7450 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7451 			{
       
  7452 		
       
  7453 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7454 				return return_type_symbol;
       
  7455 				
       
  7456 			}
       
  7457 			
       
  7458 			ERROR;
       
  7459 		}
       
  7460 		
       
  7461 	}/*function_string_to_sint*/
       
  7462 	break;
       
  7463 
       
  7464 /****
       
  7465  *STRING_TO_LINT
       
  7466  */
       
  7467 	case function_string_to_lint :
       
  7468 	{
       
  7469 		symbol_c *last_type_symbol = NULL;
       
  7470 
       
  7471 		{
       
  7472 			identifier_c param_name("IN");
       
  7473 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7474 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7475 			
       
  7476 			/* Get the value from a foo(<param_value>) style call */
       
  7477 			if (IN_param_value == NULL)
       
  7478 			  IN_param_value = function_call_param_iterator.next();
       
  7479 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7480 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7481 			
       
  7482 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7483 			{
       
  7484 		
       
  7485 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7486 				return return_type_symbol;
       
  7487 				
       
  7488 			}
       
  7489 			
       
  7490 			ERROR;
       
  7491 		}
       
  7492 		
       
  7493 	}/*function_string_to_lint*/
       
  7494 	break;
       
  7495 
       
  7496 /****
       
  7497  *STRING_TO_DINT
       
  7498  */
       
  7499 	case function_string_to_dint :
       
  7500 	{
       
  7501 		symbol_c *last_type_symbol = NULL;
       
  7502 
       
  7503 		{
       
  7504 			identifier_c param_name("IN");
       
  7505 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7506 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7507 			
       
  7508 			/* Get the value from a foo(<param_value>) style call */
       
  7509 			if (IN_param_value == NULL)
       
  7510 			  IN_param_value = function_call_param_iterator.next();
       
  7511 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7512 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7513 			
       
  7514 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7515 			{
       
  7516 		
       
  7517 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7518 				return return_type_symbol;
       
  7519 				
       
  7520 			}
       
  7521 			
       
  7522 			ERROR;
       
  7523 		}
       
  7524 		
       
  7525 	}/*function_string_to_dint*/
       
  7526 	break;
       
  7527 
       
  7528 /****
       
  7529  *STRING_TO_DATE
       
  7530  */
       
  7531 	case function_string_to_date :
       
  7532 	{
       
  7533 		symbol_c *last_type_symbol = NULL;
       
  7534 
       
  7535 		{
       
  7536 			identifier_c param_name("IN");
       
  7537 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7538 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7539 			
       
  7540 			/* Get the value from a foo(<param_value>) style call */
       
  7541 			if (IN_param_value == NULL)
       
  7542 			  IN_param_value = function_call_param_iterator.next();
       
  7543 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7544 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7545 			
       
  7546 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7547 			{
       
  7548 		
       
  7549 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7550 				return return_type_symbol;
       
  7551 				
       
  7552 			}
       
  7553 			
       
  7554 			ERROR;
       
  7555 		}
       
  7556 		
       
  7557 	}/*function_string_to_date*/
       
  7558 	break;
       
  7559 
       
  7560 /****
       
  7561  *STRING_TO_DWORD
       
  7562  */
       
  7563 	case function_string_to_dword :
       
  7564 	{
       
  7565 		symbol_c *last_type_symbol = NULL;
       
  7566 
       
  7567 		{
       
  7568 			identifier_c param_name("IN");
       
  7569 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7570 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7571 			
       
  7572 			/* Get the value from a foo(<param_value>) style call */
       
  7573 			if (IN_param_value == NULL)
       
  7574 			  IN_param_value = function_call_param_iterator.next();
       
  7575 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7576 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7577 			
       
  7578 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7579 			{
       
  7580 		
       
  7581 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7582 				return return_type_symbol;
       
  7583 				
       
  7584 			}
       
  7585 			
       
  7586 			ERROR;
       
  7587 		}
       
  7588 		
       
  7589 	}/*function_string_to_dword*/
       
  7590 	break;
       
  7591 
       
  7592 /****
       
  7593  *STRING_TO_DT
       
  7594  */
       
  7595 	case function_string_to_dt :
       
  7596 	{
       
  7597 		symbol_c *last_type_symbol = NULL;
       
  7598 
       
  7599 		{
       
  7600 			identifier_c param_name("IN");
       
  7601 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7602 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7603 			
       
  7604 			/* Get the value from a foo(<param_value>) style call */
       
  7605 			if (IN_param_value == NULL)
       
  7606 			  IN_param_value = function_call_param_iterator.next();
       
  7607 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7608 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7609 			
       
  7610 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7611 			{
       
  7612 		
       
  7613 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7614 				return return_type_symbol;
       
  7615 				
       
  7616 			}
       
  7617 			
       
  7618 			ERROR;
       
  7619 		}
       
  7620 		
       
  7621 	}/*function_string_to_dt*/
       
  7622 	break;
       
  7623 
       
  7624 /****
       
  7625  *STRING_TO_TOD
       
  7626  */
       
  7627 	case function_string_to_tod :
       
  7628 	{
       
  7629 		symbol_c *last_type_symbol = NULL;
       
  7630 
       
  7631 		{
       
  7632 			identifier_c param_name("IN");
       
  7633 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7634 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7635 			
       
  7636 			/* Get the value from a foo(<param_value>) style call */
       
  7637 			if (IN_param_value == NULL)
       
  7638 			  IN_param_value = function_call_param_iterator.next();
       
  7639 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7640 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7641 			
       
  7642 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7643 			{
       
  7644 		
       
  7645 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7646 				return return_type_symbol;
       
  7647 				
       
  7648 			}
       
  7649 			
       
  7650 			ERROR;
       
  7651 		}
       
  7652 		
       
  7653 	}/*function_string_to_tod*/
       
  7654 	break;
       
  7655 
       
  7656 /****
       
  7657  *STRING_TO_UDINT
       
  7658  */
       
  7659 	case function_string_to_udint :
       
  7660 	{
       
  7661 		symbol_c *last_type_symbol = NULL;
       
  7662 
       
  7663 		{
       
  7664 			identifier_c param_name("IN");
       
  7665 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7666 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7667 			
       
  7668 			/* Get the value from a foo(<param_value>) style call */
       
  7669 			if (IN_param_value == NULL)
       
  7670 			  IN_param_value = function_call_param_iterator.next();
       
  7671 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7672 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7673 			
       
  7674 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7675 			{
       
  7676 		
       
  7677 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7678 				return return_type_symbol;
       
  7679 				
       
  7680 			}
       
  7681 			
       
  7682 			ERROR;
       
  7683 		}
       
  7684 		
       
  7685 	}/*function_string_to_udint*/
       
  7686 	break;
       
  7687 
       
  7688 /****
       
  7689  *STRING_TO_WORD
       
  7690  */
       
  7691 	case function_string_to_word :
       
  7692 	{
       
  7693 		symbol_c *last_type_symbol = NULL;
       
  7694 
       
  7695 		{
       
  7696 			identifier_c param_name("IN");
       
  7697 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7698 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7699 			
       
  7700 			/* Get the value from a foo(<param_value>) style call */
       
  7701 			if (IN_param_value == NULL)
       
  7702 			  IN_param_value = function_call_param_iterator.next();
       
  7703 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7704 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7705 			
       
  7706 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7707 			{
       
  7708 		
       
  7709 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7710 				return return_type_symbol;
       
  7711 				
       
  7712 			}
       
  7713 			
       
  7714 			ERROR;
       
  7715 		}
       
  7716 		
       
  7717 	}/*function_string_to_word*/
       
  7718 	break;
       
  7719 
       
  7720 /****
       
  7721  *STRING_TO_WSTRING
       
  7722  */
       
  7723 	case function_string_to_wstring :
       
  7724 	{
       
  7725 		symbol_c *last_type_symbol = NULL;
       
  7726 
       
  7727 		{
       
  7728 			identifier_c param_name("IN");
       
  7729 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7730 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7731 			
       
  7732 			/* Get the value from a foo(<param_value>) style call */
       
  7733 			if (IN_param_value == NULL)
       
  7734 			  IN_param_value = function_call_param_iterator.next();
       
  7735 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7736 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7737 			
       
  7738 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7739 			{
       
  7740 		
       
  7741 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7742 				return return_type_symbol;
       
  7743 				
       
  7744 			}
       
  7745 			
       
  7746 			ERROR;
       
  7747 		}
       
  7748 		
       
  7749 	}/*function_string_to_wstring*/
       
  7750 	break;
       
  7751 
       
  7752 /****
       
  7753  *STRING_TO_STRING
       
  7754  */
       
  7755 	case function_string_to_string :
       
  7756 	{
       
  7757 		symbol_c *last_type_symbol = NULL;
       
  7758 
       
  7759 		{
       
  7760 			identifier_c param_name("IN");
       
  7761 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7762 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7763 			
       
  7764 			/* Get the value from a foo(<param_value>) style call */
       
  7765 			if (IN_param_value == NULL)
       
  7766 			  IN_param_value = function_call_param_iterator.next();
       
  7767 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7768 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7769 			
       
  7770 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7771 			{
       
  7772 		
       
  7773 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7774 				return return_type_symbol;
       
  7775 				
       
  7776 			}
       
  7777 			
       
  7778 			ERROR;
       
  7779 		}
       
  7780 		
       
  7781 	}/*function_string_to_string*/
       
  7782 	break;
       
  7783 
       
  7784 /****
       
  7785  *STRING_TO_LWORD
       
  7786  */
       
  7787 	case function_string_to_lword :
       
  7788 	{
       
  7789 		symbol_c *last_type_symbol = NULL;
       
  7790 
       
  7791 		{
       
  7792 			identifier_c param_name("IN");
       
  7793 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7794 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7795 			
       
  7796 			/* Get the value from a foo(<param_value>) style call */
       
  7797 			if (IN_param_value == NULL)
       
  7798 			  IN_param_value = function_call_param_iterator.next();
       
  7799 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7800 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7801 			
       
  7802 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7803 			{
       
  7804 		
       
  7805 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7806 				return return_type_symbol;
       
  7807 				
       
  7808 			}
       
  7809 			
       
  7810 			ERROR;
       
  7811 		}
       
  7812 		
       
  7813 	}/*function_string_to_lword*/
       
  7814 	break;
       
  7815 
       
  7816 /****
       
  7817  *STRING_TO_UINT
       
  7818  */
       
  7819 	case function_string_to_uint :
       
  7820 	{
       
  7821 		symbol_c *last_type_symbol = NULL;
       
  7822 
       
  7823 		{
       
  7824 			identifier_c param_name("IN");
       
  7825 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7826 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7827 			
       
  7828 			/* Get the value from a foo(<param_value>) style call */
       
  7829 			if (IN_param_value == NULL)
       
  7830 			  IN_param_value = function_call_param_iterator.next();
       
  7831 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7832 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7833 			
       
  7834 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7835 			{
       
  7836 		
       
  7837 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7838 				return return_type_symbol;
       
  7839 				
       
  7840 			}
       
  7841 			
       
  7842 			ERROR;
       
  7843 		}
       
  7844 		
       
  7845 	}/*function_string_to_uint*/
       
  7846 	break;
       
  7847 
       
  7848 /****
       
  7849  *STRING_TO_LREAL
       
  7850  */
       
  7851 	case function_string_to_lreal :
       
  7852 	{
       
  7853 		symbol_c *last_type_symbol = NULL;
       
  7854 
       
  7855 		{
       
  7856 			identifier_c param_name("IN");
       
  7857 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7858 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7859 			
       
  7860 			/* Get the value from a foo(<param_value>) style call */
       
  7861 			if (IN_param_value == NULL)
       
  7862 			  IN_param_value = function_call_param_iterator.next();
       
  7863 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7864 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7865 			
       
  7866 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7867 			{
       
  7868 		
       
  7869 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7870 				return return_type_symbol;
       
  7871 				
       
  7872 			}
       
  7873 			
       
  7874 			ERROR;
       
  7875 		}
       
  7876 		
       
  7877 	}/*function_string_to_lreal*/
       
  7878 	break;
       
  7879 
       
  7880 /****
       
  7881  *STRING_TO_BYTE
       
  7882  */
       
  7883 	case function_string_to_byte :
       
  7884 	{
       
  7885 		symbol_c *last_type_symbol = NULL;
       
  7886 
       
  7887 		{
       
  7888 			identifier_c param_name("IN");
       
  7889 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7890 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7891 			
       
  7892 			/* Get the value from a foo(<param_value>) style call */
       
  7893 			if (IN_param_value == NULL)
       
  7894 			  IN_param_value = function_call_param_iterator.next();
       
  7895 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7896 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7897 			
       
  7898 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7899 			{
       
  7900 		
       
  7901 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7902 				return return_type_symbol;
       
  7903 				
       
  7904 			}
       
  7905 			
       
  7906 			ERROR;
       
  7907 		}
       
  7908 		
       
  7909 	}/*function_string_to_byte*/
       
  7910 	break;
       
  7911 
       
  7912 /****
       
  7913  *STRING_TO_USINT
       
  7914  */
       
  7915 	case function_string_to_usint :
       
  7916 	{
       
  7917 		symbol_c *last_type_symbol = NULL;
       
  7918 
       
  7919 		{
       
  7920 			identifier_c param_name("IN");
       
  7921 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7922 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7923 			
       
  7924 			/* Get the value from a foo(<param_value>) style call */
       
  7925 			if (IN_param_value == NULL)
       
  7926 			  IN_param_value = function_call_param_iterator.next();
       
  7927 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7928 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7929 			
       
  7930 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7931 			{
       
  7932 		
       
  7933 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7934 				return return_type_symbol;
       
  7935 				
       
  7936 			}
       
  7937 			
       
  7938 			ERROR;
       
  7939 		}
       
  7940 		
       
  7941 	}/*function_string_to_usint*/
       
  7942 	break;
       
  7943 
       
  7944 /****
       
  7945  *STRING_TO_ULINT
       
  7946  */
       
  7947 	case function_string_to_ulint :
       
  7948 	{
       
  7949 		symbol_c *last_type_symbol = NULL;
       
  7950 
       
  7951 		{
       
  7952 			identifier_c param_name("IN");
       
  7953 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7954 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7955 			
       
  7956 			/* Get the value from a foo(<param_value>) style call */
       
  7957 			if (IN_param_value == NULL)
       
  7958 			  IN_param_value = function_call_param_iterator.next();
       
  7959 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7960 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7961 			
       
  7962 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7963 			{
       
  7964 		
       
  7965 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7966 				return return_type_symbol;
       
  7967 				
       
  7968 			}
       
  7969 			
       
  7970 			ERROR;
       
  7971 		}
       
  7972 		
       
  7973 	}/*function_string_to_ulint*/
       
  7974 	break;
       
  7975 
       
  7976 /****
       
  7977  *STRING_TO_BOOL
       
  7978  */
       
  7979 	case function_string_to_bool :
       
  7980 	{
       
  7981 		symbol_c *last_type_symbol = NULL;
       
  7982 
       
  7983 		{
       
  7984 			identifier_c param_name("IN");
       
  7985 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7986 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7987 			
       
  7988 			/* Get the value from a foo(<param_value>) style call */
       
  7989 			if (IN_param_value == NULL)
       
  7990 			  IN_param_value = function_call_param_iterator.next();
       
  7991 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7992 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7993 			
       
  7994 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  7995 			{
       
  7996 		
       
  7997 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7998 				return return_type_symbol;
       
  7999 				
       
  8000 			}
       
  8001 			
       
  8002 			ERROR;
       
  8003 		}
       
  8004 		
       
  8005 	}/*function_string_to_bool*/
       
  8006 	break;
       
  8007 
       
  8008 /****
       
  8009  *STRING_TO_TIME
       
  8010  */
       
  8011 	case function_string_to_time :
       
  8012 	{
       
  8013 		symbol_c *last_type_symbol = NULL;
       
  8014 
       
  8015 		{
       
  8016 			identifier_c param_name("IN");
       
  8017 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8018 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8019 			
       
  8020 			/* Get the value from a foo(<param_value>) style call */
       
  8021 			if (IN_param_value == NULL)
       
  8022 			  IN_param_value = function_call_param_iterator.next();
       
  8023 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8024 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8025 			
       
  8026 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8027 			{
       
  8028 		
       
  8029 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8030 				return return_type_symbol;
       
  8031 				
       
  8032 			}
       
  8033 			
       
  8034 			ERROR;
       
  8035 		}
       
  8036 		
       
  8037 	}/*function_string_to_time*/
       
  8038 	break;
       
  8039 
       
  8040 /****
       
  8041  *STRING_TO_INT
       
  8042  */
       
  8043 	case function_string_to_int :
       
  8044 	{
       
  8045 		symbol_c *last_type_symbol = NULL;
       
  8046 
       
  8047 		{
       
  8048 			identifier_c param_name("IN");
       
  8049 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8050 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8051 			
       
  8052 			/* Get the value from a foo(<param_value>) style call */
       
  8053 			if (IN_param_value == NULL)
       
  8054 			  IN_param_value = function_call_param_iterator.next();
       
  8055 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8056 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8057 			
       
  8058 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8059 			{
       
  8060 		
       
  8061 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8062 				return return_type_symbol;
       
  8063 				
       
  8064 			}
       
  8065 			
       
  8066 			ERROR;
       
  8067 		}
       
  8068 		
       
  8069 	}/*function_string_to_int*/
       
  8070 	break;
       
  8071 
       
  8072 /****
       
  8073  *LWORD_TO_REAL
       
  8074  */
       
  8075 	case function_lword_to_real :
       
  8076 	{
       
  8077 		symbol_c *last_type_symbol = NULL;
       
  8078 
       
  8079 		{
       
  8080 			identifier_c param_name("IN");
       
  8081 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8082 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8083 			
       
  8084 			/* Get the value from a foo(<param_value>) style call */
       
  8085 			if (IN_param_value == NULL)
       
  8086 			  IN_param_value = function_call_param_iterator.next();
       
  8087 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8088 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8089 			
       
  8090 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8091 			{
       
  8092 		
       
  8093 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8094 				return return_type_symbol;
       
  8095 				
       
  8096 			}
       
  8097 			
       
  8098 			ERROR;
       
  8099 		}
       
  8100 		
       
  8101 	}/*function_lword_to_real*/
       
  8102 	break;
       
  8103 
       
  8104 /****
       
  8105  *LWORD_TO_SINT
       
  8106  */
       
  8107 	case function_lword_to_sint :
       
  8108 	{
       
  8109 		symbol_c *last_type_symbol = NULL;
       
  8110 
       
  8111 		{
       
  8112 			identifier_c param_name("IN");
       
  8113 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8114 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8115 			
       
  8116 			/* Get the value from a foo(<param_value>) style call */
       
  8117 			if (IN_param_value == NULL)
       
  8118 			  IN_param_value = function_call_param_iterator.next();
       
  8119 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8120 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8121 			
       
  8122 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8123 			{
       
  8124 		
       
  8125 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8126 				return return_type_symbol;
       
  8127 				
       
  8128 			}
       
  8129 			
       
  8130 			ERROR;
       
  8131 		}
       
  8132 		
       
  8133 	}/*function_lword_to_sint*/
       
  8134 	break;
       
  8135 
       
  8136 /****
       
  8137  *LWORD_TO_LINT
       
  8138  */
       
  8139 	case function_lword_to_lint :
       
  8140 	{
       
  8141 		symbol_c *last_type_symbol = NULL;
       
  8142 
       
  8143 		{
       
  8144 			identifier_c param_name("IN");
       
  8145 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8146 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8147 			
       
  8148 			/* Get the value from a foo(<param_value>) style call */
       
  8149 			if (IN_param_value == NULL)
       
  8150 			  IN_param_value = function_call_param_iterator.next();
       
  8151 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8152 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8153 			
       
  8154 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8155 			{
       
  8156 		
       
  8157 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8158 				return return_type_symbol;
       
  8159 				
       
  8160 			}
       
  8161 			
       
  8162 			ERROR;
       
  8163 		}
       
  8164 		
       
  8165 	}/*function_lword_to_lint*/
       
  8166 	break;
       
  8167 
       
  8168 /****
       
  8169  *LWORD_TO_DINT
       
  8170  */
       
  8171 	case function_lword_to_dint :
       
  8172 	{
       
  8173 		symbol_c *last_type_symbol = NULL;
       
  8174 
       
  8175 		{
       
  8176 			identifier_c param_name("IN");
       
  8177 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8178 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8179 			
       
  8180 			/* Get the value from a foo(<param_value>) style call */
       
  8181 			if (IN_param_value == NULL)
       
  8182 			  IN_param_value = function_call_param_iterator.next();
       
  8183 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8184 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8185 			
       
  8186 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8187 			{
       
  8188 		
       
  8189 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8190 				return return_type_symbol;
       
  8191 				
       
  8192 			}
       
  8193 			
       
  8194 			ERROR;
       
  8195 		}
       
  8196 		
       
  8197 	}/*function_lword_to_dint*/
       
  8198 	break;
       
  8199 
       
  8200 /****
       
  8201  *LWORD_TO_DATE
       
  8202  */
       
  8203 	case function_lword_to_date :
       
  8204 	{
       
  8205 		symbol_c *last_type_symbol = NULL;
       
  8206 
       
  8207 		{
       
  8208 			identifier_c param_name("IN");
       
  8209 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8210 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8211 			
       
  8212 			/* Get the value from a foo(<param_value>) style call */
       
  8213 			if (IN_param_value == NULL)
       
  8214 			  IN_param_value = function_call_param_iterator.next();
       
  8215 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8216 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8217 			
       
  8218 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8219 			{
       
  8220 		
       
  8221 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8222 				return return_type_symbol;
       
  8223 				
       
  8224 			}
       
  8225 			
       
  8226 			ERROR;
       
  8227 		}
       
  8228 		
       
  8229 	}/*function_lword_to_date*/
       
  8230 	break;
       
  8231 
       
  8232 /****
       
  8233  *LWORD_TO_DWORD
       
  8234  */
       
  8235 	case function_lword_to_dword :
       
  8236 	{
       
  8237 		symbol_c *last_type_symbol = NULL;
       
  8238 
       
  8239 		{
       
  8240 			identifier_c param_name("IN");
       
  8241 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8242 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8243 			
       
  8244 			/* Get the value from a foo(<param_value>) style call */
       
  8245 			if (IN_param_value == NULL)
       
  8246 			  IN_param_value = function_call_param_iterator.next();
       
  8247 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8248 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8249 			
       
  8250 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8251 			{
       
  8252 		
       
  8253 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8254 				return return_type_symbol;
       
  8255 				
       
  8256 			}
       
  8257 			
       
  8258 			ERROR;
       
  8259 		}
       
  8260 		
       
  8261 	}/*function_lword_to_dword*/
       
  8262 	break;
       
  8263 
       
  8264 /****
       
  8265  *LWORD_TO_DT
       
  8266  */
       
  8267 	case function_lword_to_dt :
       
  8268 	{
       
  8269 		symbol_c *last_type_symbol = NULL;
       
  8270 
       
  8271 		{
       
  8272 			identifier_c param_name("IN");
       
  8273 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8274 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8275 			
       
  8276 			/* Get the value from a foo(<param_value>) style call */
       
  8277 			if (IN_param_value == NULL)
       
  8278 			  IN_param_value = function_call_param_iterator.next();
       
  8279 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8280 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8281 			
       
  8282 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8283 			{
       
  8284 		
       
  8285 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8286 				return return_type_symbol;
       
  8287 				
       
  8288 			}
       
  8289 			
       
  8290 			ERROR;
       
  8291 		}
       
  8292 		
       
  8293 	}/*function_lword_to_dt*/
       
  8294 	break;
       
  8295 
       
  8296 /****
       
  8297  *LWORD_TO_TOD
       
  8298  */
       
  8299 	case function_lword_to_tod :
       
  8300 	{
       
  8301 		symbol_c *last_type_symbol = NULL;
       
  8302 
       
  8303 		{
       
  8304 			identifier_c param_name("IN");
       
  8305 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8306 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8307 			
       
  8308 			/* Get the value from a foo(<param_value>) style call */
       
  8309 			if (IN_param_value == NULL)
       
  8310 			  IN_param_value = function_call_param_iterator.next();
       
  8311 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8312 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8313 			
       
  8314 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8315 			{
       
  8316 		
       
  8317 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8318 				return return_type_symbol;
       
  8319 				
       
  8320 			}
       
  8321 			
       
  8322 			ERROR;
       
  8323 		}
       
  8324 		
       
  8325 	}/*function_lword_to_tod*/
       
  8326 	break;
       
  8327 
       
  8328 /****
       
  8329  *LWORD_TO_UDINT
       
  8330  */
       
  8331 	case function_lword_to_udint :
       
  8332 	{
       
  8333 		symbol_c *last_type_symbol = NULL;
       
  8334 
       
  8335 		{
       
  8336 			identifier_c param_name("IN");
       
  8337 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8338 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8339 			
       
  8340 			/* Get the value from a foo(<param_value>) style call */
       
  8341 			if (IN_param_value == NULL)
       
  8342 			  IN_param_value = function_call_param_iterator.next();
       
  8343 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8344 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8345 			
       
  8346 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8347 			{
       
  8348 		
       
  8349 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8350 				return return_type_symbol;
       
  8351 				
       
  8352 			}
       
  8353 			
       
  8354 			ERROR;
       
  8355 		}
       
  8356 		
       
  8357 	}/*function_lword_to_udint*/
       
  8358 	break;
       
  8359 
       
  8360 /****
       
  8361  *LWORD_TO_WORD
       
  8362  */
       
  8363 	case function_lword_to_word :
       
  8364 	{
       
  8365 		symbol_c *last_type_symbol = NULL;
       
  8366 
       
  8367 		{
       
  8368 			identifier_c param_name("IN");
       
  8369 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8370 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8371 			
       
  8372 			/* Get the value from a foo(<param_value>) style call */
       
  8373 			if (IN_param_value == NULL)
       
  8374 			  IN_param_value = function_call_param_iterator.next();
       
  8375 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8376 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8377 			
       
  8378 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8379 			{
       
  8380 		
       
  8381 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8382 				return return_type_symbol;
       
  8383 				
       
  8384 			}
       
  8385 			
       
  8386 			ERROR;
       
  8387 		}
       
  8388 		
       
  8389 	}/*function_lword_to_word*/
       
  8390 	break;
       
  8391 
       
  8392 /****
       
  8393  *LWORD_TO_WSTRING
       
  8394  */
       
  8395 	case function_lword_to_wstring :
       
  8396 	{
       
  8397 		symbol_c *last_type_symbol = NULL;
       
  8398 
       
  8399 		{
       
  8400 			identifier_c param_name("IN");
       
  8401 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8402 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8403 			
       
  8404 			/* Get the value from a foo(<param_value>) style call */
       
  8405 			if (IN_param_value == NULL)
       
  8406 			  IN_param_value = function_call_param_iterator.next();
       
  8407 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8408 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8409 			
       
  8410 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8411 			{
       
  8412 		
       
  8413 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8414 				return return_type_symbol;
       
  8415 				
       
  8416 			}
       
  8417 			
       
  8418 			ERROR;
       
  8419 		}
       
  8420 		
       
  8421 	}/*function_lword_to_wstring*/
       
  8422 	break;
       
  8423 
       
  8424 /****
       
  8425  *LWORD_TO_STRING
       
  8426  */
       
  8427 	case function_lword_to_string :
       
  8428 	{
       
  8429 		symbol_c *last_type_symbol = NULL;
       
  8430 
       
  8431 		{
       
  8432 			identifier_c param_name("IN");
       
  8433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8435 			
       
  8436 			/* Get the value from a foo(<param_value>) style call */
       
  8437 			if (IN_param_value == NULL)
       
  8438 			  IN_param_value = function_call_param_iterator.next();
       
  8439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8441 			
       
  8442 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8443 			{
       
  8444 		
       
  8445 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8446 				return return_type_symbol;
       
  8447 				
       
  8448 			}
       
  8449 			
       
  8450 			ERROR;
       
  8451 		}
       
  8452 		
       
  8453 	}/*function_lword_to_string*/
       
  8454 	break;
       
  8455 
       
  8456 /****
       
  8457  *LWORD_TO_LWORD
       
  8458  */
       
  8459 	case function_lword_to_lword :
       
  8460 	{
       
  8461 		symbol_c *last_type_symbol = NULL;
       
  8462 
       
  8463 		{
       
  8464 			identifier_c param_name("IN");
       
  8465 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8466 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8467 			
       
  8468 			/* Get the value from a foo(<param_value>) style call */
       
  8469 			if (IN_param_value == NULL)
       
  8470 			  IN_param_value = function_call_param_iterator.next();
       
  8471 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8472 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8473 			
       
  8474 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8475 			{
       
  8476 		
       
  8477 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8478 				return return_type_symbol;
       
  8479 				
       
  8480 			}
       
  8481 			
       
  8482 			ERROR;
       
  8483 		}
       
  8484 		
       
  8485 	}/*function_lword_to_lword*/
       
  8486 	break;
       
  8487 
       
  8488 /****
       
  8489  *LWORD_TO_UINT
       
  8490  */
       
  8491 	case function_lword_to_uint :
       
  8492 	{
       
  8493 		symbol_c *last_type_symbol = NULL;
       
  8494 
       
  8495 		{
       
  8496 			identifier_c param_name("IN");
       
  8497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8499 			
       
  8500 			/* Get the value from a foo(<param_value>) style call */
       
  8501 			if (IN_param_value == NULL)
       
  8502 			  IN_param_value = function_call_param_iterator.next();
       
  8503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8505 			
       
  8506 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8507 			{
       
  8508 		
       
  8509 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8510 				return return_type_symbol;
       
  8511 				
       
  8512 			}
       
  8513 			
       
  8514 			ERROR;
       
  8515 		}
       
  8516 		
       
  8517 	}/*function_lword_to_uint*/
       
  8518 	break;
       
  8519 
       
  8520 /****
       
  8521  *LWORD_TO_LREAL
       
  8522  */
       
  8523 	case function_lword_to_lreal :
       
  8524 	{
       
  8525 		symbol_c *last_type_symbol = NULL;
       
  8526 
       
  8527 		{
       
  8528 			identifier_c param_name("IN");
       
  8529 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8530 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8531 			
       
  8532 			/* Get the value from a foo(<param_value>) style call */
       
  8533 			if (IN_param_value == NULL)
       
  8534 			  IN_param_value = function_call_param_iterator.next();
       
  8535 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8536 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8537 			
       
  8538 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8539 			{
       
  8540 		
       
  8541 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8542 				return return_type_symbol;
       
  8543 				
       
  8544 			}
       
  8545 			
       
  8546 			ERROR;
       
  8547 		}
       
  8548 		
       
  8549 	}/*function_lword_to_lreal*/
       
  8550 	break;
       
  8551 
       
  8552 /****
       
  8553  *LWORD_TO_BYTE
       
  8554  */
       
  8555 	case function_lword_to_byte :
       
  8556 	{
       
  8557 		symbol_c *last_type_symbol = NULL;
       
  8558 
       
  8559 		{
       
  8560 			identifier_c param_name("IN");
       
  8561 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8562 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8563 			
       
  8564 			/* Get the value from a foo(<param_value>) style call */
       
  8565 			if (IN_param_value == NULL)
       
  8566 			  IN_param_value = function_call_param_iterator.next();
       
  8567 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8568 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8569 			
       
  8570 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8571 			{
       
  8572 		
       
  8573 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8574 				return return_type_symbol;
       
  8575 				
       
  8576 			}
       
  8577 			
       
  8578 			ERROR;
       
  8579 		}
       
  8580 		
       
  8581 	}/*function_lword_to_byte*/
       
  8582 	break;
       
  8583 
       
  8584 /****
       
  8585  *LWORD_TO_USINT
       
  8586  */
       
  8587 	case function_lword_to_usint :
       
  8588 	{
       
  8589 		symbol_c *last_type_symbol = NULL;
       
  8590 
       
  8591 		{
       
  8592 			identifier_c param_name("IN");
       
  8593 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8594 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8595 			
       
  8596 			/* Get the value from a foo(<param_value>) style call */
       
  8597 			if (IN_param_value == NULL)
       
  8598 			  IN_param_value = function_call_param_iterator.next();
       
  8599 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8600 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8601 			
       
  8602 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8603 			{
       
  8604 		
       
  8605 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8606 				return return_type_symbol;
       
  8607 				
       
  8608 			}
       
  8609 			
       
  8610 			ERROR;
       
  8611 		}
       
  8612 		
       
  8613 	}/*function_lword_to_usint*/
       
  8614 	break;
       
  8615 
       
  8616 /****
       
  8617  *LWORD_TO_ULINT
       
  8618  */
       
  8619 	case function_lword_to_ulint :
       
  8620 	{
       
  8621 		symbol_c *last_type_symbol = NULL;
       
  8622 
       
  8623 		{
       
  8624 			identifier_c param_name("IN");
       
  8625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8626 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8627 			
       
  8628 			/* Get the value from a foo(<param_value>) style call */
       
  8629 			if (IN_param_value == NULL)
       
  8630 			  IN_param_value = function_call_param_iterator.next();
       
  8631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8632 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8633 			
       
  8634 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8635 			{
       
  8636 		
       
  8637 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8638 				return return_type_symbol;
       
  8639 				
       
  8640 			}
       
  8641 			
       
  8642 			ERROR;
       
  8643 		}
       
  8644 		
       
  8645 	}/*function_lword_to_ulint*/
       
  8646 	break;
       
  8647 
       
  8648 /****
       
  8649  *LWORD_TO_BOOL
       
  8650  */
       
  8651 	case function_lword_to_bool :
       
  8652 	{
       
  8653 		symbol_c *last_type_symbol = NULL;
       
  8654 
       
  8655 		{
       
  8656 			identifier_c param_name("IN");
       
  8657 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8658 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8659 			
       
  8660 			/* Get the value from a foo(<param_value>) style call */
       
  8661 			if (IN_param_value == NULL)
       
  8662 			  IN_param_value = function_call_param_iterator.next();
       
  8663 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8664 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8665 			
       
  8666 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8667 			{
       
  8668 		
       
  8669 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8670 				return return_type_symbol;
       
  8671 				
       
  8672 			}
       
  8673 			
       
  8674 			ERROR;
       
  8675 		}
       
  8676 		
       
  8677 	}/*function_lword_to_bool*/
       
  8678 	break;
       
  8679 
       
  8680 /****
       
  8681  *LWORD_TO_TIME
       
  8682  */
       
  8683 	case function_lword_to_time :
       
  8684 	{
       
  8685 		symbol_c *last_type_symbol = NULL;
       
  8686 
       
  8687 		{
       
  8688 			identifier_c param_name("IN");
       
  8689 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8690 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8691 			
       
  8692 			/* Get the value from a foo(<param_value>) style call */
       
  8693 			if (IN_param_value == NULL)
       
  8694 			  IN_param_value = function_call_param_iterator.next();
       
  8695 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8696 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8697 			
       
  8698 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8699 			{
       
  8700 		
       
  8701 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8702 				return return_type_symbol;
       
  8703 				
       
  8704 			}
       
  8705 			
       
  8706 			ERROR;
       
  8707 		}
       
  8708 		
       
  8709 	}/*function_lword_to_time*/
       
  8710 	break;
       
  8711 
       
  8712 /****
       
  8713  *LWORD_TO_INT
       
  8714  */
       
  8715 	case function_lword_to_int :
       
  8716 	{
       
  8717 		symbol_c *last_type_symbol = NULL;
       
  8718 
       
  8719 		{
       
  8720 			identifier_c param_name("IN");
       
  8721 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8722 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8723 			
       
  8724 			/* Get the value from a foo(<param_value>) style call */
       
  8725 			if (IN_param_value == NULL)
       
  8726 			  IN_param_value = function_call_param_iterator.next();
       
  8727 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8728 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8729 			
       
  8730 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  8731 			{
       
  8732 		
       
  8733 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8734 				return return_type_symbol;
       
  8735 				
       
  8736 			}
       
  8737 			
       
  8738 			ERROR;
       
  8739 		}
       
  8740 		
       
  8741 	}/*function_lword_to_int*/
       
  8742 	break;
       
  8743 
       
  8744 /****
       
  8745  *UINT_TO_REAL
       
  8746  */
       
  8747 	case function_uint_to_real :
       
  8748 	{
       
  8749 		symbol_c *last_type_symbol = NULL;
       
  8750 
       
  8751 		{
       
  8752 			identifier_c param_name("IN");
       
  8753 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8754 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8755 			
       
  8756 			/* Get the value from a foo(<param_value>) style call */
       
  8757 			if (IN_param_value == NULL)
       
  8758 			  IN_param_value = function_call_param_iterator.next();
       
  8759 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8760 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8761 			
       
  8762 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8763 			{
       
  8764 		
       
  8765 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8766 				return return_type_symbol;
       
  8767 				
       
  8768 			}
       
  8769 			
       
  8770 			ERROR;
       
  8771 		}
       
  8772 		
       
  8773 	}/*function_uint_to_real*/
       
  8774 	break;
       
  8775 
       
  8776 /****
       
  8777  *UINT_TO_SINT
       
  8778  */
       
  8779 	case function_uint_to_sint :
       
  8780 	{
       
  8781 		symbol_c *last_type_symbol = NULL;
       
  8782 
       
  8783 		{
       
  8784 			identifier_c param_name("IN");
       
  8785 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8786 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8787 			
       
  8788 			/* Get the value from a foo(<param_value>) style call */
       
  8789 			if (IN_param_value == NULL)
       
  8790 			  IN_param_value = function_call_param_iterator.next();
       
  8791 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8792 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8793 			
       
  8794 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8795 			{
       
  8796 		
       
  8797 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8798 				return return_type_symbol;
       
  8799 				
       
  8800 			}
       
  8801 			
       
  8802 			ERROR;
       
  8803 		}
       
  8804 		
       
  8805 	}/*function_uint_to_sint*/
       
  8806 	break;
       
  8807 
       
  8808 /****
       
  8809  *UINT_TO_LINT
       
  8810  */
       
  8811 	case function_uint_to_lint :
       
  8812 	{
       
  8813 		symbol_c *last_type_symbol = NULL;
       
  8814 
       
  8815 		{
       
  8816 			identifier_c param_name("IN");
       
  8817 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8818 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8819 			
       
  8820 			/* Get the value from a foo(<param_value>) style call */
       
  8821 			if (IN_param_value == NULL)
       
  8822 			  IN_param_value = function_call_param_iterator.next();
       
  8823 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8824 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8825 			
       
  8826 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8827 			{
       
  8828 		
       
  8829 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8830 				return return_type_symbol;
       
  8831 				
       
  8832 			}
       
  8833 			
       
  8834 			ERROR;
       
  8835 		}
       
  8836 		
       
  8837 	}/*function_uint_to_lint*/
       
  8838 	break;
       
  8839 
       
  8840 /****
       
  8841  *UINT_TO_DINT
       
  8842  */
       
  8843 	case function_uint_to_dint :
       
  8844 	{
       
  8845 		symbol_c *last_type_symbol = NULL;
       
  8846 
       
  8847 		{
       
  8848 			identifier_c param_name("IN");
       
  8849 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8850 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8851 			
       
  8852 			/* Get the value from a foo(<param_value>) style call */
       
  8853 			if (IN_param_value == NULL)
       
  8854 			  IN_param_value = function_call_param_iterator.next();
       
  8855 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8856 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8857 			
       
  8858 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8859 			{
       
  8860 		
       
  8861 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8862 				return return_type_symbol;
       
  8863 				
       
  8864 			}
       
  8865 			
       
  8866 			ERROR;
       
  8867 		}
       
  8868 		
       
  8869 	}/*function_uint_to_dint*/
       
  8870 	break;
       
  8871 
       
  8872 /****
       
  8873  *UINT_TO_DATE
       
  8874  */
       
  8875 	case function_uint_to_date :
       
  8876 	{
       
  8877 		symbol_c *last_type_symbol = NULL;
       
  8878 
       
  8879 		{
       
  8880 			identifier_c param_name("IN");
       
  8881 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8882 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8883 			
       
  8884 			/* Get the value from a foo(<param_value>) style call */
       
  8885 			if (IN_param_value == NULL)
       
  8886 			  IN_param_value = function_call_param_iterator.next();
       
  8887 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8888 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8889 			
       
  8890 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8891 			{
       
  8892 		
       
  8893 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8894 				return return_type_symbol;
       
  8895 				
       
  8896 			}
       
  8897 			
       
  8898 			ERROR;
       
  8899 		}
       
  8900 		
       
  8901 	}/*function_uint_to_date*/
       
  8902 	break;
       
  8903 
       
  8904 /****
       
  8905  *UINT_TO_DWORD
       
  8906  */
       
  8907 	case function_uint_to_dword :
       
  8908 	{
       
  8909 		symbol_c *last_type_symbol = NULL;
       
  8910 
       
  8911 		{
       
  8912 			identifier_c param_name("IN");
       
  8913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8914 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8915 			
       
  8916 			/* Get the value from a foo(<param_value>) style call */
       
  8917 			if (IN_param_value == NULL)
       
  8918 			  IN_param_value = function_call_param_iterator.next();
       
  8919 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8920 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8921 			
       
  8922 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8923 			{
       
  8924 		
       
  8925 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8926 				return return_type_symbol;
       
  8927 				
       
  8928 			}
       
  8929 			
       
  8930 			ERROR;
       
  8931 		}
       
  8932 		
       
  8933 	}/*function_uint_to_dword*/
       
  8934 	break;
       
  8935 
       
  8936 /****
       
  8937  *UINT_TO_DT
       
  8938  */
       
  8939 	case function_uint_to_dt :
       
  8940 	{
       
  8941 		symbol_c *last_type_symbol = NULL;
       
  8942 
       
  8943 		{
       
  8944 			identifier_c param_name("IN");
       
  8945 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8946 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8947 			
       
  8948 			/* Get the value from a foo(<param_value>) style call */
       
  8949 			if (IN_param_value == NULL)
       
  8950 			  IN_param_value = function_call_param_iterator.next();
       
  8951 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8952 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8953 			
       
  8954 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8955 			{
       
  8956 		
       
  8957 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8958 				return return_type_symbol;
       
  8959 				
       
  8960 			}
       
  8961 			
       
  8962 			ERROR;
       
  8963 		}
       
  8964 		
       
  8965 	}/*function_uint_to_dt*/
       
  8966 	break;
       
  8967 
       
  8968 /****
       
  8969  *UINT_TO_TOD
       
  8970  */
       
  8971 	case function_uint_to_tod :
       
  8972 	{
       
  8973 		symbol_c *last_type_symbol = NULL;
       
  8974 
       
  8975 		{
       
  8976 			identifier_c param_name("IN");
       
  8977 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8978 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8979 			
       
  8980 			/* Get the value from a foo(<param_value>) style call */
       
  8981 			if (IN_param_value == NULL)
       
  8982 			  IN_param_value = function_call_param_iterator.next();
       
  8983 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8984 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8985 			
       
  8986 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  8987 			{
       
  8988 		
       
  8989 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8990 				return return_type_symbol;
       
  8991 				
       
  8992 			}
       
  8993 			
       
  8994 			ERROR;
       
  8995 		}
       
  8996 		
       
  8997 	}/*function_uint_to_tod*/
       
  8998 	break;
       
  8999 
       
  9000 /****
       
  9001  *UINT_TO_UDINT
       
  9002  */
       
  9003 	case function_uint_to_udint :
       
  9004 	{
       
  9005 		symbol_c *last_type_symbol = NULL;
       
  9006 
       
  9007 		{
       
  9008 			identifier_c param_name("IN");
       
  9009 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9010 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9011 			
       
  9012 			/* Get the value from a foo(<param_value>) style call */
       
  9013 			if (IN_param_value == NULL)
       
  9014 			  IN_param_value = function_call_param_iterator.next();
       
  9015 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9016 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9017 			
       
  9018 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9019 			{
       
  9020 		
       
  9021 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9022 				return return_type_symbol;
       
  9023 				
       
  9024 			}
       
  9025 			
       
  9026 			ERROR;
       
  9027 		}
       
  9028 		
       
  9029 	}/*function_uint_to_udint*/
       
  9030 	break;
       
  9031 
       
  9032 /****
       
  9033  *UINT_TO_WORD
       
  9034  */
       
  9035 	case function_uint_to_word :
       
  9036 	{
       
  9037 		symbol_c *last_type_symbol = NULL;
       
  9038 
       
  9039 		{
       
  9040 			identifier_c param_name("IN");
       
  9041 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9042 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9043 			
       
  9044 			/* Get the value from a foo(<param_value>) style call */
       
  9045 			if (IN_param_value == NULL)
       
  9046 			  IN_param_value = function_call_param_iterator.next();
       
  9047 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9048 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9049 			
       
  9050 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9051 			{
       
  9052 		
       
  9053 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9054 				return return_type_symbol;
       
  9055 				
       
  9056 			}
       
  9057 			
       
  9058 			ERROR;
       
  9059 		}
       
  9060 		
       
  9061 	}/*function_uint_to_word*/
       
  9062 	break;
       
  9063 
       
  9064 /****
       
  9065  *UINT_TO_WSTRING
       
  9066  */
       
  9067 	case function_uint_to_wstring :
       
  9068 	{
       
  9069 		symbol_c *last_type_symbol = NULL;
       
  9070 
       
  9071 		{
       
  9072 			identifier_c param_name("IN");
       
  9073 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9074 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9075 			
       
  9076 			/* Get the value from a foo(<param_value>) style call */
       
  9077 			if (IN_param_value == NULL)
       
  9078 			  IN_param_value = function_call_param_iterator.next();
       
  9079 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9080 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9081 			
       
  9082 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9083 			{
       
  9084 		
       
  9085 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9086 				return return_type_symbol;
       
  9087 				
       
  9088 			}
       
  9089 			
       
  9090 			ERROR;
       
  9091 		}
       
  9092 		
       
  9093 	}/*function_uint_to_wstring*/
       
  9094 	break;
       
  9095 
       
  9096 /****
       
  9097  *UINT_TO_STRING
       
  9098  */
       
  9099 	case function_uint_to_string :
       
  9100 	{
       
  9101 		symbol_c *last_type_symbol = NULL;
       
  9102 
       
  9103 		{
       
  9104 			identifier_c param_name("IN");
       
  9105 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9106 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9107 			
       
  9108 			/* Get the value from a foo(<param_value>) style call */
       
  9109 			if (IN_param_value == NULL)
       
  9110 			  IN_param_value = function_call_param_iterator.next();
       
  9111 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9112 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9113 			
       
  9114 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9115 			{
       
  9116 		
       
  9117 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9118 				return return_type_symbol;
       
  9119 				
       
  9120 			}
       
  9121 			
       
  9122 			ERROR;
       
  9123 		}
       
  9124 		
       
  9125 	}/*function_uint_to_string*/
       
  9126 	break;
       
  9127 
       
  9128 /****
       
  9129  *UINT_TO_LWORD
       
  9130  */
       
  9131 	case function_uint_to_lword :
       
  9132 	{
       
  9133 		symbol_c *last_type_symbol = NULL;
       
  9134 
       
  9135 		{
       
  9136 			identifier_c param_name("IN");
       
  9137 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9138 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9139 			
       
  9140 			/* Get the value from a foo(<param_value>) style call */
       
  9141 			if (IN_param_value == NULL)
       
  9142 			  IN_param_value = function_call_param_iterator.next();
       
  9143 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9144 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9145 			
       
  9146 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9147 			{
       
  9148 		
       
  9149 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9150 				return return_type_symbol;
       
  9151 				
       
  9152 			}
       
  9153 			
       
  9154 			ERROR;
       
  9155 		}
       
  9156 		
       
  9157 	}/*function_uint_to_lword*/
       
  9158 	break;
       
  9159 
       
  9160 /****
       
  9161  *UINT_TO_UINT
       
  9162  */
       
  9163 	case function_uint_to_uint :
       
  9164 	{
       
  9165 		symbol_c *last_type_symbol = NULL;
       
  9166 
       
  9167 		{
       
  9168 			identifier_c param_name("IN");
       
  9169 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9170 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9171 			
       
  9172 			/* Get the value from a foo(<param_value>) style call */
       
  9173 			if (IN_param_value == NULL)
       
  9174 			  IN_param_value = function_call_param_iterator.next();
       
  9175 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9176 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9177 			
       
  9178 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9179 			{
       
  9180 		
       
  9181 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9182 				return return_type_symbol;
       
  9183 				
       
  9184 			}
       
  9185 			
       
  9186 			ERROR;
       
  9187 		}
       
  9188 		
       
  9189 	}/*function_uint_to_uint*/
       
  9190 	break;
       
  9191 
       
  9192 /****
       
  9193  *UINT_TO_LREAL
       
  9194  */
       
  9195 	case function_uint_to_lreal :
       
  9196 	{
       
  9197 		symbol_c *last_type_symbol = NULL;
       
  9198 
       
  9199 		{
       
  9200 			identifier_c param_name("IN");
       
  9201 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9202 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9203 			
       
  9204 			/* Get the value from a foo(<param_value>) style call */
       
  9205 			if (IN_param_value == NULL)
       
  9206 			  IN_param_value = function_call_param_iterator.next();
       
  9207 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9208 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9209 			
       
  9210 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9211 			{
       
  9212 		
       
  9213 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9214 				return return_type_symbol;
       
  9215 				
       
  9216 			}
       
  9217 			
       
  9218 			ERROR;
       
  9219 		}
       
  9220 		
       
  9221 	}/*function_uint_to_lreal*/
       
  9222 	break;
       
  9223 
       
  9224 /****
       
  9225  *UINT_TO_BYTE
       
  9226  */
       
  9227 	case function_uint_to_byte :
       
  9228 	{
       
  9229 		symbol_c *last_type_symbol = NULL;
       
  9230 
       
  9231 		{
       
  9232 			identifier_c param_name("IN");
       
  9233 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9234 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9235 			
       
  9236 			/* Get the value from a foo(<param_value>) style call */
       
  9237 			if (IN_param_value == NULL)
       
  9238 			  IN_param_value = function_call_param_iterator.next();
       
  9239 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9240 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9241 			
       
  9242 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9243 			{
       
  9244 		
       
  9245 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9246 				return return_type_symbol;
       
  9247 				
       
  9248 			}
       
  9249 			
       
  9250 			ERROR;
       
  9251 		}
       
  9252 		
       
  9253 	}/*function_uint_to_byte*/
       
  9254 	break;
       
  9255 
       
  9256 /****
       
  9257  *UINT_TO_USINT
       
  9258  */
       
  9259 	case function_uint_to_usint :
       
  9260 	{
       
  9261 		symbol_c *last_type_symbol = NULL;
       
  9262 
       
  9263 		{
       
  9264 			identifier_c param_name("IN");
       
  9265 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9266 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9267 			
       
  9268 			/* Get the value from a foo(<param_value>) style call */
       
  9269 			if (IN_param_value == NULL)
       
  9270 			  IN_param_value = function_call_param_iterator.next();
       
  9271 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9272 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9273 			
       
  9274 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9275 			{
       
  9276 		
       
  9277 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9278 				return return_type_symbol;
       
  9279 				
       
  9280 			}
       
  9281 			
       
  9282 			ERROR;
       
  9283 		}
       
  9284 		
       
  9285 	}/*function_uint_to_usint*/
       
  9286 	break;
       
  9287 
       
  9288 /****
       
  9289  *UINT_TO_ULINT
       
  9290  */
       
  9291 	case function_uint_to_ulint :
       
  9292 	{
       
  9293 		symbol_c *last_type_symbol = NULL;
       
  9294 
       
  9295 		{
       
  9296 			identifier_c param_name("IN");
       
  9297 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9298 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9299 			
       
  9300 			/* Get the value from a foo(<param_value>) style call */
       
  9301 			if (IN_param_value == NULL)
       
  9302 			  IN_param_value = function_call_param_iterator.next();
       
  9303 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9304 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9305 			
       
  9306 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9307 			{
       
  9308 		
       
  9309 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9310 				return return_type_symbol;
       
  9311 				
       
  9312 			}
       
  9313 			
       
  9314 			ERROR;
       
  9315 		}
       
  9316 		
       
  9317 	}/*function_uint_to_ulint*/
       
  9318 	break;
       
  9319 
       
  9320 /****
       
  9321  *UINT_TO_BOOL
       
  9322  */
       
  9323 	case function_uint_to_bool :
       
  9324 	{
       
  9325 		symbol_c *last_type_symbol = NULL;
       
  9326 
       
  9327 		{
       
  9328 			identifier_c param_name("IN");
       
  9329 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9330 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9331 			
       
  9332 			/* Get the value from a foo(<param_value>) style call */
       
  9333 			if (IN_param_value == NULL)
       
  9334 			  IN_param_value = function_call_param_iterator.next();
       
  9335 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9336 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9337 			
       
  9338 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9339 			{
       
  9340 		
       
  9341 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9342 				return return_type_symbol;
       
  9343 				
       
  9344 			}
       
  9345 			
       
  9346 			ERROR;
       
  9347 		}
       
  9348 		
       
  9349 	}/*function_uint_to_bool*/
       
  9350 	break;
       
  9351 
       
  9352 /****
       
  9353  *UINT_TO_TIME
       
  9354  */
       
  9355 	case function_uint_to_time :
       
  9356 	{
       
  9357 		symbol_c *last_type_symbol = NULL;
       
  9358 
       
  9359 		{
       
  9360 			identifier_c param_name("IN");
       
  9361 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9362 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9363 			
       
  9364 			/* Get the value from a foo(<param_value>) style call */
       
  9365 			if (IN_param_value == NULL)
       
  9366 			  IN_param_value = function_call_param_iterator.next();
       
  9367 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9368 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9369 			
       
  9370 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9371 			{
       
  9372 		
       
  9373 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9374 				return return_type_symbol;
       
  9375 				
       
  9376 			}
       
  9377 			
       
  9378 			ERROR;
       
  9379 		}
       
  9380 		
       
  9381 	}/*function_uint_to_time*/
       
  9382 	break;
       
  9383 
       
  9384 /****
       
  9385  *UINT_TO_INT
       
  9386  */
       
  9387 	case function_uint_to_int :
       
  9388 	{
       
  9389 		symbol_c *last_type_symbol = NULL;
       
  9390 
       
  9391 		{
       
  9392 			identifier_c param_name("IN");
       
  9393 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9394 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9395 			
       
  9396 			/* Get the value from a foo(<param_value>) style call */
       
  9397 			if (IN_param_value == NULL)
       
  9398 			  IN_param_value = function_call_param_iterator.next();
       
  9399 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9400 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9401 			
       
  9402 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9403 			{
       
  9404 		
       
  9405 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9406 				return return_type_symbol;
       
  9407 				
       
  9408 			}
       
  9409 			
       
  9410 			ERROR;
       
  9411 		}
       
  9412 		
       
  9413 	}/*function_uint_to_int*/
       
  9414 	break;
       
  9415 
       
  9416 /****
       
  9417  *LREAL_TO_REAL
       
  9418  */
       
  9419 	case function_lreal_to_real :
       
  9420 	{
       
  9421 		symbol_c *last_type_symbol = NULL;
       
  9422 
       
  9423 		{
       
  9424 			identifier_c param_name("IN");
       
  9425 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9426 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9427 			
       
  9428 			/* Get the value from a foo(<param_value>) style call */
       
  9429 			if (IN_param_value == NULL)
       
  9430 			  IN_param_value = function_call_param_iterator.next();
       
  9431 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9432 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9433 			
       
  9434 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9435 			{
       
  9436 		
       
  9437 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9438 				return return_type_symbol;
       
  9439 				
       
  9440 			}
       
  9441 			
       
  9442 			ERROR;
       
  9443 		}
       
  9444 		
       
  9445 	}/*function_lreal_to_real*/
       
  9446 	break;
       
  9447 
       
  9448 /****
       
  9449  *LREAL_TO_SINT
       
  9450  */
       
  9451 	case function_lreal_to_sint :
       
  9452 	{
       
  9453 		symbol_c *last_type_symbol = NULL;
       
  9454 
       
  9455 		{
       
  9456 			identifier_c param_name("IN");
       
  9457 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9458 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9459 			
       
  9460 			/* Get the value from a foo(<param_value>) style call */
       
  9461 			if (IN_param_value == NULL)
       
  9462 			  IN_param_value = function_call_param_iterator.next();
       
  9463 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9464 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9465 			
       
  9466 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9467 			{
       
  9468 		
       
  9469 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9470 				return return_type_symbol;
       
  9471 				
       
  9472 			}
       
  9473 			
       
  9474 			ERROR;
       
  9475 		}
       
  9476 		
       
  9477 	}/*function_lreal_to_sint*/
       
  9478 	break;
       
  9479 
       
  9480 /****
       
  9481  *LREAL_TO_LINT
       
  9482  */
       
  9483 	case function_lreal_to_lint :
       
  9484 	{
       
  9485 		symbol_c *last_type_symbol = NULL;
       
  9486 
       
  9487 		{
       
  9488 			identifier_c param_name("IN");
       
  9489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9490 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9491 			
       
  9492 			/* Get the value from a foo(<param_value>) style call */
       
  9493 			if (IN_param_value == NULL)
       
  9494 			  IN_param_value = function_call_param_iterator.next();
       
  9495 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9496 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9497 			
       
  9498 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9499 			{
       
  9500 		
       
  9501 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9502 				return return_type_symbol;
       
  9503 				
       
  9504 			}
       
  9505 			
       
  9506 			ERROR;
       
  9507 		}
       
  9508 		
       
  9509 	}/*function_lreal_to_lint*/
       
  9510 	break;
       
  9511 
       
  9512 /****
       
  9513  *LREAL_TO_DINT
       
  9514  */
       
  9515 	case function_lreal_to_dint :
       
  9516 	{
       
  9517 		symbol_c *last_type_symbol = NULL;
       
  9518 
       
  9519 		{
       
  9520 			identifier_c param_name("IN");
       
  9521 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9522 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9523 			
       
  9524 			/* Get the value from a foo(<param_value>) style call */
       
  9525 			if (IN_param_value == NULL)
       
  9526 			  IN_param_value = function_call_param_iterator.next();
       
  9527 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9528 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9529 			
       
  9530 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9531 			{
       
  9532 		
       
  9533 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9534 				return return_type_symbol;
       
  9535 				
       
  9536 			}
       
  9537 			
       
  9538 			ERROR;
       
  9539 		}
       
  9540 		
       
  9541 	}/*function_lreal_to_dint*/
       
  9542 	break;
       
  9543 
       
  9544 /****
       
  9545  *LREAL_TO_DATE
       
  9546  */
       
  9547 	case function_lreal_to_date :
       
  9548 	{
       
  9549 		symbol_c *last_type_symbol = NULL;
       
  9550 
       
  9551 		{
       
  9552 			identifier_c param_name("IN");
       
  9553 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9554 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9555 			
       
  9556 			/* Get the value from a foo(<param_value>) style call */
       
  9557 			if (IN_param_value == NULL)
       
  9558 			  IN_param_value = function_call_param_iterator.next();
       
  9559 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9560 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9561 			
       
  9562 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9563 			{
       
  9564 		
       
  9565 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9566 				return return_type_symbol;
       
  9567 				
       
  9568 			}
       
  9569 			
       
  9570 			ERROR;
       
  9571 		}
       
  9572 		
       
  9573 	}/*function_lreal_to_date*/
       
  9574 	break;
       
  9575 
       
  9576 /****
       
  9577  *LREAL_TO_DWORD
       
  9578  */
       
  9579 	case function_lreal_to_dword :
       
  9580 	{
       
  9581 		symbol_c *last_type_symbol = NULL;
       
  9582 
       
  9583 		{
       
  9584 			identifier_c param_name("IN");
       
  9585 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9586 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9587 			
       
  9588 			/* Get the value from a foo(<param_value>) style call */
       
  9589 			if (IN_param_value == NULL)
       
  9590 			  IN_param_value = function_call_param_iterator.next();
       
  9591 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9592 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9593 			
       
  9594 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9595 			{
       
  9596 		
       
  9597 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9598 				return return_type_symbol;
       
  9599 				
       
  9600 			}
       
  9601 			
       
  9602 			ERROR;
       
  9603 		}
       
  9604 		
       
  9605 	}/*function_lreal_to_dword*/
       
  9606 	break;
       
  9607 
       
  9608 /****
       
  9609  *LREAL_TO_DT
       
  9610  */
       
  9611 	case function_lreal_to_dt :
       
  9612 	{
       
  9613 		symbol_c *last_type_symbol = NULL;
       
  9614 
       
  9615 		{
       
  9616 			identifier_c param_name("IN");
       
  9617 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9618 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9619 			
       
  9620 			/* Get the value from a foo(<param_value>) style call */
       
  9621 			if (IN_param_value == NULL)
       
  9622 			  IN_param_value = function_call_param_iterator.next();
       
  9623 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9624 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9625 			
       
  9626 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9627 			{
       
  9628 		
       
  9629 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9630 				return return_type_symbol;
       
  9631 				
       
  9632 			}
       
  9633 			
       
  9634 			ERROR;
       
  9635 		}
       
  9636 		
       
  9637 	}/*function_lreal_to_dt*/
       
  9638 	break;
       
  9639 
       
  9640 /****
       
  9641  *LREAL_TO_TOD
       
  9642  */
       
  9643 	case function_lreal_to_tod :
       
  9644 	{
       
  9645 		symbol_c *last_type_symbol = NULL;
       
  9646 
       
  9647 		{
       
  9648 			identifier_c param_name("IN");
       
  9649 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9650 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9651 			
       
  9652 			/* Get the value from a foo(<param_value>) style call */
       
  9653 			if (IN_param_value == NULL)
       
  9654 			  IN_param_value = function_call_param_iterator.next();
       
  9655 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9656 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9657 			
       
  9658 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9659 			{
       
  9660 		
       
  9661 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9662 				return return_type_symbol;
       
  9663 				
       
  9664 			}
       
  9665 			
       
  9666 			ERROR;
       
  9667 		}
       
  9668 		
       
  9669 	}/*function_lreal_to_tod*/
       
  9670 	break;
       
  9671 
       
  9672 /****
       
  9673  *LREAL_TO_UDINT
       
  9674  */
       
  9675 	case function_lreal_to_udint :
       
  9676 	{
       
  9677 		symbol_c *last_type_symbol = NULL;
       
  9678 
       
  9679 		{
       
  9680 			identifier_c param_name("IN");
       
  9681 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9682 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9683 			
       
  9684 			/* Get the value from a foo(<param_value>) style call */
       
  9685 			if (IN_param_value == NULL)
       
  9686 			  IN_param_value = function_call_param_iterator.next();
       
  9687 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9688 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9689 			
       
  9690 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9691 			{
       
  9692 		
       
  9693 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9694 				return return_type_symbol;
       
  9695 				
       
  9696 			}
       
  9697 			
       
  9698 			ERROR;
       
  9699 		}
       
  9700 		
       
  9701 	}/*function_lreal_to_udint*/
       
  9702 	break;
       
  9703 
       
  9704 /****
       
  9705  *LREAL_TO_WORD
       
  9706  */
       
  9707 	case function_lreal_to_word :
       
  9708 	{
       
  9709 		symbol_c *last_type_symbol = NULL;
       
  9710 
       
  9711 		{
       
  9712 			identifier_c param_name("IN");
       
  9713 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9714 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9715 			
       
  9716 			/* Get the value from a foo(<param_value>) style call */
       
  9717 			if (IN_param_value == NULL)
       
  9718 			  IN_param_value = function_call_param_iterator.next();
       
  9719 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9720 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9721 			
       
  9722 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9723 			{
       
  9724 		
       
  9725 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9726 				return return_type_symbol;
       
  9727 				
       
  9728 			}
       
  9729 			
       
  9730 			ERROR;
       
  9731 		}
       
  9732 		
       
  9733 	}/*function_lreal_to_word*/
       
  9734 	break;
       
  9735 
       
  9736 /****
       
  9737  *LREAL_TO_WSTRING
       
  9738  */
       
  9739 	case function_lreal_to_wstring :
       
  9740 	{
       
  9741 		symbol_c *last_type_symbol = NULL;
       
  9742 
       
  9743 		{
       
  9744 			identifier_c param_name("IN");
       
  9745 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9746 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9747 			
       
  9748 			/* Get the value from a foo(<param_value>) style call */
       
  9749 			if (IN_param_value == NULL)
       
  9750 			  IN_param_value = function_call_param_iterator.next();
       
  9751 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9752 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9753 			
       
  9754 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9755 			{
       
  9756 		
       
  9757 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9758 				return return_type_symbol;
       
  9759 				
       
  9760 			}
       
  9761 			
       
  9762 			ERROR;
       
  9763 		}
       
  9764 		
       
  9765 	}/*function_lreal_to_wstring*/
       
  9766 	break;
       
  9767 
       
  9768 /****
       
  9769  *LREAL_TO_STRING
       
  9770  */
       
  9771 	case function_lreal_to_string :
       
  9772 	{
       
  9773 		symbol_c *last_type_symbol = NULL;
       
  9774 
       
  9775 		{
       
  9776 			identifier_c param_name("IN");
       
  9777 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9778 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9779 			
       
  9780 			/* Get the value from a foo(<param_value>) style call */
       
  9781 			if (IN_param_value == NULL)
       
  9782 			  IN_param_value = function_call_param_iterator.next();
       
  9783 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9784 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9785 			
       
  9786 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9787 			{
       
  9788 		
       
  9789 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9790 				return return_type_symbol;
       
  9791 				
       
  9792 			}
       
  9793 			
       
  9794 			ERROR;
       
  9795 		}
       
  9796 		
       
  9797 	}/*function_lreal_to_string*/
       
  9798 	break;
       
  9799 
       
  9800 /****
       
  9801  *LREAL_TO_LWORD
       
  9802  */
       
  9803 	case function_lreal_to_lword :
       
  9804 	{
       
  9805 		symbol_c *last_type_symbol = NULL;
       
  9806 
       
  9807 		{
       
  9808 			identifier_c param_name("IN");
       
  9809 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9810 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9811 			
       
  9812 			/* Get the value from a foo(<param_value>) style call */
       
  9813 			if (IN_param_value == NULL)
       
  9814 			  IN_param_value = function_call_param_iterator.next();
       
  9815 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9816 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9817 			
       
  9818 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9819 			{
       
  9820 		
       
  9821 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9822 				return return_type_symbol;
       
  9823 				
       
  9824 			}
       
  9825 			
       
  9826 			ERROR;
       
  9827 		}
       
  9828 		
       
  9829 	}/*function_lreal_to_lword*/
       
  9830 	break;
       
  9831 
       
  9832 /****
       
  9833  *LREAL_TO_UINT
       
  9834  */
       
  9835 	case function_lreal_to_uint :
       
  9836 	{
       
  9837 		symbol_c *last_type_symbol = NULL;
       
  9838 
       
  9839 		{
       
  9840 			identifier_c param_name("IN");
       
  9841 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9842 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9843 			
       
  9844 			/* Get the value from a foo(<param_value>) style call */
       
  9845 			if (IN_param_value == NULL)
       
  9846 			  IN_param_value = function_call_param_iterator.next();
       
  9847 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9848 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9849 			
       
  9850 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9851 			{
       
  9852 		
       
  9853 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9854 				return return_type_symbol;
       
  9855 				
       
  9856 			}
       
  9857 			
       
  9858 			ERROR;
       
  9859 		}
       
  9860 		
       
  9861 	}/*function_lreal_to_uint*/
       
  9862 	break;
       
  9863 
       
  9864 /****
       
  9865  *LREAL_TO_LREAL
       
  9866  */
       
  9867 	case function_lreal_to_lreal :
       
  9868 	{
       
  9869 		symbol_c *last_type_symbol = NULL;
       
  9870 
       
  9871 		{
       
  9872 			identifier_c param_name("IN");
       
  9873 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9874 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9875 			
       
  9876 			/* Get the value from a foo(<param_value>) style call */
       
  9877 			if (IN_param_value == NULL)
       
  9878 			  IN_param_value = function_call_param_iterator.next();
       
  9879 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9880 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9881 			
       
  9882 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9883 			{
       
  9884 		
       
  9885 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9886 				return return_type_symbol;
       
  9887 				
       
  9888 			}
       
  9889 			
       
  9890 			ERROR;
       
  9891 		}
       
  9892 		
       
  9893 	}/*function_lreal_to_lreal*/
       
  9894 	break;
       
  9895 
       
  9896 /****
       
  9897  *LREAL_TO_BYTE
       
  9898  */
       
  9899 	case function_lreal_to_byte :
       
  9900 	{
       
  9901 		symbol_c *last_type_symbol = NULL;
       
  9902 
       
  9903 		{
       
  9904 			identifier_c param_name("IN");
       
  9905 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9906 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9907 			
       
  9908 			/* Get the value from a foo(<param_value>) style call */
       
  9909 			if (IN_param_value == NULL)
       
  9910 			  IN_param_value = function_call_param_iterator.next();
       
  9911 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9912 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9913 			
       
  9914 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9915 			{
       
  9916 		
       
  9917 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9918 				return return_type_symbol;
       
  9919 				
       
  9920 			}
       
  9921 			
       
  9922 			ERROR;
       
  9923 		}
       
  9924 		
       
  9925 	}/*function_lreal_to_byte*/
       
  9926 	break;
       
  9927 
       
  9928 /****
       
  9929  *LREAL_TO_USINT
       
  9930  */
       
  9931 	case function_lreal_to_usint :
       
  9932 	{
       
  9933 		symbol_c *last_type_symbol = NULL;
       
  9934 
       
  9935 		{
       
  9936 			identifier_c param_name("IN");
       
  9937 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9938 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9939 			
       
  9940 			/* Get the value from a foo(<param_value>) style call */
       
  9941 			if (IN_param_value == NULL)
       
  9942 			  IN_param_value = function_call_param_iterator.next();
       
  9943 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9944 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9945 			
       
  9946 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9947 			{
       
  9948 		
       
  9949 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9950 				return return_type_symbol;
       
  9951 				
       
  9952 			}
       
  9953 			
       
  9954 			ERROR;
       
  9955 		}
       
  9956 		
       
  9957 	}/*function_lreal_to_usint*/
       
  9958 	break;
       
  9959 
       
  9960 /****
       
  9961  *LREAL_TO_ULINT
       
  9962  */
       
  9963 	case function_lreal_to_ulint :
       
  9964 	{
       
  9965 		symbol_c *last_type_symbol = NULL;
       
  9966 
       
  9967 		{
       
  9968 			identifier_c param_name("IN");
       
  9969 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9970 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9971 			
       
  9972 			/* Get the value from a foo(<param_value>) style call */
       
  9973 			if (IN_param_value == NULL)
       
  9974 			  IN_param_value = function_call_param_iterator.next();
       
  9975 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9976 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9977 			
       
  9978 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  9979 			{
       
  9980 		
       
  9981 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9982 				return return_type_symbol;
       
  9983 				
       
  9984 			}
       
  9985 			
       
  9986 			ERROR;
       
  9987 		}
       
  9988 		
       
  9989 	}/*function_lreal_to_ulint*/
       
  9990 	break;
       
  9991 
       
  9992 /****
       
  9993  *LREAL_TO_BOOL
       
  9994  */
       
  9995 	case function_lreal_to_bool :
       
  9996 	{
       
  9997 		symbol_c *last_type_symbol = NULL;
       
  9998 
       
  9999 		{
       
 10000 			identifier_c param_name("IN");
       
 10001 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10002 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10003 			
       
 10004 			/* Get the value from a foo(<param_value>) style call */
       
 10005 			if (IN_param_value == NULL)
       
 10006 			  IN_param_value = function_call_param_iterator.next();
       
 10007 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10008 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10009 			
       
 10010 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10011 			{
       
 10012 		
       
 10013 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10014 				return return_type_symbol;
       
 10015 				
       
 10016 			}
       
 10017 			
       
 10018 			ERROR;
       
 10019 		}
       
 10020 		
       
 10021 	}/*function_lreal_to_bool*/
       
 10022 	break;
       
 10023 
       
 10024 /****
       
 10025  *LREAL_TO_TIME
       
 10026  */
       
 10027 	case function_lreal_to_time :
       
 10028 	{
       
 10029 		symbol_c *last_type_symbol = NULL;
       
 10030 
       
 10031 		{
       
 10032 			identifier_c param_name("IN");
       
 10033 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10034 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10035 			
       
 10036 			/* Get the value from a foo(<param_value>) style call */
       
 10037 			if (IN_param_value == NULL)
       
 10038 			  IN_param_value = function_call_param_iterator.next();
       
 10039 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10040 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10041 			
       
 10042 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10043 			{
       
 10044 		
       
 10045 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10046 				return return_type_symbol;
       
 10047 				
       
 10048 			}
       
 10049 			
       
 10050 			ERROR;
       
 10051 		}
       
 10052 		
       
 10053 	}/*function_lreal_to_time*/
       
 10054 	break;
       
 10055 
       
 10056 /****
       
 10057  *LREAL_TO_INT
       
 10058  */
       
 10059 	case function_lreal_to_int :
       
 10060 	{
       
 10061 		symbol_c *last_type_symbol = NULL;
       
 10062 
       
 10063 		{
       
 10064 			identifier_c param_name("IN");
       
 10065 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10066 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10067 			
       
 10068 			/* Get the value from a foo(<param_value>) style call */
       
 10069 			if (IN_param_value == NULL)
       
 10070 			  IN_param_value = function_call_param_iterator.next();
       
 10071 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10072 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10073 			
       
 10074 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10075 			{
       
 10076 		
       
 10077 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10078 				return return_type_symbol;
       
 10079 				
       
 10080 			}
       
 10081 			
       
 10082 			ERROR;
       
 10083 		}
       
 10084 		
       
 10085 	}/*function_lreal_to_int*/
       
 10086 	break;
       
 10087 
       
 10088 /****
       
 10089  *BYTE_TO_REAL
       
 10090  */
       
 10091 	case function_byte_to_real :
       
 10092 	{
       
 10093 		symbol_c *last_type_symbol = NULL;
       
 10094 
       
 10095 		{
       
 10096 			identifier_c param_name("IN");
       
 10097 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10098 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10099 			
       
 10100 			/* Get the value from a foo(<param_value>) style call */
       
 10101 			if (IN_param_value == NULL)
       
 10102 			  IN_param_value = function_call_param_iterator.next();
       
 10103 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10104 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10105 			
       
 10106 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10107 			{
       
 10108 		
       
 10109 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10110 				return return_type_symbol;
       
 10111 				
       
 10112 			}
       
 10113 			
       
 10114 			ERROR;
       
 10115 		}
       
 10116 		
       
 10117 	}/*function_byte_to_real*/
       
 10118 	break;
       
 10119 
       
 10120 /****
       
 10121  *BYTE_TO_SINT
       
 10122  */
       
 10123 	case function_byte_to_sint :
       
 10124 	{
       
 10125 		symbol_c *last_type_symbol = NULL;
       
 10126 
       
 10127 		{
       
 10128 			identifier_c param_name("IN");
       
 10129 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10130 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10131 			
       
 10132 			/* Get the value from a foo(<param_value>) style call */
       
 10133 			if (IN_param_value == NULL)
       
 10134 			  IN_param_value = function_call_param_iterator.next();
       
 10135 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10136 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10137 			
       
 10138 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10139 			{
       
 10140 		
       
 10141 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10142 				return return_type_symbol;
       
 10143 				
       
 10144 			}
       
 10145 			
       
 10146 			ERROR;
       
 10147 		}
       
 10148 		
       
 10149 	}/*function_byte_to_sint*/
       
 10150 	break;
       
 10151 
       
 10152 /****
       
 10153  *BYTE_TO_LINT
       
 10154  */
       
 10155 	case function_byte_to_lint :
       
 10156 	{
       
 10157 		symbol_c *last_type_symbol = NULL;
       
 10158 
       
 10159 		{
       
 10160 			identifier_c param_name("IN");
       
 10161 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10162 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10163 			
       
 10164 			/* Get the value from a foo(<param_value>) style call */
       
 10165 			if (IN_param_value == NULL)
       
 10166 			  IN_param_value = function_call_param_iterator.next();
       
 10167 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10168 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10169 			
       
 10170 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10171 			{
       
 10172 		
       
 10173 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10174 				return return_type_symbol;
       
 10175 				
       
 10176 			}
       
 10177 			
       
 10178 			ERROR;
       
 10179 		}
       
 10180 		
       
 10181 	}/*function_byte_to_lint*/
       
 10182 	break;
       
 10183 
       
 10184 /****
       
 10185  *BYTE_TO_DINT
       
 10186  */
       
 10187 	case function_byte_to_dint :
       
 10188 	{
       
 10189 		symbol_c *last_type_symbol = NULL;
       
 10190 
       
 10191 		{
       
 10192 			identifier_c param_name("IN");
       
 10193 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10194 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10195 			
       
 10196 			/* Get the value from a foo(<param_value>) style call */
       
 10197 			if (IN_param_value == NULL)
       
 10198 			  IN_param_value = function_call_param_iterator.next();
       
 10199 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10200 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10201 			
       
 10202 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10203 			{
       
 10204 		
       
 10205 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10206 				return return_type_symbol;
       
 10207 				
       
 10208 			}
       
 10209 			
       
 10210 			ERROR;
       
 10211 		}
       
 10212 		
       
 10213 	}/*function_byte_to_dint*/
       
 10214 	break;
       
 10215 
       
 10216 /****
       
 10217  *BYTE_TO_DATE
       
 10218  */
       
 10219 	case function_byte_to_date :
       
 10220 	{
       
 10221 		symbol_c *last_type_symbol = NULL;
       
 10222 
       
 10223 		{
       
 10224 			identifier_c param_name("IN");
       
 10225 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10226 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10227 			
       
 10228 			/* Get the value from a foo(<param_value>) style call */
       
 10229 			if (IN_param_value == NULL)
       
 10230 			  IN_param_value = function_call_param_iterator.next();
       
 10231 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10232 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10233 			
       
 10234 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10235 			{
       
 10236 		
       
 10237 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10238 				return return_type_symbol;
       
 10239 				
       
 10240 			}
       
 10241 			
       
 10242 			ERROR;
       
 10243 		}
       
 10244 		
       
 10245 	}/*function_byte_to_date*/
       
 10246 	break;
       
 10247 
       
 10248 /****
       
 10249  *BYTE_TO_DWORD
       
 10250  */
       
 10251 	case function_byte_to_dword :
       
 10252 	{
       
 10253 		symbol_c *last_type_symbol = NULL;
       
 10254 
       
 10255 		{
       
 10256 			identifier_c param_name("IN");
       
 10257 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10258 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10259 			
       
 10260 			/* Get the value from a foo(<param_value>) style call */
       
 10261 			if (IN_param_value == NULL)
       
 10262 			  IN_param_value = function_call_param_iterator.next();
       
 10263 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10264 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10265 			
       
 10266 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10267 			{
       
 10268 		
       
 10269 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10270 				return return_type_symbol;
       
 10271 				
       
 10272 			}
       
 10273 			
       
 10274 			ERROR;
       
 10275 		}
       
 10276 		
       
 10277 	}/*function_byte_to_dword*/
       
 10278 	break;
       
 10279 
       
 10280 /****
       
 10281  *BYTE_TO_DT
       
 10282  */
       
 10283 	case function_byte_to_dt :
       
 10284 	{
       
 10285 		symbol_c *last_type_symbol = NULL;
       
 10286 
       
 10287 		{
       
 10288 			identifier_c param_name("IN");
       
 10289 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10290 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10291 			
       
 10292 			/* Get the value from a foo(<param_value>) style call */
       
 10293 			if (IN_param_value == NULL)
       
 10294 			  IN_param_value = function_call_param_iterator.next();
       
 10295 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10296 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10297 			
       
 10298 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10299 			{
       
 10300 		
       
 10301 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10302 				return return_type_symbol;
       
 10303 				
       
 10304 			}
       
 10305 			
       
 10306 			ERROR;
       
 10307 		}
       
 10308 		
       
 10309 	}/*function_byte_to_dt*/
       
 10310 	break;
       
 10311 
       
 10312 /****
       
 10313  *BYTE_TO_TOD
       
 10314  */
       
 10315 	case function_byte_to_tod :
       
 10316 	{
       
 10317 		symbol_c *last_type_symbol = NULL;
       
 10318 
       
 10319 		{
       
 10320 			identifier_c param_name("IN");
       
 10321 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10322 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10323 			
       
 10324 			/* Get the value from a foo(<param_value>) style call */
       
 10325 			if (IN_param_value == NULL)
       
 10326 			  IN_param_value = function_call_param_iterator.next();
       
 10327 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10328 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10329 			
       
 10330 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10331 			{
       
 10332 		
       
 10333 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10334 				return return_type_symbol;
       
 10335 				
       
 10336 			}
       
 10337 			
       
 10338 			ERROR;
       
 10339 		}
       
 10340 		
       
 10341 	}/*function_byte_to_tod*/
       
 10342 	break;
       
 10343 
       
 10344 /****
       
 10345  *BYTE_TO_UDINT
       
 10346  */
       
 10347 	case function_byte_to_udint :
       
 10348 	{
       
 10349 		symbol_c *last_type_symbol = NULL;
       
 10350 
       
 10351 		{
       
 10352 			identifier_c param_name("IN");
       
 10353 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10354 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10355 			
       
 10356 			/* Get the value from a foo(<param_value>) style call */
       
 10357 			if (IN_param_value == NULL)
       
 10358 			  IN_param_value = function_call_param_iterator.next();
       
 10359 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10360 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10361 			
       
 10362 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10363 			{
       
 10364 		
       
 10365 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10366 				return return_type_symbol;
       
 10367 				
       
 10368 			}
       
 10369 			
       
 10370 			ERROR;
       
 10371 		}
       
 10372 		
       
 10373 	}/*function_byte_to_udint*/
       
 10374 	break;
       
 10375 
       
 10376 /****
       
 10377  *BYTE_TO_WORD
       
 10378  */
       
 10379 	case function_byte_to_word :
       
 10380 	{
       
 10381 		symbol_c *last_type_symbol = NULL;
       
 10382 
       
 10383 		{
       
 10384 			identifier_c param_name("IN");
       
 10385 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10386 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10387 			
       
 10388 			/* Get the value from a foo(<param_value>) style call */
       
 10389 			if (IN_param_value == NULL)
       
 10390 			  IN_param_value = function_call_param_iterator.next();
       
 10391 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10392 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10393 			
       
 10394 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10395 			{
       
 10396 		
       
 10397 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10398 				return return_type_symbol;
       
 10399 				
       
 10400 			}
       
 10401 			
       
 10402 			ERROR;
       
 10403 		}
       
 10404 		
       
 10405 	}/*function_byte_to_word*/
       
 10406 	break;
       
 10407 
       
 10408 /****
       
 10409  *BYTE_TO_WSTRING
       
 10410  */
       
 10411 	case function_byte_to_wstring :
       
 10412 	{
       
 10413 		symbol_c *last_type_symbol = NULL;
       
 10414 
       
 10415 		{
       
 10416 			identifier_c param_name("IN");
       
 10417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10419 			
       
 10420 			/* Get the value from a foo(<param_value>) style call */
       
 10421 			if (IN_param_value == NULL)
       
 10422 			  IN_param_value = function_call_param_iterator.next();
       
 10423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10424 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10425 			
       
 10426 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10427 			{
       
 10428 		
       
 10429 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 10430 				return return_type_symbol;
       
 10431 				
       
 10432 			}
       
 10433 			
       
 10434 			ERROR;
       
 10435 		}
       
 10436 		
       
 10437 	}/*function_byte_to_wstring*/
       
 10438 	break;
       
 10439 
       
 10440 /****
       
 10441  *BYTE_TO_STRING
       
 10442  */
       
 10443 	case function_byte_to_string :
       
 10444 	{
       
 10445 		symbol_c *last_type_symbol = NULL;
       
 10446 
       
 10447 		{
       
 10448 			identifier_c param_name("IN");
       
 10449 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10450 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10451 			
       
 10452 			/* Get the value from a foo(<param_value>) style call */
       
 10453 			if (IN_param_value == NULL)
       
 10454 			  IN_param_value = function_call_param_iterator.next();
       
 10455 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10456 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10457 			
       
 10458 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10459 			{
       
 10460 		
       
 10461 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10462 				return return_type_symbol;
       
 10463 				
       
 10464 			}
       
 10465 			
       
 10466 			ERROR;
       
 10467 		}
       
 10468 		
       
 10469 	}/*function_byte_to_string*/
       
 10470 	break;
       
 10471 
       
 10472 /****
       
 10473  *BYTE_TO_LWORD
       
 10474  */
       
 10475 	case function_byte_to_lword :
       
 10476 	{
       
 10477 		symbol_c *last_type_symbol = NULL;
       
 10478 
       
 10479 		{
       
 10480 			identifier_c param_name("IN");
       
 10481 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10482 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10483 			
       
 10484 			/* Get the value from a foo(<param_value>) style call */
       
 10485 			if (IN_param_value == NULL)
       
 10486 			  IN_param_value = function_call_param_iterator.next();
       
 10487 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10488 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10489 			
       
 10490 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10491 			{
       
 10492 		
       
 10493 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10494 				return return_type_symbol;
       
 10495 				
       
 10496 			}
       
 10497 			
       
 10498 			ERROR;
       
 10499 		}
       
 10500 		
       
 10501 	}/*function_byte_to_lword*/
       
 10502 	break;
       
 10503 
       
 10504 /****
       
 10505  *BYTE_TO_UINT
       
 10506  */
       
 10507 	case function_byte_to_uint :
       
 10508 	{
       
 10509 		symbol_c *last_type_symbol = NULL;
       
 10510 
       
 10511 		{
       
 10512 			identifier_c param_name("IN");
       
 10513 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10514 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10515 			
       
 10516 			/* Get the value from a foo(<param_value>) style call */
       
 10517 			if (IN_param_value == NULL)
       
 10518 			  IN_param_value = function_call_param_iterator.next();
       
 10519 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10520 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10521 			
       
 10522 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10523 			{
       
 10524 		
       
 10525 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10526 				return return_type_symbol;
       
 10527 				
       
 10528 			}
       
 10529 			
       
 10530 			ERROR;
       
 10531 		}
       
 10532 		
       
 10533 	}/*function_byte_to_uint*/
       
 10534 	break;
       
 10535 
       
 10536 /****
       
 10537  *BYTE_TO_LREAL
       
 10538  */
       
 10539 	case function_byte_to_lreal :
       
 10540 	{
       
 10541 		symbol_c *last_type_symbol = NULL;
       
 10542 
       
 10543 		{
       
 10544 			identifier_c param_name("IN");
       
 10545 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10546 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10547 			
       
 10548 			/* Get the value from a foo(<param_value>) style call */
       
 10549 			if (IN_param_value == NULL)
       
 10550 			  IN_param_value = function_call_param_iterator.next();
       
 10551 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10552 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10553 			
       
 10554 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10555 			{
       
 10556 		
       
 10557 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10558 				return return_type_symbol;
       
 10559 				
       
 10560 			}
       
 10561 			
       
 10562 			ERROR;
       
 10563 		}
       
 10564 		
       
 10565 	}/*function_byte_to_lreal*/
       
 10566 	break;
       
 10567 
       
 10568 /****
       
 10569  *BYTE_TO_BYTE
       
 10570  */
       
 10571 	case function_byte_to_byte :
       
 10572 	{
       
 10573 		symbol_c *last_type_symbol = NULL;
       
 10574 
       
 10575 		{
       
 10576 			identifier_c param_name("IN");
       
 10577 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10578 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10579 			
       
 10580 			/* Get the value from a foo(<param_value>) style call */
       
 10581 			if (IN_param_value == NULL)
       
 10582 			  IN_param_value = function_call_param_iterator.next();
       
 10583 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10584 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10585 			
       
 10586 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10587 			{
       
 10588 		
       
 10589 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10590 				return return_type_symbol;
       
 10591 				
       
 10592 			}
       
 10593 			
       
 10594 			ERROR;
       
 10595 		}
       
 10596 		
       
 10597 	}/*function_byte_to_byte*/
       
 10598 	break;
       
 10599 
       
 10600 /****
       
 10601  *BYTE_TO_USINT
       
 10602  */
       
 10603 	case function_byte_to_usint :
       
 10604 	{
       
 10605 		symbol_c *last_type_symbol = NULL;
       
 10606 
       
 10607 		{
       
 10608 			identifier_c param_name("IN");
       
 10609 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10610 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10611 			
       
 10612 			/* Get the value from a foo(<param_value>) style call */
       
 10613 			if (IN_param_value == NULL)
       
 10614 			  IN_param_value = function_call_param_iterator.next();
       
 10615 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10616 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10617 			
       
 10618 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10619 			{
       
 10620 		
       
 10621 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10622 				return return_type_symbol;
       
 10623 				
       
 10624 			}
       
 10625 			
       
 10626 			ERROR;
       
 10627 		}
       
 10628 		
       
 10629 	}/*function_byte_to_usint*/
       
 10630 	break;
       
 10631 
       
 10632 /****
       
 10633  *BYTE_TO_ULINT
       
 10634  */
       
 10635 	case function_byte_to_ulint :
       
 10636 	{
       
 10637 		symbol_c *last_type_symbol = NULL;
       
 10638 
       
 10639 		{
       
 10640 			identifier_c param_name("IN");
       
 10641 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10642 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10643 			
       
 10644 			/* Get the value from a foo(<param_value>) style call */
       
 10645 			if (IN_param_value == NULL)
       
 10646 			  IN_param_value = function_call_param_iterator.next();
       
 10647 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10648 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10649 			
       
 10650 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10651 			{
       
 10652 		
       
 10653 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10654 				return return_type_symbol;
       
 10655 				
       
 10656 			}
       
 10657 			
       
 10658 			ERROR;
       
 10659 		}
       
 10660 		
       
 10661 	}/*function_byte_to_ulint*/
       
 10662 	break;
       
 10663 
       
 10664 /****
       
 10665  *BYTE_TO_BOOL
       
 10666  */
       
 10667 	case function_byte_to_bool :
       
 10668 	{
       
 10669 		symbol_c *last_type_symbol = NULL;
       
 10670 
       
 10671 		{
       
 10672 			identifier_c param_name("IN");
       
 10673 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10674 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10675 			
       
 10676 			/* Get the value from a foo(<param_value>) style call */
       
 10677 			if (IN_param_value == NULL)
       
 10678 			  IN_param_value = function_call_param_iterator.next();
       
 10679 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10680 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10681 			
       
 10682 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10683 			{
       
 10684 		
       
 10685 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10686 				return return_type_symbol;
       
 10687 				
       
 10688 			}
       
 10689 			
       
 10690 			ERROR;
       
 10691 		}
       
 10692 		
       
 10693 	}/*function_byte_to_bool*/
       
 10694 	break;
       
 10695 
       
 10696 /****
       
 10697  *BYTE_TO_TIME
       
 10698  */
       
 10699 	case function_byte_to_time :
       
 10700 	{
       
 10701 		symbol_c *last_type_symbol = NULL;
       
 10702 
       
 10703 		{
       
 10704 			identifier_c param_name("IN");
       
 10705 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10706 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10707 			
       
 10708 			/* Get the value from a foo(<param_value>) style call */
       
 10709 			if (IN_param_value == NULL)
       
 10710 			  IN_param_value = function_call_param_iterator.next();
       
 10711 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10712 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10713 			
       
 10714 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10715 			{
       
 10716 		
       
 10717 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10718 				return return_type_symbol;
       
 10719 				
       
 10720 			}
       
 10721 			
       
 10722 			ERROR;
       
 10723 		}
       
 10724 		
       
 10725 	}/*function_byte_to_time*/
       
 10726 	break;
       
 10727 
       
 10728 /****
       
 10729  *BYTE_TO_INT
       
 10730  */
       
 10731 	case function_byte_to_int :
       
 10732 	{
       
 10733 		symbol_c *last_type_symbol = NULL;
       
 10734 
       
 10735 		{
       
 10736 			identifier_c param_name("IN");
       
 10737 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10738 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10739 			
       
 10740 			/* Get the value from a foo(<param_value>) style call */
       
 10741 			if (IN_param_value == NULL)
       
 10742 			  IN_param_value = function_call_param_iterator.next();
       
 10743 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10744 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10745 			
       
 10746 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10747 			{
       
 10748 		
       
 10749 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10750 				return return_type_symbol;
       
 10751 				
       
 10752 			}
       
 10753 			
       
 10754 			ERROR;
       
 10755 		}
       
 10756 		
       
 10757 	}/*function_byte_to_int*/
       
 10758 	break;
       
 10759 
       
 10760 /****
       
 10761  *USINT_TO_REAL
       
 10762  */
       
 10763 	case function_usint_to_real :
       
 10764 	{
       
 10765 		symbol_c *last_type_symbol = NULL;
       
 10766 
       
 10767 		{
       
 10768 			identifier_c param_name("IN");
       
 10769 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10770 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10771 			
       
 10772 			/* Get the value from a foo(<param_value>) style call */
       
 10773 			if (IN_param_value == NULL)
       
 10774 			  IN_param_value = function_call_param_iterator.next();
       
 10775 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10776 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10777 			
       
 10778 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10779 			{
       
 10780 		
       
 10781 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10782 				return return_type_symbol;
       
 10783 				
       
 10784 			}
       
 10785 			
       
 10786 			ERROR;
       
 10787 		}
       
 10788 		
       
 10789 	}/*function_usint_to_real*/
       
 10790 	break;
       
 10791 
       
 10792 /****
       
 10793  *USINT_TO_SINT
       
 10794  */
       
 10795 	case function_usint_to_sint :
       
 10796 	{
       
 10797 		symbol_c *last_type_symbol = NULL;
       
 10798 
       
 10799 		{
       
 10800 			identifier_c param_name("IN");
       
 10801 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10802 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10803 			
       
 10804 			/* Get the value from a foo(<param_value>) style call */
       
 10805 			if (IN_param_value == NULL)
       
 10806 			  IN_param_value = function_call_param_iterator.next();
       
 10807 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10808 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10809 			
       
 10810 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10811 			{
       
 10812 		
       
 10813 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10814 				return return_type_symbol;
       
 10815 				
       
 10816 			}
       
 10817 			
       
 10818 			ERROR;
       
 10819 		}
       
 10820 		
       
 10821 	}/*function_usint_to_sint*/
       
 10822 	break;
       
 10823 
       
 10824 /****
       
 10825  *USINT_TO_LINT
       
 10826  */
       
 10827 	case function_usint_to_lint :
       
 10828 	{
       
 10829 		symbol_c *last_type_symbol = NULL;
       
 10830 
       
 10831 		{
       
 10832 			identifier_c param_name("IN");
       
 10833 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10834 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10835 			
       
 10836 			/* Get the value from a foo(<param_value>) style call */
       
 10837 			if (IN_param_value == NULL)
       
 10838 			  IN_param_value = function_call_param_iterator.next();
       
 10839 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10840 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10841 			
       
 10842 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10843 			{
       
 10844 		
       
 10845 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10846 				return return_type_symbol;
       
 10847 				
       
 10848 			}
       
 10849 			
       
 10850 			ERROR;
       
 10851 		}
       
 10852 		
       
 10853 	}/*function_usint_to_lint*/
       
 10854 	break;
       
 10855 
       
 10856 /****
       
 10857  *USINT_TO_DINT
       
 10858  */
       
 10859 	case function_usint_to_dint :
       
 10860 	{
       
 10861 		symbol_c *last_type_symbol = NULL;
       
 10862 
       
 10863 		{
       
 10864 			identifier_c param_name("IN");
       
 10865 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10866 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10867 			
       
 10868 			/* Get the value from a foo(<param_value>) style call */
       
 10869 			if (IN_param_value == NULL)
       
 10870 			  IN_param_value = function_call_param_iterator.next();
       
 10871 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10872 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10873 			
       
 10874 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10875 			{
       
 10876 		
       
 10877 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10878 				return return_type_symbol;
       
 10879 				
       
 10880 			}
       
 10881 			
       
 10882 			ERROR;
       
 10883 		}
       
 10884 		
       
 10885 	}/*function_usint_to_dint*/
       
 10886 	break;
       
 10887 
       
 10888 /****
       
 10889  *USINT_TO_DATE
       
 10890  */
       
 10891 	case function_usint_to_date :
       
 10892 	{
       
 10893 		symbol_c *last_type_symbol = NULL;
       
 10894 
       
 10895 		{
       
 10896 			identifier_c param_name("IN");
       
 10897 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10898 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10899 			
       
 10900 			/* Get the value from a foo(<param_value>) style call */
       
 10901 			if (IN_param_value == NULL)
       
 10902 			  IN_param_value = function_call_param_iterator.next();
       
 10903 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10904 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10905 			
       
 10906 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10907 			{
       
 10908 		
       
 10909 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10910 				return return_type_symbol;
       
 10911 				
       
 10912 			}
       
 10913 			
       
 10914 			ERROR;
       
 10915 		}
       
 10916 		
       
 10917 	}/*function_usint_to_date*/
       
 10918 	break;
       
 10919 
       
 10920 /****
       
 10921  *USINT_TO_DWORD
       
 10922  */
       
 10923 	case function_usint_to_dword :
       
 10924 	{
       
 10925 		symbol_c *last_type_symbol = NULL;
       
 10926 
       
 10927 		{
       
 10928 			identifier_c param_name("IN");
       
 10929 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10930 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10931 			
       
 10932 			/* Get the value from a foo(<param_value>) style call */
       
 10933 			if (IN_param_value == NULL)
       
 10934 			  IN_param_value = function_call_param_iterator.next();
       
 10935 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10936 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10937 			
       
 10938 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10939 			{
       
 10940 		
       
 10941 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10942 				return return_type_symbol;
       
 10943 				
       
 10944 			}
       
 10945 			
       
 10946 			ERROR;
       
 10947 		}
       
 10948 		
       
 10949 	}/*function_usint_to_dword*/
       
 10950 	break;
       
 10951 
       
 10952 /****
       
 10953  *USINT_TO_DT
       
 10954  */
       
 10955 	case function_usint_to_dt :
       
 10956 	{
       
 10957 		symbol_c *last_type_symbol = NULL;
       
 10958 
       
 10959 		{
       
 10960 			identifier_c param_name("IN");
       
 10961 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10962 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10963 			
       
 10964 			/* Get the value from a foo(<param_value>) style call */
       
 10965 			if (IN_param_value == NULL)
       
 10966 			  IN_param_value = function_call_param_iterator.next();
       
 10967 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10968 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10969 			
       
 10970 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 10971 			{
       
 10972 		
       
 10973 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10974 				return return_type_symbol;
       
 10975 				
       
 10976 			}
       
 10977 			
       
 10978 			ERROR;
       
 10979 		}
       
 10980 		
       
 10981 	}/*function_usint_to_dt*/
       
 10982 	break;
       
 10983 
       
 10984 /****
       
 10985  *USINT_TO_TOD
       
 10986  */
       
 10987 	case function_usint_to_tod :
       
 10988 	{
       
 10989 		symbol_c *last_type_symbol = NULL;
       
 10990 
       
 10991 		{
       
 10992 			identifier_c param_name("IN");
       
 10993 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10994 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10995 			
       
 10996 			/* Get the value from a foo(<param_value>) style call */
       
 10997 			if (IN_param_value == NULL)
       
 10998 			  IN_param_value = function_call_param_iterator.next();
       
 10999 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11000 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11001 			
       
 11002 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11003 			{
       
 11004 		
       
 11005 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11006 				return return_type_symbol;
       
 11007 				
       
 11008 			}
       
 11009 			
       
 11010 			ERROR;
       
 11011 		}
       
 11012 		
       
 11013 	}/*function_usint_to_tod*/
       
 11014 	break;
       
 11015 
       
 11016 /****
       
 11017  *USINT_TO_UDINT
       
 11018  */
       
 11019 	case function_usint_to_udint :
       
 11020 	{
       
 11021 		symbol_c *last_type_symbol = NULL;
       
 11022 
       
 11023 		{
       
 11024 			identifier_c param_name("IN");
       
 11025 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11026 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11027 			
       
 11028 			/* Get the value from a foo(<param_value>) style call */
       
 11029 			if (IN_param_value == NULL)
       
 11030 			  IN_param_value = function_call_param_iterator.next();
       
 11031 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11032 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11033 			
       
 11034 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11035 			{
       
 11036 		
       
 11037 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11038 				return return_type_symbol;
       
 11039 				
       
 11040 			}
       
 11041 			
       
 11042 			ERROR;
       
 11043 		}
       
 11044 		
       
 11045 	}/*function_usint_to_udint*/
       
 11046 	break;
       
 11047 
       
 11048 /****
       
 11049  *USINT_TO_WORD
       
 11050  */
       
 11051 	case function_usint_to_word :
       
 11052 	{
       
 11053 		symbol_c *last_type_symbol = NULL;
       
 11054 
       
 11055 		{
       
 11056 			identifier_c param_name("IN");
       
 11057 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11058 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11059 			
       
 11060 			/* Get the value from a foo(<param_value>) style call */
       
 11061 			if (IN_param_value == NULL)
       
 11062 			  IN_param_value = function_call_param_iterator.next();
       
 11063 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11064 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11065 			
       
 11066 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11067 			{
       
 11068 		
       
 11069 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11070 				return return_type_symbol;
       
 11071 				
       
 11072 			}
       
 11073 			
       
 11074 			ERROR;
       
 11075 		}
       
 11076 		
       
 11077 	}/*function_usint_to_word*/
       
 11078 	break;
       
 11079 
       
 11080 /****
       
 11081  *USINT_TO_WSTRING
       
 11082  */
       
 11083 	case function_usint_to_wstring :
       
 11084 	{
       
 11085 		symbol_c *last_type_symbol = NULL;
       
 11086 
       
 11087 		{
       
 11088 			identifier_c param_name("IN");
       
 11089 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11090 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11091 			
       
 11092 			/* Get the value from a foo(<param_value>) style call */
       
 11093 			if (IN_param_value == NULL)
       
 11094 			  IN_param_value = function_call_param_iterator.next();
       
 11095 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11096 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11097 			
       
 11098 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11099 			{
       
 11100 		
       
 11101 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11102 				return return_type_symbol;
       
 11103 				
       
 11104 			}
       
 11105 			
       
 11106 			ERROR;
       
 11107 		}
       
 11108 		
       
 11109 	}/*function_usint_to_wstring*/
       
 11110 	break;
       
 11111 
       
 11112 /****
       
 11113  *USINT_TO_STRING
       
 11114  */
       
 11115 	case function_usint_to_string :
       
 11116 	{
       
 11117 		symbol_c *last_type_symbol = NULL;
       
 11118 
       
 11119 		{
       
 11120 			identifier_c param_name("IN");
       
 11121 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11122 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11123 			
       
 11124 			/* Get the value from a foo(<param_value>) style call */
       
 11125 			if (IN_param_value == NULL)
       
 11126 			  IN_param_value = function_call_param_iterator.next();
       
 11127 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11128 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11129 			
       
 11130 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11131 			{
       
 11132 		
       
 11133 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11134 				return return_type_symbol;
       
 11135 				
       
 11136 			}
       
 11137 			
       
 11138 			ERROR;
       
 11139 		}
       
 11140 		
       
 11141 	}/*function_usint_to_string*/
       
 11142 	break;
       
 11143 
       
 11144 /****
       
 11145  *USINT_TO_LWORD
       
 11146  */
       
 11147 	case function_usint_to_lword :
       
 11148 	{
       
 11149 		symbol_c *last_type_symbol = NULL;
       
 11150 
       
 11151 		{
       
 11152 			identifier_c param_name("IN");
       
 11153 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11154 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11155 			
       
 11156 			/* Get the value from a foo(<param_value>) style call */
       
 11157 			if (IN_param_value == NULL)
       
 11158 			  IN_param_value = function_call_param_iterator.next();
       
 11159 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11160 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11161 			
       
 11162 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11163 			{
       
 11164 		
       
 11165 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11166 				return return_type_symbol;
       
 11167 				
       
 11168 			}
       
 11169 			
       
 11170 			ERROR;
       
 11171 		}
       
 11172 		
       
 11173 	}/*function_usint_to_lword*/
       
 11174 	break;
       
 11175 
       
 11176 /****
       
 11177  *USINT_TO_UINT
       
 11178  */
       
 11179 	case function_usint_to_uint :
       
 11180 	{
       
 11181 		symbol_c *last_type_symbol = NULL;
       
 11182 
       
 11183 		{
       
 11184 			identifier_c param_name("IN");
       
 11185 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11186 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11187 			
       
 11188 			/* Get the value from a foo(<param_value>) style call */
       
 11189 			if (IN_param_value == NULL)
       
 11190 			  IN_param_value = function_call_param_iterator.next();
       
 11191 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11192 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11193 			
       
 11194 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11195 			{
       
 11196 		
       
 11197 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11198 				return return_type_symbol;
       
 11199 				
       
 11200 			}
       
 11201 			
       
 11202 			ERROR;
       
 11203 		}
       
 11204 		
       
 11205 	}/*function_usint_to_uint*/
       
 11206 	break;
       
 11207 
       
 11208 /****
       
 11209  *USINT_TO_LREAL
       
 11210  */
       
 11211 	case function_usint_to_lreal :
       
 11212 	{
       
 11213 		symbol_c *last_type_symbol = NULL;
       
 11214 
       
 11215 		{
       
 11216 			identifier_c param_name("IN");
       
 11217 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11218 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11219 			
       
 11220 			/* Get the value from a foo(<param_value>) style call */
       
 11221 			if (IN_param_value == NULL)
       
 11222 			  IN_param_value = function_call_param_iterator.next();
       
 11223 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11224 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11225 			
       
 11226 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11227 			{
       
 11228 		
       
 11229 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11230 				return return_type_symbol;
       
 11231 				
       
 11232 			}
       
 11233 			
       
 11234 			ERROR;
       
 11235 		}
       
 11236 		
       
 11237 	}/*function_usint_to_lreal*/
       
 11238 	break;
       
 11239 
       
 11240 /****
       
 11241  *USINT_TO_BYTE
       
 11242  */
       
 11243 	case function_usint_to_byte :
       
 11244 	{
       
 11245 		symbol_c *last_type_symbol = NULL;
       
 11246 
       
 11247 		{
       
 11248 			identifier_c param_name("IN");
       
 11249 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11250 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11251 			
       
 11252 			/* Get the value from a foo(<param_value>) style call */
       
 11253 			if (IN_param_value == NULL)
       
 11254 			  IN_param_value = function_call_param_iterator.next();
       
 11255 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11256 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11257 			
       
 11258 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11259 			{
       
 11260 		
       
 11261 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11262 				return return_type_symbol;
       
 11263 				
       
 11264 			}
       
 11265 			
       
 11266 			ERROR;
       
 11267 		}
       
 11268 		
       
 11269 	}/*function_usint_to_byte*/
       
 11270 	break;
       
 11271 
       
 11272 /****
       
 11273  *USINT_TO_USINT
       
 11274  */
       
 11275 	case function_usint_to_usint :
       
 11276 	{
       
 11277 		symbol_c *last_type_symbol = NULL;
       
 11278 
       
 11279 		{
       
 11280 			identifier_c param_name("IN");
       
 11281 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11282 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11283 			
       
 11284 			/* Get the value from a foo(<param_value>) style call */
       
 11285 			if (IN_param_value == NULL)
       
 11286 			  IN_param_value = function_call_param_iterator.next();
       
 11287 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11288 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11289 			
       
 11290 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11291 			{
       
 11292 		
       
 11293 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11294 				return return_type_symbol;
       
 11295 				
       
 11296 			}
       
 11297 			
       
 11298 			ERROR;
       
 11299 		}
       
 11300 		
       
 11301 	}/*function_usint_to_usint*/
       
 11302 	break;
       
 11303 
       
 11304 /****
       
 11305  *USINT_TO_ULINT
       
 11306  */
       
 11307 	case function_usint_to_ulint :
       
 11308 	{
       
 11309 		symbol_c *last_type_symbol = NULL;
       
 11310 
       
 11311 		{
       
 11312 			identifier_c param_name("IN");
       
 11313 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11314 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11315 			
       
 11316 			/* Get the value from a foo(<param_value>) style call */
       
 11317 			if (IN_param_value == NULL)
       
 11318 			  IN_param_value = function_call_param_iterator.next();
       
 11319 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11320 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11321 			
       
 11322 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11323 			{
       
 11324 		
       
 11325 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11326 				return return_type_symbol;
       
 11327 				
       
 11328 			}
       
 11329 			
       
 11330 			ERROR;
       
 11331 		}
       
 11332 		
       
 11333 	}/*function_usint_to_ulint*/
       
 11334 	break;
       
 11335 
       
 11336 /****
       
 11337  *USINT_TO_BOOL
       
 11338  */
       
 11339 	case function_usint_to_bool :
       
 11340 	{
       
 11341 		symbol_c *last_type_symbol = NULL;
       
 11342 
       
 11343 		{
       
 11344 			identifier_c param_name("IN");
       
 11345 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11346 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11347 			
       
 11348 			/* Get the value from a foo(<param_value>) style call */
       
 11349 			if (IN_param_value == NULL)
       
 11350 			  IN_param_value = function_call_param_iterator.next();
       
 11351 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11352 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11353 			
       
 11354 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11355 			{
       
 11356 		
       
 11357 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11358 				return return_type_symbol;
       
 11359 				
       
 11360 			}
       
 11361 			
       
 11362 			ERROR;
       
 11363 		}
       
 11364 		
       
 11365 	}/*function_usint_to_bool*/
       
 11366 	break;
       
 11367 
       
 11368 /****
       
 11369  *USINT_TO_TIME
       
 11370  */
       
 11371 	case function_usint_to_time :
       
 11372 	{
       
 11373 		symbol_c *last_type_symbol = NULL;
       
 11374 
       
 11375 		{
       
 11376 			identifier_c param_name("IN");
       
 11377 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11378 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11379 			
       
 11380 			/* Get the value from a foo(<param_value>) style call */
       
 11381 			if (IN_param_value == NULL)
       
 11382 			  IN_param_value = function_call_param_iterator.next();
       
 11383 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11384 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11385 			
       
 11386 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11387 			{
       
 11388 		
       
 11389 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11390 				return return_type_symbol;
       
 11391 				
       
 11392 			}
       
 11393 			
       
 11394 			ERROR;
       
 11395 		}
       
 11396 		
       
 11397 	}/*function_usint_to_time*/
       
 11398 	break;
       
 11399 
       
 11400 /****
       
 11401  *USINT_TO_INT
       
 11402  */
       
 11403 	case function_usint_to_int :
       
 11404 	{
       
 11405 		symbol_c *last_type_symbol = NULL;
       
 11406 
       
 11407 		{
       
 11408 			identifier_c param_name("IN");
       
 11409 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11410 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11411 			
       
 11412 			/* Get the value from a foo(<param_value>) style call */
       
 11413 			if (IN_param_value == NULL)
       
 11414 			  IN_param_value = function_call_param_iterator.next();
       
 11415 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11416 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11417 			
       
 11418 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11419 			{
       
 11420 		
       
 11421 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11422 				return return_type_symbol;
       
 11423 				
       
 11424 			}
       
 11425 			
       
 11426 			ERROR;
       
 11427 		}
       
 11428 		
       
 11429 	}/*function_usint_to_int*/
       
 11430 	break;
       
 11431 
       
 11432 /****
       
 11433  *ULINT_TO_REAL
       
 11434  */
       
 11435 	case function_ulint_to_real :
       
 11436 	{
       
 11437 		symbol_c *last_type_symbol = NULL;
       
 11438 
       
 11439 		{
       
 11440 			identifier_c param_name("IN");
       
 11441 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11442 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11443 			
       
 11444 			/* Get the value from a foo(<param_value>) style call */
       
 11445 			if (IN_param_value == NULL)
       
 11446 			  IN_param_value = function_call_param_iterator.next();
       
 11447 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11448 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11449 			
       
 11450 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11451 			{
       
 11452 		
       
 11453 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11454 				return return_type_symbol;
       
 11455 				
       
 11456 			}
       
 11457 			
       
 11458 			ERROR;
       
 11459 		}
       
 11460 		
       
 11461 	}/*function_ulint_to_real*/
       
 11462 	break;
       
 11463 
       
 11464 /****
       
 11465  *ULINT_TO_SINT
       
 11466  */
       
 11467 	case function_ulint_to_sint :
       
 11468 	{
       
 11469 		symbol_c *last_type_symbol = NULL;
       
 11470 
       
 11471 		{
       
 11472 			identifier_c param_name("IN");
       
 11473 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11474 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11475 			
       
 11476 			/* Get the value from a foo(<param_value>) style call */
       
 11477 			if (IN_param_value == NULL)
       
 11478 			  IN_param_value = function_call_param_iterator.next();
       
 11479 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11480 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11481 			
       
 11482 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11483 			{
       
 11484 		
       
 11485 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11486 				return return_type_symbol;
       
 11487 				
       
 11488 			}
       
 11489 			
       
 11490 			ERROR;
       
 11491 		}
       
 11492 		
       
 11493 	}/*function_ulint_to_sint*/
       
 11494 	break;
       
 11495 
       
 11496 /****
       
 11497  *ULINT_TO_LINT
       
 11498  */
       
 11499 	case function_ulint_to_lint :
       
 11500 	{
       
 11501 		symbol_c *last_type_symbol = NULL;
       
 11502 
       
 11503 		{
       
 11504 			identifier_c param_name("IN");
       
 11505 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11506 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11507 			
       
 11508 			/* Get the value from a foo(<param_value>) style call */
       
 11509 			if (IN_param_value == NULL)
       
 11510 			  IN_param_value = function_call_param_iterator.next();
       
 11511 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11512 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11513 			
       
 11514 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11515 			{
       
 11516 		
       
 11517 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11518 				return return_type_symbol;
       
 11519 				
       
 11520 			}
       
 11521 			
       
 11522 			ERROR;
       
 11523 		}
       
 11524 		
       
 11525 	}/*function_ulint_to_lint*/
       
 11526 	break;
       
 11527 
       
 11528 /****
       
 11529  *ULINT_TO_DINT
       
 11530  */
       
 11531 	case function_ulint_to_dint :
       
 11532 	{
       
 11533 		symbol_c *last_type_symbol = NULL;
       
 11534 
       
 11535 		{
       
 11536 			identifier_c param_name("IN");
       
 11537 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11538 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11539 			
       
 11540 			/* Get the value from a foo(<param_value>) style call */
       
 11541 			if (IN_param_value == NULL)
       
 11542 			  IN_param_value = function_call_param_iterator.next();
       
 11543 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11544 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11545 			
       
 11546 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11547 			{
       
 11548 		
       
 11549 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11550 				return return_type_symbol;
       
 11551 				
       
 11552 			}
       
 11553 			
       
 11554 			ERROR;
       
 11555 		}
       
 11556 		
       
 11557 	}/*function_ulint_to_dint*/
       
 11558 	break;
       
 11559 
       
 11560 /****
       
 11561  *ULINT_TO_DATE
       
 11562  */
       
 11563 	case function_ulint_to_date :
       
 11564 	{
       
 11565 		symbol_c *last_type_symbol = NULL;
       
 11566 
       
 11567 		{
       
 11568 			identifier_c param_name("IN");
       
 11569 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11570 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11571 			
       
 11572 			/* Get the value from a foo(<param_value>) style call */
       
 11573 			if (IN_param_value == NULL)
       
 11574 			  IN_param_value = function_call_param_iterator.next();
       
 11575 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11576 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11577 			
       
 11578 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11579 			{
       
 11580 		
       
 11581 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11582 				return return_type_symbol;
       
 11583 				
       
 11584 			}
       
 11585 			
       
 11586 			ERROR;
       
 11587 		}
       
 11588 		
       
 11589 	}/*function_ulint_to_date*/
       
 11590 	break;
       
 11591 
       
 11592 /****
       
 11593  *ULINT_TO_DWORD
       
 11594  */
       
 11595 	case function_ulint_to_dword :
       
 11596 	{
       
 11597 		symbol_c *last_type_symbol = NULL;
       
 11598 
       
 11599 		{
       
 11600 			identifier_c param_name("IN");
       
 11601 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11602 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11603 			
       
 11604 			/* Get the value from a foo(<param_value>) style call */
       
 11605 			if (IN_param_value == NULL)
       
 11606 			  IN_param_value = function_call_param_iterator.next();
       
 11607 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11608 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11609 			
       
 11610 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11611 			{
       
 11612 		
       
 11613 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11614 				return return_type_symbol;
       
 11615 				
       
 11616 			}
       
 11617 			
       
 11618 			ERROR;
       
 11619 		}
       
 11620 		
       
 11621 	}/*function_ulint_to_dword*/
       
 11622 	break;
       
 11623 
       
 11624 /****
       
 11625  *ULINT_TO_DT
       
 11626  */
       
 11627 	case function_ulint_to_dt :
       
 11628 	{
       
 11629 		symbol_c *last_type_symbol = NULL;
       
 11630 
       
 11631 		{
       
 11632 			identifier_c param_name("IN");
       
 11633 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11634 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11635 			
       
 11636 			/* Get the value from a foo(<param_value>) style call */
       
 11637 			if (IN_param_value == NULL)
       
 11638 			  IN_param_value = function_call_param_iterator.next();
       
 11639 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11640 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11641 			
       
 11642 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11643 			{
       
 11644 		
       
 11645 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11646 				return return_type_symbol;
       
 11647 				
       
 11648 			}
       
 11649 			
       
 11650 			ERROR;
       
 11651 		}
       
 11652 		
       
 11653 	}/*function_ulint_to_dt*/
       
 11654 	break;
       
 11655 
       
 11656 /****
       
 11657  *ULINT_TO_TOD
       
 11658  */
       
 11659 	case function_ulint_to_tod :
       
 11660 	{
       
 11661 		symbol_c *last_type_symbol = NULL;
       
 11662 
       
 11663 		{
       
 11664 			identifier_c param_name("IN");
       
 11665 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11666 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11667 			
       
 11668 			/* Get the value from a foo(<param_value>) style call */
       
 11669 			if (IN_param_value == NULL)
       
 11670 			  IN_param_value = function_call_param_iterator.next();
       
 11671 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11672 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11673 			
       
 11674 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11675 			{
       
 11676 		
       
 11677 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11678 				return return_type_symbol;
       
 11679 				
       
 11680 			}
       
 11681 			
       
 11682 			ERROR;
       
 11683 		}
       
 11684 		
       
 11685 	}/*function_ulint_to_tod*/
       
 11686 	break;
       
 11687 
       
 11688 /****
       
 11689  *ULINT_TO_UDINT
       
 11690  */
       
 11691 	case function_ulint_to_udint :
       
 11692 	{
       
 11693 		symbol_c *last_type_symbol = NULL;
       
 11694 
       
 11695 		{
       
 11696 			identifier_c param_name("IN");
       
 11697 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11698 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11699 			
       
 11700 			/* Get the value from a foo(<param_value>) style call */
       
 11701 			if (IN_param_value == NULL)
       
 11702 			  IN_param_value = function_call_param_iterator.next();
       
 11703 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11704 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11705 			
       
 11706 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11707 			{
       
 11708 		
       
 11709 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11710 				return return_type_symbol;
       
 11711 				
       
 11712 			}
       
 11713 			
       
 11714 			ERROR;
       
 11715 		}
       
 11716 		
       
 11717 	}/*function_ulint_to_udint*/
       
 11718 	break;
       
 11719 
       
 11720 /****
       
 11721  *ULINT_TO_WORD
       
 11722  */
       
 11723 	case function_ulint_to_word :
       
 11724 	{
       
 11725 		symbol_c *last_type_symbol = NULL;
       
 11726 
       
 11727 		{
       
 11728 			identifier_c param_name("IN");
       
 11729 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11730 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11731 			
       
 11732 			/* Get the value from a foo(<param_value>) style call */
       
 11733 			if (IN_param_value == NULL)
       
 11734 			  IN_param_value = function_call_param_iterator.next();
       
 11735 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11736 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11737 			
       
 11738 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11739 			{
       
 11740 		
       
 11741 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11742 				return return_type_symbol;
       
 11743 				
       
 11744 			}
       
 11745 			
       
 11746 			ERROR;
       
 11747 		}
       
 11748 		
       
 11749 	}/*function_ulint_to_word*/
       
 11750 	break;
       
 11751 
       
 11752 /****
       
 11753  *ULINT_TO_WSTRING
       
 11754  */
       
 11755 	case function_ulint_to_wstring :
       
 11756 	{
       
 11757 		symbol_c *last_type_symbol = NULL;
       
 11758 
       
 11759 		{
       
 11760 			identifier_c param_name("IN");
       
 11761 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11762 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11763 			
       
 11764 			/* Get the value from a foo(<param_value>) style call */
       
 11765 			if (IN_param_value == NULL)
       
 11766 			  IN_param_value = function_call_param_iterator.next();
       
 11767 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11768 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11769 			
       
 11770 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11771 			{
       
 11772 		
       
 11773 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11774 				return return_type_symbol;
       
 11775 				
       
 11776 			}
       
 11777 			
       
 11778 			ERROR;
       
 11779 		}
       
 11780 		
       
 11781 	}/*function_ulint_to_wstring*/
       
 11782 	break;
       
 11783 
       
 11784 /****
       
 11785  *ULINT_TO_STRING
       
 11786  */
       
 11787 	case function_ulint_to_string :
       
 11788 	{
       
 11789 		symbol_c *last_type_symbol = NULL;
       
 11790 
       
 11791 		{
       
 11792 			identifier_c param_name("IN");
       
 11793 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11794 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11795 			
       
 11796 			/* Get the value from a foo(<param_value>) style call */
       
 11797 			if (IN_param_value == NULL)
       
 11798 			  IN_param_value = function_call_param_iterator.next();
       
 11799 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11800 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11801 			
       
 11802 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11803 			{
       
 11804 		
       
 11805 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11806 				return return_type_symbol;
       
 11807 				
       
 11808 			}
       
 11809 			
       
 11810 			ERROR;
       
 11811 		}
       
 11812 		
       
 11813 	}/*function_ulint_to_string*/
       
 11814 	break;
       
 11815 
       
 11816 /****
       
 11817  *ULINT_TO_LWORD
       
 11818  */
       
 11819 	case function_ulint_to_lword :
       
 11820 	{
       
 11821 		symbol_c *last_type_symbol = NULL;
       
 11822 
       
 11823 		{
       
 11824 			identifier_c param_name("IN");
       
 11825 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11826 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11827 			
       
 11828 			/* Get the value from a foo(<param_value>) style call */
       
 11829 			if (IN_param_value == NULL)
       
 11830 			  IN_param_value = function_call_param_iterator.next();
       
 11831 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11832 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11833 			
       
 11834 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11835 			{
       
 11836 		
       
 11837 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11838 				return return_type_symbol;
       
 11839 				
       
 11840 			}
       
 11841 			
       
 11842 			ERROR;
       
 11843 		}
       
 11844 		
       
 11845 	}/*function_ulint_to_lword*/
       
 11846 	break;
       
 11847 
       
 11848 /****
       
 11849  *ULINT_TO_UINT
       
 11850  */
       
 11851 	case function_ulint_to_uint :
       
 11852 	{
       
 11853 		symbol_c *last_type_symbol = NULL;
       
 11854 
       
 11855 		{
       
 11856 			identifier_c param_name("IN");
       
 11857 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11858 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11859 			
       
 11860 			/* Get the value from a foo(<param_value>) style call */
       
 11861 			if (IN_param_value == NULL)
       
 11862 			  IN_param_value = function_call_param_iterator.next();
       
 11863 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11864 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11865 			
       
 11866 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11867 			{
       
 11868 		
       
 11869 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11870 				return return_type_symbol;
       
 11871 				
       
 11872 			}
       
 11873 			
       
 11874 			ERROR;
       
 11875 		}
       
 11876 		
       
 11877 	}/*function_ulint_to_uint*/
       
 11878 	break;
       
 11879 
       
 11880 /****
       
 11881  *ULINT_TO_LREAL
       
 11882  */
       
 11883 	case function_ulint_to_lreal :
       
 11884 	{
       
 11885 		symbol_c *last_type_symbol = NULL;
       
 11886 
       
 11887 		{
       
 11888 			identifier_c param_name("IN");
       
 11889 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11890 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11891 			
       
 11892 			/* Get the value from a foo(<param_value>) style call */
       
 11893 			if (IN_param_value == NULL)
       
 11894 			  IN_param_value = function_call_param_iterator.next();
       
 11895 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11896 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11897 			
       
 11898 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11899 			{
       
 11900 		
       
 11901 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11902 				return return_type_symbol;
       
 11903 				
       
 11904 			}
       
 11905 			
       
 11906 			ERROR;
       
 11907 		}
       
 11908 		
       
 11909 	}/*function_ulint_to_lreal*/
       
 11910 	break;
       
 11911 
       
 11912 /****
       
 11913  *ULINT_TO_BYTE
       
 11914  */
       
 11915 	case function_ulint_to_byte :
       
 11916 	{
       
 11917 		symbol_c *last_type_symbol = NULL;
       
 11918 
       
 11919 		{
       
 11920 			identifier_c param_name("IN");
       
 11921 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11922 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11923 			
       
 11924 			/* Get the value from a foo(<param_value>) style call */
       
 11925 			if (IN_param_value == NULL)
       
 11926 			  IN_param_value = function_call_param_iterator.next();
       
 11927 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11928 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11929 			
       
 11930 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11931 			{
       
 11932 		
       
 11933 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11934 				return return_type_symbol;
       
 11935 				
       
 11936 			}
       
 11937 			
       
 11938 			ERROR;
       
 11939 		}
       
 11940 		
       
 11941 	}/*function_ulint_to_byte*/
       
 11942 	break;
       
 11943 
       
 11944 /****
       
 11945  *ULINT_TO_USINT
       
 11946  */
       
 11947 	case function_ulint_to_usint :
       
 11948 	{
       
 11949 		symbol_c *last_type_symbol = NULL;
       
 11950 
       
 11951 		{
       
 11952 			identifier_c param_name("IN");
       
 11953 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11954 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11955 			
       
 11956 			/* Get the value from a foo(<param_value>) style call */
       
 11957 			if (IN_param_value == NULL)
       
 11958 			  IN_param_value = function_call_param_iterator.next();
       
 11959 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11960 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11961 			
       
 11962 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11963 			{
       
 11964 		
       
 11965 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11966 				return return_type_symbol;
       
 11967 				
       
 11968 			}
       
 11969 			
       
 11970 			ERROR;
       
 11971 		}
       
 11972 		
       
 11973 	}/*function_ulint_to_usint*/
       
 11974 	break;
       
 11975 
       
 11976 /****
       
 11977  *ULINT_TO_ULINT
       
 11978  */
       
 11979 	case function_ulint_to_ulint :
       
 11980 	{
       
 11981 		symbol_c *last_type_symbol = NULL;
       
 11982 
       
 11983 		{
       
 11984 			identifier_c param_name("IN");
       
 11985 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11986 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11987 			
       
 11988 			/* Get the value from a foo(<param_value>) style call */
       
 11989 			if (IN_param_value == NULL)
       
 11990 			  IN_param_value = function_call_param_iterator.next();
       
 11991 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11992 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11993 			
       
 11994 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 11995 			{
       
 11996 		
       
 11997 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11998 				return return_type_symbol;
       
 11999 				
       
 12000 			}
       
 12001 			
       
 12002 			ERROR;
       
 12003 		}
       
 12004 		
       
 12005 	}/*function_ulint_to_ulint*/
       
 12006 	break;
       
 12007 
       
 12008 /****
       
 12009  *ULINT_TO_BOOL
       
 12010  */
       
 12011 	case function_ulint_to_bool :
       
 12012 	{
       
 12013 		symbol_c *last_type_symbol = NULL;
       
 12014 
       
 12015 		{
       
 12016 			identifier_c param_name("IN");
       
 12017 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12018 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12019 			
       
 12020 			/* Get the value from a foo(<param_value>) style call */
       
 12021 			if (IN_param_value == NULL)
       
 12022 			  IN_param_value = function_call_param_iterator.next();
       
 12023 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12024 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12025 			
       
 12026 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 12027 			{
       
 12028 		
       
 12029 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12030 				return return_type_symbol;
       
 12031 				
       
 12032 			}
       
 12033 			
       
 12034 			ERROR;
       
 12035 		}
       
 12036 		
       
 12037 	}/*function_ulint_to_bool*/
       
 12038 	break;
       
 12039 
       
 12040 /****
       
 12041  *ULINT_TO_TIME
       
 12042  */
       
 12043 	case function_ulint_to_time :
       
 12044 	{
       
 12045 		symbol_c *last_type_symbol = NULL;
       
 12046 
       
 12047 		{
       
 12048 			identifier_c param_name("IN");
       
 12049 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12050 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12051 			
       
 12052 			/* Get the value from a foo(<param_value>) style call */
       
 12053 			if (IN_param_value == NULL)
       
 12054 			  IN_param_value = function_call_param_iterator.next();
       
 12055 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12056 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12057 			
       
 12058 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 12059 			{
       
 12060 		
       
 12061 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12062 				return return_type_symbol;
       
 12063 				
       
 12064 			}
       
 12065 			
       
 12066 			ERROR;
       
 12067 		}
       
 12068 		
       
 12069 	}/*function_ulint_to_time*/
       
 12070 	break;
       
 12071 
       
 12072 /****
       
 12073  *ULINT_TO_INT
       
 12074  */
       
 12075 	case function_ulint_to_int :
       
 12076 	{
       
 12077 		symbol_c *last_type_symbol = NULL;
       
 12078 
       
 12079 		{
       
 12080 			identifier_c param_name("IN");
       
 12081 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12082 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12083 			
       
 12084 			/* Get the value from a foo(<param_value>) style call */
       
 12085 			if (IN_param_value == NULL)
       
 12086 			  IN_param_value = function_call_param_iterator.next();
       
 12087 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12088 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12089 			
       
 12090 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 12091 			{
       
 12092 		
       
 12093 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12094 				return return_type_symbol;
       
 12095 				
       
 12096 			}
       
 12097 			
       
 12098 			ERROR;
       
 12099 		}
       
 12100 		
       
 12101 	}/*function_ulint_to_int*/
       
 12102 	break;
       
 12103 
       
 12104 /****
       
 12105  *BOOL_TO_REAL
       
 12106  */
       
 12107 	case function_bool_to_real :
       
 12108 	{
       
 12109 		symbol_c *last_type_symbol = NULL;
       
 12110 
       
 12111 		{
       
 12112 			identifier_c param_name("IN");
       
 12113 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12114 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12115 			
       
 12116 			/* Get the value from a foo(<param_value>) style call */
       
 12117 			if (IN_param_value == NULL)
       
 12118 			  IN_param_value = function_call_param_iterator.next();
       
 12119 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12120 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12121 			
       
 12122 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12123 			{
       
 12124 		
       
 12125 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12126 				return return_type_symbol;
       
 12127 				
       
 12128 			}
       
 12129 			
       
 12130 			ERROR;
       
 12131 		}
       
 12132 		
       
 12133 	}/*function_bool_to_real*/
       
 12134 	break;
       
 12135 
       
 12136 /****
       
 12137  *BOOL_TO_SINT
       
 12138  */
       
 12139 	case function_bool_to_sint :
       
 12140 	{
       
 12141 		symbol_c *last_type_symbol = NULL;
       
 12142 
       
 12143 		{
       
 12144 			identifier_c param_name("IN");
       
 12145 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12146 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12147 			
       
 12148 			/* Get the value from a foo(<param_value>) style call */
       
 12149 			if (IN_param_value == NULL)
       
 12150 			  IN_param_value = function_call_param_iterator.next();
       
 12151 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12152 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12153 			
       
 12154 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12155 			{
       
 12156 		
       
 12157 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12158 				return return_type_symbol;
       
 12159 				
       
 12160 			}
       
 12161 			
       
 12162 			ERROR;
       
 12163 		}
       
 12164 		
       
 12165 	}/*function_bool_to_sint*/
       
 12166 	break;
       
 12167 
       
 12168 /****
       
 12169  *BOOL_TO_LINT
       
 12170  */
       
 12171 	case function_bool_to_lint :
       
 12172 	{
       
 12173 		symbol_c *last_type_symbol = NULL;
       
 12174 
       
 12175 		{
       
 12176 			identifier_c param_name("IN");
       
 12177 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12178 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12179 			
       
 12180 			/* Get the value from a foo(<param_value>) style call */
       
 12181 			if (IN_param_value == NULL)
       
 12182 			  IN_param_value = function_call_param_iterator.next();
       
 12183 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12184 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12185 			
       
 12186 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12187 			{
       
 12188 		
       
 12189 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12190 				return return_type_symbol;
       
 12191 				
       
 12192 			}
       
 12193 			
       
 12194 			ERROR;
       
 12195 		}
       
 12196 		
       
 12197 	}/*function_bool_to_lint*/
       
 12198 	break;
       
 12199 
       
 12200 /****
       
 12201  *BOOL_TO_DINT
       
 12202  */
       
 12203 	case function_bool_to_dint :
       
 12204 	{
       
 12205 		symbol_c *last_type_symbol = NULL;
       
 12206 
       
 12207 		{
       
 12208 			identifier_c param_name("IN");
       
 12209 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12210 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12211 			
       
 12212 			/* Get the value from a foo(<param_value>) style call */
       
 12213 			if (IN_param_value == NULL)
       
 12214 			  IN_param_value = function_call_param_iterator.next();
       
 12215 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12216 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12217 			
       
 12218 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12219 			{
       
 12220 		
       
 12221 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12222 				return return_type_symbol;
       
 12223 				
       
 12224 			}
       
 12225 			
       
 12226 			ERROR;
       
 12227 		}
       
 12228 		
       
 12229 	}/*function_bool_to_dint*/
       
 12230 	break;
       
 12231 
       
 12232 /****
       
 12233  *BOOL_TO_DATE
       
 12234  */
       
 12235 	case function_bool_to_date :
       
 12236 	{
       
 12237 		symbol_c *last_type_symbol = NULL;
       
 12238 
       
 12239 		{
       
 12240 			identifier_c param_name("IN");
       
 12241 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12242 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12243 			
       
 12244 			/* Get the value from a foo(<param_value>) style call */
       
 12245 			if (IN_param_value == NULL)
       
 12246 			  IN_param_value = function_call_param_iterator.next();
       
 12247 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12248 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12249 			
       
 12250 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12251 			{
       
 12252 		
       
 12253 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12254 				return return_type_symbol;
       
 12255 				
       
 12256 			}
       
 12257 			
       
 12258 			ERROR;
       
 12259 		}
       
 12260 		
       
 12261 	}/*function_bool_to_date*/
       
 12262 	break;
       
 12263 
       
 12264 /****
       
 12265  *BOOL_TO_DWORD
       
 12266  */
       
 12267 	case function_bool_to_dword :
       
 12268 	{
       
 12269 		symbol_c *last_type_symbol = NULL;
       
 12270 
       
 12271 		{
       
 12272 			identifier_c param_name("IN");
       
 12273 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12274 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12275 			
       
 12276 			/* Get the value from a foo(<param_value>) style call */
       
 12277 			if (IN_param_value == NULL)
       
 12278 			  IN_param_value = function_call_param_iterator.next();
       
 12279 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12280 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12281 			
       
 12282 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12283 			{
       
 12284 		
       
 12285 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12286 				return return_type_symbol;
       
 12287 				
       
 12288 			}
       
 12289 			
       
 12290 			ERROR;
       
 12291 		}
       
 12292 		
       
 12293 	}/*function_bool_to_dword*/
       
 12294 	break;
       
 12295 
       
 12296 /****
       
 12297  *BOOL_TO_DT
       
 12298  */
       
 12299 	case function_bool_to_dt :
       
 12300 	{
       
 12301 		symbol_c *last_type_symbol = NULL;
       
 12302 
       
 12303 		{
       
 12304 			identifier_c param_name("IN");
       
 12305 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12306 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12307 			
       
 12308 			/* Get the value from a foo(<param_value>) style call */
       
 12309 			if (IN_param_value == NULL)
       
 12310 			  IN_param_value = function_call_param_iterator.next();
       
 12311 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12312 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12313 			
       
 12314 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12315 			{
       
 12316 		
       
 12317 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12318 				return return_type_symbol;
       
 12319 				
       
 12320 			}
       
 12321 			
       
 12322 			ERROR;
       
 12323 		}
       
 12324 		
       
 12325 	}/*function_bool_to_dt*/
       
 12326 	break;
       
 12327 
       
 12328 /****
       
 12329  *BOOL_TO_TOD
       
 12330  */
       
 12331 	case function_bool_to_tod :
       
 12332 	{
       
 12333 		symbol_c *last_type_symbol = NULL;
       
 12334 
       
 12335 		{
       
 12336 			identifier_c param_name("IN");
       
 12337 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12338 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12339 			
       
 12340 			/* Get the value from a foo(<param_value>) style call */
       
 12341 			if (IN_param_value == NULL)
       
 12342 			  IN_param_value = function_call_param_iterator.next();
       
 12343 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12344 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12345 			
       
 12346 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12347 			{
       
 12348 		
       
 12349 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12350 				return return_type_symbol;
       
 12351 				
       
 12352 			}
       
 12353 			
       
 12354 			ERROR;
       
 12355 		}
       
 12356 		
       
 12357 	}/*function_bool_to_tod*/
       
 12358 	break;
       
 12359 
       
 12360 /****
       
 12361  *BOOL_TO_UDINT
       
 12362  */
       
 12363 	case function_bool_to_udint :
       
 12364 	{
       
 12365 		symbol_c *last_type_symbol = NULL;
       
 12366 
       
 12367 		{
       
 12368 			identifier_c param_name("IN");
       
 12369 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12370 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12371 			
       
 12372 			/* Get the value from a foo(<param_value>) style call */
       
 12373 			if (IN_param_value == NULL)
       
 12374 			  IN_param_value = function_call_param_iterator.next();
       
 12375 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12376 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12377 			
       
 12378 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12379 			{
       
 12380 		
       
 12381 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12382 				return return_type_symbol;
       
 12383 				
       
 12384 			}
       
 12385 			
       
 12386 			ERROR;
       
 12387 		}
       
 12388 		
       
 12389 	}/*function_bool_to_udint*/
       
 12390 	break;
       
 12391 
       
 12392 /****
       
 12393  *BOOL_TO_WORD
       
 12394  */
       
 12395 	case function_bool_to_word :
       
 12396 	{
       
 12397 		symbol_c *last_type_symbol = NULL;
       
 12398 
       
 12399 		{
       
 12400 			identifier_c param_name("IN");
       
 12401 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12402 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12403 			
       
 12404 			/* Get the value from a foo(<param_value>) style call */
       
 12405 			if (IN_param_value == NULL)
       
 12406 			  IN_param_value = function_call_param_iterator.next();
       
 12407 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12408 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12409 			
       
 12410 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12411 			{
       
 12412 		
       
 12413 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12414 				return return_type_symbol;
       
 12415 				
       
 12416 			}
       
 12417 			
       
 12418 			ERROR;
       
 12419 		}
       
 12420 		
       
 12421 	}/*function_bool_to_word*/
       
 12422 	break;
       
 12423 
       
 12424 /****
       
 12425  *BOOL_TO_WSTRING
       
 12426  */
       
 12427 	case function_bool_to_wstring :
       
 12428 	{
       
 12429 		symbol_c *last_type_symbol = NULL;
       
 12430 
       
 12431 		{
       
 12432 			identifier_c param_name("IN");
       
 12433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12435 			
       
 12436 			/* Get the value from a foo(<param_value>) style call */
       
 12437 			if (IN_param_value == NULL)
       
 12438 			  IN_param_value = function_call_param_iterator.next();
       
 12439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12441 			
       
 12442 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12443 			{
       
 12444 		
       
 12445 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12446 				return return_type_symbol;
       
 12447 				
       
 12448 			}
       
 12449 			
       
 12450 			ERROR;
       
 12451 		}
       
 12452 		
       
 12453 	}/*function_bool_to_wstring*/
       
 12454 	break;
       
 12455 
       
 12456 /****
       
 12457  *BOOL_TO_STRING
       
 12458  */
       
 12459 	case function_bool_to_string :
       
 12460 	{
       
 12461 		symbol_c *last_type_symbol = NULL;
       
 12462 
       
 12463 		{
       
 12464 			identifier_c param_name("IN");
       
 12465 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12466 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12467 			
       
 12468 			/* Get the value from a foo(<param_value>) style call */
       
 12469 			if (IN_param_value == NULL)
       
 12470 			  IN_param_value = function_call_param_iterator.next();
       
 12471 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12472 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12473 			
       
 12474 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12475 			{
       
 12476 		
       
 12477 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12478 				return return_type_symbol;
       
 12479 				
       
 12480 			}
       
 12481 			
       
 12482 			ERROR;
       
 12483 		}
       
 12484 		
       
 12485 	}/*function_bool_to_string*/
       
 12486 	break;
       
 12487 
       
 12488 /****
       
 12489  *BOOL_TO_LWORD
       
 12490  */
       
 12491 	case function_bool_to_lword :
       
 12492 	{
       
 12493 		symbol_c *last_type_symbol = NULL;
       
 12494 
       
 12495 		{
       
 12496 			identifier_c param_name("IN");
       
 12497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12499 			
       
 12500 			/* Get the value from a foo(<param_value>) style call */
       
 12501 			if (IN_param_value == NULL)
       
 12502 			  IN_param_value = function_call_param_iterator.next();
       
 12503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12505 			
       
 12506 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12507 			{
       
 12508 		
       
 12509 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12510 				return return_type_symbol;
       
 12511 				
       
 12512 			}
       
 12513 			
       
 12514 			ERROR;
       
 12515 		}
       
 12516 		
       
 12517 	}/*function_bool_to_lword*/
       
 12518 	break;
       
 12519 
       
 12520 /****
       
 12521  *BOOL_TO_UINT
       
 12522  */
       
 12523 	case function_bool_to_uint :
       
 12524 	{
       
 12525 		symbol_c *last_type_symbol = NULL;
       
 12526 
       
 12527 		{
       
 12528 			identifier_c param_name("IN");
       
 12529 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12530 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12531 			
       
 12532 			/* Get the value from a foo(<param_value>) style call */
       
 12533 			if (IN_param_value == NULL)
       
 12534 			  IN_param_value = function_call_param_iterator.next();
       
 12535 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12536 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12537 			
       
 12538 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12539 			{
       
 12540 		
       
 12541 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12542 				return return_type_symbol;
       
 12543 				
       
 12544 			}
       
 12545 			
       
 12546 			ERROR;
       
 12547 		}
       
 12548 		
       
 12549 	}/*function_bool_to_uint*/
       
 12550 	break;
       
 12551 
       
 12552 /****
       
 12553  *BOOL_TO_LREAL
       
 12554  */
       
 12555 	case function_bool_to_lreal :
       
 12556 	{
       
 12557 		symbol_c *last_type_symbol = NULL;
       
 12558 
       
 12559 		{
       
 12560 			identifier_c param_name("IN");
       
 12561 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12562 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12563 			
       
 12564 			/* Get the value from a foo(<param_value>) style call */
       
 12565 			if (IN_param_value == NULL)
       
 12566 			  IN_param_value = function_call_param_iterator.next();
       
 12567 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12568 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12569 			
       
 12570 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12571 			{
       
 12572 		
       
 12573 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12574 				return return_type_symbol;
       
 12575 				
       
 12576 			}
       
 12577 			
       
 12578 			ERROR;
       
 12579 		}
       
 12580 		
       
 12581 	}/*function_bool_to_lreal*/
       
 12582 	break;
       
 12583 
       
 12584 /****
       
 12585  *BOOL_TO_BYTE
       
 12586  */
       
 12587 	case function_bool_to_byte :
       
 12588 	{
       
 12589 		symbol_c *last_type_symbol = NULL;
       
 12590 
       
 12591 		{
       
 12592 			identifier_c param_name("IN");
       
 12593 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12594 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12595 			
       
 12596 			/* Get the value from a foo(<param_value>) style call */
       
 12597 			if (IN_param_value == NULL)
       
 12598 			  IN_param_value = function_call_param_iterator.next();
       
 12599 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12600 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12601 			
       
 12602 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12603 			{
       
 12604 		
       
 12605 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12606 				return return_type_symbol;
       
 12607 				
       
 12608 			}
       
 12609 			
       
 12610 			ERROR;
       
 12611 		}
       
 12612 		
       
 12613 	}/*function_bool_to_byte*/
       
 12614 	break;
       
 12615 
       
 12616 /****
       
 12617  *BOOL_TO_USINT
       
 12618  */
       
 12619 	case function_bool_to_usint :
       
 12620 	{
       
 12621 		symbol_c *last_type_symbol = NULL;
       
 12622 
       
 12623 		{
       
 12624 			identifier_c param_name("IN");
       
 12625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12626 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12627 			
       
 12628 			/* Get the value from a foo(<param_value>) style call */
       
 12629 			if (IN_param_value == NULL)
       
 12630 			  IN_param_value = function_call_param_iterator.next();
       
 12631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12632 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12633 			
       
 12634 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12635 			{
       
 12636 		
       
 12637 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12638 				return return_type_symbol;
       
 12639 				
       
 12640 			}
       
 12641 			
       
 12642 			ERROR;
       
 12643 		}
       
 12644 		
       
 12645 	}/*function_bool_to_usint*/
       
 12646 	break;
       
 12647 
       
 12648 /****
       
 12649  *BOOL_TO_ULINT
       
 12650  */
       
 12651 	case function_bool_to_ulint :
       
 12652 	{
       
 12653 		symbol_c *last_type_symbol = NULL;
       
 12654 
       
 12655 		{
       
 12656 			identifier_c param_name("IN");
       
 12657 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12658 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12659 			
       
 12660 			/* Get the value from a foo(<param_value>) style call */
       
 12661 			if (IN_param_value == NULL)
       
 12662 			  IN_param_value = function_call_param_iterator.next();
       
 12663 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12664 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12665 			
       
 12666 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12667 			{
       
 12668 		
       
 12669 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12670 				return return_type_symbol;
       
 12671 				
       
 12672 			}
       
 12673 			
       
 12674 			ERROR;
       
 12675 		}
       
 12676 		
       
 12677 	}/*function_bool_to_ulint*/
       
 12678 	break;
       
 12679 
       
 12680 /****
       
 12681  *BOOL_TO_BOOL
       
 12682  */
       
 12683 	case function_bool_to_bool :
       
 12684 	{
       
 12685 		symbol_c *last_type_symbol = NULL;
       
 12686 
       
 12687 		{
       
 12688 			identifier_c param_name("IN");
       
 12689 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12690 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12691 			
       
 12692 			/* Get the value from a foo(<param_value>) style call */
       
 12693 			if (IN_param_value == NULL)
       
 12694 			  IN_param_value = function_call_param_iterator.next();
       
 12695 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12696 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12697 			
       
 12698 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12699 			{
       
 12700 		
       
 12701 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12702 				return return_type_symbol;
       
 12703 				
       
 12704 			}
       
 12705 			
       
 12706 			ERROR;
       
 12707 		}
       
 12708 		
       
 12709 	}/*function_bool_to_bool*/
       
 12710 	break;
       
 12711 
       
 12712 /****
       
 12713  *BOOL_TO_TIME
       
 12714  */
       
 12715 	case function_bool_to_time :
       
 12716 	{
       
 12717 		symbol_c *last_type_symbol = NULL;
       
 12718 
       
 12719 		{
       
 12720 			identifier_c param_name("IN");
       
 12721 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12722 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12723 			
       
 12724 			/* Get the value from a foo(<param_value>) style call */
       
 12725 			if (IN_param_value == NULL)
       
 12726 			  IN_param_value = function_call_param_iterator.next();
       
 12727 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12728 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12729 			
       
 12730 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12731 			{
       
 12732 		
       
 12733 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12734 				return return_type_symbol;
       
 12735 				
       
 12736 			}
       
 12737 			
       
 12738 			ERROR;
       
 12739 		}
       
 12740 		
       
 12741 	}/*function_bool_to_time*/
       
 12742 	break;
       
 12743 
       
 12744 /****
       
 12745  *BOOL_TO_INT
       
 12746  */
       
 12747 	case function_bool_to_int :
       
 12748 	{
       
 12749 		symbol_c *last_type_symbol = NULL;
       
 12750 
       
 12751 		{
       
 12752 			identifier_c param_name("IN");
       
 12753 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12754 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12755 			
       
 12756 			/* Get the value from a foo(<param_value>) style call */
       
 12757 			if (IN_param_value == NULL)
       
 12758 			  IN_param_value = function_call_param_iterator.next();
       
 12759 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12760 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12761 			
       
 12762 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 12763 			{
       
 12764 		
       
 12765 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12766 				return return_type_symbol;
       
 12767 				
       
 12768 			}
       
 12769 			
       
 12770 			ERROR;
       
 12771 		}
       
 12772 		
       
 12773 	}/*function_bool_to_int*/
       
 12774 	break;
       
 12775 
       
 12776 /****
       
 12777  *TIME_TO_REAL
       
 12778  */
       
 12779 	case function_time_to_real :
       
 12780 	{
       
 12781 		symbol_c *last_type_symbol = NULL;
       
 12782 
       
 12783 		{
       
 12784 			identifier_c param_name("IN");
       
 12785 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12786 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12787 			
       
 12788 			/* Get the value from a foo(<param_value>) style call */
       
 12789 			if (IN_param_value == NULL)
       
 12790 			  IN_param_value = function_call_param_iterator.next();
       
 12791 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12792 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12793 			
       
 12794 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12795 			{
       
 12796 		
       
 12797 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12798 				return return_type_symbol;
       
 12799 				
       
 12800 			}
       
 12801 			
       
 12802 			ERROR;
       
 12803 		}
       
 12804 		
       
 12805 	}/*function_time_to_real*/
       
 12806 	break;
       
 12807 
       
 12808 /****
       
 12809  *TIME_TO_SINT
       
 12810  */
       
 12811 	case function_time_to_sint :
       
 12812 	{
       
 12813 		symbol_c *last_type_symbol = NULL;
       
 12814 
       
 12815 		{
       
 12816 			identifier_c param_name("IN");
       
 12817 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12818 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12819 			
       
 12820 			/* Get the value from a foo(<param_value>) style call */
       
 12821 			if (IN_param_value == NULL)
       
 12822 			  IN_param_value = function_call_param_iterator.next();
       
 12823 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12824 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12825 			
       
 12826 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12827 			{
       
 12828 		
       
 12829 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12830 				return return_type_symbol;
       
 12831 				
       
 12832 			}
       
 12833 			
       
 12834 			ERROR;
       
 12835 		}
       
 12836 		
       
 12837 	}/*function_time_to_sint*/
       
 12838 	break;
       
 12839 
       
 12840 /****
       
 12841  *TIME_TO_LINT
       
 12842  */
       
 12843 	case function_time_to_lint :
       
 12844 	{
       
 12845 		symbol_c *last_type_symbol = NULL;
       
 12846 
       
 12847 		{
       
 12848 			identifier_c param_name("IN");
       
 12849 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12850 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12851 			
       
 12852 			/* Get the value from a foo(<param_value>) style call */
       
 12853 			if (IN_param_value == NULL)
       
 12854 			  IN_param_value = function_call_param_iterator.next();
       
 12855 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12856 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12857 			
       
 12858 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12859 			{
       
 12860 		
       
 12861 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12862 				return return_type_symbol;
       
 12863 				
       
 12864 			}
       
 12865 			
       
 12866 			ERROR;
       
 12867 		}
       
 12868 		
       
 12869 	}/*function_time_to_lint*/
       
 12870 	break;
       
 12871 
       
 12872 /****
       
 12873  *TIME_TO_DINT
       
 12874  */
       
 12875 	case function_time_to_dint :
       
 12876 	{
       
 12877 		symbol_c *last_type_symbol = NULL;
       
 12878 
       
 12879 		{
       
 12880 			identifier_c param_name("IN");
       
 12881 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12882 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12883 			
       
 12884 			/* Get the value from a foo(<param_value>) style call */
       
 12885 			if (IN_param_value == NULL)
       
 12886 			  IN_param_value = function_call_param_iterator.next();
       
 12887 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12888 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12889 			
       
 12890 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12891 			{
       
 12892 		
       
 12893 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12894 				return return_type_symbol;
       
 12895 				
       
 12896 			}
       
 12897 			
       
 12898 			ERROR;
       
 12899 		}
       
 12900 		
       
 12901 	}/*function_time_to_dint*/
       
 12902 	break;
       
 12903 
       
 12904 /****
       
 12905  *TIME_TO_DATE
       
 12906  */
       
 12907 	case function_time_to_date :
       
 12908 	{
       
 12909 		symbol_c *last_type_symbol = NULL;
       
 12910 
       
 12911 		{
       
 12912 			identifier_c param_name("IN");
       
 12913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12914 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12915 			
       
 12916 			/* Get the value from a foo(<param_value>) style call */
       
 12917 			if (IN_param_value == NULL)
       
 12918 			  IN_param_value = function_call_param_iterator.next();
       
 12919 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12920 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12921 			
       
 12922 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12923 			{
       
 12924 		
       
 12925 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12926 				return return_type_symbol;
       
 12927 				
       
 12928 			}
       
 12929 			
       
 12930 			ERROR;
       
 12931 		}
       
 12932 		
       
 12933 	}/*function_time_to_date*/
       
 12934 	break;
       
 12935 
       
 12936 /****
       
 12937  *TIME_TO_DWORD
       
 12938  */
       
 12939 	case function_time_to_dword :
       
 12940 	{
       
 12941 		symbol_c *last_type_symbol = NULL;
       
 12942 
       
 12943 		{
       
 12944 			identifier_c param_name("IN");
       
 12945 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12946 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12947 			
       
 12948 			/* Get the value from a foo(<param_value>) style call */
       
 12949 			if (IN_param_value == NULL)
       
 12950 			  IN_param_value = function_call_param_iterator.next();
       
 12951 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12952 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12953 			
       
 12954 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12955 			{
       
 12956 		
       
 12957 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12958 				return return_type_symbol;
       
 12959 				
       
 12960 			}
       
 12961 			
       
 12962 			ERROR;
       
 12963 		}
       
 12964 		
       
 12965 	}/*function_time_to_dword*/
       
 12966 	break;
       
 12967 
       
 12968 /****
       
 12969  *TIME_TO_DT
       
 12970  */
       
 12971 	case function_time_to_dt :
       
 12972 	{
       
 12973 		symbol_c *last_type_symbol = NULL;
       
 12974 
       
 12975 		{
       
 12976 			identifier_c param_name("IN");
       
 12977 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12978 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12979 			
       
 12980 			/* Get the value from a foo(<param_value>) style call */
       
 12981 			if (IN_param_value == NULL)
       
 12982 			  IN_param_value = function_call_param_iterator.next();
       
 12983 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12984 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12985 			
       
 12986 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 12987 			{
       
 12988 		
       
 12989 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12990 				return return_type_symbol;
       
 12991 				
       
 12992 			}
       
 12993 			
       
 12994 			ERROR;
       
 12995 		}
       
 12996 		
       
 12997 	}/*function_time_to_dt*/
       
 12998 	break;
       
 12999 
       
 13000 /****
       
 13001  *TIME_TO_TOD
       
 13002  */
       
 13003 	case function_time_to_tod :
       
 13004 	{
       
 13005 		symbol_c *last_type_symbol = NULL;
       
 13006 
       
 13007 		{
       
 13008 			identifier_c param_name("IN");
       
 13009 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13010 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13011 			
       
 13012 			/* Get the value from a foo(<param_value>) style call */
       
 13013 			if (IN_param_value == NULL)
       
 13014 			  IN_param_value = function_call_param_iterator.next();
       
 13015 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13016 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13017 			
       
 13018 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13019 			{
       
 13020 		
       
 13021 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13022 				return return_type_symbol;
       
 13023 				
       
 13024 			}
       
 13025 			
       
 13026 			ERROR;
       
 13027 		}
       
 13028 		
       
 13029 	}/*function_time_to_tod*/
       
 13030 	break;
       
 13031 
       
 13032 /****
       
 13033  *TIME_TO_UDINT
       
 13034  */
       
 13035 	case function_time_to_udint :
       
 13036 	{
       
 13037 		symbol_c *last_type_symbol = NULL;
       
 13038 
       
 13039 		{
       
 13040 			identifier_c param_name("IN");
       
 13041 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13042 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13043 			
       
 13044 			/* Get the value from a foo(<param_value>) style call */
       
 13045 			if (IN_param_value == NULL)
       
 13046 			  IN_param_value = function_call_param_iterator.next();
       
 13047 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13048 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13049 			
       
 13050 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13051 			{
       
 13052 		
       
 13053 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13054 				return return_type_symbol;
       
 13055 				
       
 13056 			}
       
 13057 			
       
 13058 			ERROR;
       
 13059 		}
       
 13060 		
       
 13061 	}/*function_time_to_udint*/
       
 13062 	break;
       
 13063 
       
 13064 /****
       
 13065  *TIME_TO_WORD
       
 13066  */
       
 13067 	case function_time_to_word :
       
 13068 	{
       
 13069 		symbol_c *last_type_symbol = NULL;
       
 13070 
       
 13071 		{
       
 13072 			identifier_c param_name("IN");
       
 13073 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13074 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13075 			
       
 13076 			/* Get the value from a foo(<param_value>) style call */
       
 13077 			if (IN_param_value == NULL)
       
 13078 			  IN_param_value = function_call_param_iterator.next();
       
 13079 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13080 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13081 			
       
 13082 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13083 			{
       
 13084 		
       
 13085 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13086 				return return_type_symbol;
       
 13087 				
       
 13088 			}
       
 13089 			
       
 13090 			ERROR;
       
 13091 		}
       
 13092 		
       
 13093 	}/*function_time_to_word*/
       
 13094 	break;
       
 13095 
       
 13096 /****
       
 13097  *TIME_TO_WSTRING
       
 13098  */
       
 13099 	case function_time_to_wstring :
       
 13100 	{
       
 13101 		symbol_c *last_type_symbol = NULL;
       
 13102 
       
 13103 		{
       
 13104 			identifier_c param_name("IN");
       
 13105 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13106 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13107 			
       
 13108 			/* Get the value from a foo(<param_value>) style call */
       
 13109 			if (IN_param_value == NULL)
       
 13110 			  IN_param_value = function_call_param_iterator.next();
       
 13111 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13112 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13113 			
       
 13114 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13115 			{
       
 13116 		
       
 13117 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 13118 				return return_type_symbol;
       
 13119 				
       
 13120 			}
       
 13121 			
       
 13122 			ERROR;
       
 13123 		}
       
 13124 		
       
 13125 	}/*function_time_to_wstring*/
       
 13126 	break;
       
 13127 
       
 13128 /****
       
 13129  *TIME_TO_STRING
       
 13130  */
       
 13131 	case function_time_to_string :
       
 13132 	{
       
 13133 		symbol_c *last_type_symbol = NULL;
       
 13134 
       
 13135 		{
       
 13136 			identifier_c param_name("IN");
       
 13137 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13138 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13139 			
       
 13140 			/* Get the value from a foo(<param_value>) style call */
       
 13141 			if (IN_param_value == NULL)
       
 13142 			  IN_param_value = function_call_param_iterator.next();
       
 13143 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13144 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13145 			
       
 13146 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13147 			{
       
 13148 		
       
 13149 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13150 				return return_type_symbol;
       
 13151 				
       
 13152 			}
       
 13153 			
       
 13154 			ERROR;
       
 13155 		}
       
 13156 		
       
 13157 	}/*function_time_to_string*/
       
 13158 	break;
       
 13159 
       
 13160 /****
       
 13161  *TIME_TO_LWORD
       
 13162  */
       
 13163 	case function_time_to_lword :
       
 13164 	{
       
 13165 		symbol_c *last_type_symbol = NULL;
       
 13166 
       
 13167 		{
       
 13168 			identifier_c param_name("IN");
       
 13169 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13170 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13171 			
       
 13172 			/* Get the value from a foo(<param_value>) style call */
       
 13173 			if (IN_param_value == NULL)
       
 13174 			  IN_param_value = function_call_param_iterator.next();
       
 13175 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13176 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13177 			
       
 13178 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13179 			{
       
 13180 		
       
 13181 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13182 				return return_type_symbol;
       
 13183 				
       
 13184 			}
       
 13185 			
       
 13186 			ERROR;
       
 13187 		}
       
 13188 		
       
 13189 	}/*function_time_to_lword*/
       
 13190 	break;
       
 13191 
       
 13192 /****
       
 13193  *TIME_TO_UINT
       
 13194  */
       
 13195 	case function_time_to_uint :
       
 13196 	{
       
 13197 		symbol_c *last_type_symbol = NULL;
       
 13198 
       
 13199 		{
       
 13200 			identifier_c param_name("IN");
       
 13201 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13202 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13203 			
       
 13204 			/* Get the value from a foo(<param_value>) style call */
       
 13205 			if (IN_param_value == NULL)
       
 13206 			  IN_param_value = function_call_param_iterator.next();
       
 13207 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13208 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13209 			
       
 13210 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13211 			{
       
 13212 		
       
 13213 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13214 				return return_type_symbol;
       
 13215 				
       
 13216 			}
       
 13217 			
       
 13218 			ERROR;
       
 13219 		}
       
 13220 		
       
 13221 	}/*function_time_to_uint*/
       
 13222 	break;
       
 13223 
       
 13224 /****
       
 13225  *TIME_TO_LREAL
       
 13226  */
       
 13227 	case function_time_to_lreal :
       
 13228 	{
       
 13229 		symbol_c *last_type_symbol = NULL;
       
 13230 
       
 13231 		{
       
 13232 			identifier_c param_name("IN");
       
 13233 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13234 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13235 			
       
 13236 			/* Get the value from a foo(<param_value>) style call */
       
 13237 			if (IN_param_value == NULL)
       
 13238 			  IN_param_value = function_call_param_iterator.next();
       
 13239 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13240 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13241 			
       
 13242 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13243 			{
       
 13244 		
       
 13245 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13246 				return return_type_symbol;
       
 13247 				
       
 13248 			}
       
 13249 			
       
 13250 			ERROR;
       
 13251 		}
       
 13252 		
       
 13253 	}/*function_time_to_lreal*/
       
 13254 	break;
       
 13255 
       
 13256 /****
       
 13257  *TIME_TO_BYTE
       
 13258  */
       
 13259 	case function_time_to_byte :
       
 13260 	{
       
 13261 		symbol_c *last_type_symbol = NULL;
       
 13262 
       
 13263 		{
       
 13264 			identifier_c param_name("IN");
       
 13265 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13266 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13267 			
       
 13268 			/* Get the value from a foo(<param_value>) style call */
       
 13269 			if (IN_param_value == NULL)
       
 13270 			  IN_param_value = function_call_param_iterator.next();
       
 13271 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13272 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13273 			
       
 13274 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13275 			{
       
 13276 		
       
 13277 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13278 				return return_type_symbol;
       
 13279 				
       
 13280 			}
       
 13281 			
       
 13282 			ERROR;
       
 13283 		}
       
 13284 		
       
 13285 	}/*function_time_to_byte*/
       
 13286 	break;
       
 13287 
       
 13288 /****
       
 13289  *TIME_TO_USINT
       
 13290  */
       
 13291 	case function_time_to_usint :
       
 13292 	{
       
 13293 		symbol_c *last_type_symbol = NULL;
       
 13294 
       
 13295 		{
       
 13296 			identifier_c param_name("IN");
       
 13297 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13298 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13299 			
       
 13300 			/* Get the value from a foo(<param_value>) style call */
       
 13301 			if (IN_param_value == NULL)
       
 13302 			  IN_param_value = function_call_param_iterator.next();
       
 13303 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13304 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13305 			
       
 13306 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13307 			{
       
 13308 		
       
 13309 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13310 				return return_type_symbol;
       
 13311 				
       
 13312 			}
       
 13313 			
       
 13314 			ERROR;
       
 13315 		}
       
 13316 		
       
 13317 	}/*function_time_to_usint*/
       
 13318 	break;
       
 13319 
       
 13320 /****
       
 13321  *TIME_TO_ULINT
       
 13322  */
       
 13323 	case function_time_to_ulint :
       
 13324 	{
       
 13325 		symbol_c *last_type_symbol = NULL;
       
 13326 
       
 13327 		{
       
 13328 			identifier_c param_name("IN");
       
 13329 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13330 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13331 			
       
 13332 			/* Get the value from a foo(<param_value>) style call */
       
 13333 			if (IN_param_value == NULL)
       
 13334 			  IN_param_value = function_call_param_iterator.next();
       
 13335 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13336 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13337 			
       
 13338 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13339 			{
       
 13340 		
       
 13341 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13342 				return return_type_symbol;
       
 13343 				
       
 13344 			}
       
 13345 			
       
 13346 			ERROR;
       
 13347 		}
       
 13348 		
       
 13349 	}/*function_time_to_ulint*/
       
 13350 	break;
       
 13351 
       
 13352 /****
       
 13353  *TIME_TO_BOOL
       
 13354  */
       
 13355 	case function_time_to_bool :
       
 13356 	{
       
 13357 		symbol_c *last_type_symbol = NULL;
       
 13358 
       
 13359 		{
       
 13360 			identifier_c param_name("IN");
       
 13361 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13362 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13363 			
       
 13364 			/* Get the value from a foo(<param_value>) style call */
       
 13365 			if (IN_param_value == NULL)
       
 13366 			  IN_param_value = function_call_param_iterator.next();
       
 13367 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13368 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13369 			
       
 13370 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13371 			{
       
 13372 		
       
 13373 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13374 				return return_type_symbol;
       
 13375 				
       
 13376 			}
       
 13377 			
       
 13378 			ERROR;
       
 13379 		}
       
 13380 		
       
 13381 	}/*function_time_to_bool*/
       
 13382 	break;
       
 13383 
       
 13384 /****
       
 13385  *TIME_TO_TIME
       
 13386  */
       
 13387 	case function_time_to_time :
       
 13388 	{
       
 13389 		symbol_c *last_type_symbol = NULL;
       
 13390 
       
 13391 		{
       
 13392 			identifier_c param_name("IN");
       
 13393 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13394 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13395 			
       
 13396 			/* Get the value from a foo(<param_value>) style call */
       
 13397 			if (IN_param_value == NULL)
       
 13398 			  IN_param_value = function_call_param_iterator.next();
       
 13399 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13400 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13401 			
       
 13402 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13403 			{
       
 13404 		
       
 13405 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13406 				return return_type_symbol;
       
 13407 				
       
 13408 			}
       
 13409 			
       
 13410 			ERROR;
       
 13411 		}
       
 13412 		
       
 13413 	}/*function_time_to_time*/
       
 13414 	break;
       
 13415 
       
 13416 /****
       
 13417  *TIME_TO_INT
       
 13418  */
       
 13419 	case function_time_to_int :
       
 13420 	{
       
 13421 		symbol_c *last_type_symbol = NULL;
       
 13422 
       
 13423 		{
       
 13424 			identifier_c param_name("IN");
       
 13425 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13426 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13427 			
       
 13428 			/* Get the value from a foo(<param_value>) style call */
       
 13429 			if (IN_param_value == NULL)
       
 13430 			  IN_param_value = function_call_param_iterator.next();
       
 13431 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13432 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13433 			
       
 13434 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 13435 			{
       
 13436 		
       
 13437 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13438 				return return_type_symbol;
       
 13439 				
       
 13440 			}
       
 13441 			
       
 13442 			ERROR;
       
 13443 		}
       
 13444 		
       
 13445 	}/*function_time_to_int*/
       
 13446 	break;
       
 13447 
       
 13448 /****
       
 13449  *INT_TO_REAL
       
 13450  */
       
 13451 	case function_int_to_real :
       
 13452 	{
       
 13453 		symbol_c *last_type_symbol = NULL;
       
 13454 
       
 13455 		{
       
 13456 			identifier_c param_name("IN");
       
 13457 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13458 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13459 			
       
 13460 			/* Get the value from a foo(<param_value>) style call */
       
 13461 			if (IN_param_value == NULL)
       
 13462 			  IN_param_value = function_call_param_iterator.next();
       
 13463 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13464 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13465 			
       
 13466 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13467 			{
       
 13468 		
       
 13469 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 13470 				return return_type_symbol;
       
 13471 				
       
 13472 			}
       
 13473 			
       
 13474 			ERROR;
       
 13475 		}
       
 13476 		
       
 13477 	}/*function_int_to_real*/
       
 13478 	break;
       
 13479 
       
 13480 /****
       
 13481  *INT_TO_SINT
       
 13482  */
       
 13483 	case function_int_to_sint :
       
 13484 	{
       
 13485 		symbol_c *last_type_symbol = NULL;
       
 13486 
       
 13487 		{
       
 13488 			identifier_c param_name("IN");
       
 13489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13490 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13491 			
       
 13492 			/* Get the value from a foo(<param_value>) style call */
       
 13493 			if (IN_param_value == NULL)
       
 13494 			  IN_param_value = function_call_param_iterator.next();
       
 13495 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13496 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13497 			
       
 13498 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13499 			{
       
 13500 		
       
 13501 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13502 				return return_type_symbol;
       
 13503 				
       
 13504 			}
       
 13505 			
       
 13506 			ERROR;
       
 13507 		}
       
 13508 		
       
 13509 	}/*function_int_to_sint*/
       
 13510 	break;
       
 13511 
       
 13512 /****
       
 13513  *INT_TO_LINT
       
 13514  */
       
 13515 	case function_int_to_lint :
       
 13516 	{
       
 13517 		symbol_c *last_type_symbol = NULL;
       
 13518 
       
 13519 		{
       
 13520 			identifier_c param_name("IN");
       
 13521 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13522 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13523 			
       
 13524 			/* Get the value from a foo(<param_value>) style call */
       
 13525 			if (IN_param_value == NULL)
       
 13526 			  IN_param_value = function_call_param_iterator.next();
       
 13527 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13528 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13529 			
       
 13530 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13531 			{
       
 13532 		
       
 13533 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13534 				return return_type_symbol;
       
 13535 				
       
 13536 			}
       
 13537 			
       
 13538 			ERROR;
       
 13539 		}
       
 13540 		
       
 13541 	}/*function_int_to_lint*/
       
 13542 	break;
       
 13543 
       
 13544 /****
       
 13545  *INT_TO_DINT
       
 13546  */
       
 13547 	case function_int_to_dint :
       
 13548 	{
       
 13549 		symbol_c *last_type_symbol = NULL;
       
 13550 
       
 13551 		{
       
 13552 			identifier_c param_name("IN");
       
 13553 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13554 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13555 			
       
 13556 			/* Get the value from a foo(<param_value>) style call */
       
 13557 			if (IN_param_value == NULL)
       
 13558 			  IN_param_value = function_call_param_iterator.next();
       
 13559 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13560 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13561 			
       
 13562 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13563 			{
       
 13564 		
       
 13565 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13566 				return return_type_symbol;
       
 13567 				
       
 13568 			}
       
 13569 			
       
 13570 			ERROR;
       
 13571 		}
       
 13572 		
       
 13573 	}/*function_int_to_dint*/
       
 13574 	break;
       
 13575 
       
 13576 /****
       
 13577  *INT_TO_DATE
       
 13578  */
       
 13579 	case function_int_to_date :
       
 13580 	{
       
 13581 		symbol_c *last_type_symbol = NULL;
       
 13582 
       
 13583 		{
       
 13584 			identifier_c param_name("IN");
       
 13585 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13586 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13587 			
       
 13588 			/* Get the value from a foo(<param_value>) style call */
       
 13589 			if (IN_param_value == NULL)
       
 13590 			  IN_param_value = function_call_param_iterator.next();
       
 13591 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13592 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13593 			
       
 13594 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13595 			{
       
 13596 		
       
 13597 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13598 				return return_type_symbol;
       
 13599 				
       
 13600 			}
       
 13601 			
       
 13602 			ERROR;
       
 13603 		}
       
 13604 		
       
 13605 	}/*function_int_to_date*/
       
 13606 	break;
       
 13607 
       
 13608 /****
       
 13609  *INT_TO_DWORD
       
 13610  */
       
 13611 	case function_int_to_dword :
       
 13612 	{
       
 13613 		symbol_c *last_type_symbol = NULL;
       
 13614 
       
 13615 		{
       
 13616 			identifier_c param_name("IN");
       
 13617 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13618 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13619 			
       
 13620 			/* Get the value from a foo(<param_value>) style call */
       
 13621 			if (IN_param_value == NULL)
       
 13622 			  IN_param_value = function_call_param_iterator.next();
       
 13623 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13624 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13625 			
       
 13626 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13627 			{
       
 13628 		
       
 13629 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13630 				return return_type_symbol;
       
 13631 				
       
 13632 			}
       
 13633 			
       
 13634 			ERROR;
       
 13635 		}
       
 13636 		
       
 13637 	}/*function_int_to_dword*/
       
 13638 	break;
       
 13639 
       
 13640 /****
       
 13641  *INT_TO_DT
       
 13642  */
       
 13643 	case function_int_to_dt :
       
 13644 	{
       
 13645 		symbol_c *last_type_symbol = NULL;
       
 13646 
       
 13647 		{
       
 13648 			identifier_c param_name("IN");
       
 13649 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13650 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13651 			
       
 13652 			/* Get the value from a foo(<param_value>) style call */
       
 13653 			if (IN_param_value == NULL)
       
 13654 			  IN_param_value = function_call_param_iterator.next();
       
 13655 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13656 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13657 			
       
 13658 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13659 			{
       
 13660 		
       
 13661 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13662 				return return_type_symbol;
       
 13663 				
       
 13664 			}
       
 13665 			
       
 13666 			ERROR;
       
 13667 		}
       
 13668 		
       
 13669 	}/*function_int_to_dt*/
       
 13670 	break;
       
 13671 
       
 13672 /****
       
 13673  *INT_TO_TOD
       
 13674  */
       
 13675 	case function_int_to_tod :
       
 13676 	{
       
 13677 		symbol_c *last_type_symbol = NULL;
       
 13678 
       
 13679 		{
       
 13680 			identifier_c param_name("IN");
       
 13681 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13682 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13683 			
       
 13684 			/* Get the value from a foo(<param_value>) style call */
       
 13685 			if (IN_param_value == NULL)
       
 13686 			  IN_param_value = function_call_param_iterator.next();
       
 13687 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13688 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13689 			
       
 13690 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13691 			{
       
 13692 		
       
 13693 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13694 				return return_type_symbol;
       
 13695 				
       
 13696 			}
       
 13697 			
       
 13698 			ERROR;
       
 13699 		}
       
 13700 		
       
 13701 	}/*function_int_to_tod*/
       
 13702 	break;
       
 13703 
       
 13704 /****
       
 13705  *INT_TO_UDINT
       
 13706  */
       
 13707 	case function_int_to_udint :
       
 13708 	{
       
 13709 		symbol_c *last_type_symbol = NULL;
       
 13710 
       
 13711 		{
       
 13712 			identifier_c param_name("IN");
       
 13713 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13714 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13715 			
       
 13716 			/* Get the value from a foo(<param_value>) style call */
       
 13717 			if (IN_param_value == NULL)
       
 13718 			  IN_param_value = function_call_param_iterator.next();
       
 13719 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13720 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13721 			
       
 13722 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13723 			{
       
 13724 		
       
 13725 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13726 				return return_type_symbol;
       
 13727 				
       
 13728 			}
       
 13729 			
       
 13730 			ERROR;
       
 13731 		}
       
 13732 		
       
 13733 	}/*function_int_to_udint*/
       
 13734 	break;
       
 13735 
       
 13736 /****
       
 13737  *INT_TO_WORD
       
 13738  */
       
 13739 	case function_int_to_word :
       
 13740 	{
       
 13741 		symbol_c *last_type_symbol = NULL;
       
 13742 
       
 13743 		{
       
 13744 			identifier_c param_name("IN");
       
 13745 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13746 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13747 			
       
 13748 			/* Get the value from a foo(<param_value>) style call */
       
 13749 			if (IN_param_value == NULL)
       
 13750 			  IN_param_value = function_call_param_iterator.next();
       
 13751 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13752 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13753 			
       
 13754 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13755 			{
       
 13756 		
       
 13757 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13758 				return return_type_symbol;
       
 13759 				
       
 13760 			}
       
 13761 			
       
 13762 			ERROR;
       
 13763 		}
       
 13764 		
       
 13765 	}/*function_int_to_word*/
       
 13766 	break;
       
 13767 
       
 13768 /****
       
 13769  *INT_TO_WSTRING
       
 13770  */
       
 13771 	case function_int_to_wstring :
       
 13772 	{
       
 13773 		symbol_c *last_type_symbol = NULL;
       
 13774 
       
 13775 		{
       
 13776 			identifier_c param_name("IN");
       
 13777 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13778 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13779 			
       
 13780 			/* Get the value from a foo(<param_value>) style call */
       
 13781 			if (IN_param_value == NULL)
       
 13782 			  IN_param_value = function_call_param_iterator.next();
       
 13783 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13784 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13785 			
       
 13786 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13787 			{
       
 13788 		
       
 13789 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 13790 				return return_type_symbol;
       
 13791 				
       
 13792 			}
       
 13793 			
       
 13794 			ERROR;
       
 13795 		}
       
 13796 		
       
 13797 	}/*function_int_to_wstring*/
       
 13798 	break;
       
 13799 
       
 13800 /****
       
 13801  *INT_TO_STRING
       
 13802  */
       
 13803 	case function_int_to_string :
       
 13804 	{
       
 13805 		symbol_c *last_type_symbol = NULL;
       
 13806 
       
 13807 		{
       
 13808 			identifier_c param_name("IN");
       
 13809 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13810 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13811 			
       
 13812 			/* Get the value from a foo(<param_value>) style call */
       
 13813 			if (IN_param_value == NULL)
       
 13814 			  IN_param_value = function_call_param_iterator.next();
       
 13815 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13816 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13817 			
       
 13818 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13819 			{
       
 13820 		
       
 13821 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13822 				return return_type_symbol;
       
 13823 				
       
 13824 			}
       
 13825 			
       
 13826 			ERROR;
       
 13827 		}
       
 13828 		
       
 13829 	}/*function_int_to_string*/
       
 13830 	break;
       
 13831 
       
 13832 /****
       
 13833  *INT_TO_LWORD
       
 13834  */
       
 13835 	case function_int_to_lword :
       
 13836 	{
       
 13837 		symbol_c *last_type_symbol = NULL;
       
 13838 
       
 13839 		{
       
 13840 			identifier_c param_name("IN");
       
 13841 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13842 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13843 			
       
 13844 			/* Get the value from a foo(<param_value>) style call */
       
 13845 			if (IN_param_value == NULL)
       
 13846 			  IN_param_value = function_call_param_iterator.next();
       
 13847 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13848 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13849 			
       
 13850 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13851 			{
       
 13852 		
       
 13853 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13854 				return return_type_symbol;
       
 13855 				
       
 13856 			}
       
 13857 			
       
 13858 			ERROR;
       
 13859 		}
       
 13860 		
       
 13861 	}/*function_int_to_lword*/
       
 13862 	break;
       
 13863 
       
 13864 /****
       
 13865  *INT_TO_UINT
       
 13866  */
       
 13867 	case function_int_to_uint :
       
 13868 	{
       
 13869 		symbol_c *last_type_symbol = NULL;
       
 13870 
       
 13871 		{
       
 13872 			identifier_c param_name("IN");
       
 13873 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13874 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13875 			
       
 13876 			/* Get the value from a foo(<param_value>) style call */
       
 13877 			if (IN_param_value == NULL)
       
 13878 			  IN_param_value = function_call_param_iterator.next();
       
 13879 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13880 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13881 			
       
 13882 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13883 			{
       
 13884 		
       
 13885 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13886 				return return_type_symbol;
       
 13887 				
       
 13888 			}
       
 13889 			
       
 13890 			ERROR;
       
 13891 		}
       
 13892 		
       
 13893 	}/*function_int_to_uint*/
       
 13894 	break;
       
 13895 
       
 13896 /****
       
 13897  *INT_TO_LREAL
       
 13898  */
       
 13899 	case function_int_to_lreal :
       
 13900 	{
       
 13901 		symbol_c *last_type_symbol = NULL;
       
 13902 
       
 13903 		{
       
 13904 			identifier_c param_name("IN");
       
 13905 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13906 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13907 			
       
 13908 			/* Get the value from a foo(<param_value>) style call */
       
 13909 			if (IN_param_value == NULL)
       
 13910 			  IN_param_value = function_call_param_iterator.next();
       
 13911 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13912 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13913 			
       
 13914 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13915 			{
       
 13916 		
       
 13917 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13918 				return return_type_symbol;
       
 13919 				
       
 13920 			}
       
 13921 			
       
 13922 			ERROR;
       
 13923 		}
       
 13924 		
       
 13925 	}/*function_int_to_lreal*/
       
 13926 	break;
       
 13927 
       
 13928 /****
       
 13929  *INT_TO_BYTE
       
 13930  */
       
 13931 	case function_int_to_byte :
       
 13932 	{
       
 13933 		symbol_c *last_type_symbol = NULL;
       
 13934 
       
 13935 		{
       
 13936 			identifier_c param_name("IN");
       
 13937 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13938 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13939 			
       
 13940 			/* Get the value from a foo(<param_value>) style call */
       
 13941 			if (IN_param_value == NULL)
       
 13942 			  IN_param_value = function_call_param_iterator.next();
       
 13943 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13944 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13945 			
       
 13946 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13947 			{
       
 13948 		
       
 13949 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13950 				return return_type_symbol;
       
 13951 				
       
 13952 			}
       
 13953 			
       
 13954 			ERROR;
       
 13955 		}
       
 13956 		
       
 13957 	}/*function_int_to_byte*/
       
 13958 	break;
       
 13959 
       
 13960 /****
       
 13961  *INT_TO_USINT
       
 13962  */
       
 13963 	case function_int_to_usint :
       
 13964 	{
       
 13965 		symbol_c *last_type_symbol = NULL;
       
 13966 
       
 13967 		{
       
 13968 			identifier_c param_name("IN");
       
 13969 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13970 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13971 			
       
 13972 			/* Get the value from a foo(<param_value>) style call */
       
 13973 			if (IN_param_value == NULL)
       
 13974 			  IN_param_value = function_call_param_iterator.next();
       
 13975 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13976 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13977 			
       
 13978 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13979 			{
       
 13980 		
       
 13981 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13982 				return return_type_symbol;
       
 13983 				
       
 13984 			}
       
 13985 			
       
 13986 			ERROR;
       
 13987 		}
       
 13988 		
       
 13989 	}/*function_int_to_usint*/
       
 13990 	break;
       
 13991 
       
 13992 /****
       
 13993  *INT_TO_ULINT
       
 13994  */
       
 13995 	case function_int_to_ulint :
       
 13996 	{
       
 13997 		symbol_c *last_type_symbol = NULL;
       
 13998 
       
 13999 		{
       
 14000 			identifier_c param_name("IN");
       
 14001 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14002 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14003 			
       
 14004 			/* Get the value from a foo(<param_value>) style call */
       
 14005 			if (IN_param_value == NULL)
       
 14006 			  IN_param_value = function_call_param_iterator.next();
       
 14007 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14008 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14009 			
       
 14010 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 14011 			{
       
 14012 		
       
 14013 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14014 				return return_type_symbol;
       
 14015 				
       
 14016 			}
       
 14017 			
       
 14018 			ERROR;
       
 14019 		}
       
 14020 		
       
 14021 	}/*function_int_to_ulint*/
       
 14022 	break;
       
 14023 
       
 14024 /****
       
 14025  *INT_TO_BOOL
       
 14026  */
       
 14027 	case function_int_to_bool :
       
 14028 	{
       
 14029 		symbol_c *last_type_symbol = NULL;
       
 14030 
       
 14031 		{
       
 14032 			identifier_c param_name("IN");
       
 14033 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14034 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14035 			
       
 14036 			/* Get the value from a foo(<param_value>) style call */
       
 14037 			if (IN_param_value == NULL)
       
 14038 			  IN_param_value = function_call_param_iterator.next();
       
 14039 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14040 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14041 			
       
 14042 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 14043 			{
       
 14044 		
       
 14045 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 14046 				return return_type_symbol;
       
 14047 				
       
 14048 			}
       
 14049 			
       
 14050 			ERROR;
       
 14051 		}
       
 14052 		
       
 14053 	}/*function_int_to_bool*/
       
 14054 	break;
       
 14055 
       
 14056 /****
       
 14057  *INT_TO_TIME
       
 14058  */
       
 14059 	case function_int_to_time :
       
 14060 	{
       
 14061 		symbol_c *last_type_symbol = NULL;
       
 14062 
       
 14063 		{
       
 14064 			identifier_c param_name("IN");
       
 14065 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14066 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14067 			
       
 14068 			/* Get the value from a foo(<param_value>) style call */
       
 14069 			if (IN_param_value == NULL)
       
 14070 			  IN_param_value = function_call_param_iterator.next();
       
 14071 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14072 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14073 			
       
 14074 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 14075 			{
       
 14076 		
       
 14077 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14078 				return return_type_symbol;
       
 14079 				
       
 14080 			}
       
 14081 			
       
 14082 			ERROR;
       
 14083 		}
       
 14084 		
       
 14085 	}/*function_int_to_time*/
       
 14086 	break;
       
 14087 
       
 14088 /****
       
 14089  *INT_TO_INT
       
 14090  */
       
 14091 	case function_int_to_int :
       
 14092 	{
       
 14093 		symbol_c *last_type_symbol = NULL;
       
 14094 
       
 14095 		{
       
 14096 			identifier_c param_name("IN");
       
 14097 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14098 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14099 			
       
 14100 			/* Get the value from a foo(<param_value>) style call */
       
 14101 			if (IN_param_value == NULL)
       
 14102 			  IN_param_value = function_call_param_iterator.next();
       
 14103 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14104 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14105 			
       
 14106 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 14107 			{
       
 14108 		
       
 14109 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14110 				return return_type_symbol;
       
 14111 				
       
 14112 			}
       
 14113 			
       
 14114 			ERROR;
       
 14115 		}
       
 14116 		
       
 14117 	}/*function_int_to_int*/
       
 14118 	break;
       
 14119 
 26296 
 14120 /****
 26297 /****
 14121  *TRUNC
 26298  *TRUNC
 14122  */
 26299  */
 14123 	case function_trunc :
 26300     case function_trunc :
 14124 	{
 26301     {
 14125 		symbol_c *last_type_symbol = NULL;
 26302         symbol_c *last_type_symbol = NULL;
 14126 
 26303 
 14127 		{
 26304         {
 14128 			identifier_c param_name("IN");
 26305             symbol_c *IN_type_symbol = param_data_type;
 14129 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26306             last_type_symbol = param_data_type;
 14130 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26307             
 14131 			
 26308             if(search_expression_type->is_real_type(IN_type_symbol))
 14132 			/* Get the value from a foo(<param_value>) style call */
 26309             {
 14133 			if (IN_param_value == NULL)
 26310         
 14134 			  IN_param_value = function_call_param_iterator.next();
 26311                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14135 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26312                 return return_type_symbol;
 14136 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26313                 
 14137 			
 26314             }
 14138 			if(search_expression_type->is_real_type(IN_type_symbol))
 26315             
 14139 			{
 26316             ERROR;
 14140 		
 26317         }
 14141 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26318         
 14142 				return return_type_symbol;
 26319     }/*function_trunc*/
 14143 				
 26320     break;
 14144 			}
       
 14145 			
       
 14146 			ERROR;
       
 14147 		}
       
 14148 		
       
 14149 	}/*function_trunc*/
       
 14150 	break;
       
 14151 
 26321 
 14152 /****
 26322 /****
 14153  *BCD_TO_SINT
 26323  *BCD_TO_SINT
 14154  */
 26324  */
 14155 	case function_bcd_to_sint :
 26325     case function_bcd_to_sint :
 14156 	{
 26326     {
 14157 		symbol_c *last_type_symbol = NULL;
 26327         symbol_c *last_type_symbol = NULL;
 14158 
 26328 
 14159 		{
 26329         {
 14160 			identifier_c param_name("IN");
 26330             symbol_c *IN_type_symbol = param_data_type;
 14161 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26331             last_type_symbol = param_data_type;
 14162 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26332             
 14163 			
 26333             if(search_expression_type->is_binary_type(IN_type_symbol))
 14164 			/* Get the value from a foo(<param_value>) style call */
 26334             {
 14165 			if (IN_param_value == NULL)
 26335         
 14166 			  IN_param_value = function_call_param_iterator.next();
 26336                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14167 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26337                 return return_type_symbol;
 14168 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26338                 
 14169 			
 26339             }
 14170 			if(search_expression_type->is_binary_type(IN_type_symbol))
 26340             
 14171 			{
 26341             ERROR;
 14172 		
 26342         }
 14173 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 26343         
 14174 				return return_type_symbol;
 26344     }/*function_bcd_to_sint*/
 14175 				
 26345     break;
 14176 			}
 26346 
 14177 			
 26347 /****
 14178 			ERROR;
 26348  *BCD_TO_INT
 14179 		}
 26349  */
 14180 		
 26350     case function_bcd_to_int :
 14181 	}/*function_bcd_to_sint*/
 26351     {
 14182 	break;
 26352         symbol_c *last_type_symbol = NULL;
       
 26353 
       
 26354         {
       
 26355             symbol_c *IN_type_symbol = param_data_type;
       
 26356             last_type_symbol = param_data_type;
       
 26357             
       
 26358             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26359             {
       
 26360         
       
 26361                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 26362                 return return_type_symbol;
       
 26363                 
       
 26364             }
       
 26365             
       
 26366             ERROR;
       
 26367         }
       
 26368         
       
 26369     }/*function_bcd_to_int*/
       
 26370     break;
       
 26371 
       
 26372 /****
       
 26373  *BCD_TO_DINT
       
 26374  */
       
 26375     case function_bcd_to_dint :
       
 26376     {
       
 26377         symbol_c *last_type_symbol = NULL;
       
 26378 
       
 26379         {
       
 26380             symbol_c *IN_type_symbol = param_data_type;
       
 26381             last_type_symbol = param_data_type;
       
 26382             
       
 26383             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26384             {
       
 26385         
       
 26386                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 26387                 return return_type_symbol;
       
 26388                 
       
 26389             }
       
 26390             
       
 26391             ERROR;
       
 26392         }
       
 26393         
       
 26394     }/*function_bcd_to_dint*/
       
 26395     break;
 14183 
 26396 
 14184 /****
 26397 /****
 14185  *BCD_TO_LINT
 26398  *BCD_TO_LINT
 14186  */
 26399  */
 14187 	case function_bcd_to_lint :
 26400     case function_bcd_to_lint :
 14188 	{
 26401     {
 14189 		symbol_c *last_type_symbol = NULL;
 26402         symbol_c *last_type_symbol = NULL;
 14190 
 26403 
 14191 		{
 26404         {
 14192 			identifier_c param_name("IN");
 26405             symbol_c *IN_type_symbol = param_data_type;
 14193 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26406             last_type_symbol = param_data_type;
 14194 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26407             
 14195 			
 26408             if(search_expression_type->is_binary_type(IN_type_symbol))
 14196 			/* Get the value from a foo(<param_value>) style call */
 26409             {
 14197 			if (IN_param_value == NULL)
 26410         
 14198 			  IN_param_value = function_call_param_iterator.next();
 26411                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14199 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26412                 return return_type_symbol;
 14200 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26413                 
 14201 			
 26414             }
 14202 			if(search_expression_type->is_binary_type(IN_type_symbol))
 26415             
 14203 			{
 26416             ERROR;
 14204 		
 26417         }
 14205 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 26418         
 14206 				return return_type_symbol;
 26419     }/*function_bcd_to_lint*/
 14207 				
 26420     break;
 14208 			}
 26421 
 14209 			
 26422 /****
 14210 			ERROR;
 26423  *BCD_TO_USINT
 14211 		}
 26424  */
 14212 		
 26425     case function_bcd_to_usint :
 14213 	}/*function_bcd_to_lint*/
 26426     {
 14214 	break;
 26427         symbol_c *last_type_symbol = NULL;
 14215 
 26428 
 14216 /****
 26429         {
 14217  *BCD_TO_DINT
 26430             symbol_c *IN_type_symbol = param_data_type;
 14218  */
 26431             last_type_symbol = param_data_type;
 14219 	case function_bcd_to_dint :
 26432             
 14220 	{
 26433             if(search_expression_type->is_binary_type(IN_type_symbol))
 14221 		symbol_c *last_type_symbol = NULL;
 26434             {
 14222 
 26435         
 14223 		{
 26436                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 14224 			identifier_c param_name("IN");
 26437                 return return_type_symbol;
 14225 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26438                 
 14226 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26439             }
 14227 			
 26440             
 14228 			/* Get the value from a foo(<param_value>) style call */
 26441             ERROR;
 14229 			if (IN_param_value == NULL)
 26442         }
 14230 			  IN_param_value = function_call_param_iterator.next();
 26443         
 14231 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26444     }/*function_bcd_to_usint*/
 14232 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26445     break;
 14233 			
 26446 
 14234 			if(search_expression_type->is_binary_type(IN_type_symbol))
 26447 /****
 14235 			{
 26448  *BCD_TO_UINT
 14236 		
 26449  */
 14237 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 26450     case function_bcd_to_uint :
 14238 				return return_type_symbol;
 26451     {
 14239 				
 26452         symbol_c *last_type_symbol = NULL;
 14240 			}
 26453 
 14241 			
 26454         {
 14242 			ERROR;
 26455             symbol_c *IN_type_symbol = param_data_type;
 14243 		}
 26456             last_type_symbol = param_data_type;
 14244 		
 26457             
 14245 	}/*function_bcd_to_dint*/
 26458             if(search_expression_type->is_binary_type(IN_type_symbol))
 14246 	break;
 26459             {
       
 26460         
       
 26461                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 26462                 return return_type_symbol;
       
 26463                 
       
 26464             }
       
 26465             
       
 26466             ERROR;
       
 26467         }
       
 26468         
       
 26469     }/*function_bcd_to_uint*/
       
 26470     break;
 14247 
 26471 
 14248 /****
 26472 /****
 14249  *BCD_TO_UDINT
 26473  *BCD_TO_UDINT
 14250  */
 26474  */
 14251 	case function_bcd_to_udint :
 26475     case function_bcd_to_udint :
 14252 	{
 26476     {
 14253 		symbol_c *last_type_symbol = NULL;
 26477         symbol_c *last_type_symbol = NULL;
 14254 
 26478 
 14255 		{
 26479         {
 14256 			identifier_c param_name("IN");
 26480             symbol_c *IN_type_symbol = param_data_type;
 14257 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26481             last_type_symbol = param_data_type;
 14258 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26482             
 14259 			
 26483             if(search_expression_type->is_binary_type(IN_type_symbol))
 14260 			/* Get the value from a foo(<param_value>) style call */
 26484             {
 14261 			if (IN_param_value == NULL)
 26485         
 14262 			  IN_param_value = function_call_param_iterator.next();
 26486                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 14263 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26487                 return return_type_symbol;
 14264 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26488                 
 14265 			
 26489             }
 14266 			if(search_expression_type->is_binary_type(IN_type_symbol))
 26490             
 14267 			{
 26491             ERROR;
 14268 		
 26492         }
 14269 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 26493         
 14270 				return return_type_symbol;
 26494     }/*function_bcd_to_udint*/
 14271 				
 26495     break;
 14272 			}
       
 14273 			
       
 14274 			ERROR;
       
 14275 		}
       
 14276 		
       
 14277 	}/*function_bcd_to_udint*/
       
 14278 	break;
       
 14279 
       
 14280 /****
       
 14281  *BCD_TO_UINT
       
 14282  */
       
 14283 	case function_bcd_to_uint :
       
 14284 	{
       
 14285 		symbol_c *last_type_symbol = NULL;
       
 14286 
       
 14287 		{
       
 14288 			identifier_c param_name("IN");
       
 14289 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14290 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14291 			
       
 14292 			/* Get the value from a foo(<param_value>) style call */
       
 14293 			if (IN_param_value == NULL)
       
 14294 			  IN_param_value = function_call_param_iterator.next();
       
 14295 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14296 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14297 			
       
 14298 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14299 			{
       
 14300 		
       
 14301 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14302 				return return_type_symbol;
       
 14303 				
       
 14304 			}
       
 14305 			
       
 14306 			ERROR;
       
 14307 		}
       
 14308 		
       
 14309 	}/*function_bcd_to_uint*/
       
 14310 	break;
       
 14311 
       
 14312 /****
       
 14313  *BCD_TO_USINT
       
 14314  */
       
 14315 	case function_bcd_to_usint :
       
 14316 	{
       
 14317 		symbol_c *last_type_symbol = NULL;
       
 14318 
       
 14319 		{
       
 14320 			identifier_c param_name("IN");
       
 14321 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14322 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14323 			
       
 14324 			/* Get the value from a foo(<param_value>) style call */
       
 14325 			if (IN_param_value == NULL)
       
 14326 			  IN_param_value = function_call_param_iterator.next();
       
 14327 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14328 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14329 			
       
 14330 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14331 			{
       
 14332 		
       
 14333 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 14334 				return return_type_symbol;
       
 14335 				
       
 14336 			}
       
 14337 			
       
 14338 			ERROR;
       
 14339 		}
       
 14340 		
       
 14341 	}/*function_bcd_to_usint*/
       
 14342 	break;
       
 14343 
 26496 
 14344 /****
 26497 /****
 14345  *BCD_TO_ULINT
 26498  *BCD_TO_ULINT
 14346  */
 26499  */
 14347 	case function_bcd_to_ulint :
 26500     case function_bcd_to_ulint :
 14348 	{
 26501     {
 14349 		symbol_c *last_type_symbol = NULL;
 26502         symbol_c *last_type_symbol = NULL;
 14350 
 26503 
 14351 		{
 26504         {
 14352 			identifier_c param_name("IN");
 26505             symbol_c *IN_type_symbol = param_data_type;
 14353 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26506             last_type_symbol = param_data_type;
 14354 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26507             
 14355 			
 26508             if(search_expression_type->is_binary_type(IN_type_symbol))
 14356 			/* Get the value from a foo(<param_value>) style call */
 26509             {
 14357 			if (IN_param_value == NULL)
 26510         
 14358 			  IN_param_value = function_call_param_iterator.next();
 26511                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 14359 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26512                 return return_type_symbol;
 14360 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26513                 
 14361 			
 26514             }
 14362 			if(search_expression_type->is_binary_type(IN_type_symbol))
 26515             
 14363 			{
 26516             ERROR;
 14364 		
 26517         }
 14365 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 26518         
 14366 				return return_type_symbol;
 26519     }/*function_bcd_to_ulint*/
 14367 				
 26520     break;
 14368 			}
       
 14369 			
       
 14370 			ERROR;
       
 14371 		}
       
 14372 		
       
 14373 	}/*function_bcd_to_ulint*/
       
 14374 	break;
       
 14375 
       
 14376 /****
       
 14377  *BCD_TO_INT
       
 14378  */
       
 14379 	case function_bcd_to_int :
       
 14380 	{
       
 14381 		symbol_c *last_type_symbol = NULL;
       
 14382 
       
 14383 		{
       
 14384 			identifier_c param_name("IN");
       
 14385 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14386 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14387 			
       
 14388 			/* Get the value from a foo(<param_value>) style call */
       
 14389 			if (IN_param_value == NULL)
       
 14390 			  IN_param_value = function_call_param_iterator.next();
       
 14391 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14392 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14393 			
       
 14394 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14395 			{
       
 14396 		
       
 14397 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14398 				return return_type_symbol;
       
 14399 				
       
 14400 			}
       
 14401 			
       
 14402 			ERROR;
       
 14403 		}
       
 14404 		
       
 14405 	}/*function_bcd_to_int*/
       
 14406 	break;
       
 14407 
 26521 
 14408 /****
 26522 /****
 14409  *SINT_TO_BCD
 26523  *SINT_TO_BCD
 14410  */
 26524  */
 14411 	case function_sint_to_bcd :
 26525     case function_sint_to_bcd :
 14412 	{
 26526     {
 14413 		symbol_c *last_type_symbol = NULL;
 26527         symbol_c *last_type_symbol = NULL;
 14414 
 26528 
 14415 		{
 26529         {
 14416 			identifier_c param_name("IN");
 26530             symbol_c *IN_type_symbol = param_data_type;
 14417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26531             last_type_symbol = param_data_type;
 14418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26532             
 14419 			
 26533             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 14420 			/* Get the value from a foo(<param_value>) style call */
 26534             {
 14421 			if (IN_param_value == NULL)
 26535         
 14422 			  IN_param_value = function_call_param_iterator.next();
 26536                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26537                 return return_type_symbol;
 14424 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26538                 
 14425 			
 26539             }
 14426 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 26540             
 14427 			{
 26541             ERROR;
 14428 		
 26542         }
 14429 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26543         
 14430 				return return_type_symbol;
 26544     }/*function_sint_to_bcd*/
 14431 				
 26545     break;
 14432 			}
 26546 
 14433 			
 26547 /****
 14434 			ERROR;
 26548  *INT_TO_BCD
 14435 		}
 26549  */
 14436 		
 26550     case function_int_to_bcd :
 14437 	}/*function_sint_to_bcd*/
 26551     {
 14438 	break;
 26552         symbol_c *last_type_symbol = NULL;
       
 26553 
       
 26554         {
       
 26555             symbol_c *IN_type_symbol = param_data_type;
       
 26556             last_type_symbol = param_data_type;
       
 26557             
       
 26558             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 26559             {
       
 26560         
       
 26561                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26562                 return return_type_symbol;
       
 26563                 
       
 26564             }
       
 26565             
       
 26566             ERROR;
       
 26567         }
       
 26568         
       
 26569     }/*function_int_to_bcd*/
       
 26570     break;
       
 26571 
       
 26572 /****
       
 26573  *DINT_TO_BCD
       
 26574  */
       
 26575     case function_dint_to_bcd :
       
 26576     {
       
 26577         symbol_c *last_type_symbol = NULL;
       
 26578 
       
 26579         {
       
 26580             symbol_c *IN_type_symbol = param_data_type;
       
 26581             last_type_symbol = param_data_type;
       
 26582             
       
 26583             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 26584             {
       
 26585         
       
 26586                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26587                 return return_type_symbol;
       
 26588                 
       
 26589             }
       
 26590             
       
 26591             ERROR;
       
 26592         }
       
 26593         
       
 26594     }/*function_dint_to_bcd*/
       
 26595     break;
 14439 
 26596 
 14440 /****
 26597 /****
 14441  *LINT_TO_BCD
 26598  *LINT_TO_BCD
 14442  */
 26599  */
 14443 	case function_lint_to_bcd :
 26600     case function_lint_to_bcd :
 14444 	{
 26601     {
 14445 		symbol_c *last_type_symbol = NULL;
 26602         symbol_c *last_type_symbol = NULL;
 14446 
 26603 
 14447 		{
 26604         {
 14448 			identifier_c param_name("IN");
 26605             symbol_c *IN_type_symbol = param_data_type;
 14449 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26606             last_type_symbol = param_data_type;
 14450 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26607             
 14451 			
 26608             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 14452 			/* Get the value from a foo(<param_value>) style call */
 26609             {
 14453 			if (IN_param_value == NULL)
 26610         
 14454 			  IN_param_value = function_call_param_iterator.next();
 26611                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14455 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26612                 return return_type_symbol;
 14456 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26613                 
 14457 			
 26614             }
 14458 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 26615             
 14459 			{
 26616             ERROR;
 14460 		
 26617         }
 14461 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26618         
 14462 				return return_type_symbol;
 26619     }/*function_lint_to_bcd*/
 14463 				
 26620     break;
 14464 			}
 26621 
 14465 			
 26622 /****
 14466 			ERROR;
 26623  *USINT_TO_BCD
 14467 		}
 26624  */
 14468 		
 26625     case function_usint_to_bcd :
 14469 	}/*function_lint_to_bcd*/
 26626     {
 14470 	break;
 26627         symbol_c *last_type_symbol = NULL;
 14471 
 26628 
 14472 /****
 26629         {
 14473  *DINT_TO_BCD
 26630             symbol_c *IN_type_symbol = param_data_type;
 14474  */
 26631             last_type_symbol = param_data_type;
 14475 	case function_dint_to_bcd :
 26632             
 14476 	{
 26633             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 14477 		symbol_c *last_type_symbol = NULL;
 26634             {
 14478 
 26635         
 14479 		{
 26636                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14480 			identifier_c param_name("IN");
 26637                 return return_type_symbol;
 14481 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26638                 
 14482 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26639             }
 14483 			
 26640             
 14484 			/* Get the value from a foo(<param_value>) style call */
 26641             ERROR;
 14485 			if (IN_param_value == NULL)
 26642         }
 14486 			  IN_param_value = function_call_param_iterator.next();
 26643         
 14487 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26644     }/*function_usint_to_bcd*/
 14488 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26645     break;
 14489 			
 26646 
 14490 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 26647 /****
 14491 			{
 26648  *UINT_TO_BCD
 14492 		
 26649  */
 14493 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26650     case function_uint_to_bcd :
 14494 				return return_type_symbol;
 26651     {
 14495 				
 26652         symbol_c *last_type_symbol = NULL;
 14496 			}
 26653 
 14497 			
 26654         {
 14498 			ERROR;
 26655             symbol_c *IN_type_symbol = param_data_type;
 14499 		}
 26656             last_type_symbol = param_data_type;
 14500 		
 26657             
 14501 	}/*function_dint_to_bcd*/
 26658             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 14502 	break;
 26659             {
       
 26660         
       
 26661                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26662                 return return_type_symbol;
       
 26663                 
       
 26664             }
       
 26665             
       
 26666             ERROR;
       
 26667         }
       
 26668         
       
 26669     }/*function_uint_to_bcd*/
       
 26670     break;
 14503 
 26671 
 14504 /****
 26672 /****
 14505  *UDINT_TO_BCD
 26673  *UDINT_TO_BCD
 14506  */
 26674  */
 14507 	case function_udint_to_bcd :
 26675     case function_udint_to_bcd :
 14508 	{
 26676     {
 14509 		symbol_c *last_type_symbol = NULL;
 26677         symbol_c *last_type_symbol = NULL;
 14510 
 26678 
 14511 		{
 26679         {
 14512 			identifier_c param_name("IN");
 26680             symbol_c *IN_type_symbol = param_data_type;
 14513 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26681             last_type_symbol = param_data_type;
 14514 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26682             
 14515 			
 26683             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 14516 			/* Get the value from a foo(<param_value>) style call */
 26684             {
 14517 			if (IN_param_value == NULL)
 26685         
 14518 			  IN_param_value = function_call_param_iterator.next();
 26686                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14519 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26687                 return return_type_symbol;
 14520 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26688                 
 14521 			
 26689             }
 14522 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 26690             
 14523 			{
 26691             ERROR;
 14524 		
 26692         }
 14525 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26693         
 14526 				return return_type_symbol;
 26694     }/*function_udint_to_bcd*/
 14527 				
 26695     break;
 14528 			}
       
 14529 			
       
 14530 			ERROR;
       
 14531 		}
       
 14532 		
       
 14533 	}/*function_udint_to_bcd*/
       
 14534 	break;
       
 14535 
       
 14536 /****
       
 14537  *UINT_TO_BCD
       
 14538  */
       
 14539 	case function_uint_to_bcd :
       
 14540 	{
       
 14541 		symbol_c *last_type_symbol = NULL;
       
 14542 
       
 14543 		{
       
 14544 			identifier_c param_name("IN");
       
 14545 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14546 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14547 			
       
 14548 			/* Get the value from a foo(<param_value>) style call */
       
 14549 			if (IN_param_value == NULL)
       
 14550 			  IN_param_value = function_call_param_iterator.next();
       
 14551 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14552 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14553 			
       
 14554 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 14555 			{
       
 14556 		
       
 14557 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 14558 				return return_type_symbol;
       
 14559 				
       
 14560 			}
       
 14561 			
       
 14562 			ERROR;
       
 14563 		}
       
 14564 		
       
 14565 	}/*function_uint_to_bcd*/
       
 14566 	break;
       
 14567 
       
 14568 /****
       
 14569  *USINT_TO_BCD
       
 14570  */
       
 14571 	case function_usint_to_bcd :
       
 14572 	{
       
 14573 		symbol_c *last_type_symbol = NULL;
       
 14574 
       
 14575 		{
       
 14576 			identifier_c param_name("IN");
       
 14577 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14578 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14579 			
       
 14580 			/* Get the value from a foo(<param_value>) style call */
       
 14581 			if (IN_param_value == NULL)
       
 14582 			  IN_param_value = function_call_param_iterator.next();
       
 14583 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14584 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14585 			
       
 14586 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 14587 			{
       
 14588 		
       
 14589 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 14590 				return return_type_symbol;
       
 14591 				
       
 14592 			}
       
 14593 			
       
 14594 			ERROR;
       
 14595 		}
       
 14596 		
       
 14597 	}/*function_usint_to_bcd*/
       
 14598 	break;
       
 14599 
 26696 
 14600 /****
 26697 /****
 14601  *ULINT_TO_BCD
 26698  *ULINT_TO_BCD
 14602  */
 26699  */
 14603 	case function_ulint_to_bcd :
 26700     case function_ulint_to_bcd :
 14604 	{
 26701     {
 14605 		symbol_c *last_type_symbol = NULL;
 26702         symbol_c *last_type_symbol = NULL;
 14606 
 26703 
 14607 		{
 26704         {
 14608 			identifier_c param_name("IN");
 26705             symbol_c *IN_type_symbol = param_data_type;
 14609 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26706             last_type_symbol = param_data_type;
 14610 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26707             
 14611 			
 26708             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 14612 			/* Get the value from a foo(<param_value>) style call */
 26709             {
 14613 			if (IN_param_value == NULL)
 26710         
 14614 			  IN_param_value = function_call_param_iterator.next();
 26711                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14615 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26712                 return return_type_symbol;
 14616 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26713                 
 14617 			
 26714             }
 14618 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 26715             
 14619 			{
 26716             ERROR;
 14620 		
 26717         }
 14621 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 26718         
 14622 				return return_type_symbol;
 26719     }/*function_ulint_to_bcd*/
 14623 				
 26720     break;
 14624 			}
       
 14625 			
       
 14626 			ERROR;
       
 14627 		}
       
 14628 		
       
 14629 	}/*function_ulint_to_bcd*/
       
 14630 	break;
       
 14631 
       
 14632 /****
       
 14633  *INT_TO_BCD
       
 14634  */
       
 14635 	case function_int_to_bcd :
       
 14636 	{
       
 14637 		symbol_c *last_type_symbol = NULL;
       
 14638 
       
 14639 		{
       
 14640 			identifier_c param_name("IN");
       
 14641 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14642 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14643 			
       
 14644 			/* Get the value from a foo(<param_value>) style call */
       
 14645 			if (IN_param_value == NULL)
       
 14646 			  IN_param_value = function_call_param_iterator.next();
       
 14647 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14648 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14649 			
       
 14650 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 14651 			{
       
 14652 		
       
 14653 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 14654 				return return_type_symbol;
       
 14655 				
       
 14656 			}
       
 14657 			
       
 14658 			ERROR;
       
 14659 		}
       
 14660 		
       
 14661 	}/*function_int_to_bcd*/
       
 14662 	break;
       
 14663 
 26721 
 14664 /****
 26722 /****
 14665  *DATE_AND_TIME_TO_TIME_OF_DAY
 26723  *DATE_AND_TIME_TO_TIME_OF_DAY
 14666  */
 26724  */
 14667 	case function_date_and_time_to_time_of_day :
 26725     case function_date_and_time_to_time_of_day :
 14668 	{
 26726     {
 14669 		symbol_c *last_type_symbol = NULL;
 26727         symbol_c *last_type_symbol = NULL;
 14670 
 26728 
 14671 		{
 26729         {
 14672 			identifier_c param_name("IN");
 26730             symbol_c *IN_type_symbol = param_data_type;
 14673 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26731             last_type_symbol = param_data_type;
 14674 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26732             
 14675 			
 26733             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14676 			/* Get the value from a foo(<param_value>) style call */
 26734             {
 14677 			if (IN_param_value == NULL)
 26735         
 14678 			  IN_param_value = function_call_param_iterator.next();
 26736                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14679 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26737                 return return_type_symbol;
 14680 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26738                 
 14681 			
 26739             }
 14682 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26740             
 14683 			{
 26741             ERROR;
 14684 		
 26742         }
 14685 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 26743         
 14686 				return return_type_symbol;
 26744     }/*function_date_and_time_to_time_of_day*/
 14687 				
 26745     break;
 14688 			}
       
 14689 			
       
 14690 			ERROR;
       
 14691 		}
       
 14692 		
       
 14693 	}/*function_date_and_time_to_time_of_day*/
       
 14694 	break;
       
 14695 
 26746 
 14696 /****
 26747 /****
 14697  *DATE_AND_TIME_TO_DATE
 26748  *DATE_AND_TIME_TO_DATE
 14698  */
 26749  */
 14699 	case function_date_and_time_to_date :
 26750     case function_date_and_time_to_date :
 14700 	{
 26751     {
 14701 		symbol_c *last_type_symbol = NULL;
 26752         symbol_c *last_type_symbol = NULL;
 14702 
 26753 
 14703 		{
 26754         {
 14704 			identifier_c param_name("IN");
 26755             symbol_c *IN_type_symbol = param_data_type;
 14705 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26756             last_type_symbol = param_data_type;
 14706 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26757             
 14707 			
 26758             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14708 			/* Get the value from a foo(<param_value>) style call */
 26759             {
 14709 			if (IN_param_value == NULL)
 26760         
 14710 			  IN_param_value = function_call_param_iterator.next();
 26761                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14711 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26762                 return return_type_symbol;
 14712 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26763                 
 14713 			
 26764             }
 14714 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 26765             
 14715 			{
 26766             ERROR;
 14716 		
 26767         }
 14717 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 26768         
 14718 				return return_type_symbol;
 26769     }/*function_date_and_time_to_date*/
 14719 				
 26770     break;
 14720 			}
       
 14721 			
       
 14722 			ERROR;
       
 14723 		}
       
 14724 		
       
 14725 	}/*function_date_and_time_to_date*/
       
 14726 	break;
       
 14727 
 26771 
 14728 /****
 26772 /****
 14729  *ABS
 26773  *ABS
 14730  */
 26774  */
 14731 	case function_abs :
 26775     case function_abs :
 14732 	{
 26776     {
 14733 		symbol_c *last_type_symbol = NULL;
 26777         symbol_c *last_type_symbol = NULL;
 14734 
 26778 
 14735 		{
 26779         {
 14736 			identifier_c param_name("IN");
 26780             symbol_c *IN_type_symbol = param_data_type;
 14737 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26781             last_type_symbol = param_data_type;
 14738 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26782             
 14739 			
 26783             if(search_expression_type->is_num_type(IN_type_symbol))
 14740 			/* Get the value from a foo(<param_value>) style call */
 26784             {
 14741 			if (IN_param_value == NULL)
 26785         
 14742 			  IN_param_value = function_call_param_iterator.next();
 26786                 symbol_c * return_type_symbol = IN_type_symbol;
 14743 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26787                 return return_type_symbol;
 14744 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26788                 
 14745 			
 26789             }
 14746 			if(search_expression_type->is_num_type(IN_type_symbol))
 26790             
 14747 			{
 26791             ERROR;
 14748 		
 26792         }
 14749 				symbol_c * return_type_symbol = IN_type_symbol;
 26793         
 14750 				return return_type_symbol;
 26794     }/*function_abs*/
 14751 				
 26795     break;
 14752 			}
       
 14753 			
       
 14754 			ERROR;
       
 14755 		}
       
 14756 		
       
 14757 	}/*function_abs*/
       
 14758 	break;
       
 14759 
 26796 
 14760 /****
 26797 /****
 14761  *SQRT
 26798  *SQRT
 14762  */
 26799  */
 14763 	case function_sqrt :
 26800     case function_sqrt :
 14764 	{
 26801     {
 14765 		symbol_c *last_type_symbol = NULL;
 26802         symbol_c *last_type_symbol = NULL;
 14766 
 26803 
 14767 		{
 26804         {
 14768 			identifier_c param_name("IN");
 26805             symbol_c *IN_type_symbol = param_data_type;
 14769 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26806             last_type_symbol = param_data_type;
 14770 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26807             
 14771 			
 26808             if(search_expression_type->is_real_type(IN_type_symbol))
 14772 			/* Get the value from a foo(<param_value>) style call */
 26809             {
 14773 			if (IN_param_value == NULL)
 26810         
 14774 			  IN_param_value = function_call_param_iterator.next();
 26811                 symbol_c * return_type_symbol = IN_type_symbol;
 14775 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26812                 return return_type_symbol;
 14776 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26813                 
 14777 			
 26814             }
 14778 			if(search_expression_type->is_real_type(IN_type_symbol))
 26815             
 14779 			{
 26816             ERROR;
 14780 		
 26817         }
 14781 				symbol_c * return_type_symbol = IN_type_symbol;
 26818         
 14782 				return return_type_symbol;
 26819     }/*function_sqrt*/
 14783 				
 26820     break;
 14784 			}
       
 14785 			
       
 14786 			ERROR;
       
 14787 		}
       
 14788 		
       
 14789 	}/*function_sqrt*/
       
 14790 	break;
       
 14791 
 26821 
 14792 /****
 26822 /****
 14793  *LN
 26823  *LN
 14794  */
 26824  */
 14795 	case function_ln :
 26825     case function_ln :
 14796 	{
 26826     {
 14797 		symbol_c *last_type_symbol = NULL;
 26827         symbol_c *last_type_symbol = NULL;
 14798 
 26828 
 14799 		{
 26829         {
 14800 			identifier_c param_name("IN");
 26830             symbol_c *IN_type_symbol = param_data_type;
 14801 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26831             last_type_symbol = param_data_type;
 14802 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26832             
 14803 			
 26833             if(search_expression_type->is_real_type(IN_type_symbol))
 14804 			/* Get the value from a foo(<param_value>) style call */
 26834             {
 14805 			if (IN_param_value == NULL)
 26835         
 14806 			  IN_param_value = function_call_param_iterator.next();
 26836                 symbol_c * return_type_symbol = IN_type_symbol;
 14807 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26837                 return return_type_symbol;
 14808 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26838                 
 14809 			
 26839             }
 14810 			if(search_expression_type->is_real_type(IN_type_symbol))
 26840             
 14811 			{
 26841             ERROR;
 14812 		
 26842         }
 14813 				symbol_c * return_type_symbol = IN_type_symbol;
 26843         
 14814 				return return_type_symbol;
 26844     }/*function_ln*/
 14815 				
 26845     break;
 14816 			}
       
 14817 			
       
 14818 			ERROR;
       
 14819 		}
       
 14820 		
       
 14821 	}/*function_ln*/
       
 14822 	break;
       
 14823 
 26846 
 14824 /****
 26847 /****
 14825  *LOG
 26848  *LOG
 14826  */
 26849  */
 14827 	case function_log :
 26850     case function_log :
 14828 	{
 26851     {
 14829 		symbol_c *last_type_symbol = NULL;
 26852         symbol_c *last_type_symbol = NULL;
 14830 
 26853 
 14831 		{
 26854         {
 14832 			identifier_c param_name("IN");
 26855             symbol_c *IN_type_symbol = param_data_type;
 14833 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26856             last_type_symbol = param_data_type;
 14834 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26857             
 14835 			
 26858             if(search_expression_type->is_real_type(IN_type_symbol))
 14836 			/* Get the value from a foo(<param_value>) style call */
 26859             {
 14837 			if (IN_param_value == NULL)
 26860         
 14838 			  IN_param_value = function_call_param_iterator.next();
 26861                 symbol_c * return_type_symbol = IN_type_symbol;
 14839 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26862                 return return_type_symbol;
 14840 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26863                 
 14841 			
 26864             }
 14842 			if(search_expression_type->is_real_type(IN_type_symbol))
 26865             
 14843 			{
 26866             ERROR;
 14844 		
 26867         }
 14845 				symbol_c * return_type_symbol = IN_type_symbol;
 26868         
 14846 				return return_type_symbol;
 26869     }/*function_log*/
 14847 				
 26870     break;
 14848 			}
       
 14849 			
       
 14850 			ERROR;
       
 14851 		}
       
 14852 		
       
 14853 	}/*function_log*/
       
 14854 	break;
       
 14855 
 26871 
 14856 /****
 26872 /****
 14857  *EXP
 26873  *EXP
 14858  */
 26874  */
 14859 	case function_exp :
 26875     case function_exp :
 14860 	{
 26876     {
 14861 		symbol_c *last_type_symbol = NULL;
 26877         symbol_c *last_type_symbol = NULL;
 14862 
 26878 
 14863 		{
 26879         {
 14864 			identifier_c param_name("IN");
 26880             symbol_c *IN_type_symbol = param_data_type;
 14865 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26881             last_type_symbol = param_data_type;
 14866 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26882             
 14867 			
 26883             if(search_expression_type->is_real_type(IN_type_symbol))
 14868 			/* Get the value from a foo(<param_value>) style call */
 26884             {
 14869 			if (IN_param_value == NULL)
 26885         
 14870 			  IN_param_value = function_call_param_iterator.next();
 26886                 symbol_c * return_type_symbol = IN_type_symbol;
 14871 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26887                 return return_type_symbol;
 14872 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26888                 
 14873 			
 26889             }
 14874 			if(search_expression_type->is_real_type(IN_type_symbol))
 26890             
 14875 			{
 26891             ERROR;
 14876 		
 26892         }
 14877 				symbol_c * return_type_symbol = IN_type_symbol;
 26893         
 14878 				return return_type_symbol;
 26894     }/*function_exp*/
 14879 				
 26895     break;
 14880 			}
       
 14881 			
       
 14882 			ERROR;
       
 14883 		}
       
 14884 		
       
 14885 	}/*function_exp*/
       
 14886 	break;
       
 14887 
 26896 
 14888 /****
 26897 /****
 14889  *SIN
 26898  *SIN
 14890  */
 26899  */
 14891 	case function_sin :
 26900     case function_sin :
 14892 	{
 26901     {
 14893 		symbol_c *last_type_symbol = NULL;
 26902         symbol_c *last_type_symbol = NULL;
 14894 
 26903 
 14895 		{
 26904         {
 14896 			identifier_c param_name("IN");
 26905             symbol_c *IN_type_symbol = param_data_type;
 14897 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26906             last_type_symbol = param_data_type;
 14898 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26907             
 14899 			
 26908             if(search_expression_type->is_real_type(IN_type_symbol))
 14900 			/* Get the value from a foo(<param_value>) style call */
 26909             {
 14901 			if (IN_param_value == NULL)
 26910         
 14902 			  IN_param_value = function_call_param_iterator.next();
 26911                 symbol_c * return_type_symbol = IN_type_symbol;
 14903 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26912                 return return_type_symbol;
 14904 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26913                 
 14905 			
 26914             }
 14906 			if(search_expression_type->is_real_type(IN_type_symbol))
 26915             
 14907 			{
 26916             ERROR;
 14908 		
 26917         }
 14909 				symbol_c * return_type_symbol = IN_type_symbol;
 26918         
 14910 				return return_type_symbol;
 26919     }/*function_sin*/
 14911 				
 26920     break;
 14912 			}
       
 14913 			
       
 14914 			ERROR;
       
 14915 		}
       
 14916 		
       
 14917 	}/*function_sin*/
       
 14918 	break;
       
 14919 
 26921 
 14920 /****
 26922 /****
 14921  *COS
 26923  *COS
 14922  */
 26924  */
 14923 	case function_cos :
 26925     case function_cos :
 14924 	{
 26926     {
 14925 		symbol_c *last_type_symbol = NULL;
 26927         symbol_c *last_type_symbol = NULL;
 14926 
 26928 
 14927 		{
 26929         {
 14928 			identifier_c param_name("IN");
 26930             symbol_c *IN_type_symbol = param_data_type;
 14929 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26931             last_type_symbol = param_data_type;
 14930 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26932             
 14931 			
 26933             if(search_expression_type->is_real_type(IN_type_symbol))
 14932 			/* Get the value from a foo(<param_value>) style call */
 26934             {
 14933 			if (IN_param_value == NULL)
 26935         
 14934 			  IN_param_value = function_call_param_iterator.next();
 26936                 symbol_c * return_type_symbol = IN_type_symbol;
 14935 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26937                 return return_type_symbol;
 14936 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26938                 
 14937 			
 26939             }
 14938 			if(search_expression_type->is_real_type(IN_type_symbol))
 26940             
 14939 			{
 26941             ERROR;
 14940 		
 26942         }
 14941 				symbol_c * return_type_symbol = IN_type_symbol;
 26943         
 14942 				return return_type_symbol;
 26944     }/*function_cos*/
 14943 				
 26945     break;
 14944 			}
       
 14945 			
       
 14946 			ERROR;
       
 14947 		}
       
 14948 		
       
 14949 	}/*function_cos*/
       
 14950 	break;
       
 14951 
 26946 
 14952 /****
 26947 /****
 14953  *TAN
 26948  *TAN
 14954  */
 26949  */
 14955 	case function_tan :
 26950     case function_tan :
 14956 	{
 26951     {
 14957 		symbol_c *last_type_symbol = NULL;
 26952         symbol_c *last_type_symbol = NULL;
 14958 
 26953 
 14959 		{
 26954         {
 14960 			identifier_c param_name("IN");
 26955             symbol_c *IN_type_symbol = param_data_type;
 14961 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26956             last_type_symbol = param_data_type;
 14962 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26957             
 14963 			
 26958             if(search_expression_type->is_real_type(IN_type_symbol))
 14964 			/* Get the value from a foo(<param_value>) style call */
 26959             {
 14965 			if (IN_param_value == NULL)
 26960         
 14966 			  IN_param_value = function_call_param_iterator.next();
 26961                 symbol_c * return_type_symbol = IN_type_symbol;
 14967 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26962                 return return_type_symbol;
 14968 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26963                 
 14969 			
 26964             }
 14970 			if(search_expression_type->is_real_type(IN_type_symbol))
 26965             
 14971 			{
 26966             ERROR;
 14972 		
 26967         }
 14973 				symbol_c * return_type_symbol = IN_type_symbol;
 26968         
 14974 				return return_type_symbol;
 26969     }/*function_tan*/
 14975 				
 26970     break;
 14976 			}
       
 14977 			
       
 14978 			ERROR;
       
 14979 		}
       
 14980 		
       
 14981 	}/*function_tan*/
       
 14982 	break;
       
 14983 
 26971 
 14984 /****
 26972 /****
 14985  *ASIN
 26973  *ASIN
 14986  */
 26974  */
 14987 	case function_asin :
 26975     case function_asin :
 14988 	{
 26976     {
 14989 		symbol_c *last_type_symbol = NULL;
 26977         symbol_c *last_type_symbol = NULL;
 14990 
 26978 
 14991 		{
 26979         {
 14992 			identifier_c param_name("IN");
 26980             symbol_c *IN_type_symbol = param_data_type;
 14993 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 26981             last_type_symbol = param_data_type;
 14994 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 26982             
 14995 			
 26983             if(search_expression_type->is_real_type(IN_type_symbol))
 14996 			/* Get the value from a foo(<param_value>) style call */
 26984             {
 14997 			if (IN_param_value == NULL)
 26985         
 14998 			  IN_param_value = function_call_param_iterator.next();
 26986                 symbol_c * return_type_symbol = IN_type_symbol;
 14999 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 26987                 return return_type_symbol;
 15000 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 26988                 
 15001 			
 26989             }
 15002 			if(search_expression_type->is_real_type(IN_type_symbol))
 26990             
 15003 			{
 26991             ERROR;
 15004 		
 26992         }
 15005 				symbol_c * return_type_symbol = IN_type_symbol;
 26993         
 15006 				return return_type_symbol;
 26994     }/*function_asin*/
 15007 				
 26995     break;
 15008 			}
       
 15009 			
       
 15010 			ERROR;
       
 15011 		}
       
 15012 		
       
 15013 	}/*function_asin*/
       
 15014 	break;
       
 15015 
 26996 
 15016 /****
 26997 /****
 15017  *ACOS
 26998  *ACOS
 15018  */
 26999  */
 15019 	case function_acos :
 27000     case function_acos :
 15020 	{
 27001     {
 15021 		symbol_c *last_type_symbol = NULL;
 27002         symbol_c *last_type_symbol = NULL;
 15022 
 27003 
 15023 		{
 27004         {
 15024 			identifier_c param_name("IN");
 27005             symbol_c *IN_type_symbol = param_data_type;
 15025 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27006             last_type_symbol = param_data_type;
 15026 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27007             
 15027 			
 27008             if(search_expression_type->is_real_type(IN_type_symbol))
 15028 			/* Get the value from a foo(<param_value>) style call */
 27009             {
 15029 			if (IN_param_value == NULL)
 27010         
 15030 			  IN_param_value = function_call_param_iterator.next();
 27011                 symbol_c * return_type_symbol = IN_type_symbol;
 15031 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27012                 return return_type_symbol;
 15032 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27013                 
 15033 			
 27014             }
 15034 			if(search_expression_type->is_real_type(IN_type_symbol))
 27015             
 15035 			{
 27016             ERROR;
 15036 		
 27017         }
 15037 				symbol_c * return_type_symbol = IN_type_symbol;
 27018         
 15038 				return return_type_symbol;
 27019     }/*function_acos*/
 15039 				
 27020     break;
 15040 			}
       
 15041 			
       
 15042 			ERROR;
       
 15043 		}
       
 15044 		
       
 15045 	}/*function_acos*/
       
 15046 	break;
       
 15047 
 27021 
 15048 /****
 27022 /****
 15049  *ATAN
 27023  *ATAN
 15050  */
 27024  */
 15051 	case function_atan :
 27025     case function_atan :
 15052 	{
 27026     {
 15053 		symbol_c *last_type_symbol = NULL;
 27027         symbol_c *last_type_symbol = NULL;
 15054 
 27028 
 15055 		{
 27029         {
 15056 			identifier_c param_name("IN");
 27030             symbol_c *IN_type_symbol = param_data_type;
 15057 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27031             last_type_symbol = param_data_type;
 15058 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27032             
 15059 			
 27033             if(search_expression_type->is_real_type(IN_type_symbol))
 15060 			/* Get the value from a foo(<param_value>) style call */
 27034             {
 15061 			if (IN_param_value == NULL)
 27035         
 15062 			  IN_param_value = function_call_param_iterator.next();
 27036                 symbol_c * return_type_symbol = IN_type_symbol;
 15063 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27037                 return return_type_symbol;
 15064 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27038                 
 15065 			
 27039             }
 15066 			if(search_expression_type->is_real_type(IN_type_symbol))
 27040             
 15067 			{
 27041             ERROR;
 15068 		
 27042         }
 15069 				symbol_c * return_type_symbol = IN_type_symbol;
 27043         
 15070 				return return_type_symbol;
 27044     }/*function_atan*/
 15071 				
 27045     break;
 15072 			}
       
 15073 			
       
 15074 			ERROR;
       
 15075 		}
       
 15076 		
       
 15077 	}/*function_atan*/
       
 15078 	break;
       
 15079 
 27046 
 15080 /****
 27047 /****
 15081  *ADD
 27048  *ADD
 15082  */
 27049  */
 15083 	case function_add :
 27050     case function_add :
 15084 	{
 27051     {
 15085 		symbol_c *last_type_symbol = NULL;
 27052         symbol_c *last_type_symbol = NULL;
 15086 
 27053 
 15087 		{
 27054         {
 15088 			identifier_c param_name("IN1");
 27055             symbol_c *IN1_type_symbol = param_data_type;
 15089 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27056             last_type_symbol = param_data_type;
 15090 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27057             
 15091 			
 27058             if(search_expression_type->is_num_type(IN1_type_symbol))
 15092 			/* Get the value from a foo(<param_value>) style call */
 27059             {
 15093 			if (IN1_param_value == NULL)
 27060         
 15094 			  IN1_param_value = function_call_param_iterator.next();
 27061                 {
 15095 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27062                     identifier_c param_name("IN2");
 15096 			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 ;
 27063                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15097 			
 27064                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15098 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27065                     
 15099 			{
 27066                     /* Get the value from a foo(<param_value>) style call */
 15100 		
 27067                     if (IN2_param_value == NULL)
 15101 				{
 27068                       IN2_param_value = function_call_param_iterator.next();
 15102 					identifier_c param_name("IN2");
 27069                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15103 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27070                     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 ;
 15104 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27071                     
 15105 					
 27072                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15106 					/* Get the value from a foo(<param_value>) style call */
 27073                     {
 15107 					if (IN2_param_value == NULL)
 27074                 
 15108 					  IN2_param_value = function_call_param_iterator.next();
 27075                         symbol_c * return_type_symbol = last_type_symbol;
 15109 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27076                         return return_type_symbol;
 15110 					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 ;
 27077                         
 15111 					
 27078                     }
 15112 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27079                     
 15113 					{
 27080                     ERROR;
 15114 				
 27081                 }
 15115 						symbol_c * return_type_symbol = last_type_symbol;
 27082                 
 15116 						return return_type_symbol;
 27083             }
 15117 						
 27084             
 15118 					}
 27085             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15119 					
 27086             {
 15120 					ERROR;
 27087         
 15121 				}
 27088                 {
 15122 				
 27089                     identifier_c param_name("IN2");
 15123 			}
 27090                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15124 			
 27091                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15125 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 27092                     
 15126 			{
 27093                     /* Get the value from a foo(<param_value>) style call */
 15127 		
 27094                     if (IN2_param_value == NULL)
 15128 				{
 27095                       IN2_param_value = function_call_param_iterator.next();
 15129 					identifier_c param_name("IN2");
 27096                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15130 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27097                     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 ;
 15131 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27098                     
 15132 					
 27099                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15133 					/* Get the value from a foo(<param_value>) style call */
 27100                     {
 15134 					if (IN2_param_value == NULL)
 27101                 
 15135 					  IN2_param_value = function_call_param_iterator.next();
 27102                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15136 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27103                         return return_type_symbol;
 15137 					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 ;
 27104                         
 15138 					
 27105                     }
 15139 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27106                     
 15140 					{
 27107                     ERROR;
 15141 				
 27108                 }
 15142 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 27109                 
 15143 						return return_type_symbol;
 27110             }
 15144 						
 27111             
 15145 					}
 27112             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 15146 					
 27113             {
 15147 					ERROR;
 27114         
 15148 				}
 27115                 {
 15149 				
 27116                     identifier_c param_name("IN2");
 15150 			}
 27117                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15151 			
 27118                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15152 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 27119                     
 15153 			{
 27120                     /* Get the value from a foo(<param_value>) style call */
 15154 		
 27121                     if (IN2_param_value == NULL)
 15155 				{
 27122                       IN2_param_value = function_call_param_iterator.next();
 15156 					identifier_c param_name("IN2");
 27123                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15157 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27124                     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 ;
 15158 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27125                     
 15159 					
 27126                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15160 					/* Get the value from a foo(<param_value>) style call */
 27127                     {
 15161 					if (IN2_param_value == NULL)
 27128                 
 15162 					  IN2_param_value = function_call_param_iterator.next();
 27129                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15163 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27130                         return return_type_symbol;
 15164 					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 ;
 27131                         
 15165 					
 27132                     }
 15166 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27133                     
 15167 					{
 27134                     ERROR;
 15168 				
 27135                 }
 15169 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 27136                 
 15170 						return return_type_symbol;
 27137             }
 15171 						
 27138             
 15172 					}
 27139             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15173 					
 27140             {
 15174 					ERROR;
 27141         
 15175 				}
 27142                 {
 15176 				
 27143                     identifier_c param_name("IN2");
 15177 			}
 27144                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15178 			
 27145                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15179 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27146                     
 15180 			{
 27147                     /* Get the value from a foo(<param_value>) style call */
 15181 		
 27148                     if (IN2_param_value == NULL)
 15182 				{
 27149                       IN2_param_value = function_call_param_iterator.next();
 15183 					identifier_c param_name("IN2");
 27150                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15184 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27151                     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 ;
 15185 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27152                     
 15186 					
 27153                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15187 					/* Get the value from a foo(<param_value>) style call */
 27154                     {
 15188 					if (IN2_param_value == NULL)
 27155                 
 15189 					  IN2_param_value = function_call_param_iterator.next();
 27156                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15190 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27157                         return return_type_symbol;
 15191 					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 ;
 27158                         
 15192 					
 27159                     }
 15193 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27160                     
 15194 					{
 27161                     ERROR;
 15195 				
 27162                 }
 15196 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27163                 
 15197 						return return_type_symbol;
 27164             }
 15198 						
 27165             
 15199 					}
 27166             ERROR;
 15200 					
 27167         }
 15201 					ERROR;
 27168         
 15202 				}
 27169     }/*function_add*/
 15203 				
 27170     break;
 15204 			}
       
 15205 			
       
 15206 			ERROR;
       
 15207 		}
       
 15208 		
       
 15209 	}/*function_add*/
       
 15210 	break;
       
 15211 
 27171 
 15212 /****
 27172 /****
 15213  *MUL
 27173  *MUL
 15214  */
 27174  */
 15215 	case function_mul :
 27175     case function_mul :
 15216 	{
 27176     {
 15217 		symbol_c *last_type_symbol = NULL;
 27177         symbol_c *last_type_symbol = NULL;
 15218 
 27178 
 15219 		{
 27179         {
 15220 			identifier_c param_name("IN1");
 27180             symbol_c *IN1_type_symbol = param_data_type;
 15221 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27181             last_type_symbol = param_data_type;
 15222 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27182             
 15223 			
 27183             if(search_expression_type->is_num_type(IN1_type_symbol))
 15224 			/* Get the value from a foo(<param_value>) style call */
 27184             {
 15225 			if (IN1_param_value == NULL)
 27185         
 15226 			  IN1_param_value = function_call_param_iterator.next();
 27186                 {
 15227 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27187                     identifier_c param_name("IN2");
 15228 			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 ;
 27188                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15229 			
 27189                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15230 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27190                     
 15231 			{
 27191                     /* Get the value from a foo(<param_value>) style call */
 15232 		
 27192                     if (IN2_param_value == NULL)
 15233 				{
 27193                       IN2_param_value = function_call_param_iterator.next();
 15234 					identifier_c param_name("IN2");
 27194                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15235 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27195                     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 ;
 15236 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27196                     
 15237 					
 27197                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15238 					/* Get the value from a foo(<param_value>) style call */
 27198                     {
 15239 					if (IN2_param_value == NULL)
 27199                 
 15240 					  IN2_param_value = function_call_param_iterator.next();
 27200                         symbol_c * return_type_symbol = last_type_symbol;
 15241 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27201                         return return_type_symbol;
 15242 					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 ;
 27202                         
 15243 					
 27203                     }
 15244 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27204                     
 15245 					{
 27205                     ERROR;
 15246 				
 27206                 }
 15247 						symbol_c * return_type_symbol = last_type_symbol;
 27207                 
 15248 						return return_type_symbol;
 27208             }
 15249 						
 27209             
 15250 					}
 27210             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15251 					
 27211             {
 15252 					ERROR;
 27212         
 15253 				}
 27213                 {
 15254 				
 27214                     identifier_c param_name("IN2");
 15255 			}
 27215                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15256 			
 27216                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15257 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27217                     
 15258 			{
 27218                     /* Get the value from a foo(<param_value>) style call */
 15259 		
 27219                     if (IN2_param_value == NULL)
 15260 				{
 27220                       IN2_param_value = function_call_param_iterator.next();
 15261 					identifier_c param_name("IN2");
 27221                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15262 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27222                     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 ;
 15263 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27223                     
 15264 					
 27224                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15265 					/* Get the value from a foo(<param_value>) style call */
 27225                     {
 15266 					if (IN2_param_value == NULL)
 27226                 
 15267 					  IN2_param_value = function_call_param_iterator.next();
 27227                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15268 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27228                         return return_type_symbol;
 15269 					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 ;
 27229                         
 15270 					
 27230                     }
 15271 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27231                     
 15272 					{
 27232                     ERROR;
 15273 				
 27233                 }
 15274 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27234                 
 15275 						return return_type_symbol;
 27235             }
 15276 						
 27236             
 15277 					}
 27237             ERROR;
 15278 					
 27238         }
 15279 					ERROR;
 27239         
 15280 				}
 27240     }/*function_mul*/
 15281 				
 27241     break;
 15282 			}
       
 15283 			
       
 15284 			ERROR;
       
 15285 		}
       
 15286 		
       
 15287 	}/*function_mul*/
       
 15288 	break;
       
 15289 
 27242 
 15290 /****
 27243 /****
 15291  *SUB
 27244  *SUB
 15292  */
 27245  */
 15293 	case function_sub :
 27246     case function_sub :
 15294 	{
 27247     {
 15295 		symbol_c *last_type_symbol = NULL;
 27248         symbol_c *last_type_symbol = NULL;
 15296 
 27249 
 15297 		{
 27250         {
 15298 			identifier_c param_name("IN1");
 27251             symbol_c *IN1_type_symbol = param_data_type;
 15299 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27252             last_type_symbol = param_data_type;
 15300 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27253             
 15301 			
 27254             if(search_expression_type->is_num_type(IN1_type_symbol))
 15302 			/* Get the value from a foo(<param_value>) style call */
 27255             {
 15303 			if (IN1_param_value == NULL)
 27256         
 15304 			  IN1_param_value = function_call_param_iterator.next();
 27257                 {
 15305 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27258                     identifier_c param_name("IN2");
 15306 			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 ;
 27259                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15307 			
 27260                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15308 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27261                     
 15309 			{
 27262                     /* Get the value from a foo(<param_value>) style call */
 15310 		
 27263                     if (IN2_param_value == NULL)
 15311 				{
 27264                       IN2_param_value = function_call_param_iterator.next();
 15312 					identifier_c param_name("IN2");
 27265                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15313 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27266                     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 ;
 15314 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27267                     
 15315 					
 27268                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15316 					/* Get the value from a foo(<param_value>) style call */
 27269                     {
 15317 					if (IN2_param_value == NULL)
 27270                 
 15318 					  IN2_param_value = function_call_param_iterator.next();
 27271                         symbol_c * return_type_symbol = last_type_symbol;
 15319 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27272                         return return_type_symbol;
 15320 					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 ;
 27273                         
 15321 					
 27274                     }
 15322 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27275                     
 15323 					{
 27276                     ERROR;
 15324 				
 27277                 }
 15325 						symbol_c * return_type_symbol = last_type_symbol;
 27278                 
 15326 						return return_type_symbol;
 27279             }
 15327 						
 27280             
 15328 					}
 27281             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 15329 					
 27282             {
 15330 					ERROR;
 27283         
 15331 				}
 27284                 {
 15332 				
 27285                     identifier_c param_name("IN2");
 15333 			}
 27286                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15334 			
 27287                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15335 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 27288                     
 15336 			{
 27289                     /* Get the value from a foo(<param_value>) style call */
 15337 		
 27290                     if (IN2_param_value == NULL)
 15338 				{
 27291                       IN2_param_value = function_call_param_iterator.next();
 15339 					identifier_c param_name("IN2");
 27292                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15340 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27293                     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 ;
 15341 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27294                     
 15342 					
 27295                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 15343 					/* Get the value from a foo(<param_value>) style call */
 27296                     {
 15344 					if (IN2_param_value == NULL)
 27297                 
 15345 					  IN2_param_value = function_call_param_iterator.next();
 27298                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15346 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27299                         return return_type_symbol;
 15347 					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 ;
 27300                         
 15348 					
 27301                     }
 15349 					if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 27302                     
 15350 					{
 27303                     ERROR;
 15351 				
 27304                 }
 15352 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27305                 
 15353 						return return_type_symbol;
 27306             }
 15354 						
 27307             
 15355 					}
 27308             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15356 					
 27309             {
 15357 					ERROR;
 27310         
 15358 				}
 27311                 {
 15359 				
 27312                     identifier_c param_name("IN2");
 15360 			}
 27313                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15361 			
 27314                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15362 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 27315                     
 15363 			{
 27316                     /* Get the value from a foo(<param_value>) style call */
 15364 		
 27317                     if (IN2_param_value == NULL)
 15365 				{
 27318                       IN2_param_value = function_call_param_iterator.next();
 15366 					identifier_c param_name("IN2");
 27319                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15367 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27320                     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 ;
 15368 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27321                     
 15369 					
 27322                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15370 					/* Get the value from a foo(<param_value>) style call */
 27323                     {
 15371 					if (IN2_param_value == NULL)
 27324                 
 15372 					  IN2_param_value = function_call_param_iterator.next();
 27325                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15373 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27326                         return return_type_symbol;
 15374 					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 ;
 27327                         
 15375 					
 27328                     }
 15376 					if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 27329                     
 15377 					{
 27330                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15378 				
 27331                     {
 15379 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27332                 
 15380 						return return_type_symbol;
 27333                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15381 						
 27334                         return return_type_symbol;
 15382 					}
 27335                         
 15383 					
 27336                     }
 15384 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27337                     
 15385 					{
 27338                     ERROR;
 15386 				
 27339                 }
 15387 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 27340                 
 15388 						return return_type_symbol;
 27341             }
 15389 						
 27342             
 15390 					}
 27343             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 15391 					
 27344             {
 15392 					ERROR;
 27345         
 15393 				}
 27346                 {
 15394 				
 27347                     identifier_c param_name("IN2");
 15395 			}
 27348                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15396 			
 27349                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15397 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 27350                     
 15398 			{
 27351                     /* Get the value from a foo(<param_value>) style call */
 15399 		
 27352                     if (IN2_param_value == NULL)
 15400 				{
 27353                       IN2_param_value = function_call_param_iterator.next();
 15401 					identifier_c param_name("IN2");
 27354                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15402 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27355                     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 ;
 15403 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27356                     
 15404 					
 27357                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 15405 					/* Get the value from a foo(<param_value>) style call */
 27358                     {
 15406 					if (IN2_param_value == NULL)
 27359                 
 15407 					  IN2_param_value = function_call_param_iterator.next();
 27360                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15408 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27361                         return return_type_symbol;
 15409 					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 ;
 27362                         
 15410 					
 27363                     }
 15411 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 27364                     
 15412 					{
 27365                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15413 				
 27366                     {
 15414 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27367                 
 15415 						return return_type_symbol;
 27368                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15416 						
 27369                         return return_type_symbol;
 15417 					}
 27370                         
 15418 					
 27371                     }
 15419 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27372                     
 15420 					{
 27373                     ERROR;
 15421 				
 27374                 }
 15422 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 27375                 
 15423 						return return_type_symbol;
 27376             }
 15424 						
 27377             
 15425 					}
 27378             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15426 					
 27379             {
 15427 					ERROR;
 27380         
 15428 				}
 27381                 {
 15429 				
 27382                     identifier_c param_name("IN2");
 15430 			}
 27383                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15431 			
 27384                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15432 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27385                     
 15433 			{
 27386                     /* Get the value from a foo(<param_value>) style call */
 15434 		
 27387                     if (IN2_param_value == NULL)
 15435 				{
 27388                       IN2_param_value = function_call_param_iterator.next();
 15436 					identifier_c param_name("IN2");
 27389                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15437 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27390                     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 ;
 15438 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27391                     
 15439 					
 27392                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15440 					/* Get the value from a foo(<param_value>) style call */
 27393                     {
 15441 					if (IN2_param_value == NULL)
 27394                 
 15442 					  IN2_param_value = function_call_param_iterator.next();
 27395                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15443 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27396                         return return_type_symbol;
 15444 					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 ;
 27397                         
 15445 					
 27398                     }
 15446 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27399                     
 15447 					{
 27400                     ERROR;
 15448 				
 27401                 }
 15449 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27402                 
 15450 						return return_type_symbol;
 27403             }
 15451 						
 27404             
 15452 					}
 27405             ERROR;
 15453 					
 27406         }
 15454 					ERROR;
 27407         
 15455 				}
 27408     }/*function_sub*/
 15456 				
 27409     break;
 15457 			}
       
 15458 			
       
 15459 			ERROR;
       
 15460 		}
       
 15461 		
       
 15462 	}/*function_sub*/
       
 15463 	break;
       
 15464 
 27410 
 15465 /****
 27411 /****
 15466  *DIV
 27412  *DIV
 15467  */
 27413  */
 15468 	case function_div :
 27414     case function_div :
 15469 	{
 27415     {
 15470 		symbol_c *last_type_symbol = NULL;
 27416         symbol_c *last_type_symbol = NULL;
 15471 
 27417 
 15472 		{
 27418         {
 15473 			identifier_c param_name("IN1");
 27419             symbol_c *IN1_type_symbol = param_data_type;
 15474 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27420             last_type_symbol = param_data_type;
 15475 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27421             
 15476 			
 27422             if(search_expression_type->is_num_type(IN1_type_symbol))
 15477 			/* Get the value from a foo(<param_value>) style call */
 27423             {
 15478 			if (IN1_param_value == NULL)
 27424         
 15479 			  IN1_param_value = function_call_param_iterator.next();
 27425                 {
 15480 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27426                     identifier_c param_name("IN2");
 15481 			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 ;
 27427                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15482 			
 27428                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15483 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27429                     
 15484 			{
 27430                     /* Get the value from a foo(<param_value>) style call */
 15485 		
 27431                     if (IN2_param_value == NULL)
 15486 				{
 27432                       IN2_param_value = function_call_param_iterator.next();
 15487 					identifier_c param_name("IN2");
 27433                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15488 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27434                     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 ;
 15489 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27435                     
 15490 					
 27436                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15491 					/* Get the value from a foo(<param_value>) style call */
 27437                     {
 15492 					if (IN2_param_value == NULL)
 27438                 
 15493 					  IN2_param_value = function_call_param_iterator.next();
 27439                         symbol_c * return_type_symbol = last_type_symbol;
 15494 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27440                         return return_type_symbol;
 15495 					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 ;
 27441                         
 15496 					
 27442                     }
 15497 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27443                     
 15498 					{
 27444                     ERROR;
 15499 				
 27445                 }
 15500 						symbol_c * return_type_symbol = last_type_symbol;
 27446                 
 15501 						return return_type_symbol;
 27447             }
 15502 						
 27448             
 15503 					}
 27449             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15504 					
 27450             {
 15505 					ERROR;
 27451         
 15506 				}
 27452                 {
 15507 				
 27453                     identifier_c param_name("IN2");
 15508 			}
 27454                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15509 			
 27455                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15510 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 27456                     
 15511 			{
 27457                     /* Get the value from a foo(<param_value>) style call */
 15512 		
 27458                     if (IN2_param_value == NULL)
 15513 				{
 27459                       IN2_param_value = function_call_param_iterator.next();
 15514 					identifier_c param_name("IN2");
 27460                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15515 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27461                     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 ;
 15516 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27462                     
 15517 					
 27463                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15518 					/* Get the value from a foo(<param_value>) style call */
 27464                     {
 15519 					if (IN2_param_value == NULL)
 27465                 
 15520 					  IN2_param_value = function_call_param_iterator.next();
 27466                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15521 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27467                         return return_type_symbol;
 15522 					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 ;
 27468                         
 15523 					
 27469                     }
 15524 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27470                     
 15525 					{
 27471                     ERROR;
 15526 				
 27472                 }
 15527 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27473                 
 15528 						return return_type_symbol;
 27474             }
 15529 						
 27475             
 15530 					}
 27476             ERROR;
 15531 					
 27477         }
 15532 					ERROR;
 27478         
 15533 				}
 27479     }/*function_div*/
 15534 				
 27480     break;
 15535 			}
       
 15536 			
       
 15537 			ERROR;
       
 15538 		}
       
 15539 		
       
 15540 	}/*function_div*/
       
 15541 	break;
       
 15542 
 27481 
 15543 /****
 27482 /****
 15544  *MOD
 27483  *MOD
 15545  */
 27484  */
 15546 	case function_mod :
 27485     case function_mod :
 15547 	{
 27486     {
 15548 		symbol_c *last_type_symbol = NULL;
 27487         symbol_c *last_type_symbol = NULL;
 15549 
 27488 
 15550 		{
 27489         {
 15551 			identifier_c param_name("IN1");
 27490             symbol_c *IN1_type_symbol = param_data_type;
 15552 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27491             last_type_symbol = param_data_type;
 15553 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27492             
 15554 			
 27493             if(search_expression_type->is_num_type(IN1_type_symbol))
 15555 			/* Get the value from a foo(<param_value>) style call */
 27494             {
 15556 			if (IN1_param_value == NULL)
 27495         
 15557 			  IN1_param_value = function_call_param_iterator.next();
 27496                 {
 15558 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27497                     identifier_c param_name("IN2");
 15559 			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 ;
 27498                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15560 			
 27499                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15561 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27500                     
 15562 			{
 27501                     /* Get the value from a foo(<param_value>) style call */
 15563 		
 27502                     if (IN2_param_value == NULL)
 15564 				{
 27503                       IN2_param_value = function_call_param_iterator.next();
 15565 					identifier_c param_name("IN2");
 27504                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15566 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27505                     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 ;
 15567 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27506                     
 15568 					
 27507                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15569 					/* Get the value from a foo(<param_value>) style call */
 27508                     {
 15570 					if (IN2_param_value == NULL)
 27509                 
 15571 					  IN2_param_value = function_call_param_iterator.next();
 27510                         symbol_c * return_type_symbol = last_type_symbol;
 15572 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27511                         return return_type_symbol;
 15573 					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 ;
 27512                         
 15574 					
 27513                     }
 15575 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27514                     
 15576 					{
 27515                     ERROR;
 15577 				
 27516                 }
 15578 						symbol_c * return_type_symbol = last_type_symbol;
 27517                 
 15579 						return return_type_symbol;
 27518             }
 15580 						
 27519             
 15581 					}
 27520             ERROR;
 15582 					
 27521         }
 15583 					ERROR;
 27522         
 15584 				}
 27523     }/*function_mod*/
 15585 				
 27524     break;
 15586 			}
       
 15587 			
       
 15588 			ERROR;
       
 15589 		}
       
 15590 		
       
 15591 	}/*function_mod*/
       
 15592 	break;
       
 15593 
 27525 
 15594 /****
 27526 /****
 15595  *EXPT
 27527  *EXPT
 15596  */
 27528  */
 15597 	case function_expt :
 27529     case function_expt :
 15598 	{
 27530     {
 15599 		symbol_c *last_type_symbol = NULL;
 27531         symbol_c *last_type_symbol = NULL;
 15600 
 27532 
 15601 		{
 27533         {
 15602 			identifier_c param_name("IN1");
 27534             symbol_c *IN1_type_symbol = param_data_type;
 15603 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27535             last_type_symbol = param_data_type;
 15604 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27536             
 15605 			
 27537             if(search_expression_type->is_num_type(IN1_type_symbol))
 15606 			/* Get the value from a foo(<param_value>) style call */
 27538             {
 15607 			if (IN1_param_value == NULL)
 27539         
 15608 			  IN1_param_value = function_call_param_iterator.next();
 27540                 {
 15609 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27541                     identifier_c param_name("IN2");
 15610 			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 ;
 27542                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15611 			
 27543                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15612 			if(search_expression_type->is_num_type(IN1_type_symbol))
 27544                     
 15613 			{
 27545                     /* Get the value from a foo(<param_value>) style call */
 15614 		
 27546                     if (IN2_param_value == NULL)
 15615 				{
 27547                       IN2_param_value = function_call_param_iterator.next();
 15616 					identifier_c param_name("IN2");
 27548                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15617 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27549                     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 ;
 15618 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27550                     
 15619 					
 27551                     if(search_expression_type->is_num_type(IN2_type_symbol))
 15620 					/* Get the value from a foo(<param_value>) style call */
 27552                     {
 15621 					if (IN2_param_value == NULL)
 27553                 
 15622 					  IN2_param_value = function_call_param_iterator.next();
 27554                         symbol_c * return_type_symbol = last_type_symbol;
 15623 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27555                         return return_type_symbol;
 15624 					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 ;
 27556                         
 15625 					
 27557                     }
 15626 					if(search_expression_type->is_num_type(IN2_type_symbol))
 27558                     
 15627 					{
 27559                     ERROR;
 15628 				
 27560                 }
 15629 						symbol_c * return_type_symbol = last_type_symbol;
 27561                 
 15630 						return return_type_symbol;
 27562             }
 15631 						
 27563             
 15632 					}
 27564             ERROR;
 15633 					
 27565         }
 15634 					ERROR;
 27566         
 15635 				}
 27567     }/*function_expt*/
 15636 				
 27568     break;
 15637 			}
       
 15638 			
       
 15639 			ERROR;
       
 15640 		}
       
 15641 		
       
 15642 	}/*function_expt*/
       
 15643 	break;
       
 15644 
 27569 
 15645 /****
 27570 /****
 15646  *MOVE
 27571  *MOVE
 15647  */
 27572  */
 15648 	case function_move :
 27573     case function_move :
 15649 	{
 27574     {
 15650 		symbol_c *last_type_symbol = NULL;
 27575         symbol_c *last_type_symbol = NULL;
 15651 
 27576 
 15652 		{
 27577         {
 15653 			identifier_c param_name("IN");
 27578             symbol_c *IN_type_symbol = param_data_type;
 15654 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27579             last_type_symbol = param_data_type;
 15655 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27580             
 15656 			
 27581             if(search_expression_type->is_num_type(IN_type_symbol))
 15657 			/* Get the value from a foo(<param_value>) style call */
 27582             {
 15658 			if (IN_param_value == NULL)
 27583         
 15659 			  IN_param_value = function_call_param_iterator.next();
 27584                 symbol_c * return_type_symbol = last_type_symbol;
 15660 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27585                 return return_type_symbol;
 15661 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27586                 
 15662 			
 27587             }
 15663 			if(search_expression_type->is_num_type(IN_type_symbol))
 27588             
 15664 			{
 27589             ERROR;
 15665 		
 27590         }
 15666 				symbol_c * return_type_symbol = last_type_symbol;
 27591         
 15667 				return return_type_symbol;
 27592     }/*function_move*/
 15668 				
 27593     break;
 15669 			}
       
 15670 			
       
 15671 			ERROR;
       
 15672 		}
       
 15673 		
       
 15674 	}/*function_move*/
       
 15675 	break;
       
 15676 
 27594 
 15677 /****
 27595 /****
 15678  *SHL
 27596  *SHL
 15679  */
 27597  */
 15680 	case function_shl :
 27598     case function_shl :
 15681 	{
 27599     {
 15682 		symbol_c *last_type_symbol = NULL;
 27600         symbol_c *last_type_symbol = NULL;
 15683 
 27601 
 15684 		{
 27602         {
 15685 			identifier_c param_name("IN");
 27603             symbol_c *IN_type_symbol = param_data_type;
 15686 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27604             last_type_symbol = param_data_type;
 15687 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27605             
 15688 			
 27606             if(search_expression_type->is_binary_type(IN_type_symbol))
 15689 			/* Get the value from a foo(<param_value>) style call */
 27607             {
 15690 			if (IN_param_value == NULL)
 27608         
 15691 			  IN_param_value = function_call_param_iterator.next();
 27609                 {
 15692 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27610                     identifier_c param_name("N");
 15693 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27611                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15694 			
 27612                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 15695 			if(search_expression_type->is_binary_type(IN_type_symbol))
 27613                     
 15696 			{
 27614                     /* Get the value from a foo(<param_value>) style call */
 15697 		
 27615                     if (N_param_value == NULL)
 15698 				{
 27616                       N_param_value = function_call_param_iterator.next();
 15699 					identifier_c param_name("N");
 27617                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15700 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27618                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15701 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 27619                     
 15702 					
 27620                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15703 					/* Get the value from a foo(<param_value>) style call */
 27621                     {
 15704 					if (N_param_value == NULL)
 27622                 
 15705 					  N_param_value = function_call_param_iterator.next();
 27623                         symbol_c * return_type_symbol = IN_type_symbol;
 15706 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 27624                         return return_type_symbol;
 15707 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 27625                         
 15708 					
 27626                     }
 15709 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 27627                     
 15710 					{
 27628                     ERROR;
 15711 				
 27629                 }
 15712 						symbol_c * return_type_symbol = IN_type_symbol;
 27630                 
 15713 						return return_type_symbol;
 27631             }
 15714 						
 27632             
 15715 					}
 27633             ERROR;
 15716 					
 27634         }
 15717 					ERROR;
 27635         
 15718 				}
 27636     }/*function_shl*/
 15719 				
 27637     break;
 15720 			}
       
 15721 			
       
 15722 			ERROR;
       
 15723 		}
       
 15724 		
       
 15725 	}/*function_shl*/
       
 15726 	break;
       
 15727 
 27638 
 15728 /****
 27639 /****
 15729  *SHR
 27640  *SHR
 15730  */
 27641  */
 15731 	case function_shr :
 27642     case function_shr :
 15732 	{
 27643     {
 15733 		symbol_c *last_type_symbol = NULL;
 27644         symbol_c *last_type_symbol = NULL;
 15734 
 27645 
 15735 		{
 27646         {
 15736 			identifier_c param_name("IN");
 27647             symbol_c *IN_type_symbol = param_data_type;
 15737 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27648             last_type_symbol = param_data_type;
 15738 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27649             
 15739 			
 27650             if(search_expression_type->is_binary_type(IN_type_symbol))
 15740 			/* Get the value from a foo(<param_value>) style call */
 27651             {
 15741 			if (IN_param_value == NULL)
 27652         
 15742 			  IN_param_value = function_call_param_iterator.next();
 27653                 {
 15743 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27654                     identifier_c param_name("N");
 15744 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27655                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15745 			
 27656                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 15746 			if(search_expression_type->is_binary_type(IN_type_symbol))
 27657                     
 15747 			{
 27658                     /* Get the value from a foo(<param_value>) style call */
 15748 		
 27659                     if (N_param_value == NULL)
 15749 				{
 27660                       N_param_value = function_call_param_iterator.next();
 15750 					identifier_c param_name("N");
 27661                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15751 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27662                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15752 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 27663                     
 15753 					
 27664                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15754 					/* Get the value from a foo(<param_value>) style call */
 27665                     {
 15755 					if (N_param_value == NULL)
 27666                 
 15756 					  N_param_value = function_call_param_iterator.next();
 27667                         symbol_c * return_type_symbol = IN_type_symbol;
 15757 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 27668                         return return_type_symbol;
 15758 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 27669                         
 15759 					
 27670                     }
 15760 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 27671                     
 15761 					{
 27672                     ERROR;
 15762 				
 27673                 }
 15763 						symbol_c * return_type_symbol = IN_type_symbol;
 27674                 
 15764 						return return_type_symbol;
 27675             }
 15765 						
 27676             
 15766 					}
 27677             ERROR;
 15767 					
 27678         }
 15768 					ERROR;
 27679         
 15769 				}
 27680     }/*function_shr*/
 15770 				
 27681     break;
 15771 			}
       
 15772 			
       
 15773 			ERROR;
       
 15774 		}
       
 15775 		
       
 15776 	}/*function_shr*/
       
 15777 	break;
       
 15778 
 27682 
 15779 /****
 27683 /****
 15780  *ROR
 27684  *ROR
 15781  */
 27685  */
 15782 	case function_ror :
 27686     case function_ror :
 15783 	{
 27687     {
 15784 		symbol_c *last_type_symbol = NULL;
 27688         symbol_c *last_type_symbol = NULL;
 15785 
 27689 
 15786 		{
 27690         {
 15787 			identifier_c param_name("IN");
 27691             symbol_c *IN_type_symbol = param_data_type;
 15788 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27692             last_type_symbol = param_data_type;
 15789 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27693             
 15790 			
 27694             if(search_expression_type->is_binary_type(IN_type_symbol))
 15791 			/* Get the value from a foo(<param_value>) style call */
 27695             {
 15792 			if (IN_param_value == NULL)
 27696         
 15793 			  IN_param_value = function_call_param_iterator.next();
 27697                 {
 15794 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27698                     identifier_c param_name("N");
 15795 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27699                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15796 			
 27700                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 15797 			if(search_expression_type->is_binary_type(IN_type_symbol))
 27701                     
 15798 			{
 27702                     /* Get the value from a foo(<param_value>) style call */
 15799 		
 27703                     if (N_param_value == NULL)
 15800 				{
 27704                       N_param_value = function_call_param_iterator.next();
 15801 					identifier_c param_name("N");
 27705                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15802 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27706                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15803 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 27707                     
 15804 					
 27708                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15805 					/* Get the value from a foo(<param_value>) style call */
 27709                     {
 15806 					if (N_param_value == NULL)
 27710                 
 15807 					  N_param_value = function_call_param_iterator.next();
 27711                         symbol_c * return_type_symbol = IN_type_symbol;
 15808 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 27712                         return return_type_symbol;
 15809 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 27713                         
 15810 					
 27714                     }
 15811 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 27715                     
 15812 					{
 27716                     ERROR;
 15813 				
 27717                 }
 15814 						symbol_c * return_type_symbol = IN_type_symbol;
 27718                 
 15815 						return return_type_symbol;
 27719             }
 15816 						
 27720             
 15817 					}
 27721             ERROR;
 15818 					
 27722         }
 15819 					ERROR;
 27723         
 15820 				}
 27724     }/*function_ror*/
 15821 				
 27725     break;
 15822 			}
       
 15823 			
       
 15824 			ERROR;
       
 15825 		}
       
 15826 		
       
 15827 	}/*function_ror*/
       
 15828 	break;
       
 15829 
 27726 
 15830 /****
 27727 /****
 15831  *ROL
 27728  *ROL
 15832  */
 27729  */
 15833 	case function_rol :
 27730     case function_rol :
 15834 	{
 27731     {
 15835 		symbol_c *last_type_symbol = NULL;
 27732         symbol_c *last_type_symbol = NULL;
 15836 
 27733 
 15837 		{
 27734         {
 15838 			identifier_c param_name("IN");
 27735             symbol_c *IN_type_symbol = param_data_type;
 15839 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27736             last_type_symbol = param_data_type;
 15840 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27737             
 15841 			
 27738             if(search_expression_type->is_binary_type(IN_type_symbol))
 15842 			/* Get the value from a foo(<param_value>) style call */
 27739             {
 15843 			if (IN_param_value == NULL)
 27740         
 15844 			  IN_param_value = function_call_param_iterator.next();
 27741                 {
 15845 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27742                     identifier_c param_name("N");
 15846 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27743                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15847 			
 27744                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 15848 			if(search_expression_type->is_binary_type(IN_type_symbol))
 27745                     
 15849 			{
 27746                     /* Get the value from a foo(<param_value>) style call */
 15850 		
 27747                     if (N_param_value == NULL)
 15851 				{
 27748                       N_param_value = function_call_param_iterator.next();
 15852 					identifier_c param_name("N");
 27749                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15853 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27750                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15854 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 27751                     
 15855 					
 27752                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15856 					/* Get the value from a foo(<param_value>) style call */
 27753                     {
 15857 					if (N_param_value == NULL)
 27754                 
 15858 					  N_param_value = function_call_param_iterator.next();
 27755                         symbol_c * return_type_symbol = IN_type_symbol;
 15859 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 27756                         return return_type_symbol;
 15860 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 27757                         
 15861 					
 27758                     }
 15862 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 27759                     
 15863 					{
 27760                     ERROR;
 15864 				
 27761                 }
 15865 						symbol_c * return_type_symbol = IN_type_symbol;
 27762                 
 15866 						return return_type_symbol;
 27763             }
 15867 						
 27764             
 15868 					}
 27765             ERROR;
 15869 					
 27766         }
 15870 					ERROR;
 27767         
 15871 				}
 27768     }/*function_rol*/
 15872 				
 27769     break;
 15873 			}
       
 15874 			
       
 15875 			ERROR;
       
 15876 		}
       
 15877 		
       
 15878 	}/*function_rol*/
       
 15879 	break;
       
 15880 
 27770 
 15881 /****
 27771 /****
 15882  *AND
 27772  *AND
 15883  */
 27773  */
 15884 	case function_and :
 27774     case function_and :
 15885 	{
 27775     {
 15886 		symbol_c *last_type_symbol = NULL;
 27776         symbol_c *last_type_symbol = NULL;
 15887 
 27777 
 15888 		{
 27778         {
 15889 			identifier_c param_name("IN1");
 27779             symbol_c *IN1_type_symbol = param_data_type;
 15890 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27780             last_type_symbol = param_data_type;
 15891 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27781             
 15892 			
 27782             if(search_expression_type->is_binary_type(IN1_type_symbol))
 15893 			/* Get the value from a foo(<param_value>) style call */
 27783             {
 15894 			if (IN1_param_value == NULL)
 27784         
 15895 			  IN1_param_value = function_call_param_iterator.next();
 27785                 {
 15896 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27786                     identifier_c param_name("IN2");
 15897 			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 ;
 27787                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15898 			
 27788                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15899 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 27789                     
 15900 			{
 27790                     /* Get the value from a foo(<param_value>) style call */
 15901 		
 27791                     if (IN2_param_value == NULL)
 15902 				{
 27792                       IN2_param_value = function_call_param_iterator.next();
 15903 					identifier_c param_name("IN2");
 27793                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15904 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27794                     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 ;
 15905 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27795                     
 15906 					
 27796                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15907 					/* Get the value from a foo(<param_value>) style call */
 27797                     {
 15908 					if (IN2_param_value == NULL)
 27798                 
 15909 					  IN2_param_value = function_call_param_iterator.next();
 27799                         symbol_c * return_type_symbol = last_type_symbol;
 15910 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27800                         return return_type_symbol;
 15911 					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 ;
 27801                         
 15912 					
 27802                     }
 15913 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 27803                     
 15914 					{
 27804                     ERROR;
 15915 				
 27805                 }
 15916 						symbol_c * return_type_symbol = last_type_symbol;
 27806                 
 15917 						return return_type_symbol;
 27807             }
 15918 						
 27808             
 15919 					}
 27809             ERROR;
 15920 					
 27810         }
 15921 					ERROR;
 27811         
 15922 				}
 27812     }/*function_and*/
 15923 				
 27813     break;
 15924 			}
       
 15925 			
       
 15926 			ERROR;
       
 15927 		}
       
 15928 		
       
 15929 	}/*function_and*/
       
 15930 	break;
       
 15931 
 27814 
 15932 /****
 27815 /****
 15933  *OR
 27816  *OR
 15934  */
 27817  */
 15935 	case function_or :
 27818     case function_or :
 15936 	{
 27819     {
 15937 		symbol_c *last_type_symbol = NULL;
 27820         symbol_c *last_type_symbol = NULL;
 15938 
 27821 
 15939 		{
 27822         {
 15940 			identifier_c param_name("IN1");
 27823             symbol_c *IN1_type_symbol = param_data_type;
 15941 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27824             last_type_symbol = param_data_type;
 15942 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27825             
 15943 			
 27826             if(search_expression_type->is_binary_type(IN1_type_symbol))
 15944 			/* Get the value from a foo(<param_value>) style call */
 27827             {
 15945 			if (IN1_param_value == NULL)
 27828         
 15946 			  IN1_param_value = function_call_param_iterator.next();
 27829                 {
 15947 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27830                     identifier_c param_name("IN2");
 15948 			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 ;
 27831                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15949 			
 27832                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15950 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 27833                     
 15951 			{
 27834                     /* Get the value from a foo(<param_value>) style call */
 15952 		
 27835                     if (IN2_param_value == NULL)
 15953 				{
 27836                       IN2_param_value = function_call_param_iterator.next();
 15954 					identifier_c param_name("IN2");
 27837                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15955 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27838                     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 ;
 15956 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27839                     
 15957 					
 27840                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15958 					/* Get the value from a foo(<param_value>) style call */
 27841                     {
 15959 					if (IN2_param_value == NULL)
 27842                 
 15960 					  IN2_param_value = function_call_param_iterator.next();
 27843                         symbol_c * return_type_symbol = last_type_symbol;
 15961 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27844                         return return_type_symbol;
 15962 					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 ;
 27845                         
 15963 					
 27846                     }
 15964 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 27847                     
 15965 					{
 27848                     ERROR;
 15966 				
 27849                 }
 15967 						symbol_c * return_type_symbol = last_type_symbol;
 27850                 
 15968 						return return_type_symbol;
 27851             }
 15969 						
 27852             
 15970 					}
 27853             ERROR;
 15971 					
 27854         }
 15972 					ERROR;
 27855         
 15973 				}
 27856     }/*function_or*/
 15974 				
 27857     break;
 15975 			}
       
 15976 			
       
 15977 			ERROR;
       
 15978 		}
       
 15979 		
       
 15980 	}/*function_or*/
       
 15981 	break;
       
 15982 
 27858 
 15983 /****
 27859 /****
 15984  *XOR
 27860  *XOR
 15985  */
 27861  */
 15986 	case function_xor :
 27862     case function_xor :
 15987 	{
 27863     {
 15988 		symbol_c *last_type_symbol = NULL;
 27864         symbol_c *last_type_symbol = NULL;
 15989 
 27865 
 15990 		{
 27866         {
 15991 			identifier_c param_name("IN1");
 27867             symbol_c *IN1_type_symbol = param_data_type;
 15992 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27868             last_type_symbol = param_data_type;
 15993 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27869             
 15994 			
 27870             if(search_expression_type->is_binary_type(IN1_type_symbol))
 15995 			/* Get the value from a foo(<param_value>) style call */
 27871             {
 15996 			if (IN1_param_value == NULL)
 27872         
 15997 			  IN1_param_value = function_call_param_iterator.next();
 27873                 {
 15998 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27874                     identifier_c param_name("IN2");
 15999 			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 ;
 27875                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16000 			
 27876                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16001 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 27877                     
 16002 			{
 27878                     /* Get the value from a foo(<param_value>) style call */
 16003 		
 27879                     if (IN2_param_value == NULL)
 16004 				{
 27880                       IN2_param_value = function_call_param_iterator.next();
 16005 					identifier_c param_name("IN2");
 27881                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16006 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27882                     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 ;
 16007 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 27883                     
 16008 					
 27884                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 16009 					/* Get the value from a foo(<param_value>) style call */
 27885                     {
 16010 					if (IN2_param_value == NULL)
 27886                 
 16011 					  IN2_param_value = function_call_param_iterator.next();
 27887                         symbol_c * return_type_symbol = last_type_symbol;
 16012 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27888                         return return_type_symbol;
 16013 					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 ;
 27889                         
 16014 					
 27890                     }
 16015 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 27891                     
 16016 					{
 27892                     ERROR;
 16017 				
 27893                 }
 16018 						symbol_c * return_type_symbol = last_type_symbol;
 27894                 
 16019 						return return_type_symbol;
 27895             }
 16020 						
 27896             
 16021 					}
 27897             ERROR;
 16022 					
 27898         }
 16023 					ERROR;
 27899         
 16024 				}
 27900     }/*function_xor*/
 16025 				
 27901     break;
 16026 			}
       
 16027 			
       
 16028 			ERROR;
       
 16029 		}
       
 16030 		
       
 16031 	}/*function_xor*/
       
 16032 	break;
       
 16033 
 27902 
 16034 /****
 27903 /****
 16035  *NOT
 27904  *NOT
 16036  */
 27905  */
 16037 	case function_not :
 27906     case function_not :
 16038 	{
 27907     {
 16039 		symbol_c *last_type_symbol = NULL;
 27908         symbol_c *last_type_symbol = NULL;
 16040 
 27909 
 16041 		{
 27910         {
 16042 			identifier_c param_name("IN");
 27911             symbol_c *IN_type_symbol = param_data_type;
 16043 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27912             last_type_symbol = param_data_type;
 16044 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 27913             
 16045 			
 27914             if(search_expression_type->is_binary_type(IN_type_symbol))
 16046 			/* Get the value from a foo(<param_value>) style call */
 27915             {
 16047 			if (IN_param_value == NULL)
 27916         
 16048 			  IN_param_value = function_call_param_iterator.next();
 27917                 symbol_c * return_type_symbol = IN_type_symbol;
 16049 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 27918                 return return_type_symbol;
 16050 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 27919                 
 16051 			
 27920             }
 16052 			if(search_expression_type->is_binary_type(IN_type_symbol))
 27921             
 16053 			{
 27922             ERROR;
 16054 		
 27923         }
 16055 				symbol_c * return_type_symbol = IN_type_symbol;
 27924         
 16056 				return return_type_symbol;
 27925     }/*function_not*/
 16057 				
 27926     break;
 16058 			}
       
 16059 			
       
 16060 			ERROR;
       
 16061 		}
       
 16062 		
       
 16063 	}/*function_not*/
       
 16064 	break;
       
 16065 
 27927 
 16066 /****
 27928 /****
 16067  *SEL
 27929  *SEL
 16068  */
 27930  */
 16069 	case function_sel :
 27931     case function_sel :
 16070 	{
 27932     {
 16071 		symbol_c *last_type_symbol = NULL;
 27933         symbol_c *last_type_symbol = NULL;
 16072 
 27934 
 16073 		{
 27935         {
 16074 			identifier_c param_name("G");
 27936             symbol_c *G_type_symbol = param_data_type;
 16075 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 27937             last_type_symbol = param_data_type;
 16076 			symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
 27938             
 16077 			
 27939             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 16078 			/* Get the value from a foo(<param_value>) style call */
 27940             {
 16079 			if (G_param_value == NULL)
 27941         
 16080 			  G_param_value = function_call_param_iterator.next();
 27942                 {
 16081 			symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 27943                     identifier_c param_name("IN0");
 16082 			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 ;
 27944                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16083 			
 27945                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 16084 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 27946                     
 16085 			{
 27947                     /* Get the value from a foo(<param_value>) style call */
 16086 		
 27948                     if (IN0_param_value == NULL)
 16087 				{
 27949                       IN0_param_value = function_call_param_iterator.next();
 16088 					identifier_c param_name("IN0");
 27950                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 16089 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 27951                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
 16090 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 27952                     
 16091 					
 27953                     
 16092 					/* Get the value from a foo(<param_value>) style call */
 27954                     {
 16093 					if (IN0_param_value == NULL)
 27955                 
 16094 					  IN0_param_value = function_call_param_iterator.next();
 27956                         {
 16095 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 27957                             identifier_c param_name("IN1");
 16096 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
 27958                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16097 					
 27959                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16098 					
 27960                             
 16099 					{
 27961                             /* Get the value from a foo(<param_value>) style call */
 16100 				
 27962                             if (IN1_param_value == NULL)
 16101 						{
 27963                               IN1_param_value = function_call_param_iterator.next();
 16102 							identifier_c param_name("IN1");
 27964                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16103 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 27965                             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 ;
 16104 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 27966                             
 16105 							
 27967                             
 16106 							/* Get the value from a foo(<param_value>) style call */
 27968                             {
 16107 							if (IN1_param_value == NULL)
 27969                         
 16108 							  IN1_param_value = function_call_param_iterator.next();
 27970                                 symbol_c * return_type_symbol = last_type_symbol;
 16109 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 27971                                 return return_type_symbol;
 16110 							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 ;
 27972                                 
 16111 							
 27973                             }
 16112 							
 27974                             
 16113 							{
 27975                             ERROR;
 16114 						
 27976                         }
 16115 								symbol_c * return_type_symbol = last_type_symbol;
 27977                         
 16116 								return return_type_symbol;
 27978                     }
 16117 								
 27979                     
 16118 							}
 27980                     ERROR;
 16119 							
 27981                 }
 16120 							ERROR;
 27982                 
 16121 						}
 27983             }
 16122 						
 27984             
 16123 					}
 27985             ERROR;
 16124 					
 27986         }
 16125 					ERROR;
 27987         
 16126 				}
 27988     }/*function_sel*/
 16127 				
 27989     break;
 16128 			}
       
 16129 			
       
 16130 			ERROR;
       
 16131 		}
       
 16132 		
       
 16133 	}/*function_sel*/
       
 16134 	break;
       
 16135 
 27990 
 16136 /****
 27991 /****
 16137  *MAX
 27992  *MAX
 16138  */
 27993  */
 16139 	case function_max :
 27994     case function_max :
 16140 	{
 27995     {
 16141 		symbol_c *last_type_symbol = NULL;
 27996         symbol_c *last_type_symbol = NULL;
 16142 
 27997 
 16143 		{
 27998         {
 16144 			identifier_c param_name("IN1");
 27999             symbol_c *IN1_type_symbol = param_data_type;
 16145 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28000             last_type_symbol = param_data_type;
 16146 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28001             
 16147 			
 28002             
 16148 			/* Get the value from a foo(<param_value>) style call */
 28003             {
 16149 			if (IN1_param_value == NULL)
 28004         
 16150 			  IN1_param_value = function_call_param_iterator.next();
 28005                 {
 16151 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28006                     identifier_c param_name("IN2");
 16152 			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 ;
 28007                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16153 			
 28008                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16154 			
 28009                     
 16155 			{
 28010                     /* Get the value from a foo(<param_value>) style call */
 16156 		
 28011                     if (IN2_param_value == NULL)
 16157 				{
 28012                       IN2_param_value = function_call_param_iterator.next();
 16158 					identifier_c param_name("IN2");
 28013                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16159 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28014                     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 ;
 16160 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28015                     
 16161 					
 28016                     
 16162 					/* Get the value from a foo(<param_value>) style call */
 28017                     {
 16163 					if (IN2_param_value == NULL)
 28018                 
 16164 					  IN2_param_value = function_call_param_iterator.next();
 28019                         symbol_c * return_type_symbol = last_type_symbol;
 16165 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28020                         return return_type_symbol;
 16166 					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 ;
 28021                         
 16167 					
 28022                     }
 16168 					
 28023                     
 16169 					{
 28024                     ERROR;
 16170 				
 28025                 }
 16171 						symbol_c * return_type_symbol = last_type_symbol;
 28026                 
 16172 						return return_type_symbol;
 28027             }
 16173 						
 28028             
 16174 					}
 28029             ERROR;
 16175 					
 28030         }
 16176 					ERROR;
 28031         
 16177 				}
 28032     }/*function_max*/
 16178 				
 28033     break;
 16179 			}
       
 16180 			
       
 16181 			ERROR;
       
 16182 		}
       
 16183 		
       
 16184 	}/*function_max*/
       
 16185 	break;
       
 16186 
 28034 
 16187 /****
 28035 /****
 16188  *MIN
 28036  *MIN
 16189  */
 28037  */
 16190 	case function_min :
 28038     case function_min :
 16191 	{
 28039     {
 16192 		symbol_c *last_type_symbol = NULL;
 28040         symbol_c *last_type_symbol = NULL;
 16193 
 28041 
 16194 		{
 28042         {
 16195 			identifier_c param_name("IN1");
 28043             symbol_c *IN1_type_symbol = param_data_type;
 16196 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28044             last_type_symbol = param_data_type;
 16197 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28045             
 16198 			
 28046             
 16199 			/* Get the value from a foo(<param_value>) style call */
 28047             {
 16200 			if (IN1_param_value == NULL)
 28048         
 16201 			  IN1_param_value = function_call_param_iterator.next();
 28049                 {
 16202 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28050                     identifier_c param_name("IN2");
 16203 			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 ;
 28051                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16204 			
 28052                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16205 			
 28053                     
 16206 			{
 28054                     /* Get the value from a foo(<param_value>) style call */
 16207 		
 28055                     if (IN2_param_value == NULL)
 16208 				{
 28056                       IN2_param_value = function_call_param_iterator.next();
 16209 					identifier_c param_name("IN2");
 28057                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16210 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28058                     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 ;
 16211 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28059                     
 16212 					
 28060                     
 16213 					/* Get the value from a foo(<param_value>) style call */
 28061                     {
 16214 					if (IN2_param_value == NULL)
 28062                 
 16215 					  IN2_param_value = function_call_param_iterator.next();
 28063                         symbol_c * return_type_symbol = last_type_symbol;
 16216 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28064                         return return_type_symbol;
 16217 					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 ;
 28065                         
 16218 					
 28066                     }
 16219 					
 28067                     
 16220 					{
 28068                     ERROR;
 16221 				
 28069                 }
 16222 						symbol_c * return_type_symbol = last_type_symbol;
 28070                 
 16223 						return return_type_symbol;
 28071             }
 16224 						
 28072             
 16225 					}
 28073             ERROR;
 16226 					
 28074         }
 16227 					ERROR;
 28075         
 16228 				}
 28076     }/*function_min*/
 16229 				
 28077     break;
 16230 			}
       
 16231 			
       
 16232 			ERROR;
       
 16233 		}
       
 16234 		
       
 16235 	}/*function_min*/
       
 16236 	break;
       
 16237 
 28078 
 16238 /****
 28079 /****
 16239  *LIMIT
 28080  *LIMIT
 16240  */
 28081  */
 16241 	case function_limit :
 28082     case function_limit :
 16242 	{
 28083     {
 16243 		symbol_c *last_type_symbol = NULL;
 28084         symbol_c *last_type_symbol = NULL;
 16244 
 28085 
 16245 		{
 28086         {
 16246 			identifier_c param_name("MN");
 28087             symbol_c *MN_type_symbol = param_data_type;
 16247 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28088             last_type_symbol = param_data_type;
 16248 			symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
 28089             
 16249 			
 28090             
 16250 			/* Get the value from a foo(<param_value>) style call */
 28091             {
 16251 			if (MN_param_value == NULL)
 28092         
 16252 			  MN_param_value = function_call_param_iterator.next();
 28093                 {
 16253 			symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
 28094                     identifier_c param_name("IN");
 16254 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
 28095                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16255 			
 28096                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16256 			
 28097                     
 16257 			{
 28098                     /* Get the value from a foo(<param_value>) style call */
 16258 		
 28099                     if (IN_param_value == NULL)
 16259 				{
 28100                       IN_param_value = function_call_param_iterator.next();
 16260 					identifier_c param_name("IN");
 28101                     symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16261 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28102                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16262 					symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28103                     
 16263 					
 28104                     
 16264 					/* Get the value from a foo(<param_value>) style call */
 28105                     {
 16265 					if (IN_param_value == NULL)
 28106                 
 16266 					  IN_param_value = function_call_param_iterator.next();
 28107                         {
 16267 					symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28108                             identifier_c param_name("MX");
 16268 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28109                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16269 					
 28110                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
 16270 					
 28111                             
 16271 					{
 28112                             /* Get the value from a foo(<param_value>) style call */
 16272 				
 28113                             if (MX_param_value == NULL)
 16273 						{
 28114                               MX_param_value = function_call_param_iterator.next();
 16274 							identifier_c param_name("MX");
 28115                             symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
 16275 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28116                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
 16276 							symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
 28117                             
 16277 							
 28118                             
 16278 							/* Get the value from a foo(<param_value>) style call */
 28119                             {
 16279 							if (MX_param_value == NULL)
 28120                         
 16280 							  MX_param_value = function_call_param_iterator.next();
 28121                                 symbol_c * return_type_symbol = IN_type_symbol;
 16281 							symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
 28122                                 return return_type_symbol;
 16282 							last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
 28123                                 
 16283 							
 28124                             }
 16284 							
 28125                             
 16285 							{
 28126                             ERROR;
 16286 						
 28127                         }
 16287 								symbol_c * return_type_symbol = IN_type_symbol;
 28128                         
 16288 								return return_type_symbol;
 28129                     }
 16289 								
 28130                     
 16290 							}
 28131                     ERROR;
 16291 							
 28132                 }
 16292 							ERROR;
 28133                 
 16293 						}
 28134             }
 16294 						
 28135             
 16295 					}
 28136             ERROR;
 16296 					
 28137         }
 16297 					ERROR;
 28138         
 16298 				}
 28139     }/*function_limit*/
 16299 				
 28140     break;
 16300 			}
       
 16301 			
       
 16302 			ERROR;
       
 16303 		}
       
 16304 		
       
 16305 	}/*function_limit*/
       
 16306 	break;
       
 16307 
 28141 
 16308 /****
 28142 /****
 16309  *MUX
 28143  *MUX
 16310  */
 28144  */
 16311 	case function_mux :
 28145     case function_mux :
 16312 	{
 28146     {
 16313 		symbol_c *last_type_symbol = NULL;
 28147         symbol_c *last_type_symbol = NULL;
 16314 
 28148 
 16315 		{
 28149         {
 16316 			identifier_c param_name("K");
 28150             symbol_c *K_type_symbol = param_data_type;
 16317 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28151             last_type_symbol = param_data_type;
 16318 			symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
 28152             
 16319 			
 28153             if(search_expression_type->is_integer_type(K_type_symbol))
 16320 			/* Get the value from a foo(<param_value>) style call */
 28154             {
 16321 			if (K_param_value == NULL)
 28155         
 16322 			  K_param_value = function_call_param_iterator.next();
 28156                 {
 16323 			symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
 28157                     identifier_c param_name("IN0");
 16324 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
 28158                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16325 			
 28159                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 16326 			if(search_expression_type->is_integer_type(K_type_symbol))
 28160                     
 16327 			{
 28161                     /* Get the value from a foo(<param_value>) style call */
 16328 		
 28162                     if (IN0_param_value == NULL)
 16329 				{
 28163                       IN0_param_value = function_call_param_iterator.next();
 16330 					identifier_c param_name("IN0");
 28164                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 16331 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28165                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
 16332 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 28166                     
 16333 					
 28167                     
 16334 					/* Get the value from a foo(<param_value>) style call */
 28168                     {
 16335 					if (IN0_param_value == NULL)
 28169                 
 16336 					  IN0_param_value = function_call_param_iterator.next();
 28170                         {
 16337 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 28171                             identifier_c param_name("IN1");
 16338 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
 28172                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16339 					
 28173                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16340 					
 28174                             
 16341 					{
 28175                             /* Get the value from a foo(<param_value>) style call */
 16342 				
 28176                             if (IN1_param_value == NULL)
 16343 						{
 28177                               IN1_param_value = function_call_param_iterator.next();
 16344 							identifier_c param_name("IN1");
 28178                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16345 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28179                             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 ;
 16346 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28180                             
 16347 							
 28181                             
 16348 							/* Get the value from a foo(<param_value>) style call */
 28182                             {
 16349 							if (IN1_param_value == NULL)
 28183                         
 16350 							  IN1_param_value = function_call_param_iterator.next();
 28184                                 symbol_c * return_type_symbol = last_type_symbol;
 16351 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28185                                 return return_type_symbol;
 16352 							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 ;
 28186                                 
 16353 							
 28187                             }
 16354 							
 28188                             
 16355 							{
 28189                             ERROR;
 16356 						
 28190                         }
 16357 								symbol_c * return_type_symbol = last_type_symbol;
 28191                         
 16358 								return return_type_symbol;
 28192                     }
 16359 								
 28193                     
 16360 							}
 28194                     ERROR;
 16361 							
 28195                 }
 16362 							ERROR;
 28196                 
 16363 						}
 28197             }
 16364 						
 28198             
 16365 					}
 28199             ERROR;
 16366 					
 28200         }
 16367 					ERROR;
 28201         
 16368 				}
 28202     }/*function_mux*/
 16369 				
 28203     break;
 16370 			}
       
 16371 			
       
 16372 			ERROR;
       
 16373 		}
       
 16374 		
       
 16375 	}/*function_mux*/
       
 16376 	break;
       
 16377 
 28204 
 16378 /****
 28205 /****
 16379  *GT
 28206  *GT
 16380  */
 28207  */
 16381 	case function_gt :
 28208     case function_gt :
 16382 	{
 28209     {
 16383 		symbol_c *last_type_symbol = NULL;
 28210         symbol_c *last_type_symbol = NULL;
 16384 
 28211 
 16385 		{
 28212         {
 16386 			identifier_c param_name("IN1");
 28213             symbol_c *IN1_type_symbol = param_data_type;
 16387 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28214             last_type_symbol = param_data_type;
 16388 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28215             
 16389 			
 28216             
 16390 			/* Get the value from a foo(<param_value>) style call */
 28217             {
 16391 			if (IN1_param_value == NULL)
 28218         
 16392 			  IN1_param_value = function_call_param_iterator.next();
 28219                 {
 16393 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28220                     identifier_c param_name("IN2");
 16394 			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 ;
 28221                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16395 			
 28222                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16396 			
 28223                     
 16397 			{
 28224                     /* Get the value from a foo(<param_value>) style call */
 16398 		
 28225                     if (IN2_param_value == NULL)
 16399 				{
 28226                       IN2_param_value = function_call_param_iterator.next();
 16400 					identifier_c param_name("IN2");
 28227                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16401 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28228                     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 ;
 16402 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28229                     
 16403 					
 28230                     
 16404 					/* Get the value from a foo(<param_value>) style call */
 28231                     {
 16405 					if (IN2_param_value == NULL)
 28232                 
 16406 					  IN2_param_value = function_call_param_iterator.next();
 28233                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16407 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28234                         return return_type_symbol;
 16408 					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 ;
 28235                         
 16409 					
 28236                     }
 16410 					
 28237                     
 16411 					{
 28238                     ERROR;
 16412 				
 28239                 }
 16413 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28240                 
 16414 						return return_type_symbol;
 28241             }
 16415 						
 28242             
 16416 					}
 28243             ERROR;
 16417 					
 28244         }
 16418 					ERROR;
 28245         
 16419 				}
 28246     }/*function_gt*/
 16420 				
 28247     break;
 16421 			}
       
 16422 			
       
 16423 			ERROR;
       
 16424 		}
       
 16425 		
       
 16426 	}/*function_gt*/
       
 16427 	break;
       
 16428 
 28248 
 16429 /****
 28249 /****
 16430  *GE
 28250  *GE
 16431  */
 28251  */
 16432 	case function_ge :
 28252     case function_ge :
 16433 	{
 28253     {
 16434 		symbol_c *last_type_symbol = NULL;
 28254         symbol_c *last_type_symbol = NULL;
 16435 
 28255 
 16436 		{
 28256         {
 16437 			identifier_c param_name("IN1");
 28257             symbol_c *IN1_type_symbol = param_data_type;
 16438 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28258             last_type_symbol = param_data_type;
 16439 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28259             
 16440 			
 28260             
 16441 			/* Get the value from a foo(<param_value>) style call */
 28261             {
 16442 			if (IN1_param_value == NULL)
 28262         
 16443 			  IN1_param_value = function_call_param_iterator.next();
 28263                 {
 16444 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28264                     identifier_c param_name("IN2");
 16445 			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 ;
 28265                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16446 			
 28266                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16447 			
 28267                     
 16448 			{
 28268                     /* Get the value from a foo(<param_value>) style call */
 16449 		
 28269                     if (IN2_param_value == NULL)
 16450 				{
 28270                       IN2_param_value = function_call_param_iterator.next();
 16451 					identifier_c param_name("IN2");
 28271                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16452 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28272                     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 ;
 16453 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28273                     
 16454 					
 28274                     
 16455 					/* Get the value from a foo(<param_value>) style call */
 28275                     {
 16456 					if (IN2_param_value == NULL)
 28276                 
 16457 					  IN2_param_value = function_call_param_iterator.next();
 28277                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16458 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28278                         return return_type_symbol;
 16459 					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 ;
 28279                         
 16460 					
 28280                     }
 16461 					
 28281                     
 16462 					{
 28282                     ERROR;
 16463 				
 28283                 }
 16464 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28284                 
 16465 						return return_type_symbol;
 28285             }
 16466 						
 28286             
 16467 					}
 28287             ERROR;
 16468 					
 28288         }
 16469 					ERROR;
 28289         
 16470 				}
 28290     }/*function_ge*/
 16471 				
 28291     break;
 16472 			}
       
 16473 			
       
 16474 			ERROR;
       
 16475 		}
       
 16476 		
       
 16477 	}/*function_ge*/
       
 16478 	break;
       
 16479 
 28292 
 16480 /****
 28293 /****
 16481  *EQ
 28294  *EQ
 16482  */
 28295  */
 16483 	case function_eq :
 28296     case function_eq :
 16484 	{
 28297     {
 16485 		symbol_c *last_type_symbol = NULL;
 28298         symbol_c *last_type_symbol = NULL;
 16486 
 28299 
 16487 		{
 28300         {
 16488 			identifier_c param_name("IN1");
 28301             symbol_c *IN1_type_symbol = param_data_type;
 16489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28302             last_type_symbol = param_data_type;
 16490 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28303             
 16491 			
 28304             
 16492 			/* Get the value from a foo(<param_value>) style call */
 28305             {
 16493 			if (IN1_param_value == NULL)
 28306         
 16494 			  IN1_param_value = function_call_param_iterator.next();
 28307                 {
 16495 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28308                     identifier_c param_name("IN2");
 16496 			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 ;
 28309                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16497 			
 28310                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16498 			
 28311                     
 16499 			{
 28312                     /* Get the value from a foo(<param_value>) style call */
 16500 		
 28313                     if (IN2_param_value == NULL)
 16501 				{
 28314                       IN2_param_value = function_call_param_iterator.next();
 16502 					identifier_c param_name("IN2");
 28315                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16503 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28316                     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 ;
 16504 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28317                     
 16505 					
 28318                     
 16506 					/* Get the value from a foo(<param_value>) style call */
 28319                     {
 16507 					if (IN2_param_value == NULL)
 28320                 
 16508 					  IN2_param_value = function_call_param_iterator.next();
 28321                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16509 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28322                         return return_type_symbol;
 16510 					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 ;
 28323                         
 16511 					
 28324                     }
 16512 					
 28325                     
 16513 					{
 28326                     ERROR;
 16514 				
 28327                 }
 16515 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28328                 
 16516 						return return_type_symbol;
 28329             }
 16517 						
 28330             
 16518 					}
 28331             ERROR;
 16519 					
 28332         }
 16520 					ERROR;
 28333         
 16521 				}
 28334     }/*function_eq*/
 16522 				
 28335     break;
 16523 			}
       
 16524 			
       
 16525 			ERROR;
       
 16526 		}
       
 16527 		
       
 16528 	}/*function_eq*/
       
 16529 	break;
       
 16530 
 28336 
 16531 /****
 28337 /****
 16532  *LT
 28338  *LT
 16533  */
 28339  */
 16534 	case function_lt :
 28340     case function_lt :
 16535 	{
 28341     {
 16536 		symbol_c *last_type_symbol = NULL;
 28342         symbol_c *last_type_symbol = NULL;
 16537 
 28343 
 16538 		{
 28344         {
 16539 			identifier_c param_name("IN1");
 28345             symbol_c *IN1_type_symbol = param_data_type;
 16540 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28346             last_type_symbol = param_data_type;
 16541 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28347             
 16542 			
 28348             
 16543 			/* Get the value from a foo(<param_value>) style call */
 28349             {
 16544 			if (IN1_param_value == NULL)
 28350         
 16545 			  IN1_param_value = function_call_param_iterator.next();
 28351                 {
 16546 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28352                     identifier_c param_name("IN2");
 16547 			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 ;
 28353                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16548 			
 28354                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16549 			
 28355                     
 16550 			{
 28356                     /* Get the value from a foo(<param_value>) style call */
 16551 		
 28357                     if (IN2_param_value == NULL)
 16552 				{
 28358                       IN2_param_value = function_call_param_iterator.next();
 16553 					identifier_c param_name("IN2");
 28359                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16554 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28360                     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 ;
 16555 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28361                     
 16556 					
 28362                     
 16557 					/* Get the value from a foo(<param_value>) style call */
 28363                     {
 16558 					if (IN2_param_value == NULL)
 28364                 
 16559 					  IN2_param_value = function_call_param_iterator.next();
 28365                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16560 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28366                         return return_type_symbol;
 16561 					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 ;
 28367                         
 16562 					
 28368                     }
 16563 					
 28369                     
 16564 					{
 28370                     ERROR;
 16565 				
 28371                 }
 16566 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28372                 
 16567 						return return_type_symbol;
 28373             }
 16568 						
 28374             
 16569 					}
 28375             ERROR;
 16570 					
 28376         }
 16571 					ERROR;
 28377         
 16572 				}
 28378     }/*function_lt*/
 16573 				
 28379     break;
 16574 			}
       
 16575 			
       
 16576 			ERROR;
       
 16577 		}
       
 16578 		
       
 16579 	}/*function_lt*/
       
 16580 	break;
       
 16581 
 28380 
 16582 /****
 28381 /****
 16583  *LE
 28382  *LE
 16584  */
 28383  */
 16585 	case function_le :
 28384     case function_le :
 16586 	{
 28385     {
 16587 		symbol_c *last_type_symbol = NULL;
 28386         symbol_c *last_type_symbol = NULL;
 16588 
 28387 
 16589 		{
 28388         {
 16590 			identifier_c param_name("IN1");
 28389             symbol_c *IN1_type_symbol = param_data_type;
 16591 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28390             last_type_symbol = param_data_type;
 16592 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28391             
 16593 			
 28392             
 16594 			/* Get the value from a foo(<param_value>) style call */
 28393             {
 16595 			if (IN1_param_value == NULL)
 28394         
 16596 			  IN1_param_value = function_call_param_iterator.next();
 28395                 {
 16597 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28396                     identifier_c param_name("IN2");
 16598 			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 ;
 28397                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16599 			
 28398                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16600 			
 28399                     
 16601 			{
 28400                     /* Get the value from a foo(<param_value>) style call */
 16602 		
 28401                     if (IN2_param_value == NULL)
 16603 				{
 28402                       IN2_param_value = function_call_param_iterator.next();
 16604 					identifier_c param_name("IN2");
 28403                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16605 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28404                     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 ;
 16606 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28405                     
 16607 					
 28406                     
 16608 					/* Get the value from a foo(<param_value>) style call */
 28407                     {
 16609 					if (IN2_param_value == NULL)
 28408                 
 16610 					  IN2_param_value = function_call_param_iterator.next();
 28409                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16611 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28410                         return return_type_symbol;
 16612 					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 ;
 28411                         
 16613 					
 28412                     }
 16614 					
 28413                     
 16615 					{
 28414                     ERROR;
 16616 				
 28415                 }
 16617 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28416                 
 16618 						return return_type_symbol;
 28417             }
 16619 						
 28418             
 16620 					}
 28419             ERROR;
 16621 					
 28420         }
 16622 					ERROR;
 28421         
 16623 				}
 28422     }/*function_le*/
 16624 				
 28423     break;
 16625 			}
       
 16626 			
       
 16627 			ERROR;
       
 16628 		}
       
 16629 		
       
 16630 	}/*function_le*/
       
 16631 	break;
       
 16632 
 28424 
 16633 /****
 28425 /****
 16634  *NE
 28426  *NE
 16635  */
 28427  */
 16636 	case function_ne :
 28428     case function_ne :
 16637 	{
 28429     {
 16638 		symbol_c *last_type_symbol = NULL;
 28430         symbol_c *last_type_symbol = NULL;
 16639 
 28431 
 16640 		{
 28432         {
 16641 			identifier_c param_name("IN1");
 28433             symbol_c *IN1_type_symbol = param_data_type;
 16642 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28434             last_type_symbol = param_data_type;
 16643 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28435             
 16644 			
 28436             
 16645 			/* Get the value from a foo(<param_value>) style call */
 28437             {
 16646 			if (IN1_param_value == NULL)
 28438         
 16647 			  IN1_param_value = function_call_param_iterator.next();
 28439                 {
 16648 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28440                     identifier_c param_name("IN2");
 16649 			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 ;
 28441                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16650 			
 28442                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16651 			
 28443                     
 16652 			{
 28444                     /* Get the value from a foo(<param_value>) style call */
 16653 		
 28445                     if (IN2_param_value == NULL)
 16654 				{
 28446                       IN2_param_value = function_call_param_iterator.next();
 16655 					identifier_c param_name("IN2");
 28447                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16656 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28448                     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 ;
 16657 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28449                     
 16658 					
 28450                     
 16659 					/* Get the value from a foo(<param_value>) style call */
 28451                     {
 16660 					if (IN2_param_value == NULL)
 28452                 
 16661 					  IN2_param_value = function_call_param_iterator.next();
 28453                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16662 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28454                         return return_type_symbol;
 16663 					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 ;
 28455                         
 16664 					
 28456                     }
 16665 					
 28457                     
 16666 					{
 28458                     ERROR;
 16667 				
 28459                 }
 16668 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 28460                 
 16669 						return return_type_symbol;
 28461             }
 16670 						
 28462             
 16671 					}
 28463             ERROR;
 16672 					
 28464         }
 16673 					ERROR;
 28465         
 16674 				}
 28466     }/*function_ne*/
 16675 				
 28467     break;
 16676 			}
       
 16677 			
       
 16678 			ERROR;
       
 16679 		}
       
 16680 		
       
 16681 	}/*function_ne*/
       
 16682 	break;
       
 16683 
 28468 
 16684 /****
 28469 /****
 16685  *LEN
 28470  *LEN
 16686  */
 28471  */
 16687 	case function_len :
 28472     case function_len :
 16688 	{
 28473     {
 16689 		symbol_c *last_type_symbol = NULL;
 28474         symbol_c *last_type_symbol = NULL;
 16690 
 28475 
 16691 		{
 28476         {
 16692 			identifier_c param_name("IN");
 28477             symbol_c *IN_type_symbol = param_data_type;
 16693 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28478             last_type_symbol = param_data_type;
 16694 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28479             
 16695 			
 28480             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16696 			/* Get the value from a foo(<param_value>) style call */
 28481             {
 16697 			if (IN_param_value == NULL)
 28482         
 16698 			  IN_param_value = function_call_param_iterator.next();
 28483                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16699 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28484                 return return_type_symbol;
 16700 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28485                 
 16701 			
 28486             }
 16702 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28487             
 16703 			{
 28488             ERROR;
 16704 		
 28489         }
 16705 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 28490         
 16706 				return return_type_symbol;
 28491     }/*function_len*/
 16707 				
 28492     break;
 16708 			}
       
 16709 			
       
 16710 			ERROR;
       
 16711 		}
       
 16712 		
       
 16713 	}/*function_len*/
       
 16714 	break;
       
 16715 
 28493 
 16716 /****
 28494 /****
 16717  *LEFT
 28495  *LEFT
 16718  */
 28496  */
 16719 	case function_left :
 28497     case function_left :
 16720 	{
 28498     {
 16721 		symbol_c *last_type_symbol = NULL;
 28499         symbol_c *last_type_symbol = NULL;
 16722 
 28500 
 16723 		{
 28501         {
 16724 			identifier_c param_name("IN");
 28502             symbol_c *IN_type_symbol = param_data_type;
 16725 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28503             last_type_symbol = param_data_type;
 16726 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28504             
 16727 			
 28505             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16728 			/* Get the value from a foo(<param_value>) style call */
 28506             {
 16729 			if (IN_param_value == NULL)
 28507         
 16730 			  IN_param_value = function_call_param_iterator.next();
 28508                 {
 16731 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28509                     identifier_c param_name("L");
 16732 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28510                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16733 			
 28511                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 16734 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28512                     
 16735 			{
 28513                     /* Get the value from a foo(<param_value>) style call */
 16736 		
 28514                     if (L_param_value == NULL)
 16737 				{
 28515                       L_param_value = function_call_param_iterator.next();
 16738 					identifier_c param_name("L");
 28516                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16739 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28517                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16740 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 28518                     
 16741 					
 28519                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16742 					/* Get the value from a foo(<param_value>) style call */
 28520                     {
 16743 					if (L_param_value == NULL)
 28521                 
 16744 					  L_param_value = function_call_param_iterator.next();
 28522                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16745 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 28523                         return return_type_symbol;
 16746 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 28524                         
 16747 					
 28525                     }
 16748 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28526                     
 16749 					{
 28527                     ERROR;
 16750 				
 28528                 }
 16751 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28529                 
 16752 						return return_type_symbol;
 28530             }
 16753 						
 28531             
 16754 					}
 28532             ERROR;
 16755 					
 28533         }
 16756 					ERROR;
 28534         
 16757 				}
 28535     }/*function_left*/
 16758 				
 28536     break;
 16759 			}
       
 16760 			
       
 16761 			ERROR;
       
 16762 		}
       
 16763 		
       
 16764 	}/*function_left*/
       
 16765 	break;
       
 16766 
 28537 
 16767 /****
 28538 /****
 16768  *RIGHT
 28539  *RIGHT
 16769  */
 28540  */
 16770 	case function_right :
 28541     case function_right :
 16771 	{
 28542     {
 16772 		symbol_c *last_type_symbol = NULL;
 28543         symbol_c *last_type_symbol = NULL;
 16773 
 28544 
 16774 		{
 28545         {
 16775 			identifier_c param_name("IN");
 28546             symbol_c *IN_type_symbol = param_data_type;
 16776 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28547             last_type_symbol = param_data_type;
 16777 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28548             
 16778 			
 28549             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16779 			/* Get the value from a foo(<param_value>) style call */
 28550             {
 16780 			if (IN_param_value == NULL)
 28551         
 16781 			  IN_param_value = function_call_param_iterator.next();
 28552                 {
 16782 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28553                     identifier_c param_name("L");
 16783 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28554                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16784 			
 28555                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 16785 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28556                     
 16786 			{
 28557                     /* Get the value from a foo(<param_value>) style call */
 16787 		
 28558                     if (L_param_value == NULL)
 16788 				{
 28559                       L_param_value = function_call_param_iterator.next();
 16789 					identifier_c param_name("L");
 28560                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16790 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28561                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16791 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 28562                     
 16792 					
 28563                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16793 					/* Get the value from a foo(<param_value>) style call */
 28564                     {
 16794 					if (L_param_value == NULL)
 28565                 
 16795 					  L_param_value = function_call_param_iterator.next();
 28566                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16796 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 28567                         return return_type_symbol;
 16797 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 28568                         
 16798 					
 28569                     }
 16799 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28570                     
 16800 					{
 28571                     ERROR;
 16801 				
 28572                 }
 16802 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28573                 
 16803 						return return_type_symbol;
 28574             }
 16804 						
 28575             
 16805 					}
 28576             ERROR;
 16806 					
 28577         }
 16807 					ERROR;
 28578         
 16808 				}
 28579     }/*function_right*/
 16809 				
 28580     break;
 16810 			}
       
 16811 			
       
 16812 			ERROR;
       
 16813 		}
       
 16814 		
       
 16815 	}/*function_right*/
       
 16816 	break;
       
 16817 
 28581 
 16818 /****
 28582 /****
 16819  *MID
 28583  *MID
 16820  */
 28584  */
 16821 	case function_mid :
 28585     case function_mid :
 16822 	{
 28586     {
 16823 		symbol_c *last_type_symbol = NULL;
 28587         symbol_c *last_type_symbol = NULL;
 16824 
 28588 
 16825 		{
 28589         {
 16826 			identifier_c param_name("IN");
 28590             symbol_c *IN_type_symbol = param_data_type;
 16827 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28591             last_type_symbol = param_data_type;
 16828 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28592             
 16829 			
 28593             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16830 			/* Get the value from a foo(<param_value>) style call */
 28594             {
 16831 			if (IN_param_value == NULL)
 28595         
 16832 			  IN_param_value = function_call_param_iterator.next();
 28596                 {
 16833 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28597                     identifier_c param_name("L");
 16834 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28598                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16835 			
 28599                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 16836 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28600                     
 16837 			{
 28601                     /* Get the value from a foo(<param_value>) style call */
 16838 		
 28602                     if (L_param_value == NULL)
 16839 				{
 28603                       L_param_value = function_call_param_iterator.next();
 16840 					identifier_c param_name("L");
 28604                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16841 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28605                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16842 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 28606                     
 16843 					
 28607                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16844 					/* Get the value from a foo(<param_value>) style call */
 28608                     {
 16845 					if (L_param_value == NULL)
 28609                 
 16846 					  L_param_value = function_call_param_iterator.next();
 28610                         {
 16847 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 28611                             identifier_c param_name("P");
 16848 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 28612                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16849 					
 28613                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 16850 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28614                             
 16851 					{
 28615                             /* Get the value from a foo(<param_value>) style call */
 16852 				
 28616                             if (P_param_value == NULL)
 16853 						{
 28617                               P_param_value = function_call_param_iterator.next();
 16854 							identifier_c param_name("P");
 28618                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16855 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28619                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16856 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 28620                             
 16857 							
 28621                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16858 							/* Get the value from a foo(<param_value>) style call */
 28622                             {
 16859 							if (P_param_value == NULL)
 28623                         
 16860 							  P_param_value = function_call_param_iterator.next();
 28624                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16861 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 28625                                 return return_type_symbol;
 16862 							last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 28626                                 
 16863 							
 28627                             }
 16864 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28628                             
 16865 							{
 28629                             ERROR;
 16866 						
 28630                         }
 16867 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28631                         
 16868 								return return_type_symbol;
 28632                     }
 16869 								
 28633                     
 16870 							}
 28634                     ERROR;
 16871 							
 28635                 }
 16872 							ERROR;
 28636                 
 16873 						}
 28637             }
 16874 						
 28638             
 16875 					}
 28639             ERROR;
 16876 					
 28640         }
 16877 					ERROR;
 28641         
 16878 				}
 28642     }/*function_mid*/
 16879 				
 28643     break;
 16880 			}
       
 16881 			
       
 16882 			ERROR;
       
 16883 		}
       
 16884 		
       
 16885 	}/*function_mid*/
       
 16886 	break;
       
 16887 
 28644 
 16888 /****
 28645 /****
 16889  *CONCAT
 28646  *CONCAT
 16890  */
 28647  */
 16891 	case function_concat :
 28648     case function_concat :
 16892 	{
 28649     {
 16893 		symbol_c *last_type_symbol = NULL;
 28650         symbol_c *last_type_symbol = NULL;
 16894 
 28651 
 16895 		{
 28652         {
 16896 			identifier_c param_name("IN1");
 28653             symbol_c *IN1_type_symbol = param_data_type;
 16897 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28654             last_type_symbol = param_data_type;
 16898 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28655             
 16899 			
 28656             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 16900 			/* Get the value from a foo(<param_value>) style call */
 28657             {
 16901 			if (IN1_param_value == NULL)
 28658         
 16902 			  IN1_param_value = function_call_param_iterator.next();
 28659                 {
 16903 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28660                     identifier_c param_name("IN2");
 16904 			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 ;
 28661                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16905 			
 28662                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16906 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 28663                     
 16907 			{
 28664                     /* Get the value from a foo(<param_value>) style call */
 16908 		
 28665                     if (IN2_param_value == NULL)
 16909 				{
 28666                       IN2_param_value = function_call_param_iterator.next();
 16910 					identifier_c param_name("IN2");
 28667                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16911 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28668                     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 ;
 16912 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28669                     
 16913 					
 28670                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 16914 					/* Get the value from a foo(<param_value>) style call */
 28671                     {
 16915 					if (IN2_param_value == NULL)
 28672                 
 16916 					  IN2_param_value = function_call_param_iterator.next();
 28673                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16917 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28674                         return return_type_symbol;
 16918 					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 ;
 28675                         
 16919 					
 28676                     }
 16920 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 28677                     
 16921 					{
 28678                     ERROR;
 16922 				
 28679                 }
 16923 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 28680                 
 16924 						return return_type_symbol;
 28681             }
 16925 						
 28682             
 16926 					}
 28683             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16927 					
 28684             {
 16928 					ERROR;
 28685         
 16929 				}
 28686                 {
 16930 				
 28687                     identifier_c param_name("IN2");
 16931 			}
 28688                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16932 			
 28689                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16933 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28690                     
 16934 			{
 28691                     /* Get the value from a foo(<param_value>) style call */
 16935 		
 28692                     if (IN2_param_value == NULL)
 16936 				{
 28693                       IN2_param_value = function_call_param_iterator.next();
 16937 					identifier_c param_name("IN2");
 28694                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16938 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28695                     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 ;
 16939 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28696                     
 16940 					
 28697                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16941 					/* Get the value from a foo(<param_value>) style call */
 28698                     {
 16942 					if (IN2_param_value == NULL)
 28699                 
 16943 					  IN2_param_value = function_call_param_iterator.next();
 28700                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16944 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28701                         return return_type_symbol;
 16945 					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 ;
 28702                         
 16946 					
 28703                     }
 16947 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28704                     
 16948 					{
 28705                     ERROR;
 16949 				
 28706                 }
 16950 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28707                 
 16951 						return return_type_symbol;
 28708             }
 16952 						
 28709             
 16953 					}
 28710             ERROR;
 16954 					
 28711         }
 16955 					ERROR;
 28712         
 16956 				}
 28713     }/*function_concat*/
 16957 				
 28714     break;
 16958 			}
       
 16959 			
       
 16960 			ERROR;
       
 16961 		}
       
 16962 		
       
 16963 	}/*function_concat*/
       
 16964 	break;
       
 16965 
 28715 
 16966 /****
 28716 /****
 16967  *INSERT
 28717  *INSERT
 16968  */
 28718  */
 16969 	case function_insert :
 28719     case function_insert :
 16970 	{
 28720     {
 16971 		symbol_c *last_type_symbol = NULL;
 28721         symbol_c *last_type_symbol = NULL;
 16972 
 28722 
 16973 		{
 28723         {
 16974 			identifier_c param_name("IN1");
 28724             symbol_c *IN1_type_symbol = param_data_type;
 16975 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28725             last_type_symbol = param_data_type;
 16976 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28726             
 16977 			
 28727             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16978 			/* Get the value from a foo(<param_value>) style call */
 28728             {
 16979 			if (IN1_param_value == NULL)
 28729         
 16980 			  IN1_param_value = function_call_param_iterator.next();
 28730                 {
 16981 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28731                     identifier_c param_name("IN2");
 16982 			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 ;
 28732                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16983 			
 28733                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16984 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28734                     
 16985 			{
 28735                     /* Get the value from a foo(<param_value>) style call */
 16986 		
 28736                     if (IN2_param_value == NULL)
 16987 				{
 28737                       IN2_param_value = function_call_param_iterator.next();
 16988 					identifier_c param_name("IN2");
 28738                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16989 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28739                     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 ;
 16990 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28740                     
 16991 					
 28741                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16992 					/* Get the value from a foo(<param_value>) style call */
 28742                     {
 16993 					if (IN2_param_value == NULL)
 28743                 
 16994 					  IN2_param_value = function_call_param_iterator.next();
 28744                         {
 16995 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28745                             identifier_c param_name("P");
 16996 					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 ;
 28746                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16997 					
 28747                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 16998 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28748                             
 16999 					{
 28749                             /* Get the value from a foo(<param_value>) style call */
 17000 				
 28750                             if (P_param_value == NULL)
 17001 						{
 28751                               P_param_value = function_call_param_iterator.next();
 17002 							identifier_c param_name("P");
 28752                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 17003 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28753                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 17004 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 28754                             
 17005 							
 28755                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17006 							/* Get the value from a foo(<param_value>) style call */
 28756                             {
 17007 							if (P_param_value == NULL)
 28757                         
 17008 							  P_param_value = function_call_param_iterator.next();
 28758                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17009 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 28759                                 return return_type_symbol;
 17010 							last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 28760                                 
 17011 							
 28761                             }
 17012 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28762                             
 17013 							{
 28763                             ERROR;
 17014 						
 28764                         }
 17015 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28765                         
 17016 								return return_type_symbol;
 28766                     }
 17017 								
 28767                     
 17018 							}
 28768                     ERROR;
 17019 							
 28769                 }
 17020 							ERROR;
 28770                 
 17021 						}
 28771             }
 17022 						
 28772             
 17023 					}
 28773             ERROR;
 17024 					
 28774         }
 17025 					ERROR;
 28775         
 17026 				}
 28776     }/*function_insert*/
 17027 				
 28777     break;
 17028 			}
       
 17029 			
       
 17030 			ERROR;
       
 17031 		}
       
 17032 		
       
 17033 	}/*function_insert*/
       
 17034 	break;
       
 17035 
 28778 
 17036 /****
 28779 /****
 17037  *DELETE
 28780  *DELETE
 17038  */
 28781  */
 17039 	case function_delete :
 28782     case function_delete :
 17040 	{
 28783     {
 17041 		symbol_c *last_type_symbol = NULL;
 28784         symbol_c *last_type_symbol = NULL;
 17042 
 28785 
 17043 		{
 28786         {
 17044 			identifier_c param_name("IN");
 28787             symbol_c *IN_type_symbol = param_data_type;
 17045 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28788             last_type_symbol = param_data_type;
 17046 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 28789             
 17047 			
 28790             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17048 			/* Get the value from a foo(<param_value>) style call */
 28791             {
 17049 			if (IN_param_value == NULL)
 28792         
 17050 			  IN_param_value = function_call_param_iterator.next();
 28793                 {
 17051 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 28794                     identifier_c param_name("L");
 17052 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 28795                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17053 			
 28796                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 17054 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28797                     
 17055 			{
 28798                     /* Get the value from a foo(<param_value>) style call */
 17056 		
 28799                     if (L_param_value == NULL)
 17057 				{
 28800                       L_param_value = function_call_param_iterator.next();
 17058 					identifier_c param_name("L");
 28801                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 17059 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28802                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 17060 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 28803                     
 17061 					
 28804                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17062 					/* Get the value from a foo(<param_value>) style call */
 28805                     {
 17063 					if (L_param_value == NULL)
 28806                 
 17064 					  L_param_value = function_call_param_iterator.next();
 28807                         {
 17065 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 28808                             identifier_c param_name("P");
 17066 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 28809                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17067 					
 28810                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 17068 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28811                             
 17069 					{
 28812                             /* Get the value from a foo(<param_value>) style call */
 17070 				
 28813                             if (P_param_value == NULL)
 17071 						{
 28814                               P_param_value = function_call_param_iterator.next();
 17072 							identifier_c param_name("P");
 28815                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 17073 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28816                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 17074 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 28817                             
 17075 							
 28818                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17076 							/* Get the value from a foo(<param_value>) style call */
 28819                             {
 17077 							if (P_param_value == NULL)
 28820                         
 17078 							  P_param_value = function_call_param_iterator.next();
 28821                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17079 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 28822                                 return return_type_symbol;
 17080 							last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 28823                                 
 17081 							
 28824                             }
 17082 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28825                             
 17083 							{
 28826                             ERROR;
 17084 						
 28827                         }
 17085 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28828                         
 17086 								return return_type_symbol;
 28829                     }
 17087 								
 28830                     
 17088 							}
 28831                     ERROR;
 17089 							
 28832                 }
 17090 							ERROR;
 28833                 
 17091 						}
 28834             }
 17092 						
 28835             
 17093 					}
 28836             ERROR;
 17094 					
 28837         }
 17095 					ERROR;
 28838         
 17096 				}
 28839     }/*function_delete*/
 17097 				
 28840     break;
 17098 			}
       
 17099 			
       
 17100 			ERROR;
       
 17101 		}
       
 17102 		
       
 17103 	}/*function_delete*/
       
 17104 	break;
       
 17105 
 28841 
 17106 /****
 28842 /****
 17107  *REPLACE
 28843  *REPLACE
 17108  */
 28844  */
 17109 	case function_replace :
 28845     case function_replace :
 17110 	{
 28846     {
 17111 		symbol_c *last_type_symbol = NULL;
 28847         symbol_c *last_type_symbol = NULL;
 17112 
 28848 
 17113 		{
 28849         {
 17114 			identifier_c param_name("IN1");
 28850             symbol_c *IN1_type_symbol = param_data_type;
 17115 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28851             last_type_symbol = param_data_type;
 17116 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28852             
 17117 			
 28853             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17118 			/* Get the value from a foo(<param_value>) style call */
 28854             {
 17119 			if (IN1_param_value == NULL)
 28855         
 17120 			  IN1_param_value = function_call_param_iterator.next();
 28856                 {
 17121 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28857                     identifier_c param_name("IN2");
 17122 			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 ;
 28858                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17123 			
 28859                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17124 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28860                     
 17125 			{
 28861                     /* Get the value from a foo(<param_value>) style call */
 17126 		
 28862                     if (IN2_param_value == NULL)
 17127 				{
 28863                       IN2_param_value = function_call_param_iterator.next();
 17128 					identifier_c param_name("IN2");
 28864                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17129 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28865                     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 ;
 17130 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28866                     
 17131 					
 28867                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17132 					/* Get the value from a foo(<param_value>) style call */
 28868                     {
 17133 					if (IN2_param_value == NULL)
 28869                 
 17134 					  IN2_param_value = function_call_param_iterator.next();
 28870                         {
 17135 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28871                             identifier_c param_name("L");
 17136 					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 ;
 28872                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17137 					
 28873                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 17138 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28874                             
 17139 					{
 28875                             /* Get the value from a foo(<param_value>) style call */
 17140 				
 28876                             if (L_param_value == NULL)
 17141 						{
 28877                               L_param_value = function_call_param_iterator.next();
 17142 							identifier_c param_name("L");
 28878                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 17143 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 28879                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 17144 							symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 28880                             
 17145 							
 28881                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17146 							/* Get the value from a foo(<param_value>) style call */
 28882                             {
 17147 							if (L_param_value == NULL)
 28883                         
 17148 							  L_param_value = function_call_param_iterator.next();
 28884                                 {
 17149 							symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 28885                                     identifier_c param_name("P");
 17150 							last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 28886                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17151 							
 28887                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 17152 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28888                                     
 17153 							{
 28889                                     /* Get the value from a foo(<param_value>) style call */
 17154 						
 28890                                     if (P_param_value == NULL)
 17155 								{
 28891                                       P_param_value = function_call_param_iterator.next();
 17156 									identifier_c param_name("P");
 28892                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 17157 									/* Get the value from a foo(<param_name> = <param_value>) style call */
 28893                                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 17158 									symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 28894                                     
 17159 									
 28895                                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17160 									/* Get the value from a foo(<param_value>) style call */
 28896                                     {
 17161 									if (P_param_value == NULL)
 28897                                 
 17162 									  P_param_value = function_call_param_iterator.next();
 28898                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17163 									symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 28899                                         return return_type_symbol;
 17164 									last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 28900                                         
 17165 									
 28901                                     }
 17166 									if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 28902                                     
 17167 									{
 28903                                     ERROR;
 17168 								
 28904                                 }
 17169 										symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28905                                 
 17170 										return return_type_symbol;
 28906                             }
 17171 										
 28907                             
 17172 									}
 28908                             ERROR;
 17173 									
 28909                         }
 17174 									ERROR;
 28910                         
 17175 								}
 28911                     }
 17176 								
 28912                     
 17177 							}
 28913                     ERROR;
 17178 							
 28914                 }
 17179 							ERROR;
 28915                 
 17180 						}
 28916             }
 17181 						
 28917             
 17182 					}
 28918             ERROR;
 17183 					
 28919         }
 17184 					ERROR;
 28920         
 17185 				}
 28921     }/*function_replace*/
 17186 				
 28922     break;
 17187 			}
       
 17188 			
       
 17189 			ERROR;
       
 17190 		}
       
 17191 		
       
 17192 	}/*function_replace*/
       
 17193 	break;
       
 17194 
 28923 
 17195 /****
 28924 /****
 17196  *FIND
 28925  *FIND
 17197  */
 28926  */
 17198 	case function_find :
 28927     case function_find :
 17199 	{
 28928     {
 17200 		symbol_c *last_type_symbol = NULL;
 28929         symbol_c *last_type_symbol = NULL;
 17201 
 28930 
 17202 		{
 28931         {
 17203 			identifier_c param_name("IN1");
 28932             symbol_c *IN1_type_symbol = param_data_type;
 17204 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 28933             last_type_symbol = param_data_type;
 17205 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 28934             
 17206 			
 28935             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17207 			/* Get the value from a foo(<param_value>) style call */
 28936             {
 17208 			if (IN1_param_value == NULL)
 28937         
 17209 			  IN1_param_value = function_call_param_iterator.next();
 28938                 {
 17210 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 28939                     identifier_c param_name("IN2");
 17211 			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 ;
 28940                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17212 			
 28941                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17213 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28942                     
 17214 			{
 28943                     /* Get the value from a foo(<param_value>) style call */
 17215 		
 28944                     if (IN2_param_value == NULL)
 17216 				{
 28945                       IN2_param_value = function_call_param_iterator.next();
 17217 					identifier_c param_name("IN2");
 28946                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17218 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 28947                     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 ;
 17219 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 28948                     
 17220 					
 28949                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17221 					/* Get the value from a foo(<param_value>) style call */
 28950                     {
 17222 					if (IN2_param_value == NULL)
 28951                 
 17223 					  IN2_param_value = function_call_param_iterator.next();
 28952                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17224 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28953                         return return_type_symbol;
 17225 					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 ;
 28954                         
 17226 					
 28955                     }
 17227 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 28956                     
 17228 					{
 28957                     ERROR;
 17229 				
 28958                 }
 17230 						symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 28959                 
 17231 						return return_type_symbol;
 28960             }
 17232 						
 28961             
 17233 					}
 28962             ERROR;
 17234 					
 28963         }
 17235 					ERROR;
 28964         
 17236 				}
 28965     }/*function_find*/
 17237 				
 28966     break;
 17238 			}
 28967 
 17239 			
 28968     case function_none :
 17240 			ERROR;
 28969     ERROR;
 17241 		}
 28970   }
 17242 		
 28971   return NULL;
 17243 	}/*function_find*/
       
 17244 	break;
       
 17245 
       
 17246 	case function_none :
       
 17247 	ERROR;
       
 17248 }
 28972 }
 17249 return NULL;