stage4/generate_cc/st_code_gen.c
changeset 35 9f3d6c089533
parent 34 a793b010e371
child 38 6cce7d14647e
equal deleted inserted replaced
34:a793b010e371 35:9f3d6c089533
     4  * generated code, do not edit by hand
     4  * generated code, do not edit by hand
     5  */
     5  */
     6 switch(current_function_type){
     6 switch(current_function_type){
     7 
     7 
     8 /****
     8 /****
     9  *REAL_TO_REAL
     9  *REAL_TO_LREAL
    10  */
    10  */
    11 	case function_real_to_real :
    11     case function_real_to_lreal :
    12 	{
    12     {
    13 		symbol_c *last_type_symbol = NULL;
    13         symbol_c *last_type_symbol = NULL;
    14 
    14 
    15 		{
    15         {
    16 			identifier_c param_name("IN");
    16             identifier_c param_name("IN");
    17 			/* Get the value from a foo(<param_name> = <param_value>) style call */
    17             /* Get the value from a foo(<param_name> = <param_value>) style call */
    18 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    18             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    19 			
    19             
    20 			/* Get the value from a foo(<param_value>) style call */
    20             /* Get the value from a foo(<param_value>) style call */
    21 			if (IN_param_value == NULL)
    21             if (IN_param_value == NULL)
    22 			  IN_param_value = function_call_param_iterator.next();
    22               IN_param_value = function_call_param_iterator.next();
    23 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    23             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    25 			
    25             
    26 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    26             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    27 			{
    27             {
    28 		
    28         
    29 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
    29                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
    30 				s4o.print("(");
    30                 s4o.print("(");
    31 				return_type_symbol->accept(*this);
    31                 return_type_symbol->accept(*this);
    32 				s4o.print(")");
    32                 s4o.print(")");
    33 				IN_param_value->accept(*this);
    33                 IN_param_value->accept(*this);
    34 				return NULL;
    34                 return NULL;
    35 				
    35                 
    36 			}
    36             }
    37 			
    37             
    38 			ERROR;
    38             ERROR;
    39 		}
    39         }
    40 		
    40         
    41 	}/*function_real_to_real*/
    41     }/*function_real_to_lreal*/
    42 	break;
    42     break;
    43 
    43 
    44 /****
    44 /****
    45  *REAL_TO_SINT
    45  *REAL_TO_SINT
    46  */
    46  */
    47 	case function_real_to_sint :
    47     case function_real_to_sint :
    48 	{
    48     {
    49 		symbol_c *last_type_symbol = NULL;
    49         symbol_c *last_type_symbol = NULL;
    50 
    50 
    51 		{
    51         {
    52 			identifier_c param_name("IN");
    52             identifier_c param_name("IN");
    53 			/* Get the value from a foo(<param_name> = <param_value>) style call */
    53             /* Get the value from a foo(<param_name> = <param_value>) style call */
    54 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    54             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    55 			
    55             
    56 			/* Get the value from a foo(<param_value>) style call */
    56             /* Get the value from a foo(<param_value>) style call */
    57 			if (IN_param_value == NULL)
    57             if (IN_param_value == NULL)
    58 			  IN_param_value = function_call_param_iterator.next();
    58               IN_param_value = function_call_param_iterator.next();
    59 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    59             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    60 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    60             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    61 			
    61             
    62 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    62             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    63 			{
    63             {
    64 		
    64         
    65 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    65                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    66 				s4o.print("(");
    66                 s4o.print("(");
    67 				return_type_symbol->accept(*this);
    67                 return_type_symbol->accept(*this);
    68 				s4o.print(")");
    68                 s4o.print(")");
    69 				IN_param_value->accept(*this);
    69                 IN_param_value->accept(*this);
    70 				return NULL;
    70                 return NULL;
    71 				
    71                 
    72 			}
    72             }
    73 			
    73             
    74 			ERROR;
    74             ERROR;
    75 		}
    75         }
    76 		
    76         
    77 	}/*function_real_to_sint*/
    77     }/*function_real_to_sint*/
    78 	break;
    78     break;
       
    79 
       
    80 /****
       
    81  *REAL_TO_INT
       
    82  */
       
    83     case function_real_to_int :
       
    84     {
       
    85         symbol_c *last_type_symbol = NULL;
       
    86 
       
    87         {
       
    88             identifier_c param_name("IN");
       
    89             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    90             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    91             
       
    92             /* Get the value from a foo(<param_value>) style call */
       
    93             if (IN_param_value == NULL)
       
    94               IN_param_value = function_call_param_iterator.next();
       
    95             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    96             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    97             
       
    98             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
    99             {
       
   100         
       
   101                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   102                 s4o.print("(");
       
   103                 return_type_symbol->accept(*this);
       
   104                 s4o.print(")");
       
   105                 IN_param_value->accept(*this);
       
   106                 return NULL;
       
   107                 
       
   108             }
       
   109             
       
   110             ERROR;
       
   111         }
       
   112         
       
   113     }/*function_real_to_int*/
       
   114     break;
       
   115 
       
   116 /****
       
   117  *REAL_TO_DINT
       
   118  */
       
   119     case function_real_to_dint :
       
   120     {
       
   121         symbol_c *last_type_symbol = NULL;
       
   122 
       
   123         {
       
   124             identifier_c param_name("IN");
       
   125             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   126             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   127             
       
   128             /* Get the value from a foo(<param_value>) style call */
       
   129             if (IN_param_value == NULL)
       
   130               IN_param_value = function_call_param_iterator.next();
       
   131             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   132             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   133             
       
   134             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   135             {
       
   136         
       
   137                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   138                 s4o.print("(");
       
   139                 return_type_symbol->accept(*this);
       
   140                 s4o.print(")");
       
   141                 IN_param_value->accept(*this);
       
   142                 return NULL;
       
   143                 
       
   144             }
       
   145             
       
   146             ERROR;
       
   147         }
       
   148         
       
   149     }/*function_real_to_dint*/
       
   150     break;
    79 
   151 
    80 /****
   152 /****
    81  *REAL_TO_LINT
   153  *REAL_TO_LINT
    82  */
   154  */
    83 	case function_real_to_lint :
   155     case function_real_to_lint :
    84 	{
   156     {
    85 		symbol_c *last_type_symbol = NULL;
   157         symbol_c *last_type_symbol = NULL;
    86 
   158 
    87 		{
   159         {
    88 			identifier_c param_name("IN");
   160             identifier_c param_name("IN");
    89 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   161             /* Get the value from a foo(<param_name> = <param_value>) style call */
    90 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   162             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    91 			
   163             
    92 			/* Get the value from a foo(<param_value>) style call */
   164             /* Get the value from a foo(<param_value>) style call */
    93 			if (IN_param_value == NULL)
   165             if (IN_param_value == NULL)
    94 			  IN_param_value = function_call_param_iterator.next();
   166               IN_param_value = function_call_param_iterator.next();
    95 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   167             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    96 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   168             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    97 			
   169             
    98 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   170             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    99 			{
   171             {
   100 		
   172         
   101 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   173                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   102 				s4o.print("(");
   174                 s4o.print("(");
   103 				return_type_symbol->accept(*this);
   175                 return_type_symbol->accept(*this);
   104 				s4o.print(")");
   176                 s4o.print(")");
   105 				IN_param_value->accept(*this);
   177                 IN_param_value->accept(*this);
   106 				return NULL;
   178                 return NULL;
   107 				
   179                 
   108 			}
   180             }
   109 			
   181             
   110 			ERROR;
   182             ERROR;
   111 		}
   183         }
   112 		
   184         
   113 	}/*function_real_to_lint*/
   185     }/*function_real_to_lint*/
   114 	break;
   186     break;
   115 
   187 
   116 /****
   188 /****
   117  *REAL_TO_DINT
   189  *REAL_TO_USINT
   118  */
   190  */
   119 	case function_real_to_dint :
   191     case function_real_to_usint :
   120 	{
   192     {
   121 		symbol_c *last_type_symbol = NULL;
   193         symbol_c *last_type_symbol = NULL;
   122 
   194 
   123 		{
   195         {
   124 			identifier_c param_name("IN");
   196             identifier_c param_name("IN");
   125 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   197             /* Get the value from a foo(<param_name> = <param_value>) style call */
   126 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   198             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   127 			
   199             
   128 			/* Get the value from a foo(<param_value>) style call */
   200             /* Get the value from a foo(<param_value>) style call */
   129 			if (IN_param_value == NULL)
   201             if (IN_param_value == NULL)
   130 			  IN_param_value = function_call_param_iterator.next();
   202               IN_param_value = function_call_param_iterator.next();
   131 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   203             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   132 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   204             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   133 			
   205             
   134 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   206             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   135 			{
   207             {
   136 		
   208         
   137 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   209                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   138 				s4o.print("(");
   210                 s4o.print("(");
   139 				return_type_symbol->accept(*this);
   211                 return_type_symbol->accept(*this);
   140 				s4o.print(")");
   212                 s4o.print(")");
   141 				IN_param_value->accept(*this);
   213                 IN_param_value->accept(*this);
   142 				return NULL;
   214                 return NULL;
   143 				
   215                 
   144 			}
   216             }
   145 			
   217             
   146 			ERROR;
   218             ERROR;
   147 		}
   219         }
   148 		
   220         
   149 	}/*function_real_to_dint*/
   221     }/*function_real_to_usint*/
   150 	break;
   222     break;
       
   223 
       
   224 /****
       
   225  *REAL_TO_UINT
       
   226  */
       
   227     case function_real_to_uint :
       
   228     {
       
   229         symbol_c *last_type_symbol = NULL;
       
   230 
       
   231         {
       
   232             identifier_c param_name("IN");
       
   233             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   234             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   235             
       
   236             /* Get the value from a foo(<param_value>) style call */
       
   237             if (IN_param_value == NULL)
       
   238               IN_param_value = function_call_param_iterator.next();
       
   239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   241             
       
   242             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   243             {
       
   244         
       
   245                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   246                 s4o.print("(");
       
   247                 return_type_symbol->accept(*this);
       
   248                 s4o.print(")");
       
   249                 IN_param_value->accept(*this);
       
   250                 return NULL;
       
   251                 
       
   252             }
       
   253             
       
   254             ERROR;
       
   255         }
       
   256         
       
   257     }/*function_real_to_uint*/
       
   258     break;
       
   259 
       
   260 /****
       
   261  *REAL_TO_UDINT
       
   262  */
       
   263     case function_real_to_udint :
       
   264     {
       
   265         symbol_c *last_type_symbol = NULL;
       
   266 
       
   267         {
       
   268             identifier_c param_name("IN");
       
   269             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   270             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   271             
       
   272             /* Get the value from a foo(<param_value>) style call */
       
   273             if (IN_param_value == NULL)
       
   274               IN_param_value = function_call_param_iterator.next();
       
   275             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   276             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   277             
       
   278             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   279             {
       
   280         
       
   281                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   282                 s4o.print("(");
       
   283                 return_type_symbol->accept(*this);
       
   284                 s4o.print(")");
       
   285                 IN_param_value->accept(*this);
       
   286                 return NULL;
       
   287                 
       
   288             }
       
   289             
       
   290             ERROR;
       
   291         }
       
   292         
       
   293     }/*function_real_to_udint*/
       
   294     break;
       
   295 
       
   296 /****
       
   297  *REAL_TO_ULINT
       
   298  */
       
   299     case function_real_to_ulint :
       
   300     {
       
   301         symbol_c *last_type_symbol = NULL;
       
   302 
       
   303         {
       
   304             identifier_c param_name("IN");
       
   305             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   306             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   307             
       
   308             /* Get the value from a foo(<param_value>) style call */
       
   309             if (IN_param_value == NULL)
       
   310               IN_param_value = function_call_param_iterator.next();
       
   311             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   313             
       
   314             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   315             {
       
   316         
       
   317                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   318                 s4o.print("(");
       
   319                 return_type_symbol->accept(*this);
       
   320                 s4o.print(")");
       
   321                 IN_param_value->accept(*this);
       
   322                 return NULL;
       
   323                 
       
   324             }
       
   325             
       
   326             ERROR;
       
   327         }
       
   328         
       
   329     }/*function_real_to_ulint*/
       
   330     break;
       
   331 
       
   332 /****
       
   333  *REAL_TO_TIME
       
   334  */
       
   335     case function_real_to_time :
       
   336     {
       
   337         symbol_c *last_type_symbol = NULL;
       
   338 
       
   339         {
       
   340             identifier_c param_name("IN");
       
   341             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   342             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   343             
       
   344             /* Get the value from a foo(<param_value>) style call */
       
   345             if (IN_param_value == NULL)
       
   346               IN_param_value = function_call_param_iterator.next();
       
   347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   349             
       
   350             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   351             {
       
   352         
       
   353                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   354                 s4o.print("(");
       
   355                 return_type_symbol->accept(*this);
       
   356                 s4o.print(")real_to_time(");
       
   357                 IN_param_value->accept(*this);
       
   358                 s4o.print(")");
       
   359                 return NULL;
       
   360                 
       
   361             }
       
   362             
       
   363             ERROR;
       
   364         }
       
   365         
       
   366     }/*function_real_to_time*/
       
   367     break;
       
   368 
       
   369 /****
       
   370  *REAL_TO_BOOL
       
   371  */
       
   372     case function_real_to_bool :
       
   373     {
       
   374         symbol_c *last_type_symbol = NULL;
       
   375 
       
   376         {
       
   377             identifier_c param_name("IN");
       
   378             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   379             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   380             
       
   381             /* Get the value from a foo(<param_value>) style call */
       
   382             if (IN_param_value == NULL)
       
   383               IN_param_value = function_call_param_iterator.next();
       
   384             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   385             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   386             
       
   387             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   388             {
       
   389         
       
   390                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   391                 s4o.print("(");
       
   392                 return_type_symbol->accept(*this);
       
   393                 s4o.print(")");
       
   394                 IN_param_value->accept(*this);
       
   395                 return NULL;
       
   396                 
       
   397             }
       
   398             
       
   399             ERROR;
       
   400         }
       
   401         
       
   402     }/*function_real_to_bool*/
       
   403     break;
       
   404 
       
   405 /****
       
   406  *REAL_TO_BYTE
       
   407  */
       
   408     case function_real_to_byte :
       
   409     {
       
   410         symbol_c *last_type_symbol = NULL;
       
   411 
       
   412         {
       
   413             identifier_c param_name("IN");
       
   414             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   415             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   416             
       
   417             /* Get the value from a foo(<param_value>) style call */
       
   418             if (IN_param_value == NULL)
       
   419               IN_param_value = function_call_param_iterator.next();
       
   420             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   421             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   422             
       
   423             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   424             {
       
   425         
       
   426                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   427                 s4o.print("(");
       
   428                 return_type_symbol->accept(*this);
       
   429                 s4o.print(")");
       
   430                 IN_param_value->accept(*this);
       
   431                 return NULL;
       
   432                 
       
   433             }
       
   434             
       
   435             ERROR;
       
   436         }
       
   437         
       
   438     }/*function_real_to_byte*/
       
   439     break;
       
   440 
       
   441 /****
       
   442  *REAL_TO_WORD
       
   443  */
       
   444     case function_real_to_word :
       
   445     {
       
   446         symbol_c *last_type_symbol = NULL;
       
   447 
       
   448         {
       
   449             identifier_c param_name("IN");
       
   450             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   451             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   452             
       
   453             /* Get the value from a foo(<param_value>) style call */
       
   454             if (IN_param_value == NULL)
       
   455               IN_param_value = function_call_param_iterator.next();
       
   456             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   457             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   458             
       
   459             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   460             {
       
   461         
       
   462                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   463                 s4o.print("(");
       
   464                 return_type_symbol->accept(*this);
       
   465                 s4o.print(")");
       
   466                 IN_param_value->accept(*this);
       
   467                 return NULL;
       
   468                 
       
   469             }
       
   470             
       
   471             ERROR;
       
   472         }
       
   473         
       
   474     }/*function_real_to_word*/
       
   475     break;
       
   476 
       
   477 /****
       
   478  *REAL_TO_DWORD
       
   479  */
       
   480     case function_real_to_dword :
       
   481     {
       
   482         symbol_c *last_type_symbol = NULL;
       
   483 
       
   484         {
       
   485             identifier_c param_name("IN");
       
   486             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   487             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   488             
       
   489             /* Get the value from a foo(<param_value>) style call */
       
   490             if (IN_param_value == NULL)
       
   491               IN_param_value = function_call_param_iterator.next();
       
   492             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   493             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   494             
       
   495             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   496             {
       
   497         
       
   498                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   499                 s4o.print("(");
       
   500                 return_type_symbol->accept(*this);
       
   501                 s4o.print(")");
       
   502                 IN_param_value->accept(*this);
       
   503                 return NULL;
       
   504                 
       
   505             }
       
   506             
       
   507             ERROR;
       
   508         }
       
   509         
       
   510     }/*function_real_to_dword*/
       
   511     break;
       
   512 
       
   513 /****
       
   514  *REAL_TO_LWORD
       
   515  */
       
   516     case function_real_to_lword :
       
   517     {
       
   518         symbol_c *last_type_symbol = NULL;
       
   519 
       
   520         {
       
   521             identifier_c param_name("IN");
       
   522             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   523             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   524             
       
   525             /* Get the value from a foo(<param_value>) style call */
       
   526             if (IN_param_value == NULL)
       
   527               IN_param_value = function_call_param_iterator.next();
       
   528             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   529             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   530             
       
   531             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   532             {
       
   533         
       
   534                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   535                 s4o.print("(");
       
   536                 return_type_symbol->accept(*this);
       
   537                 s4o.print(")");
       
   538                 IN_param_value->accept(*this);
       
   539                 return NULL;
       
   540                 
       
   541             }
       
   542             
       
   543             ERROR;
       
   544         }
       
   545         
       
   546     }/*function_real_to_lword*/
       
   547     break;
       
   548 
       
   549 /****
       
   550  *REAL_TO_STRING
       
   551  */
       
   552     case function_real_to_string :
       
   553     {
       
   554         symbol_c *last_type_symbol = NULL;
       
   555 
       
   556         {
       
   557             identifier_c param_name("IN");
       
   558             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   560             
       
   561             /* Get the value from a foo(<param_value>) style call */
       
   562             if (IN_param_value == NULL)
       
   563               IN_param_value = function_call_param_iterator.next();
       
   564             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   566             
       
   567             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   568             {
       
   569         
       
   570                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   571                 s4o.print("(");
       
   572                 return_type_symbol->accept(*this);
       
   573                 s4o.print(")int_to_string(");
       
   574                 IN_param_value->accept(*this);
       
   575                 s4o.print(", 10)");
       
   576                 return NULL;
       
   577                 
       
   578             }
       
   579             
       
   580             ERROR;
       
   581         }
       
   582         
       
   583     }/*function_real_to_string*/
       
   584     break;
       
   585 
       
   586 /****
       
   587  *REAL_TO_WSTRING
       
   588  */
       
   589     case function_real_to_wstring :
       
   590     {
       
   591         symbol_c *last_type_symbol = NULL;
       
   592 
       
   593         {
       
   594             identifier_c param_name("IN");
       
   595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   597             
       
   598             /* Get the value from a foo(<param_value>) style call */
       
   599             if (IN_param_value == NULL)
       
   600               IN_param_value = function_call_param_iterator.next();
       
   601             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   603             
       
   604             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   605             {
       
   606         
       
   607                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
   608                 s4o.print("(");
       
   609                 return_type_symbol->accept(*this);
       
   610                 s4o.print(")int_to_string(");
       
   611                 IN_param_value->accept(*this);
       
   612                 s4o.print(", 10)");
       
   613                 return NULL;
       
   614                 
       
   615             }
       
   616             
       
   617             ERROR;
       
   618         }
       
   619         
       
   620     }/*function_real_to_wstring*/
       
   621     break;
   151 
   622 
   152 /****
   623 /****
   153  *REAL_TO_DATE
   624  *REAL_TO_DATE
   154  */
   625  */
   155 	case function_real_to_date :
   626     case function_real_to_date :
   156 	{
   627     {
   157 		symbol_c *last_type_symbol = NULL;
   628         symbol_c *last_type_symbol = NULL;
   158 
   629 
   159 		{
   630         {
   160 			identifier_c param_name("IN");
   631             identifier_c param_name("IN");
   161 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   632             /* Get the value from a foo(<param_name> = <param_value>) style call */
   162 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   163 			
   634             
   164 			/* Get the value from a foo(<param_value>) style call */
   635             /* Get the value from a foo(<param_value>) style call */
   165 			if (IN_param_value == NULL)
   636             if (IN_param_value == NULL)
   166 			  IN_param_value = function_call_param_iterator.next();
   637               IN_param_value = function_call_param_iterator.next();
   167 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   168 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   169 			
   640             
   170 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   641             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   171 			{
   642             {
   172 		
   643         
   173 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   644                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   174 				s4o.print("(");
   645                 s4o.print("(");
   175 				return_type_symbol->accept(*this);
   646                 return_type_symbol->accept(*this);
   176 				s4o.print(")time_to_real(");
   647                 s4o.print(")real_to_time(");
   177 				IN_param_value->accept(*this);
   648                 IN_param_value->accept(*this);
   178 				s4o.print(")");
   649                 s4o.print(")");
   179 				return NULL;
   650                 return NULL;
   180 				
   651                 
   181 			}
   652             }
   182 			
   653             
   183 			ERROR;
   654             ERROR;
   184 		}
   655         }
   185 		
   656         
   186 	}/*function_real_to_date*/
   657     }/*function_real_to_date*/
   187 	break;
   658     break;
   188 
   659 
   189 /****
   660 /****
   190  *REAL_TO_DWORD
   661  *REAL_TO_TOD
   191  */
   662  */
   192 	case function_real_to_dword :
   663     case function_real_to_tod :
   193 	{
   664     {
   194 		symbol_c *last_type_symbol = NULL;
   665         symbol_c *last_type_symbol = NULL;
   195 
   666 
   196 		{
   667         {
   197 			identifier_c param_name("IN");
   668             identifier_c param_name("IN");
   198 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   669             /* Get the value from a foo(<param_name> = <param_value>) style call */
   199 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   670             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   200 			
   671             
   201 			/* Get the value from a foo(<param_value>) style call */
   672             /* Get the value from a foo(<param_value>) style call */
   202 			if (IN_param_value == NULL)
   673             if (IN_param_value == NULL)
   203 			  IN_param_value = function_call_param_iterator.next();
   674               IN_param_value = function_call_param_iterator.next();
   204 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   675             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   205 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   676             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   206 			
   677             
   207 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   678             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   208 			{
   679             {
   209 		
   680         
   210 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   681                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   211 				s4o.print("(");
   682                 s4o.print("(");
   212 				return_type_symbol->accept(*this);
   683                 return_type_symbol->accept(*this);
   213 				s4o.print(")");
   684                 s4o.print(")real_to_time(");
   214 				IN_param_value->accept(*this);
   685                 IN_param_value->accept(*this);
   215 				return NULL;
   686                 s4o.print(")");
   216 				
   687                 return NULL;
   217 			}
   688                 
   218 			
   689             }
   219 			ERROR;
   690             
   220 		}
   691             ERROR;
   221 		
   692         }
   222 	}/*function_real_to_dword*/
   693         
   223 	break;
   694     }/*function_real_to_tod*/
       
   695     break;
   224 
   696 
   225 /****
   697 /****
   226  *REAL_TO_DT
   698  *REAL_TO_DT
   227  */
   699  */
   228 	case function_real_to_dt :
   700     case function_real_to_dt :
   229 	{
   701     {
   230 		symbol_c *last_type_symbol = NULL;
   702         symbol_c *last_type_symbol = NULL;
   231 
   703 
   232 		{
   704         {
   233 			identifier_c param_name("IN");
   705             identifier_c param_name("IN");
   234 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   706             /* Get the value from a foo(<param_name> = <param_value>) style call */
   235 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   707             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   236 			
   708             
   237 			/* Get the value from a foo(<param_value>) style call */
   709             /* Get the value from a foo(<param_value>) style call */
   238 			if (IN_param_value == NULL)
   710             if (IN_param_value == NULL)
   239 			  IN_param_value = function_call_param_iterator.next();
   711               IN_param_value = function_call_param_iterator.next();
   240 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   241 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   713             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   242 			
   714             
   243 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   715             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   244 			{
   716             {
   245 		
   717         
   246 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   718                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   247 				s4o.print("(");
   719                 s4o.print("(");
   248 				return_type_symbol->accept(*this);
   720                 return_type_symbol->accept(*this);
   249 				s4o.print(")time_to_real(");
   721                 s4o.print(")real_to_time(");
   250 				IN_param_value->accept(*this);
   722                 IN_param_value->accept(*this);
   251 				s4o.print(")");
   723                 s4o.print(")");
   252 				return NULL;
   724                 return NULL;
   253 				
   725                 
   254 			}
   726             }
   255 			
   727             
   256 			ERROR;
   728             ERROR;
   257 		}
   729         }
   258 		
   730         
   259 	}/*function_real_to_dt*/
   731     }/*function_real_to_dt*/
   260 	break;
   732     break;
   261 
   733 
   262 /****
   734 /****
   263  *REAL_TO_TOD
   735  *LREAL_TO_REAL
   264  */
   736  */
   265 	case function_real_to_tod :
   737     case function_lreal_to_real :
   266 	{
   738     {
   267 		symbol_c *last_type_symbol = NULL;
   739         symbol_c *last_type_symbol = NULL;
   268 
   740 
   269 		{
   741         {
   270 			identifier_c param_name("IN");
   742             identifier_c param_name("IN");
   271 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   743             /* Get the value from a foo(<param_name> = <param_value>) style call */
   272 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   744             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   273 			
   745             
   274 			/* Get the value from a foo(<param_value>) style call */
   746             /* Get the value from a foo(<param_value>) style call */
   275 			if (IN_param_value == NULL)
   747             if (IN_param_value == NULL)
   276 			  IN_param_value = function_call_param_iterator.next();
   748               IN_param_value = function_call_param_iterator.next();
   277 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   749             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   278 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   750             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   279 			
   751             
   280 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   752             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   281 			{
   753             {
   282 		
   754         
   283 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   755                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   284 				s4o.print("(");
   756                 s4o.print("(");
   285 				return_type_symbol->accept(*this);
   757                 return_type_symbol->accept(*this);
   286 				s4o.print(")time_to_real(");
   758                 s4o.print(")");
   287 				IN_param_value->accept(*this);
   759                 IN_param_value->accept(*this);
   288 				s4o.print(")");
   760                 return NULL;
   289 				return NULL;
   761                 
   290 				
   762             }
   291 			}
   763             
   292 			
   764             ERROR;
   293 			ERROR;
   765         }
   294 		}
   766         
   295 		
   767     }/*function_lreal_to_real*/
   296 	}/*function_real_to_tod*/
   768     break;
   297 	break;
   769 
   298 
   770 /****
   299 /****
   771  *LREAL_TO_SINT
   300  *REAL_TO_UDINT
   772  */
   301  */
   773     case function_lreal_to_sint :
   302 	case function_real_to_udint :
   774     {
   303 	{
   775         symbol_c *last_type_symbol = NULL;
   304 		symbol_c *last_type_symbol = NULL;
   776 
   305 
   777         {
   306 		{
   778             identifier_c param_name("IN");
   307 			identifier_c param_name("IN");
   779             /* Get the value from a foo(<param_name> = <param_value>) style call */
   308 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   780             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   309 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   781             
   310 			
   782             /* Get the value from a foo(<param_value>) style call */
   311 			/* Get the value from a foo(<param_value>) style call */
   783             if (IN_param_value == NULL)
   312 			if (IN_param_value == NULL)
   784               IN_param_value = function_call_param_iterator.next();
   313 			  IN_param_value = function_call_param_iterator.next();
   785             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   314 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   786             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   315 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   787             
   316 			
   788             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   317 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   789             {
   318 			{
   790         
   319 		
   791                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
   320 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   792                 s4o.print("(");
   321 				s4o.print("(");
   793                 return_type_symbol->accept(*this);
   322 				return_type_symbol->accept(*this);
   794                 s4o.print(")");
   323 				s4o.print(")");
   795                 IN_param_value->accept(*this);
   324 				IN_param_value->accept(*this);
   796                 return NULL;
   325 				return NULL;
   797                 
   326 				
   798             }
   327 			}
   799             
   328 			
   800             ERROR;
   329 			ERROR;
   801         }
   330 		}
   802         
   331 		
   803     }/*function_lreal_to_sint*/
   332 	}/*function_real_to_udint*/
   804     break;
   333 	break;
   805 
   334 
   806 /****
   335 /****
   807  *LREAL_TO_INT
   336  *REAL_TO_WORD
   808  */
   337  */
   809     case function_lreal_to_int :
   338 	case function_real_to_word :
   810     {
   339 	{
   811         symbol_c *last_type_symbol = NULL;
   340 		symbol_c *last_type_symbol = NULL;
   812 
   341 
   813         {
   342 		{
   814             identifier_c param_name("IN");
   343 			identifier_c param_name("IN");
   815             /* Get the value from a foo(<param_name> = <param_value>) style call */
   344 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   816             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   345 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   817             
   346 			
   818             /* Get the value from a foo(<param_value>) style call */
   347 			/* Get the value from a foo(<param_value>) style call */
   819             if (IN_param_value == NULL)
   348 			if (IN_param_value == NULL)
   820               IN_param_value = function_call_param_iterator.next();
   349 			  IN_param_value = function_call_param_iterator.next();
   821             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   350 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   822             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   351 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   823             
   352 			
   824             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   353 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   825             {
   354 			{
   826         
   355 		
   827                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   356 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   828                 s4o.print("(");
   357 				s4o.print("(");
   829                 return_type_symbol->accept(*this);
   358 				return_type_symbol->accept(*this);
   830                 s4o.print(")");
   359 				s4o.print(")");
   831                 IN_param_value->accept(*this);
   360 				IN_param_value->accept(*this);
   832                 return NULL;
   361 				return NULL;
   833                 
   362 				
   834             }
   363 			}
   835             
   364 			
   836             ERROR;
   365 			ERROR;
   837         }
   366 		}
   838         
   367 		
   839     }/*function_lreal_to_int*/
   368 	}/*function_real_to_word*/
   840     break;
   369 	break;
   841 
   370 
   842 /****
   371 /****
   843  *LREAL_TO_DINT
   372  *REAL_TO_WSTRING
   844  */
   373  */
   845     case function_lreal_to_dint :
   374 	case function_real_to_wstring :
   846     {
   375 	{
   847         symbol_c *last_type_symbol = NULL;
   376 		symbol_c *last_type_symbol = NULL;
   848 
   377 
   849         {
   378 		{
   850             identifier_c param_name("IN");
   379 			identifier_c param_name("IN");
   851             /* Get the value from a foo(<param_name> = <param_value>) style call */
   380 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   852             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   381 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   853             
   382 			
   854             /* Get the value from a foo(<param_value>) style call */
   383 			/* Get the value from a foo(<param_value>) style call */
   855             if (IN_param_value == NULL)
   384 			if (IN_param_value == NULL)
   856               IN_param_value = function_call_param_iterator.next();
   385 			  IN_param_value = function_call_param_iterator.next();
   857             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   386 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   858             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   387 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   859             
   388 			
   860             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   389 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   861             {
   390 			{
   862         
   391 		
   863                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   392 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
   864                 s4o.print("(");
   393 				s4o.print("(");
   865                 return_type_symbol->accept(*this);
   394 				return_type_symbol->accept(*this);
   866                 s4o.print(")");
   395 				s4o.print(")string_to_int(");
   867                 IN_param_value->accept(*this);
   396 				IN_param_value->accept(*this);
   868                 return NULL;
   397 				s4o.print(", 10)");
   869                 
   398 				return NULL;
   870             }
   399 				
   871             
   400 			}
   872             ERROR;
   401 			
   873         }
   402 			ERROR;
   874         
   403 		}
   875     }/*function_lreal_to_dint*/
   404 		
   876     break;
   405 	}/*function_real_to_wstring*/
   877 
   406 	break;
   878 /****
   407 
   879  *LREAL_TO_LINT
   408 /****
   880  */
   409  *REAL_TO_STRING
   881     case function_lreal_to_lint :
   410  */
   882     {
   411 	case function_real_to_string :
   883         symbol_c *last_type_symbol = NULL;
   412 	{
   884 
   413 		symbol_c *last_type_symbol = NULL;
   885         {
   414 
   886             identifier_c param_name("IN");
   415 		{
   887             /* Get the value from a foo(<param_name> = <param_value>) style call */
   416 			identifier_c param_name("IN");
   888             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   889             
   418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   890             /* Get the value from a foo(<param_value>) style call */
   419 			
   891             if (IN_param_value == NULL)
   420 			/* Get the value from a foo(<param_value>) style call */
   892               IN_param_value = function_call_param_iterator.next();
   421 			if (IN_param_value == NULL)
   893             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   422 			  IN_param_value = function_call_param_iterator.next();
   894             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   895             
   424 			last_type_symbol = last_type_symbol && search_expression_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             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   425 			
   897             {
   426 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   898         
   427 			{
   899                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   428 		
   900                 s4o.print("(");
   429 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   901                 return_type_symbol->accept(*this);
   430 				s4o.print("(");
   902                 s4o.print(")");
   431 				return_type_symbol->accept(*this);
   903                 IN_param_value->accept(*this);
   432 				s4o.print(")string_to_int(");
   904                 return NULL;
   433 				IN_param_value->accept(*this);
   905                 
   434 				s4o.print(", 10)");
   906             }
   435 				return NULL;
   907             
   436 				
   908             ERROR;
   437 			}
   909         }
   438 			
   910         
   439 			ERROR;
   911     }/*function_lreal_to_lint*/
   440 		}
   912     break;
   441 		
   913 
   442 	}/*function_real_to_string*/
   914 /****
   443 	break;
   915  *LREAL_TO_USINT
   444 
   916  */
   445 /****
   917     case function_lreal_to_usint :
   446  *REAL_TO_LWORD
   918     {
   447  */
   919         symbol_c *last_type_symbol = NULL;
   448 	case function_real_to_lword :
   920 
   449 	{
   921         {
   450 		symbol_c *last_type_symbol = NULL;
   922             identifier_c param_name("IN");
   451 
   923             /* Get the value from a foo(<param_name> = <param_value>) style call */
   452 		{
   924             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   453 			identifier_c param_name("IN");
   925             
   454 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   926             /* Get the value from a foo(<param_value>) style call */
   455 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   927             if (IN_param_value == NULL)
   456 			
   928               IN_param_value = function_call_param_iterator.next();
   457 			/* Get the value from a foo(<param_value>) style call */
   929             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   458 			if (IN_param_value == NULL)
   930             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   459 			  IN_param_value = function_call_param_iterator.next();
   931             
   460 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   932             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   461 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   933             {
   462 			
   934         
   463 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   935                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   464 			{
   936                 s4o.print("(");
   465 		
   937                 return_type_symbol->accept(*this);
   466 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   938                 s4o.print(")");
   467 				s4o.print("(");
   939                 IN_param_value->accept(*this);
   468 				return_type_symbol->accept(*this);
   940                 return NULL;
   469 				s4o.print(")");
   941                 
   470 				IN_param_value->accept(*this);
   942             }
   471 				return NULL;
   943             
   472 				
   944             ERROR;
   473 			}
   945         }
   474 			
   946         
   475 			ERROR;
   947     }/*function_lreal_to_usint*/
   476 		}
   948     break;
   477 		
   949 
   478 	}/*function_real_to_lword*/
   950 /****
   479 	break;
   951  *LREAL_TO_UINT
   480 
   952  */
   481 /****
   953     case function_lreal_to_uint :
   482  *REAL_TO_UINT
   954     {
   483  */
   955         symbol_c *last_type_symbol = NULL;
   484 	case function_real_to_uint :
   956 
   485 	{
   957         {
   486 		symbol_c *last_type_symbol = NULL;
   958             identifier_c param_name("IN");
   487 
   959             /* Get the value from a foo(<param_name> = <param_value>) style call */
   488 		{
   960             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   489 			identifier_c param_name("IN");
   961             
   490 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   962             /* Get the value from a foo(<param_value>) style call */
   491 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   963             if (IN_param_value == NULL)
   492 			
   964               IN_param_value = function_call_param_iterator.next();
   493 			/* Get the value from a foo(<param_value>) style call */
   965             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   494 			if (IN_param_value == NULL)
   966             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   495 			  IN_param_value = function_call_param_iterator.next();
   967             
   496 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   968             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   497 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   969             {
   498 			
   970         
   499 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   971                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   500 			{
   972                 s4o.print("(");
   501 		
   973                 return_type_symbol->accept(*this);
   502 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   974                 s4o.print(")");
   503 				s4o.print("(");
   975                 IN_param_value->accept(*this);
   504 				return_type_symbol->accept(*this);
   976                 return NULL;
   505 				s4o.print(")");
   977                 
   506 				IN_param_value->accept(*this);
   978             }
   507 				return NULL;
   979             
   508 				
   980             ERROR;
   509 			}
   981         }
   510 			
   982         
   511 			ERROR;
   983     }/*function_lreal_to_uint*/
   512 		}
   984     break;
   513 		
   985 
   514 	}/*function_real_to_uint*/
   986 /****
   515 	break;
   987  *LREAL_TO_UDINT
   516 
   988  */
   517 /****
   989     case function_lreal_to_udint :
   518  *REAL_TO_LREAL
   990     {
   519  */
   991         symbol_c *last_type_symbol = NULL;
   520 	case function_real_to_lreal :
   992 
   521 	{
   993         {
   522 		symbol_c *last_type_symbol = NULL;
   994             identifier_c param_name("IN");
   523 
   995             /* Get the value from a foo(<param_name> = <param_value>) style call */
   524 		{
   996             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   525 			identifier_c param_name("IN");
   997             
   526 			/* Get the value from a foo(<param_name> = <param_value>) style call */
   998             /* Get the value from a foo(<param_value>) style call */
   527 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   999             if (IN_param_value == NULL)
   528 			
  1000               IN_param_value = function_call_param_iterator.next();
   529 			/* Get the value from a foo(<param_value>) style call */
  1001             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   530 			if (IN_param_value == NULL)
  1002             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   531 			  IN_param_value = function_call_param_iterator.next();
  1003             
   532 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1004             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   533 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1005             {
   534 			
  1006         
   535 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1007                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   536 			{
  1008                 s4o.print("(");
   537 		
  1009                 return_type_symbol->accept(*this);
   538 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1010                 s4o.print(")");
   539 				s4o.print("(");
  1011                 IN_param_value->accept(*this);
   540 				return_type_symbol->accept(*this);
  1012                 return NULL;
   541 				s4o.print(")");
  1013                 
   542 				IN_param_value->accept(*this);
  1014             }
   543 				return NULL;
  1015             
   544 				
  1016             ERROR;
   545 			}
  1017         }
   546 			
  1018         
   547 			ERROR;
  1019     }/*function_lreal_to_udint*/
   548 		}
  1020     break;
   549 		
  1021 
   550 	}/*function_real_to_lreal*/
  1022 /****
   551 	break;
  1023  *LREAL_TO_ULINT
   552 
  1024  */
   553 /****
  1025     case function_lreal_to_ulint :
   554  *REAL_TO_BYTE
  1026     {
   555  */
  1027         symbol_c *last_type_symbol = NULL;
   556 	case function_real_to_byte :
  1028 
   557 	{
  1029         {
   558 		symbol_c *last_type_symbol = NULL;
  1030             identifier_c param_name("IN");
   559 
  1031             /* Get the value from a foo(<param_name> = <param_value>) style call */
   560 		{
  1032             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   561 			identifier_c param_name("IN");
  1033             
   562 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1034             /* Get the value from a foo(<param_value>) style call */
   563 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1035             if (IN_param_value == NULL)
   564 			
  1036               IN_param_value = function_call_param_iterator.next();
   565 			/* Get the value from a foo(<param_value>) style call */
  1037             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   566 			if (IN_param_value == NULL)
  1038             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   567 			  IN_param_value = function_call_param_iterator.next();
  1039             
   568 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1040             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   569 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1041             {
   570 			
  1042         
   571 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1043                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   572 			{
  1044                 s4o.print("(");
   573 		
  1045                 return_type_symbol->accept(*this);
   574 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1046                 s4o.print(")");
   575 				s4o.print("(");
  1047                 IN_param_value->accept(*this);
   576 				return_type_symbol->accept(*this);
  1048                 return NULL;
   577 				s4o.print(")");
  1049                 
   578 				IN_param_value->accept(*this);
  1050             }
   579 				return NULL;
  1051             
   580 				
  1052             ERROR;
   581 			}
  1053         }
   582 			
  1054         
   583 			ERROR;
  1055     }/*function_lreal_to_ulint*/
   584 		}
  1056     break;
   585 		
  1057 
   586 	}/*function_real_to_byte*/
  1058 /****
   587 	break;
  1059  *LREAL_TO_TIME
   588 
  1060  */
   589 /****
  1061     case function_lreal_to_time :
   590  *REAL_TO_USINT
  1062     {
   591  */
  1063         symbol_c *last_type_symbol = NULL;
   592 	case function_real_to_usint :
  1064 
   593 	{
  1065         {
   594 		symbol_c *last_type_symbol = NULL;
  1066             identifier_c param_name("IN");
   595 
  1067             /* Get the value from a foo(<param_name> = <param_value>) style call */
   596 		{
  1068             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   597 			identifier_c param_name("IN");
  1069             
   598 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1070             /* Get the value from a foo(<param_value>) style call */
   599 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1071             if (IN_param_value == NULL)
   600 			
  1072               IN_param_value = function_call_param_iterator.next();
   601 			/* Get the value from a foo(<param_value>) style call */
  1073             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   602 			if (IN_param_value == NULL)
  1074             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   603 			  IN_param_value = function_call_param_iterator.next();
  1075             
   604 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1076             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   605 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1077             {
   606 			
  1078         
   607 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1079                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   608 			{
  1080                 s4o.print("(");
   609 		
  1081                 return_type_symbol->accept(*this);
   610 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1082                 s4o.print(")real_to_time(");
   611 				s4o.print("(");
  1083                 IN_param_value->accept(*this);
   612 				return_type_symbol->accept(*this);
  1084                 s4o.print(")");
   613 				s4o.print(")");
  1085                 return NULL;
   614 				IN_param_value->accept(*this);
  1086                 
   615 				return NULL;
  1087             }
   616 				
  1088             
   617 			}
  1089             ERROR;
   618 			
  1090         }
   619 			ERROR;
  1091         
   620 		}
  1092     }/*function_lreal_to_time*/
   621 		
  1093     break;
   622 	}/*function_real_to_usint*/
  1094 
   623 	break;
  1095 /****
   624 
  1096  *LREAL_TO_BOOL
   625 /****
  1097  */
   626  *REAL_TO_ULINT
  1098     case function_lreal_to_bool :
   627  */
  1099     {
   628 	case function_real_to_ulint :
  1100         symbol_c *last_type_symbol = NULL;
   629 	{
  1101 
   630 		symbol_c *last_type_symbol = NULL;
  1102         {
   631 
  1103             identifier_c param_name("IN");
   632 		{
  1104             /* Get the value from a foo(<param_name> = <param_value>) style call */
   633 			identifier_c param_name("IN");
  1105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   634 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1106             
   635 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1107             /* Get the value from a foo(<param_value>) style call */
   636 			
  1108             if (IN_param_value == NULL)
   637 			/* Get the value from a foo(<param_value>) style call */
  1109               IN_param_value = function_call_param_iterator.next();
   638 			if (IN_param_value == NULL)
  1110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   639 			  IN_param_value = function_call_param_iterator.next();
  1111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   640 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1112             
   641 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1113             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   642 			
  1114             {
   643 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1115         
   644 			{
  1116                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   645 		
  1117                 s4o.print("(");
   646 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1118                 return_type_symbol->accept(*this);
   647 				s4o.print("(");
  1119                 s4o.print(")");
   648 				return_type_symbol->accept(*this);
  1120                 IN_param_value->accept(*this);
   649 				s4o.print(")");
  1121                 return NULL;
   650 				IN_param_value->accept(*this);
  1122                 
   651 				return NULL;
  1123             }
   652 				
  1124             
   653 			}
  1125             ERROR;
   654 			
  1126         }
   655 			ERROR;
  1127         
   656 		}
  1128     }/*function_lreal_to_bool*/
   657 		
  1129     break;
   658 	}/*function_real_to_ulint*/
  1130 
   659 	break;
  1131 /****
   660 
  1132  *LREAL_TO_BYTE
   661 /****
  1133  */
   662  *REAL_TO_BOOL
  1134     case function_lreal_to_byte :
   663  */
  1135     {
   664 	case function_real_to_bool :
  1136         symbol_c *last_type_symbol = NULL;
   665 	{
  1137 
   666 		symbol_c *last_type_symbol = NULL;
  1138         {
   667 
  1139             identifier_c param_name("IN");
   668 		{
  1140             /* Get the value from a foo(<param_name> = <param_value>) style call */
   669 			identifier_c param_name("IN");
  1141             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   670 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1142             
   671 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1143             /* Get the value from a foo(<param_value>) style call */
   672 			
  1144             if (IN_param_value == NULL)
   673 			/* Get the value from a foo(<param_value>) style call */
  1145               IN_param_value = function_call_param_iterator.next();
   674 			if (IN_param_value == NULL)
  1146             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   675 			  IN_param_value = function_call_param_iterator.next();
  1147             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   676 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1148             
   677 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1149             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   678 			
  1150             {
   679 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1151         
   680 			{
  1152                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   681 		
  1153                 s4o.print("(");
   682 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1154                 return_type_symbol->accept(*this);
   683 				s4o.print("(");
  1155                 s4o.print(")");
   684 				return_type_symbol->accept(*this);
  1156                 IN_param_value->accept(*this);
   685 				s4o.print(")");
  1157                 return NULL;
   686 				IN_param_value->accept(*this);
  1158                 
   687 				return NULL;
  1159             }
   688 				
  1160             
   689 			}
  1161             ERROR;
   690 			
  1162         }
   691 			ERROR;
  1163         
   692 		}
  1164     }/*function_lreal_to_byte*/
   693 		
  1165     break;
   694 	}/*function_real_to_bool*/
  1166 
   695 	break;
  1167 /****
   696 
  1168  *LREAL_TO_WORD
   697 /****
  1169  */
   698  *REAL_TO_TIME
  1170     case function_lreal_to_word :
   699  */
  1171     {
   700 	case function_real_to_time :
  1172         symbol_c *last_type_symbol = NULL;
   701 	{
  1173 
   702 		symbol_c *last_type_symbol = NULL;
  1174         {
   703 
  1175             identifier_c param_name("IN");
   704 		{
  1176             /* Get the value from a foo(<param_name> = <param_value>) style call */
   705 			identifier_c param_name("IN");
  1177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   706 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1178             
   707 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1179             /* Get the value from a foo(<param_value>) style call */
   708 			
  1180             if (IN_param_value == NULL)
   709 			/* Get the value from a foo(<param_value>) style call */
  1181               IN_param_value = function_call_param_iterator.next();
   710 			if (IN_param_value == NULL)
  1182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   711 			  IN_param_value = function_call_param_iterator.next();
  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 ;
   712 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1184             
   713 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1185             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   714 			
  1186             {
   715 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1187         
   716 			{
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   717 		
  1189                 s4o.print("(");
   718 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1190                 return_type_symbol->accept(*this);
   719 				s4o.print("(");
  1191                 s4o.print(")");
   720 				return_type_symbol->accept(*this);
  1192                 IN_param_value->accept(*this);
   721 				s4o.print(")time_to_real(");
  1193                 return NULL;
   722 				IN_param_value->accept(*this);
  1194                 
   723 				s4o.print(")");
  1195             }
   724 				return NULL;
  1196             
   725 				
  1197             ERROR;
   726 			}
  1198         }
   727 			
  1199         
   728 			ERROR;
  1200     }/*function_lreal_to_word*/
   729 		}
  1201     break;
   730 		
  1202 
   731 	}/*function_real_to_time*/
  1203 /****
   732 	break;
  1204  *LREAL_TO_DWORD
   733 
  1205  */
   734 /****
  1206     case function_lreal_to_dword :
   735  *REAL_TO_INT
  1207     {
   736  */
  1208         symbol_c *last_type_symbol = NULL;
   737 	case function_real_to_int :
  1209 
   738 	{
  1210         {
   739 		symbol_c *last_type_symbol = NULL;
  1211             identifier_c param_name("IN");
   740 
  1212             /* Get the value from a foo(<param_name> = <param_value>) style call */
   741 		{
  1213             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   742 			identifier_c param_name("IN");
  1214             
   743 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1215             /* Get the value from a foo(<param_value>) style call */
   744 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1216             if (IN_param_value == NULL)
   745 			
  1217               IN_param_value = function_call_param_iterator.next();
   746 			/* Get the value from a foo(<param_value>) style call */
  1218             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   747 			if (IN_param_value == NULL)
  1219             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   748 			  IN_param_value = function_call_param_iterator.next();
  1220             
   749 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1221             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   750 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1222             {
   751 			
  1223         
   752 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1224                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   753 			{
  1225                 s4o.print("(");
   754 		
  1226                 return_type_symbol->accept(*this);
   755 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1227                 s4o.print(")");
   756 				s4o.print("(");
  1228                 IN_param_value->accept(*this);
   757 				return_type_symbol->accept(*this);
  1229                 return NULL;
   758 				s4o.print(")");
  1230                 
   759 				IN_param_value->accept(*this);
  1231             }
   760 				return NULL;
  1232             
   761 				
  1233             ERROR;
   762 			}
  1234         }
   763 			
  1235         
   764 			ERROR;
  1236     }/*function_lreal_to_dword*/
   765 		}
  1237     break;
   766 		
  1238 
   767 	}/*function_real_to_int*/
  1239 /****
   768 	break;
  1240  *LREAL_TO_LWORD
       
  1241  */
       
  1242     case function_lreal_to_lword :
       
  1243     {
       
  1244         symbol_c *last_type_symbol = NULL;
       
  1245 
       
  1246         {
       
  1247             identifier_c param_name("IN");
       
  1248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1250             
       
  1251             /* Get the value from a foo(<param_value>) style call */
       
  1252             if (IN_param_value == NULL)
       
  1253               IN_param_value = function_call_param_iterator.next();
       
  1254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1256             
       
  1257             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1258             {
       
  1259         
       
  1260                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1261                 s4o.print("(");
       
  1262                 return_type_symbol->accept(*this);
       
  1263                 s4o.print(")");
       
  1264                 IN_param_value->accept(*this);
       
  1265                 return NULL;
       
  1266                 
       
  1267             }
       
  1268             
       
  1269             ERROR;
       
  1270         }
       
  1271         
       
  1272     }/*function_lreal_to_lword*/
       
  1273     break;
       
  1274 
       
  1275 /****
       
  1276  *LREAL_TO_STRING
       
  1277  */
       
  1278     case function_lreal_to_string :
       
  1279     {
       
  1280         symbol_c *last_type_symbol = NULL;
       
  1281 
       
  1282         {
       
  1283             identifier_c param_name("IN");
       
  1284             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1285             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1286             
       
  1287             /* Get the value from a foo(<param_value>) style call */
       
  1288             if (IN_param_value == NULL)
       
  1289               IN_param_value = function_call_param_iterator.next();
       
  1290             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1291             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1292             
       
  1293             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1294             {
       
  1295         
       
  1296                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1297                 s4o.print("(");
       
  1298                 return_type_symbol->accept(*this);
       
  1299                 s4o.print(")int_to_string(");
       
  1300                 IN_param_value->accept(*this);
       
  1301                 s4o.print(", 10)");
       
  1302                 return NULL;
       
  1303                 
       
  1304             }
       
  1305             
       
  1306             ERROR;
       
  1307         }
       
  1308         
       
  1309     }/*function_lreal_to_string*/
       
  1310     break;
       
  1311 
       
  1312 /****
       
  1313  *LREAL_TO_WSTRING
       
  1314  */
       
  1315     case function_lreal_to_wstring :
       
  1316     {
       
  1317         symbol_c *last_type_symbol = NULL;
       
  1318 
       
  1319         {
       
  1320             identifier_c param_name("IN");
       
  1321             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1322             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1323             
       
  1324             /* Get the value from a foo(<param_value>) style call */
       
  1325             if (IN_param_value == NULL)
       
  1326               IN_param_value = function_call_param_iterator.next();
       
  1327             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1328             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1329             
       
  1330             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1331             {
       
  1332         
       
  1333                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1334                 s4o.print("(");
       
  1335                 return_type_symbol->accept(*this);
       
  1336                 s4o.print(")int_to_string(");
       
  1337                 IN_param_value->accept(*this);
       
  1338                 s4o.print(", 10)");
       
  1339                 return NULL;
       
  1340                 
       
  1341             }
       
  1342             
       
  1343             ERROR;
       
  1344         }
       
  1345         
       
  1346     }/*function_lreal_to_wstring*/
       
  1347     break;
       
  1348 
       
  1349 /****
       
  1350  *LREAL_TO_DATE
       
  1351  */
       
  1352     case function_lreal_to_date :
       
  1353     {
       
  1354         symbol_c *last_type_symbol = NULL;
       
  1355 
       
  1356         {
       
  1357             identifier_c param_name("IN");
       
  1358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1359             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1360             
       
  1361             /* Get the value from a foo(<param_value>) style call */
       
  1362             if (IN_param_value == NULL)
       
  1363               IN_param_value = function_call_param_iterator.next();
       
  1364             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1365             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1366             
       
  1367             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1368             {
       
  1369         
       
  1370                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1371                 s4o.print("(");
       
  1372                 return_type_symbol->accept(*this);
       
  1373                 s4o.print(")real_to_time(");
       
  1374                 IN_param_value->accept(*this);
       
  1375                 s4o.print(")");
       
  1376                 return NULL;
       
  1377                 
       
  1378             }
       
  1379             
       
  1380             ERROR;
       
  1381         }
       
  1382         
       
  1383     }/*function_lreal_to_date*/
       
  1384     break;
       
  1385 
       
  1386 /****
       
  1387  *LREAL_TO_TOD
       
  1388  */
       
  1389     case function_lreal_to_tod :
       
  1390     {
       
  1391         symbol_c *last_type_symbol = NULL;
       
  1392 
       
  1393         {
       
  1394             identifier_c param_name("IN");
       
  1395             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1396             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1397             
       
  1398             /* Get the value from a foo(<param_value>) style call */
       
  1399             if (IN_param_value == NULL)
       
  1400               IN_param_value = function_call_param_iterator.next();
       
  1401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1403             
       
  1404             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1405             {
       
  1406         
       
  1407                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1408                 s4o.print("(");
       
  1409                 return_type_symbol->accept(*this);
       
  1410                 s4o.print(")real_to_time(");
       
  1411                 IN_param_value->accept(*this);
       
  1412                 s4o.print(")");
       
  1413                 return NULL;
       
  1414                 
       
  1415             }
       
  1416             
       
  1417             ERROR;
       
  1418         }
       
  1419         
       
  1420     }/*function_lreal_to_tod*/
       
  1421     break;
       
  1422 
       
  1423 /****
       
  1424  *LREAL_TO_DT
       
  1425  */
       
  1426     case function_lreal_to_dt :
       
  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(lreal_type_name_c))
       
  1442             {
       
  1443         
       
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1445                 s4o.print("(");
       
  1446                 return_type_symbol->accept(*this);
       
  1447                 s4o.print(")real_to_time(");
       
  1448                 IN_param_value->accept(*this);
       
  1449                 s4o.print(")");
       
  1450                 return NULL;
       
  1451                 
       
  1452             }
       
  1453             
       
  1454             ERROR;
       
  1455         }
       
  1456         
       
  1457     }/*function_lreal_to_dt*/
       
  1458     break;
   769 
  1459 
   770 /****
  1460 /****
   771  *SINT_TO_REAL
  1461  *SINT_TO_REAL
   772  */
  1462  */
   773 	case function_sint_to_real :
  1463     case function_sint_to_real :
   774 	{
  1464     {
   775 		symbol_c *last_type_symbol = NULL;
  1465         symbol_c *last_type_symbol = NULL;
   776 
  1466 
   777 		{
  1467         {
   778 			identifier_c param_name("IN");
  1468             identifier_c param_name("IN");
   779 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1469             /* Get the value from a foo(<param_name> = <param_value>) style call */
   780 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1470             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   781 			
  1471             
   782 			/* Get the value from a foo(<param_value>) style call */
  1472             /* Get the value from a foo(<param_value>) style call */
   783 			if (IN_param_value == NULL)
  1473             if (IN_param_value == NULL)
   784 			  IN_param_value = function_call_param_iterator.next();
  1474               IN_param_value = function_call_param_iterator.next();
   785 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1475             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   786 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1476             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   787 			
  1477             
   788 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1478             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   789 			{
  1479             {
   790 		
  1480         
   791 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1481                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   792 				s4o.print("(");
  1482                 s4o.print("(");
   793 				return_type_symbol->accept(*this);
  1483                 return_type_symbol->accept(*this);
   794 				s4o.print(")");
  1484                 s4o.print(")");
   795 				IN_param_value->accept(*this);
  1485                 IN_param_value->accept(*this);
   796 				return NULL;
  1486                 return NULL;
   797 				
  1487                 
   798 			}
  1488             }
   799 			
  1489             
   800 			ERROR;
  1490             ERROR;
   801 		}
  1491         }
   802 		
  1492         
   803 	}/*function_sint_to_real*/
  1493     }/*function_sint_to_real*/
   804 	break;
  1494     break;
   805 
  1495 
   806 /****
  1496 /****
   807  *SINT_TO_SINT
  1497  *SINT_TO_LREAL
   808  */
  1498  */
   809 	case function_sint_to_sint :
  1499     case function_sint_to_lreal :
   810 	{
  1500     {
   811 		symbol_c *last_type_symbol = NULL;
  1501         symbol_c *last_type_symbol = NULL;
   812 
  1502 
   813 		{
  1503         {
   814 			identifier_c param_name("IN");
  1504             identifier_c param_name("IN");
   815 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1505             /* Get the value from a foo(<param_name> = <param_value>) style call */
   816 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1506             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   817 			
  1507             
   818 			/* Get the value from a foo(<param_value>) style call */
  1508             /* Get the value from a foo(<param_value>) style call */
   819 			if (IN_param_value == NULL)
  1509             if (IN_param_value == NULL)
   820 			  IN_param_value = function_call_param_iterator.next();
  1510               IN_param_value = function_call_param_iterator.next();
   821 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1511             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   822 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1512             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   823 			
  1513             
   824 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1514             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   825 			{
  1515             {
   826 		
  1516         
   827 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1517                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   828 				s4o.print("(");
  1518                 s4o.print("(");
   829 				return_type_symbol->accept(*this);
  1519                 return_type_symbol->accept(*this);
   830 				s4o.print(")");
  1520                 s4o.print(")");
   831 				IN_param_value->accept(*this);
  1521                 IN_param_value->accept(*this);
   832 				return NULL;
  1522                 return NULL;
   833 				
  1523                 
   834 			}
  1524             }
   835 			
  1525             
   836 			ERROR;
  1526             ERROR;
   837 		}
  1527         }
   838 		
  1528         
   839 	}/*function_sint_to_sint*/
  1529     }/*function_sint_to_lreal*/
   840 	break;
  1530     break;
       
  1531 
       
  1532 /****
       
  1533  *SINT_TO_INT
       
  1534  */
       
  1535     case function_sint_to_int :
       
  1536     {
       
  1537         symbol_c *last_type_symbol = NULL;
       
  1538 
       
  1539         {
       
  1540             identifier_c param_name("IN");
       
  1541             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1542             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1543             
       
  1544             /* Get the value from a foo(<param_value>) style call */
       
  1545             if (IN_param_value == NULL)
       
  1546               IN_param_value = function_call_param_iterator.next();
       
  1547             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1548             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1549             
       
  1550             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1551             {
       
  1552         
       
  1553                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1554                 s4o.print("(");
       
  1555                 return_type_symbol->accept(*this);
       
  1556                 s4o.print(")");
       
  1557                 IN_param_value->accept(*this);
       
  1558                 return NULL;
       
  1559                 
       
  1560             }
       
  1561             
       
  1562             ERROR;
       
  1563         }
       
  1564         
       
  1565     }/*function_sint_to_int*/
       
  1566     break;
       
  1567 
       
  1568 /****
       
  1569  *SINT_TO_DINT
       
  1570  */
       
  1571     case function_sint_to_dint :
       
  1572     {
       
  1573         symbol_c *last_type_symbol = NULL;
       
  1574 
       
  1575         {
       
  1576             identifier_c param_name("IN");
       
  1577             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1578             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1579             
       
  1580             /* Get the value from a foo(<param_value>) style call */
       
  1581             if (IN_param_value == NULL)
       
  1582               IN_param_value = function_call_param_iterator.next();
       
  1583             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1584             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1585             
       
  1586             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1587             {
       
  1588         
       
  1589                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1590                 s4o.print("(");
       
  1591                 return_type_symbol->accept(*this);
       
  1592                 s4o.print(")");
       
  1593                 IN_param_value->accept(*this);
       
  1594                 return NULL;
       
  1595                 
       
  1596             }
       
  1597             
       
  1598             ERROR;
       
  1599         }
       
  1600         
       
  1601     }/*function_sint_to_dint*/
       
  1602     break;
   841 
  1603 
   842 /****
  1604 /****
   843  *SINT_TO_LINT
  1605  *SINT_TO_LINT
   844  */
  1606  */
   845 	case function_sint_to_lint :
  1607     case function_sint_to_lint :
   846 	{
  1608     {
   847 		symbol_c *last_type_symbol = NULL;
  1609         symbol_c *last_type_symbol = NULL;
   848 
  1610 
   849 		{
  1611         {
   850 			identifier_c param_name("IN");
  1612             identifier_c param_name("IN");
   851 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1613             /* Get the value from a foo(<param_name> = <param_value>) style call */
   852 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1614             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   853 			
  1615             
   854 			/* Get the value from a foo(<param_value>) style call */
  1616             /* Get the value from a foo(<param_value>) style call */
   855 			if (IN_param_value == NULL)
  1617             if (IN_param_value == NULL)
   856 			  IN_param_value = function_call_param_iterator.next();
  1618               IN_param_value = function_call_param_iterator.next();
   857 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1619             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   858 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1620             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   859 			
  1621             
   860 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1622             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   861 			{
  1623             {
   862 		
  1624         
   863 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1625                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   864 				s4o.print("(");
  1626                 s4o.print("(");
   865 				return_type_symbol->accept(*this);
  1627                 return_type_symbol->accept(*this);
   866 				s4o.print(")");
  1628                 s4o.print(")");
   867 				IN_param_value->accept(*this);
  1629                 IN_param_value->accept(*this);
   868 				return NULL;
  1630                 return NULL;
   869 				
  1631                 
   870 			}
  1632             }
   871 			
  1633             
   872 			ERROR;
  1634             ERROR;
   873 		}
  1635         }
   874 		
  1636         
   875 	}/*function_sint_to_lint*/
  1637     }/*function_sint_to_lint*/
   876 	break;
  1638     break;
   877 
  1639 
   878 /****
  1640 /****
   879  *SINT_TO_DINT
  1641  *SINT_TO_USINT
   880  */
  1642  */
   881 	case function_sint_to_dint :
  1643     case function_sint_to_usint :
   882 	{
  1644     {
   883 		symbol_c *last_type_symbol = NULL;
  1645         symbol_c *last_type_symbol = NULL;
   884 
  1646 
   885 		{
  1647         {
   886 			identifier_c param_name("IN");
  1648             identifier_c param_name("IN");
   887 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  1649             /* Get the value from a foo(<param_name> = <param_value>) style call */
   888 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1650             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   889 			
  1651             
   890 			/* Get the value from a foo(<param_value>) style call */
  1652             /* Get the value from a foo(<param_value>) style call */
   891 			if (IN_param_value == NULL)
  1653             if (IN_param_value == NULL)
   892 			  IN_param_value = function_call_param_iterator.next();
  1654               IN_param_value = function_call_param_iterator.next();
   893 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1655             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   894 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1656             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   895 			
  1657             
   896 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1658             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   897 			{
  1659             {
   898 		
  1660         
   899 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1661                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   900 				s4o.print("(");
  1662                 s4o.print("(");
   901 				return_type_symbol->accept(*this);
  1663                 return_type_symbol->accept(*this);
   902 				s4o.print(")");
  1664                 s4o.print(")");
   903 				IN_param_value->accept(*this);
  1665                 IN_param_value->accept(*this);
   904 				return NULL;
  1666                 return NULL;
   905 				
  1667                 
   906 			}
  1668             }
   907 			
  1669             
   908 			ERROR;
  1670             ERROR;
   909 		}
  1671         }
   910 		
  1672         
   911 	}/*function_sint_to_dint*/
  1673     }/*function_sint_to_usint*/
   912 	break;
  1674     break;
       
  1675 
       
  1676 /****
       
  1677  *SINT_TO_UINT
       
  1678  */
       
  1679     case function_sint_to_uint :
       
  1680     {
       
  1681         symbol_c *last_type_symbol = NULL;
       
  1682 
       
  1683         {
       
  1684             identifier_c param_name("IN");
       
  1685             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1686             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1687             
       
  1688             /* Get the value from a foo(<param_value>) style call */
       
  1689             if (IN_param_value == NULL)
       
  1690               IN_param_value = function_call_param_iterator.next();
       
  1691             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1692             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1693             
       
  1694             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1695             {
       
  1696         
       
  1697                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1698                 s4o.print("(");
       
  1699                 return_type_symbol->accept(*this);
       
  1700                 s4o.print(")");
       
  1701                 IN_param_value->accept(*this);
       
  1702                 return NULL;
       
  1703                 
       
  1704             }
       
  1705             
       
  1706             ERROR;
       
  1707         }
       
  1708         
       
  1709     }/*function_sint_to_uint*/
       
  1710     break;
       
  1711 
       
  1712 /****
       
  1713  *SINT_TO_UDINT
       
  1714  */
       
  1715     case function_sint_to_udint :
       
  1716     {
       
  1717         symbol_c *last_type_symbol = NULL;
       
  1718 
       
  1719         {
       
  1720             identifier_c param_name("IN");
       
  1721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1722             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1723             
       
  1724             /* Get the value from a foo(<param_value>) style call */
       
  1725             if (IN_param_value == NULL)
       
  1726               IN_param_value = function_call_param_iterator.next();
       
  1727             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1728             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1729             
       
  1730             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1731             {
       
  1732         
       
  1733                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1734                 s4o.print("(");
       
  1735                 return_type_symbol->accept(*this);
       
  1736                 s4o.print(")");
       
  1737                 IN_param_value->accept(*this);
       
  1738                 return NULL;
       
  1739                 
       
  1740             }
       
  1741             
       
  1742             ERROR;
       
  1743         }
       
  1744         
       
  1745     }/*function_sint_to_udint*/
       
  1746     break;
       
  1747 
       
  1748 /****
       
  1749  *SINT_TO_ULINT
       
  1750  */
       
  1751     case function_sint_to_ulint :
       
  1752     {
       
  1753         symbol_c *last_type_symbol = NULL;
       
  1754 
       
  1755         {
       
  1756             identifier_c param_name("IN");
       
  1757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1758             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1759             
       
  1760             /* Get the value from a foo(<param_value>) style call */
       
  1761             if (IN_param_value == NULL)
       
  1762               IN_param_value = function_call_param_iterator.next();
       
  1763             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1764             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1765             
       
  1766             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1767             {
       
  1768         
       
  1769                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1770                 s4o.print("(");
       
  1771                 return_type_symbol->accept(*this);
       
  1772                 s4o.print(")");
       
  1773                 IN_param_value->accept(*this);
       
  1774                 return NULL;
       
  1775                 
       
  1776             }
       
  1777             
       
  1778             ERROR;
       
  1779         }
       
  1780         
       
  1781     }/*function_sint_to_ulint*/
       
  1782     break;
       
  1783 
       
  1784 /****
       
  1785  *SINT_TO_TIME
       
  1786  */
       
  1787     case function_sint_to_time :
       
  1788     {
       
  1789         symbol_c *last_type_symbol = NULL;
       
  1790 
       
  1791         {
       
  1792             identifier_c param_name("IN");
       
  1793             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1794             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1795             
       
  1796             /* Get the value from a foo(<param_value>) style call */
       
  1797             if (IN_param_value == NULL)
       
  1798               IN_param_value = function_call_param_iterator.next();
       
  1799             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1800             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1801             
       
  1802             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1803             {
       
  1804         
       
  1805                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1806                 s4o.print("(");
       
  1807                 return_type_symbol->accept(*this);
       
  1808                 s4o.print(")real_to_time(");
       
  1809                 IN_param_value->accept(*this);
       
  1810                 s4o.print(")");
       
  1811                 return NULL;
       
  1812                 
       
  1813             }
       
  1814             
       
  1815             ERROR;
       
  1816         }
       
  1817         
       
  1818     }/*function_sint_to_time*/
       
  1819     break;
       
  1820 
       
  1821 /****
       
  1822  *SINT_TO_BOOL
       
  1823  */
       
  1824     case function_sint_to_bool :
       
  1825     {
       
  1826         symbol_c *last_type_symbol = NULL;
       
  1827 
       
  1828         {
       
  1829             identifier_c param_name("IN");
       
  1830             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1831             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1832             
       
  1833             /* Get the value from a foo(<param_value>) style call */
       
  1834             if (IN_param_value == NULL)
       
  1835               IN_param_value = function_call_param_iterator.next();
       
  1836             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1837             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1838             
       
  1839             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1840             {
       
  1841         
       
  1842                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1843                 s4o.print("(");
       
  1844                 return_type_symbol->accept(*this);
       
  1845                 s4o.print(")");
       
  1846                 IN_param_value->accept(*this);
       
  1847                 return NULL;
       
  1848                 
       
  1849             }
       
  1850             
       
  1851             ERROR;
       
  1852         }
       
  1853         
       
  1854     }/*function_sint_to_bool*/
       
  1855     break;
       
  1856 
       
  1857 /****
       
  1858  *SINT_TO_BYTE
       
  1859  */
       
  1860     case function_sint_to_byte :
       
  1861     {
       
  1862         symbol_c *last_type_symbol = NULL;
       
  1863 
       
  1864         {
       
  1865             identifier_c param_name("IN");
       
  1866             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1867             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1868             
       
  1869             /* Get the value from a foo(<param_value>) style call */
       
  1870             if (IN_param_value == NULL)
       
  1871               IN_param_value = function_call_param_iterator.next();
       
  1872             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1873             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1874             
       
  1875             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1876             {
       
  1877         
       
  1878                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1879                 s4o.print("(");
       
  1880                 return_type_symbol->accept(*this);
       
  1881                 s4o.print(")");
       
  1882                 IN_param_value->accept(*this);
       
  1883                 return NULL;
       
  1884                 
       
  1885             }
       
  1886             
       
  1887             ERROR;
       
  1888         }
       
  1889         
       
  1890     }/*function_sint_to_byte*/
       
  1891     break;
       
  1892 
       
  1893 /****
       
  1894  *SINT_TO_WORD
       
  1895  */
       
  1896     case function_sint_to_word :
       
  1897     {
       
  1898         symbol_c *last_type_symbol = NULL;
       
  1899 
       
  1900         {
       
  1901             identifier_c param_name("IN");
       
  1902             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1903             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1904             
       
  1905             /* Get the value from a foo(<param_value>) style call */
       
  1906             if (IN_param_value == NULL)
       
  1907               IN_param_value = function_call_param_iterator.next();
       
  1908             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1909             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1910             
       
  1911             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1912             {
       
  1913         
       
  1914                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1915                 s4o.print("(");
       
  1916                 return_type_symbol->accept(*this);
       
  1917                 s4o.print(")");
       
  1918                 IN_param_value->accept(*this);
       
  1919                 return NULL;
       
  1920                 
       
  1921             }
       
  1922             
       
  1923             ERROR;
       
  1924         }
       
  1925         
       
  1926     }/*function_sint_to_word*/
       
  1927     break;
       
  1928 
       
  1929 /****
       
  1930  *SINT_TO_DWORD
       
  1931  */
       
  1932     case function_sint_to_dword :
       
  1933     {
       
  1934         symbol_c *last_type_symbol = NULL;
       
  1935 
       
  1936         {
       
  1937             identifier_c param_name("IN");
       
  1938             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1939             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1940             
       
  1941             /* Get the value from a foo(<param_value>) style call */
       
  1942             if (IN_param_value == NULL)
       
  1943               IN_param_value = function_call_param_iterator.next();
       
  1944             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1945             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1946             
       
  1947             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1948             {
       
  1949         
       
  1950                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1951                 s4o.print("(");
       
  1952                 return_type_symbol->accept(*this);
       
  1953                 s4o.print(")");
       
  1954                 IN_param_value->accept(*this);
       
  1955                 return NULL;
       
  1956                 
       
  1957             }
       
  1958             
       
  1959             ERROR;
       
  1960         }
       
  1961         
       
  1962     }/*function_sint_to_dword*/
       
  1963     break;
       
  1964 
       
  1965 /****
       
  1966  *SINT_TO_LWORD
       
  1967  */
       
  1968     case function_sint_to_lword :
       
  1969     {
       
  1970         symbol_c *last_type_symbol = NULL;
       
  1971 
       
  1972         {
       
  1973             identifier_c param_name("IN");
       
  1974             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1975             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1976             
       
  1977             /* Get the value from a foo(<param_value>) style call */
       
  1978             if (IN_param_value == NULL)
       
  1979               IN_param_value = function_call_param_iterator.next();
       
  1980             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1981             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1982             
       
  1983             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1984             {
       
  1985         
       
  1986                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1987                 s4o.print("(");
       
  1988                 return_type_symbol->accept(*this);
       
  1989                 s4o.print(")");
       
  1990                 IN_param_value->accept(*this);
       
  1991                 return NULL;
       
  1992                 
       
  1993             }
       
  1994             
       
  1995             ERROR;
       
  1996         }
       
  1997         
       
  1998     }/*function_sint_to_lword*/
       
  1999     break;
       
  2000 
       
  2001 /****
       
  2002  *SINT_TO_STRING
       
  2003  */
       
  2004     case function_sint_to_string :
       
  2005     {
       
  2006         symbol_c *last_type_symbol = NULL;
       
  2007 
       
  2008         {
       
  2009             identifier_c param_name("IN");
       
  2010             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2011             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2012             
       
  2013             /* Get the value from a foo(<param_value>) style call */
       
  2014             if (IN_param_value == NULL)
       
  2015               IN_param_value = function_call_param_iterator.next();
       
  2016             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2017             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2018             
       
  2019             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  2020             {
       
  2021         
       
  2022                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2023                 s4o.print("(");
       
  2024                 return_type_symbol->accept(*this);
       
  2025                 s4o.print(")int_to_string(");
       
  2026                 IN_param_value->accept(*this);
       
  2027                 s4o.print(", 10)");
       
  2028                 return NULL;
       
  2029                 
       
  2030             }
       
  2031             
       
  2032             ERROR;
       
  2033         }
       
  2034         
       
  2035     }/*function_sint_to_string*/
       
  2036     break;
       
  2037 
       
  2038 /****
       
  2039  *SINT_TO_WSTRING
       
  2040  */
       
  2041     case function_sint_to_wstring :
       
  2042     {
       
  2043         symbol_c *last_type_symbol = NULL;
       
  2044 
       
  2045         {
       
  2046             identifier_c param_name("IN");
       
  2047             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2048             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2049             
       
  2050             /* Get the value from a foo(<param_value>) style call */
       
  2051             if (IN_param_value == NULL)
       
  2052               IN_param_value = function_call_param_iterator.next();
       
  2053             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2054             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2055             
       
  2056             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  2057             {
       
  2058         
       
  2059                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  2060                 s4o.print("(");
       
  2061                 return_type_symbol->accept(*this);
       
  2062                 s4o.print(")int_to_string(");
       
  2063                 IN_param_value->accept(*this);
       
  2064                 s4o.print(", 10)");
       
  2065                 return NULL;
       
  2066                 
       
  2067             }
       
  2068             
       
  2069             ERROR;
       
  2070         }
       
  2071         
       
  2072     }/*function_sint_to_wstring*/
       
  2073     break;
   913 
  2074 
   914 /****
  2075 /****
   915  *SINT_TO_DATE
  2076  *SINT_TO_DATE
   916  */
  2077  */
   917 	case function_sint_to_date :
  2078     case function_sint_to_date :
   918 	{
  2079     {
   919 		symbol_c *last_type_symbol = NULL;
  2080         symbol_c *last_type_symbol = NULL;
   920 
  2081 
   921 		{
  2082         {
   922 			identifier_c param_name("IN");
  2083             identifier_c param_name("IN");
   923 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2084             /* Get the value from a foo(<param_name> = <param_value>) style call */
   924 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2085             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   925 			
  2086             
   926 			/* Get the value from a foo(<param_value>) style call */
  2087             /* Get the value from a foo(<param_value>) style call */
   927 			if (IN_param_value == NULL)
  2088             if (IN_param_value == NULL)
   928 			  IN_param_value = function_call_param_iterator.next();
  2089               IN_param_value = function_call_param_iterator.next();
   929 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2090             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   930 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2091             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   931 			
  2092             
   932 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2093             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   933 			{
  2094             {
   934 		
  2095         
   935 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2096                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   936 				s4o.print("(");
  2097                 s4o.print("(");
   937 				return_type_symbol->accept(*this);
  2098                 return_type_symbol->accept(*this);
   938 				s4o.print(")time_to_real(");
  2099                 s4o.print(")real_to_time(");
   939 				IN_param_value->accept(*this);
  2100                 IN_param_value->accept(*this);
   940 				s4o.print(")");
  2101                 s4o.print(")");
   941 				return NULL;
  2102                 return NULL;
   942 				
  2103                 
   943 			}
  2104             }
   944 			
  2105             
   945 			ERROR;
  2106             ERROR;
   946 		}
  2107         }
   947 		
  2108         
   948 	}/*function_sint_to_date*/
  2109     }/*function_sint_to_date*/
   949 	break;
  2110     break;
   950 
  2111 
   951 /****
  2112 /****
   952  *SINT_TO_DWORD
  2113  *SINT_TO_TOD
   953  */
  2114  */
   954 	case function_sint_to_dword :
  2115     case function_sint_to_tod :
   955 	{
  2116     {
   956 		symbol_c *last_type_symbol = NULL;
  2117         symbol_c *last_type_symbol = NULL;
   957 
  2118 
   958 		{
  2119         {
   959 			identifier_c param_name("IN");
  2120             identifier_c param_name("IN");
   960 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2121             /* Get the value from a foo(<param_name> = <param_value>) style call */
   961 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2122             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   962 			
  2123             
   963 			/* Get the value from a foo(<param_value>) style call */
  2124             /* Get the value from a foo(<param_value>) style call */
   964 			if (IN_param_value == NULL)
  2125             if (IN_param_value == NULL)
   965 			  IN_param_value = function_call_param_iterator.next();
  2126               IN_param_value = function_call_param_iterator.next();
   966 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2127             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   967 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2128             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   968 			
  2129             
   969 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2130             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   970 			{
  2131             {
   971 		
  2132         
   972 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2133                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   973 				s4o.print("(");
  2134                 s4o.print("(");
   974 				return_type_symbol->accept(*this);
  2135                 return_type_symbol->accept(*this);
   975 				s4o.print(")");
  2136                 s4o.print(")real_to_time(");
   976 				IN_param_value->accept(*this);
  2137                 IN_param_value->accept(*this);
   977 				return NULL;
  2138                 s4o.print(")");
   978 				
  2139                 return NULL;
   979 			}
  2140                 
   980 			
  2141             }
   981 			ERROR;
  2142             
   982 		}
  2143             ERROR;
   983 		
  2144         }
   984 	}/*function_sint_to_dword*/
  2145         
   985 	break;
  2146     }/*function_sint_to_tod*/
       
  2147     break;
   986 
  2148 
   987 /****
  2149 /****
   988  *SINT_TO_DT
  2150  *SINT_TO_DT
   989  */
  2151  */
   990 	case function_sint_to_dt :
  2152     case function_sint_to_dt :
   991 	{
  2153     {
   992 		symbol_c *last_type_symbol = NULL;
  2154         symbol_c *last_type_symbol = NULL;
   993 
  2155 
   994 		{
  2156         {
   995 			identifier_c param_name("IN");
  2157             identifier_c param_name("IN");
   996 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2158             /* Get the value from a foo(<param_name> = <param_value>) style call */
   997 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2159             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   998 			
  2160             
   999 			/* Get the value from a foo(<param_value>) style call */
  2161             /* Get the value from a foo(<param_value>) style call */
  1000 			if (IN_param_value == NULL)
  2162             if (IN_param_value == NULL)
  1001 			  IN_param_value = function_call_param_iterator.next();
  2163               IN_param_value = function_call_param_iterator.next();
  1002 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2164             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1003 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2165             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1004 			
  2166             
  1005 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2167             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1006 			{
  2168             {
  1007 		
  2169         
  1008 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2170                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1009 				s4o.print("(");
  2171                 s4o.print("(");
  1010 				return_type_symbol->accept(*this);
  2172                 return_type_symbol->accept(*this);
  1011 				s4o.print(")time_to_real(");
  2173                 s4o.print(")real_to_time(");
  1012 				IN_param_value->accept(*this);
  2174                 IN_param_value->accept(*this);
  1013 				s4o.print(")");
  2175                 s4o.print(")");
  1014 				return NULL;
  2176                 return NULL;
  1015 				
  2177                 
  1016 			}
  2178             }
  1017 			
  2179             
  1018 			ERROR;
  2180             ERROR;
  1019 		}
  2181         }
  1020 		
  2182         
  1021 	}/*function_sint_to_dt*/
  2183     }/*function_sint_to_dt*/
  1022 	break;
  2184     break;
  1023 
  2185 
  1024 /****
  2186 /****
  1025  *SINT_TO_TOD
  2187  *INT_TO_REAL
  1026  */
  2188  */
  1027 	case function_sint_to_tod :
  2189     case function_int_to_real :
  1028 	{
  2190     {
  1029 		symbol_c *last_type_symbol = NULL;
  2191         symbol_c *last_type_symbol = NULL;
  1030 
  2192 
  1031 		{
  2193         {
  1032 			identifier_c param_name("IN");
  2194             identifier_c param_name("IN");
  1033 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2195             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1034 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2196             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1035 			
  2197             
  1036 			/* Get the value from a foo(<param_value>) style call */
  2198             /* Get the value from a foo(<param_value>) style call */
  1037 			if (IN_param_value == NULL)
  2199             if (IN_param_value == NULL)
  1038 			  IN_param_value = function_call_param_iterator.next();
  2200               IN_param_value = function_call_param_iterator.next();
  1039 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2201             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1040 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2202             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1041 			
  2203             
  1042 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2204             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1043 			{
  2205             {
  1044 		
  2206         
  1045 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2207                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1046 				s4o.print("(");
  2208                 s4o.print("(");
  1047 				return_type_symbol->accept(*this);
  2209                 return_type_symbol->accept(*this);
  1048 				s4o.print(")time_to_real(");
  2210                 s4o.print(")");
  1049 				IN_param_value->accept(*this);
  2211                 IN_param_value->accept(*this);
  1050 				s4o.print(")");
  2212                 return NULL;
  1051 				return NULL;
  2213                 
  1052 				
  2214             }
  1053 			}
  2215             
  1054 			
  2216             ERROR;
  1055 			ERROR;
  2217         }
  1056 		}
  2218         
  1057 		
  2219     }/*function_int_to_real*/
  1058 	}/*function_sint_to_tod*/
  2220     break;
  1059 	break;
  2221 
  1060 
  2222 /****
  1061 /****
  2223  *INT_TO_LREAL
  1062  *SINT_TO_UDINT
  2224  */
  1063  */
  2225     case function_int_to_lreal :
  1064 	case function_sint_to_udint :
  2226     {
  1065 	{
  2227         symbol_c *last_type_symbol = NULL;
  1066 		symbol_c *last_type_symbol = NULL;
  2228 
  1067 
  2229         {
  1068 		{
  2230             identifier_c param_name("IN");
  1069 			identifier_c param_name("IN");
  2231             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1070 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2232             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1071 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2233             
  1072 			
  2234             /* Get the value from a foo(<param_value>) style call */
  1073 			/* Get the value from a foo(<param_value>) style call */
  2235             if (IN_param_value == NULL)
  1074 			if (IN_param_value == NULL)
  2236               IN_param_value = function_call_param_iterator.next();
  1075 			  IN_param_value = function_call_param_iterator.next();
  2237             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1076 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2238             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1077 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2239             
  1078 			
  2240             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1079 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2241             {
  1080 			{
  2242         
  1081 		
  2243                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1082 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2244                 s4o.print("(");
  1083 				s4o.print("(");
  2245                 return_type_symbol->accept(*this);
  1084 				return_type_symbol->accept(*this);
  2246                 s4o.print(")");
  1085 				s4o.print(")");
  2247                 IN_param_value->accept(*this);
  1086 				IN_param_value->accept(*this);
  2248                 return NULL;
  1087 				return NULL;
  2249                 
  1088 				
  2250             }
  1089 			}
  2251             
  1090 			
  2252             ERROR;
  1091 			ERROR;
  2253         }
  1092 		}
  2254         
  1093 		
  2255     }/*function_int_to_lreal*/
  1094 	}/*function_sint_to_udint*/
  2256     break;
  1095 	break;
  2257 
  1096 
  2258 /****
  1097 /****
  2259  *INT_TO_SINT
  1098  *SINT_TO_WORD
  2260  */
  1099  */
  2261     case function_int_to_sint :
  1100 	case function_sint_to_word :
  2262     {
  1101 	{
  2263         symbol_c *last_type_symbol = NULL;
  1102 		symbol_c *last_type_symbol = NULL;
  2264 
  1103 
  2265         {
  1104 		{
  2266             identifier_c param_name("IN");
  1105 			identifier_c param_name("IN");
  2267             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1106 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2268             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1107 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2269             
  1108 			
  2270             /* Get the value from a foo(<param_value>) style call */
  1109 			/* Get the value from a foo(<param_value>) style call */
  2271             if (IN_param_value == NULL)
  1110 			if (IN_param_value == NULL)
  2272               IN_param_value = function_call_param_iterator.next();
  1111 			  IN_param_value = function_call_param_iterator.next();
  2273             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1112 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2274             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1113 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2275             
  1114 			
  2276             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1115 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2277             {
  1116 			{
  2278         
  1117 		
  2279                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1118 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2280                 s4o.print("(");
  1119 				s4o.print("(");
  2281                 return_type_symbol->accept(*this);
  1120 				return_type_symbol->accept(*this);
  2282                 s4o.print(")");
  1121 				s4o.print(")");
  2283                 IN_param_value->accept(*this);
  1122 				IN_param_value->accept(*this);
  2284                 return NULL;
  1123 				return NULL;
  2285                 
  1124 				
  2286             }
  1125 			}
  2287             
  1126 			
  2288             ERROR;
  1127 			ERROR;
  2289         }
  1128 		}
  2290         
  1129 		
  2291     }/*function_int_to_sint*/
  1130 	}/*function_sint_to_word*/
  2292     break;
  1131 	break;
  2293 
  1132 
  2294 /****
  1133 /****
  2295  *INT_TO_DINT
  1134  *SINT_TO_WSTRING
  2296  */
  1135  */
  2297     case function_int_to_dint :
  1136 	case function_sint_to_wstring :
  2298     {
  1137 	{
  2299         symbol_c *last_type_symbol = NULL;
  1138 		symbol_c *last_type_symbol = NULL;
  2300 
  1139 
  2301         {
  1140 		{
  2302             identifier_c param_name("IN");
  1141 			identifier_c param_name("IN");
  2303             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1142 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2304             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1143 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2305             
  1144 			
  2306             /* Get the value from a foo(<param_value>) style call */
  1145 			/* Get the value from a foo(<param_value>) style call */
  2307             if (IN_param_value == NULL)
  1146 			if (IN_param_value == NULL)
  2308               IN_param_value = function_call_param_iterator.next();
  1147 			  IN_param_value = function_call_param_iterator.next();
  2309             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1148 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2310             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1149 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2311             
  1150 			
  2312             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1151 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2313             {
  1152 			{
  2314         
  1153 		
  2315                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1154 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  2316                 s4o.print("(");
  1155 				s4o.print("(");
  2317                 return_type_symbol->accept(*this);
  1156 				return_type_symbol->accept(*this);
  2318                 s4o.print(")");
  1157 				s4o.print(")string_to_int(");
  2319                 IN_param_value->accept(*this);
  1158 				IN_param_value->accept(*this);
  2320                 return NULL;
  1159 				s4o.print(", 10)");
  2321                 
  1160 				return NULL;
  2322             }
  1161 				
  2323             
  1162 			}
  2324             ERROR;
  1163 			
  2325         }
  1164 			ERROR;
  2326         
  1165 		}
  2327     }/*function_int_to_dint*/
  1166 		
  2328     break;
  1167 	}/*function_sint_to_wstring*/
  2329 
  1168 	break;
  2330 /****
  1169 
  2331  *INT_TO_LINT
  1170 /****
  2332  */
  1171  *SINT_TO_STRING
  2333     case function_int_to_lint :
  1172  */
  2334     {
  1173 	case function_sint_to_string :
  2335         symbol_c *last_type_symbol = NULL;
  1174 	{
  2336 
  1175 		symbol_c *last_type_symbol = NULL;
  2337         {
  1176 
  2338             identifier_c param_name("IN");
  1177 		{
  2339             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1178 			identifier_c param_name("IN");
  2340             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1179 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2341             
  1180 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2342             /* Get the value from a foo(<param_value>) style call */
  1181 			
  2343             if (IN_param_value == NULL)
  1182 			/* Get the value from a foo(<param_value>) style call */
  2344               IN_param_value = function_call_param_iterator.next();
  1183 			if (IN_param_value == NULL)
  2345             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1184 			  IN_param_value = function_call_param_iterator.next();
  2346             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1185 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2347             
  1186 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2348             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1187 			
  2349             {
  1188 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2350         
  1189 			{
  2351                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1190 		
  2352                 s4o.print("(");
  1191 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2353                 return_type_symbol->accept(*this);
  1192 				s4o.print("(");
  2354                 s4o.print(")");
  1193 				return_type_symbol->accept(*this);
  2355                 IN_param_value->accept(*this);
  1194 				s4o.print(")string_to_int(");
  2356                 return NULL;
  1195 				IN_param_value->accept(*this);
  2357                 
  1196 				s4o.print(", 10)");
  2358             }
  1197 				return NULL;
  2359             
  1198 				
  2360             ERROR;
  1199 			}
  2361         }
  1200 			
  2362         
  1201 			ERROR;
  2363     }/*function_int_to_lint*/
  1202 		}
  2364     break;
  1203 		
  2365 
  1204 	}/*function_sint_to_string*/
  2366 /****
  1205 	break;
  2367  *INT_TO_USINT
  1206 
  2368  */
  1207 /****
  2369     case function_int_to_usint :
  1208  *SINT_TO_LWORD
  2370     {
  1209  */
  2371         symbol_c *last_type_symbol = NULL;
  1210 	case function_sint_to_lword :
  2372 
  1211 	{
  2373         {
  1212 		symbol_c *last_type_symbol = NULL;
  2374             identifier_c param_name("IN");
  1213 
  2375             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1214 		{
  2376             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1215 			identifier_c param_name("IN");
  2377             
  1216 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2378             /* Get the value from a foo(<param_value>) style call */
  1217 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2379             if (IN_param_value == NULL)
  1218 			
  2380               IN_param_value = function_call_param_iterator.next();
  1219 			/* Get the value from a foo(<param_value>) style call */
  2381             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1220 			if (IN_param_value == NULL)
  2382             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1221 			  IN_param_value = function_call_param_iterator.next();
  2383             
  1222 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2384             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1223 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2385             {
  1224 			
  2386         
  1225 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2387                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1226 			{
  2388                 s4o.print("(");
  1227 		
  2389                 return_type_symbol->accept(*this);
  1228 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2390                 s4o.print(")");
  1229 				s4o.print("(");
  2391                 IN_param_value->accept(*this);
  1230 				return_type_symbol->accept(*this);
  2392                 return NULL;
  1231 				s4o.print(")");
  2393                 
  1232 				IN_param_value->accept(*this);
  2394             }
  1233 				return NULL;
  2395             
  1234 				
  2396             ERROR;
  1235 			}
  2397         }
  1236 			
  2398         
  1237 			ERROR;
  2399     }/*function_int_to_usint*/
  1238 		}
  2400     break;
  1239 		
  2401 
  1240 	}/*function_sint_to_lword*/
  2402 /****
  1241 	break;
  2403  *INT_TO_UINT
  1242 
  2404  */
  1243 /****
  2405     case function_int_to_uint :
  1244  *SINT_TO_UINT
  2406     {
  1245  */
  2407         symbol_c *last_type_symbol = NULL;
  1246 	case function_sint_to_uint :
  2408 
  1247 	{
  2409         {
  1248 		symbol_c *last_type_symbol = NULL;
  2410             identifier_c param_name("IN");
  1249 
  2411             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1250 		{
  2412             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1251 			identifier_c param_name("IN");
  2413             
  1252 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2414             /* Get the value from a foo(<param_value>) style call */
  1253 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2415             if (IN_param_value == NULL)
  1254 			
  2416               IN_param_value = function_call_param_iterator.next();
  1255 			/* Get the value from a foo(<param_value>) style call */
  2417             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1256 			if (IN_param_value == NULL)
  2418             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1257 			  IN_param_value = function_call_param_iterator.next();
  2419             
  1258 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2420             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1259 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2421             {
  1260 			
  2422         
  1261 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2423                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1262 			{
  2424                 s4o.print("(");
  1263 		
  2425                 return_type_symbol->accept(*this);
  1264 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2426                 s4o.print(")");
  1265 				s4o.print("(");
  2427                 IN_param_value->accept(*this);
  1266 				return_type_symbol->accept(*this);
  2428                 return NULL;
  1267 				s4o.print(")");
  2429                 
  1268 				IN_param_value->accept(*this);
  2430             }
  1269 				return NULL;
  2431             
  1270 				
  2432             ERROR;
  1271 			}
  2433         }
  1272 			
  2434         
  1273 			ERROR;
  2435     }/*function_int_to_uint*/
  1274 		}
  2436     break;
  1275 		
  2437 
  1276 	}/*function_sint_to_uint*/
  2438 /****
  1277 	break;
  2439  *INT_TO_UDINT
  1278 
  2440  */
  1279 /****
  2441     case function_int_to_udint :
  1280  *SINT_TO_LREAL
  2442     {
  1281  */
  2443         symbol_c *last_type_symbol = NULL;
  1282 	case function_sint_to_lreal :
  2444 
  1283 	{
  2445         {
  1284 		symbol_c *last_type_symbol = NULL;
  2446             identifier_c param_name("IN");
  1285 
  2447             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1286 		{
  2448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1287 			identifier_c param_name("IN");
  2449             
  1288 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2450             /* Get the value from a foo(<param_value>) style call */
  1289 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2451             if (IN_param_value == NULL)
  1290 			
  2452               IN_param_value = function_call_param_iterator.next();
  1291 			/* Get the value from a foo(<param_value>) style call */
  2453             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1292 			if (IN_param_value == NULL)
  2454             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1293 			  IN_param_value = function_call_param_iterator.next();
  2455             
  1294 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2456             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1295 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2457             {
  1296 			
  2458         
  1297 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2459                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1298 			{
  2460                 s4o.print("(");
  1299 		
  2461                 return_type_symbol->accept(*this);
  1300 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2462                 s4o.print(")");
  1301 				s4o.print("(");
  2463                 IN_param_value->accept(*this);
  1302 				return_type_symbol->accept(*this);
  2464                 return NULL;
  1303 				s4o.print(")");
  2465                 
  1304 				IN_param_value->accept(*this);
  2466             }
  1305 				return NULL;
  2467             
  1306 				
  2468             ERROR;
  1307 			}
  2469         }
  1308 			
  2470         
  1309 			ERROR;
  2471     }/*function_int_to_udint*/
  1310 		}
  2472     break;
  1311 		
  2473 
  1312 	}/*function_sint_to_lreal*/
  2474 /****
  1313 	break;
  2475  *INT_TO_ULINT
  1314 
  2476  */
  1315 /****
  2477     case function_int_to_ulint :
  1316  *SINT_TO_BYTE
  2478     {
  1317  */
  2479         symbol_c *last_type_symbol = NULL;
  1318 	case function_sint_to_byte :
  2480 
  1319 	{
  2481         {
  1320 		symbol_c *last_type_symbol = NULL;
  2482             identifier_c param_name("IN");
  1321 
  2483             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1322 		{
  2484             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1323 			identifier_c param_name("IN");
  2485             
  1324 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2486             /* Get the value from a foo(<param_value>) style call */
  1325 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2487             if (IN_param_value == NULL)
  1326 			
  2488               IN_param_value = function_call_param_iterator.next();
  1327 			/* Get the value from a foo(<param_value>) style call */
  2489             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1328 			if (IN_param_value == NULL)
  2490             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1329 			  IN_param_value = function_call_param_iterator.next();
  2491             
  1330 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2492             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1331 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2493             {
  1332 			
  2494         
  1333 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2495                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1334 			{
  2496                 s4o.print("(");
  1335 		
  2497                 return_type_symbol->accept(*this);
  1336 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2498                 s4o.print(")");
  1337 				s4o.print("(");
  2499                 IN_param_value->accept(*this);
  1338 				return_type_symbol->accept(*this);
  2500                 return NULL;
  1339 				s4o.print(")");
  2501                 
  1340 				IN_param_value->accept(*this);
  2502             }
  1341 				return NULL;
  2503             
  1342 				
  2504             ERROR;
  1343 			}
  2505         }
  1344 			
  2506         
  1345 			ERROR;
  2507     }/*function_int_to_ulint*/
  1346 		}
  2508     break;
  1347 		
  2509 
  1348 	}/*function_sint_to_byte*/
  2510 /****
  1349 	break;
  2511  *INT_TO_TIME
  1350 
  2512  */
  1351 /****
  2513     case function_int_to_time :
  1352  *SINT_TO_USINT
  2514     {
  1353  */
  2515         symbol_c *last_type_symbol = NULL;
  1354 	case function_sint_to_usint :
  2516 
  1355 	{
  2517         {
  1356 		symbol_c *last_type_symbol = NULL;
  2518             identifier_c param_name("IN");
  1357 
  2519             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1358 		{
  2520             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1359 			identifier_c param_name("IN");
  2521             
  1360 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2522             /* Get the value from a foo(<param_value>) style call */
  1361 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2523             if (IN_param_value == NULL)
  1362 			
  2524               IN_param_value = function_call_param_iterator.next();
  1363 			/* Get the value from a foo(<param_value>) style call */
  2525             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1364 			if (IN_param_value == NULL)
  2526             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1365 			  IN_param_value = function_call_param_iterator.next();
  2527             
  1366 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2528             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1367 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2529             {
  1368 			
  2530         
  1369 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2531                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1370 			{
  2532                 s4o.print("(");
  1371 		
  2533                 return_type_symbol->accept(*this);
  1372 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2534                 s4o.print(")real_to_time(");
  1373 				s4o.print("(");
  2535                 IN_param_value->accept(*this);
  1374 				return_type_symbol->accept(*this);
  2536                 s4o.print(")");
  1375 				s4o.print(")");
  2537                 return NULL;
  1376 				IN_param_value->accept(*this);
  2538                 
  1377 				return NULL;
  2539             }
  1378 				
  2540             
  1379 			}
  2541             ERROR;
  1380 			
  2542         }
  1381 			ERROR;
  2543         
  1382 		}
  2544     }/*function_int_to_time*/
  1383 		
  2545     break;
  1384 	}/*function_sint_to_usint*/
  2546 
  1385 	break;
  2547 /****
  1386 
  2548  *INT_TO_BOOL
  1387 /****
  2549  */
  1388  *SINT_TO_ULINT
  2550     case function_int_to_bool :
  1389  */
  2551     {
  1390 	case function_sint_to_ulint :
  2552         symbol_c *last_type_symbol = NULL;
  1391 	{
  2553 
  1392 		symbol_c *last_type_symbol = NULL;
  2554         {
  1393 
  2555             identifier_c param_name("IN");
  1394 		{
  2556             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1395 			identifier_c param_name("IN");
  2557             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1396 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2558             
  1397 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2559             /* Get the value from a foo(<param_value>) style call */
  1398 			
  2560             if (IN_param_value == NULL)
  1399 			/* Get the value from a foo(<param_value>) style call */
  2561               IN_param_value = function_call_param_iterator.next();
  1400 			if (IN_param_value == NULL)
  2562             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1401 			  IN_param_value = function_call_param_iterator.next();
  2563             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1402 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2564             
  1403 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2565             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1404 			
  2566             {
  1405 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2567         
  1406 			{
  2568                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1407 		
  2569                 s4o.print("(");
  1408 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2570                 return_type_symbol->accept(*this);
  1409 				s4o.print("(");
  2571                 s4o.print(")");
  1410 				return_type_symbol->accept(*this);
  2572                 IN_param_value->accept(*this);
  1411 				s4o.print(")");
  2573                 return NULL;
  1412 				IN_param_value->accept(*this);
  2574                 
  1413 				return NULL;
  2575             }
  1414 				
  2576             
  1415 			}
  2577             ERROR;
  1416 			
  2578         }
  1417 			ERROR;
  2579         
  1418 		}
  2580     }/*function_int_to_bool*/
  1419 		
  2581     break;
  1420 	}/*function_sint_to_ulint*/
  2582 
  1421 	break;
  2583 /****
  1422 
  2584  *INT_TO_BYTE
  1423 /****
  2585  */
  1424  *SINT_TO_BOOL
  2586     case function_int_to_byte :
  1425  */
  2587     {
  1426 	case function_sint_to_bool :
  2588         symbol_c *last_type_symbol = NULL;
  1427 	{
  2589 
  1428 		symbol_c *last_type_symbol = NULL;
  2590         {
  1429 
  2591             identifier_c param_name("IN");
  1430 		{
  2592             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1431 			identifier_c param_name("IN");
  2593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1432 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2594             
  1433 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2595             /* Get the value from a foo(<param_value>) style call */
  1434 			
  2596             if (IN_param_value == NULL)
  1435 			/* Get the value from a foo(<param_value>) style call */
  2597               IN_param_value = function_call_param_iterator.next();
  1436 			if (IN_param_value == NULL)
  2598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1437 			  IN_param_value = function_call_param_iterator.next();
  2599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1438 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2600             
  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 ;
  2601             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1440 			
  2602             {
  1441 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2603         
  1442 			{
  2604                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1443 		
  2605                 s4o.print("(");
  1444 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2606                 return_type_symbol->accept(*this);
  1445 				s4o.print("(");
  2607                 s4o.print(")");
  1446 				return_type_symbol->accept(*this);
  2608                 IN_param_value->accept(*this);
  1447 				s4o.print(")");
  2609                 return NULL;
  1448 				IN_param_value->accept(*this);
  2610                 
  1449 				return NULL;
  2611             }
  1450 				
  2612             
  1451 			}
  2613             ERROR;
  1452 			
  2614         }
  1453 			ERROR;
  2615         
  1454 		}
  2616     }/*function_int_to_byte*/
  1455 		
  2617     break;
  1456 	}/*function_sint_to_bool*/
  2618 
  1457 	break;
  2619 /****
  1458 
  2620  *INT_TO_WORD
  1459 /****
  2621  */
  1460  *SINT_TO_TIME
  2622     case function_int_to_word :
  1461  */
  2623     {
  1462 	case function_sint_to_time :
  2624         symbol_c *last_type_symbol = NULL;
  1463 	{
  2625 
  1464 		symbol_c *last_type_symbol = NULL;
  2626         {
  1465 
  2627             identifier_c param_name("IN");
  1466 		{
  2628             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1467 			identifier_c param_name("IN");
  2629             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1468 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2630             
  1469 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2631             /* Get the value from a foo(<param_value>) style call */
  1470 			
  2632             if (IN_param_value == NULL)
  1471 			/* Get the value from a foo(<param_value>) style call */
  2633               IN_param_value = function_call_param_iterator.next();
  1472 			if (IN_param_value == NULL)
  2634             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1473 			  IN_param_value = function_call_param_iterator.next();
  2635             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1474 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2636             
  1475 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2637             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1476 			
  2638             {
  1477 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2639         
  1478 			{
  2640                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1479 		
  2641                 s4o.print("(");
  1480 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2642                 return_type_symbol->accept(*this);
  1481 				s4o.print("(");
  2643                 s4o.print(")");
  1482 				return_type_symbol->accept(*this);
  2644                 IN_param_value->accept(*this);
  1483 				s4o.print(")time_to_real(");
  2645                 return NULL;
  1484 				IN_param_value->accept(*this);
  2646                 
  1485 				s4o.print(")");
  2647             }
  1486 				return NULL;
  2648             
  1487 				
  2649             ERROR;
  1488 			}
  2650         }
  1489 			
  2651         
  1490 			ERROR;
  2652     }/*function_int_to_word*/
  1491 		}
  2653     break;
  1492 		
  2654 
  1493 	}/*function_sint_to_time*/
  2655 /****
  1494 	break;
  2656  *INT_TO_DWORD
  1495 
  2657  */
  1496 /****
  2658     case function_int_to_dword :
  1497  *SINT_TO_INT
  2659     {
  1498  */
  2660         symbol_c *last_type_symbol = NULL;
  1499 	case function_sint_to_int :
  2661 
  1500 	{
  2662         {
  1501 		symbol_c *last_type_symbol = NULL;
  2663             identifier_c param_name("IN");
  1502 
  2664             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1503 		{
  2665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1504 			identifier_c param_name("IN");
  2666             
  1505 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  2667             /* Get the value from a foo(<param_value>) style call */
  1506 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2668             if (IN_param_value == NULL)
  1507 			
  2669               IN_param_value = function_call_param_iterator.next();
  1508 			/* Get the value from a foo(<param_value>) style call */
  2670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1509 			if (IN_param_value == NULL)
  2671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1510 			  IN_param_value = function_call_param_iterator.next();
  2672             
  1511 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2673             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1512 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2674             {
  1513 			
  2675         
  1514 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  2676                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1515 			{
  2677                 s4o.print("(");
  1516 		
  2678                 return_type_symbol->accept(*this);
  1517 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2679                 s4o.print(")");
  1518 				s4o.print("(");
  2680                 IN_param_value->accept(*this);
  1519 				return_type_symbol->accept(*this);
  2681                 return NULL;
  1520 				s4o.print(")");
  2682                 
  1521 				IN_param_value->accept(*this);
  2683             }
  1522 				return NULL;
  2684             
  1523 				
  2685             ERROR;
  1524 			}
  2686         }
  1525 			
  2687         
  1526 			ERROR;
  2688     }/*function_int_to_dword*/
  1527 		}
  2689     break;
  1528 		
  2690 
  1529 	}/*function_sint_to_int*/
  2691 /****
  1530 	break;
  2692  *INT_TO_LWORD
       
  2693  */
       
  2694     case function_int_to_lword :
       
  2695     {
       
  2696         symbol_c *last_type_symbol = NULL;
       
  2697 
       
  2698         {
       
  2699             identifier_c param_name("IN");
       
  2700             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2701             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2702             
       
  2703             /* Get the value from a foo(<param_value>) style call */
       
  2704             if (IN_param_value == NULL)
       
  2705               IN_param_value = function_call_param_iterator.next();
       
  2706             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2707             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2708             
       
  2709             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2710             {
       
  2711         
       
  2712                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2713                 s4o.print("(");
       
  2714                 return_type_symbol->accept(*this);
       
  2715                 s4o.print(")");
       
  2716                 IN_param_value->accept(*this);
       
  2717                 return NULL;
       
  2718                 
       
  2719             }
       
  2720             
       
  2721             ERROR;
       
  2722         }
       
  2723         
       
  2724     }/*function_int_to_lword*/
       
  2725     break;
       
  2726 
       
  2727 /****
       
  2728  *INT_TO_STRING
       
  2729  */
       
  2730     case function_int_to_string :
       
  2731     {
       
  2732         symbol_c *last_type_symbol = NULL;
       
  2733 
       
  2734         {
       
  2735             identifier_c param_name("IN");
       
  2736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2738             
       
  2739             /* Get the value from a foo(<param_value>) style call */
       
  2740             if (IN_param_value == NULL)
       
  2741               IN_param_value = function_call_param_iterator.next();
       
  2742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2744             
       
  2745             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2746             {
       
  2747         
       
  2748                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2749                 s4o.print("(");
       
  2750                 return_type_symbol->accept(*this);
       
  2751                 s4o.print(")int_to_string(");
       
  2752                 IN_param_value->accept(*this);
       
  2753                 s4o.print(", 10)");
       
  2754                 return NULL;
       
  2755                 
       
  2756             }
       
  2757             
       
  2758             ERROR;
       
  2759         }
       
  2760         
       
  2761     }/*function_int_to_string*/
       
  2762     break;
       
  2763 
       
  2764 /****
       
  2765  *INT_TO_WSTRING
       
  2766  */
       
  2767     case function_int_to_wstring :
       
  2768     {
       
  2769         symbol_c *last_type_symbol = NULL;
       
  2770 
       
  2771         {
       
  2772             identifier_c param_name("IN");
       
  2773             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2774             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2775             
       
  2776             /* Get the value from a foo(<param_value>) style call */
       
  2777             if (IN_param_value == NULL)
       
  2778               IN_param_value = function_call_param_iterator.next();
       
  2779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2781             
       
  2782             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2783             {
       
  2784         
       
  2785                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  2786                 s4o.print("(");
       
  2787                 return_type_symbol->accept(*this);
       
  2788                 s4o.print(")int_to_string(");
       
  2789                 IN_param_value->accept(*this);
       
  2790                 s4o.print(", 10)");
       
  2791                 return NULL;
       
  2792                 
       
  2793             }
       
  2794             
       
  2795             ERROR;
       
  2796         }
       
  2797         
       
  2798     }/*function_int_to_wstring*/
       
  2799     break;
       
  2800 
       
  2801 /****
       
  2802  *INT_TO_DATE
       
  2803  */
       
  2804     case function_int_to_date :
       
  2805     {
       
  2806         symbol_c *last_type_symbol = NULL;
       
  2807 
       
  2808         {
       
  2809             identifier_c param_name("IN");
       
  2810             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2811             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2812             
       
  2813             /* Get the value from a foo(<param_value>) style call */
       
  2814             if (IN_param_value == NULL)
       
  2815               IN_param_value = function_call_param_iterator.next();
       
  2816             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2817             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2818             
       
  2819             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2820             {
       
  2821         
       
  2822                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2823                 s4o.print("(");
       
  2824                 return_type_symbol->accept(*this);
       
  2825                 s4o.print(")real_to_time(");
       
  2826                 IN_param_value->accept(*this);
       
  2827                 s4o.print(")");
       
  2828                 return NULL;
       
  2829                 
       
  2830             }
       
  2831             
       
  2832             ERROR;
       
  2833         }
       
  2834         
       
  2835     }/*function_int_to_date*/
       
  2836     break;
       
  2837 
       
  2838 /****
       
  2839  *INT_TO_TOD
       
  2840  */
       
  2841     case function_int_to_tod :
       
  2842     {
       
  2843         symbol_c *last_type_symbol = NULL;
       
  2844 
       
  2845         {
       
  2846             identifier_c param_name("IN");
       
  2847             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2848             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2849             
       
  2850             /* Get the value from a foo(<param_value>) style call */
       
  2851             if (IN_param_value == NULL)
       
  2852               IN_param_value = function_call_param_iterator.next();
       
  2853             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2854             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2855             
       
  2856             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2857             {
       
  2858         
       
  2859                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2860                 s4o.print("(");
       
  2861                 return_type_symbol->accept(*this);
       
  2862                 s4o.print(")real_to_time(");
       
  2863                 IN_param_value->accept(*this);
       
  2864                 s4o.print(")");
       
  2865                 return NULL;
       
  2866                 
       
  2867             }
       
  2868             
       
  2869             ERROR;
       
  2870         }
       
  2871         
       
  2872     }/*function_int_to_tod*/
       
  2873     break;
       
  2874 
       
  2875 /****
       
  2876  *INT_TO_DT
       
  2877  */
       
  2878     case function_int_to_dt :
       
  2879     {
       
  2880         symbol_c *last_type_symbol = NULL;
       
  2881 
       
  2882         {
       
  2883             identifier_c param_name("IN");
       
  2884             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2885             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2886             
       
  2887             /* Get the value from a foo(<param_value>) style call */
       
  2888             if (IN_param_value == NULL)
       
  2889               IN_param_value = function_call_param_iterator.next();
       
  2890             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2891             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2892             
       
  2893             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2894             {
       
  2895         
       
  2896                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2897                 s4o.print("(");
       
  2898                 return_type_symbol->accept(*this);
       
  2899                 s4o.print(")real_to_time(");
       
  2900                 IN_param_value->accept(*this);
       
  2901                 s4o.print(")");
       
  2902                 return NULL;
       
  2903                 
       
  2904             }
       
  2905             
       
  2906             ERROR;
       
  2907         }
       
  2908         
       
  2909     }/*function_int_to_dt*/
       
  2910     break;
       
  2911 
       
  2912 /****
       
  2913  *DINT_TO_REAL
       
  2914  */
       
  2915     case function_dint_to_real :
       
  2916     {
       
  2917         symbol_c *last_type_symbol = NULL;
       
  2918 
       
  2919         {
       
  2920             identifier_c param_name("IN");
       
  2921             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2922             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2923             
       
  2924             /* Get the value from a foo(<param_value>) style call */
       
  2925             if (IN_param_value == NULL)
       
  2926               IN_param_value = function_call_param_iterator.next();
       
  2927             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2928             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2929             
       
  2930             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2931             {
       
  2932         
       
  2933                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2934                 s4o.print("(");
       
  2935                 return_type_symbol->accept(*this);
       
  2936                 s4o.print(")");
       
  2937                 IN_param_value->accept(*this);
       
  2938                 return NULL;
       
  2939                 
       
  2940             }
       
  2941             
       
  2942             ERROR;
       
  2943         }
       
  2944         
       
  2945     }/*function_dint_to_real*/
       
  2946     break;
       
  2947 
       
  2948 /****
       
  2949  *DINT_TO_LREAL
       
  2950  */
       
  2951     case function_dint_to_lreal :
       
  2952     {
       
  2953         symbol_c *last_type_symbol = NULL;
       
  2954 
       
  2955         {
       
  2956             identifier_c param_name("IN");
       
  2957             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2958             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2959             
       
  2960             /* Get the value from a foo(<param_value>) style call */
       
  2961             if (IN_param_value == NULL)
       
  2962               IN_param_value = function_call_param_iterator.next();
       
  2963             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2964             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2965             
       
  2966             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2967             {
       
  2968         
       
  2969                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2970                 s4o.print("(");
       
  2971                 return_type_symbol->accept(*this);
       
  2972                 s4o.print(")");
       
  2973                 IN_param_value->accept(*this);
       
  2974                 return NULL;
       
  2975                 
       
  2976             }
       
  2977             
       
  2978             ERROR;
       
  2979         }
       
  2980         
       
  2981     }/*function_dint_to_lreal*/
       
  2982     break;
       
  2983 
       
  2984 /****
       
  2985  *DINT_TO_SINT
       
  2986  */
       
  2987     case function_dint_to_sint :
       
  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(dint_type_name_c))
       
  3003             {
       
  3004         
       
  3005                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3006                 s4o.print("(");
       
  3007                 return_type_symbol->accept(*this);
       
  3008                 s4o.print(")");
       
  3009                 IN_param_value->accept(*this);
       
  3010                 return NULL;
       
  3011                 
       
  3012             }
       
  3013             
       
  3014             ERROR;
       
  3015         }
       
  3016         
       
  3017     }/*function_dint_to_sint*/
       
  3018     break;
       
  3019 
       
  3020 /****
       
  3021  *DINT_TO_INT
       
  3022  */
       
  3023     case function_dint_to_int :
       
  3024     {
       
  3025         symbol_c *last_type_symbol = NULL;
       
  3026 
       
  3027         {
       
  3028             identifier_c param_name("IN");
       
  3029             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3030             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3031             
       
  3032             /* Get the value from a foo(<param_value>) style call */
       
  3033             if (IN_param_value == NULL)
       
  3034               IN_param_value = function_call_param_iterator.next();
       
  3035             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3036             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3037             
       
  3038             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3039             {
       
  3040         
       
  3041                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3042                 s4o.print("(");
       
  3043                 return_type_symbol->accept(*this);
       
  3044                 s4o.print(")");
       
  3045                 IN_param_value->accept(*this);
       
  3046                 return NULL;
       
  3047                 
       
  3048             }
       
  3049             
       
  3050             ERROR;
       
  3051         }
       
  3052         
       
  3053     }/*function_dint_to_int*/
       
  3054     break;
       
  3055 
       
  3056 /****
       
  3057  *DINT_TO_LINT
       
  3058  */
       
  3059     case function_dint_to_lint :
       
  3060     {
       
  3061         symbol_c *last_type_symbol = NULL;
       
  3062 
       
  3063         {
       
  3064             identifier_c param_name("IN");
       
  3065             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3066             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3067             
       
  3068             /* Get the value from a foo(<param_value>) style call */
       
  3069             if (IN_param_value == NULL)
       
  3070               IN_param_value = function_call_param_iterator.next();
       
  3071             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3072             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3073             
       
  3074             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3075             {
       
  3076         
       
  3077                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3078                 s4o.print("(");
       
  3079                 return_type_symbol->accept(*this);
       
  3080                 s4o.print(")");
       
  3081                 IN_param_value->accept(*this);
       
  3082                 return NULL;
       
  3083                 
       
  3084             }
       
  3085             
       
  3086             ERROR;
       
  3087         }
       
  3088         
       
  3089     }/*function_dint_to_lint*/
       
  3090     break;
       
  3091 
       
  3092 /****
       
  3093  *DINT_TO_USINT
       
  3094  */
       
  3095     case function_dint_to_usint :
       
  3096     {
       
  3097         symbol_c *last_type_symbol = NULL;
       
  3098 
       
  3099         {
       
  3100             identifier_c param_name("IN");
       
  3101             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3102             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3103             
       
  3104             /* Get the value from a foo(<param_value>) style call */
       
  3105             if (IN_param_value == NULL)
       
  3106               IN_param_value = function_call_param_iterator.next();
       
  3107             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3108             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3109             
       
  3110             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3111             {
       
  3112         
       
  3113                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3114                 s4o.print("(");
       
  3115                 return_type_symbol->accept(*this);
       
  3116                 s4o.print(")");
       
  3117                 IN_param_value->accept(*this);
       
  3118                 return NULL;
       
  3119                 
       
  3120             }
       
  3121             
       
  3122             ERROR;
       
  3123         }
       
  3124         
       
  3125     }/*function_dint_to_usint*/
       
  3126     break;
       
  3127 
       
  3128 /****
       
  3129  *DINT_TO_UINT
       
  3130  */
       
  3131     case function_dint_to_uint :
       
  3132     {
       
  3133         symbol_c *last_type_symbol = NULL;
       
  3134 
       
  3135         {
       
  3136             identifier_c param_name("IN");
       
  3137             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3138             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3139             
       
  3140             /* Get the value from a foo(<param_value>) style call */
       
  3141             if (IN_param_value == NULL)
       
  3142               IN_param_value = function_call_param_iterator.next();
       
  3143             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3144             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3145             
       
  3146             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3147             {
       
  3148         
       
  3149                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3150                 s4o.print("(");
       
  3151                 return_type_symbol->accept(*this);
       
  3152                 s4o.print(")");
       
  3153                 IN_param_value->accept(*this);
       
  3154                 return NULL;
       
  3155                 
       
  3156             }
       
  3157             
       
  3158             ERROR;
       
  3159         }
       
  3160         
       
  3161     }/*function_dint_to_uint*/
       
  3162     break;
       
  3163 
       
  3164 /****
       
  3165  *DINT_TO_UDINT
       
  3166  */
       
  3167     case function_dint_to_udint :
       
  3168     {
       
  3169         symbol_c *last_type_symbol = NULL;
       
  3170 
       
  3171         {
       
  3172             identifier_c param_name("IN");
       
  3173             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3174             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3175             
       
  3176             /* Get the value from a foo(<param_value>) style call */
       
  3177             if (IN_param_value == NULL)
       
  3178               IN_param_value = function_call_param_iterator.next();
       
  3179             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3180             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3181             
       
  3182             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3183             {
       
  3184         
       
  3185                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3186                 s4o.print("(");
       
  3187                 return_type_symbol->accept(*this);
       
  3188                 s4o.print(")");
       
  3189                 IN_param_value->accept(*this);
       
  3190                 return NULL;
       
  3191                 
       
  3192             }
       
  3193             
       
  3194             ERROR;
       
  3195         }
       
  3196         
       
  3197     }/*function_dint_to_udint*/
       
  3198     break;
       
  3199 
       
  3200 /****
       
  3201  *DINT_TO_ULINT
       
  3202  */
       
  3203     case function_dint_to_ulint :
       
  3204     {
       
  3205         symbol_c *last_type_symbol = NULL;
       
  3206 
       
  3207         {
       
  3208             identifier_c param_name("IN");
       
  3209             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3210             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3211             
       
  3212             /* Get the value from a foo(<param_value>) style call */
       
  3213             if (IN_param_value == NULL)
       
  3214               IN_param_value = function_call_param_iterator.next();
       
  3215             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3216             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3217             
       
  3218             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3219             {
       
  3220         
       
  3221                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3222                 s4o.print("(");
       
  3223                 return_type_symbol->accept(*this);
       
  3224                 s4o.print(")");
       
  3225                 IN_param_value->accept(*this);
       
  3226                 return NULL;
       
  3227                 
       
  3228             }
       
  3229             
       
  3230             ERROR;
       
  3231         }
       
  3232         
       
  3233     }/*function_dint_to_ulint*/
       
  3234     break;
       
  3235 
       
  3236 /****
       
  3237  *DINT_TO_TIME
       
  3238  */
       
  3239     case function_dint_to_time :
       
  3240     {
       
  3241         symbol_c *last_type_symbol = NULL;
       
  3242 
       
  3243         {
       
  3244             identifier_c param_name("IN");
       
  3245             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3246             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3247             
       
  3248             /* Get the value from a foo(<param_value>) style call */
       
  3249             if (IN_param_value == NULL)
       
  3250               IN_param_value = function_call_param_iterator.next();
       
  3251             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3252             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3253             
       
  3254             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3255             {
       
  3256         
       
  3257                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3258                 s4o.print("(");
       
  3259                 return_type_symbol->accept(*this);
       
  3260                 s4o.print(")real_to_time(");
       
  3261                 IN_param_value->accept(*this);
       
  3262                 s4o.print(")");
       
  3263                 return NULL;
       
  3264                 
       
  3265             }
       
  3266             
       
  3267             ERROR;
       
  3268         }
       
  3269         
       
  3270     }/*function_dint_to_time*/
       
  3271     break;
       
  3272 
       
  3273 /****
       
  3274  *DINT_TO_BOOL
       
  3275  */
       
  3276     case function_dint_to_bool :
       
  3277     {
       
  3278         symbol_c *last_type_symbol = NULL;
       
  3279 
       
  3280         {
       
  3281             identifier_c param_name("IN");
       
  3282             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3283             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3284             
       
  3285             /* Get the value from a foo(<param_value>) style call */
       
  3286             if (IN_param_value == NULL)
       
  3287               IN_param_value = function_call_param_iterator.next();
       
  3288             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3289             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3290             
       
  3291             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3292             {
       
  3293         
       
  3294                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3295                 s4o.print("(");
       
  3296                 return_type_symbol->accept(*this);
       
  3297                 s4o.print(")");
       
  3298                 IN_param_value->accept(*this);
       
  3299                 return NULL;
       
  3300                 
       
  3301             }
       
  3302             
       
  3303             ERROR;
       
  3304         }
       
  3305         
       
  3306     }/*function_dint_to_bool*/
       
  3307     break;
       
  3308 
       
  3309 /****
       
  3310  *DINT_TO_BYTE
       
  3311  */
       
  3312     case function_dint_to_byte :
       
  3313     {
       
  3314         symbol_c *last_type_symbol = NULL;
       
  3315 
       
  3316         {
       
  3317             identifier_c param_name("IN");
       
  3318             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3319             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3320             
       
  3321             /* Get the value from a foo(<param_value>) style call */
       
  3322             if (IN_param_value == NULL)
       
  3323               IN_param_value = function_call_param_iterator.next();
       
  3324             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3325             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3326             
       
  3327             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3328             {
       
  3329         
       
  3330                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3331                 s4o.print("(");
       
  3332                 return_type_symbol->accept(*this);
       
  3333                 s4o.print(")");
       
  3334                 IN_param_value->accept(*this);
       
  3335                 return NULL;
       
  3336                 
       
  3337             }
       
  3338             
       
  3339             ERROR;
       
  3340         }
       
  3341         
       
  3342     }/*function_dint_to_byte*/
       
  3343     break;
       
  3344 
       
  3345 /****
       
  3346  *DINT_TO_WORD
       
  3347  */
       
  3348     case function_dint_to_word :
       
  3349     {
       
  3350         symbol_c *last_type_symbol = NULL;
       
  3351 
       
  3352         {
       
  3353             identifier_c param_name("IN");
       
  3354             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3355             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3356             
       
  3357             /* Get the value from a foo(<param_value>) style call */
       
  3358             if (IN_param_value == NULL)
       
  3359               IN_param_value = function_call_param_iterator.next();
       
  3360             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3361             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3362             
       
  3363             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3364             {
       
  3365         
       
  3366                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3367                 s4o.print("(");
       
  3368                 return_type_symbol->accept(*this);
       
  3369                 s4o.print(")");
       
  3370                 IN_param_value->accept(*this);
       
  3371                 return NULL;
       
  3372                 
       
  3373             }
       
  3374             
       
  3375             ERROR;
       
  3376         }
       
  3377         
       
  3378     }/*function_dint_to_word*/
       
  3379     break;
       
  3380 
       
  3381 /****
       
  3382  *DINT_TO_DWORD
       
  3383  */
       
  3384     case function_dint_to_dword :
       
  3385     {
       
  3386         symbol_c *last_type_symbol = NULL;
       
  3387 
       
  3388         {
       
  3389             identifier_c param_name("IN");
       
  3390             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3391             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3392             
       
  3393             /* Get the value from a foo(<param_value>) style call */
       
  3394             if (IN_param_value == NULL)
       
  3395               IN_param_value = function_call_param_iterator.next();
       
  3396             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3397             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3398             
       
  3399             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3400             {
       
  3401         
       
  3402                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3403                 s4o.print("(");
       
  3404                 return_type_symbol->accept(*this);
       
  3405                 s4o.print(")");
       
  3406                 IN_param_value->accept(*this);
       
  3407                 return NULL;
       
  3408                 
       
  3409             }
       
  3410             
       
  3411             ERROR;
       
  3412         }
       
  3413         
       
  3414     }/*function_dint_to_dword*/
       
  3415     break;
       
  3416 
       
  3417 /****
       
  3418  *DINT_TO_LWORD
       
  3419  */
       
  3420     case function_dint_to_lword :
       
  3421     {
       
  3422         symbol_c *last_type_symbol = NULL;
       
  3423 
       
  3424         {
       
  3425             identifier_c param_name("IN");
       
  3426             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3427             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3428             
       
  3429             /* Get the value from a foo(<param_value>) style call */
       
  3430             if (IN_param_value == NULL)
       
  3431               IN_param_value = function_call_param_iterator.next();
       
  3432             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3433             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3434             
       
  3435             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3436             {
       
  3437         
       
  3438                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3439                 s4o.print("(");
       
  3440                 return_type_symbol->accept(*this);
       
  3441                 s4o.print(")");
       
  3442                 IN_param_value->accept(*this);
       
  3443                 return NULL;
       
  3444                 
       
  3445             }
       
  3446             
       
  3447             ERROR;
       
  3448         }
       
  3449         
       
  3450     }/*function_dint_to_lword*/
       
  3451     break;
       
  3452 
       
  3453 /****
       
  3454  *DINT_TO_STRING
       
  3455  */
       
  3456     case function_dint_to_string :
       
  3457     {
       
  3458         symbol_c *last_type_symbol = NULL;
       
  3459 
       
  3460         {
       
  3461             identifier_c param_name("IN");
       
  3462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3464             
       
  3465             /* Get the value from a foo(<param_value>) style call */
       
  3466             if (IN_param_value == NULL)
       
  3467               IN_param_value = function_call_param_iterator.next();
       
  3468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3470             
       
  3471             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3472             {
       
  3473         
       
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3475                 s4o.print("(");
       
  3476                 return_type_symbol->accept(*this);
       
  3477                 s4o.print(")int_to_string(");
       
  3478                 IN_param_value->accept(*this);
       
  3479                 s4o.print(", 10)");
       
  3480                 return NULL;
       
  3481                 
       
  3482             }
       
  3483             
       
  3484             ERROR;
       
  3485         }
       
  3486         
       
  3487     }/*function_dint_to_string*/
       
  3488     break;
       
  3489 
       
  3490 /****
       
  3491  *DINT_TO_WSTRING
       
  3492  */
       
  3493     case function_dint_to_wstring :
       
  3494     {
       
  3495         symbol_c *last_type_symbol = NULL;
       
  3496 
       
  3497         {
       
  3498             identifier_c param_name("IN");
       
  3499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3501             
       
  3502             /* Get the value from a foo(<param_value>) style call */
       
  3503             if (IN_param_value == NULL)
       
  3504               IN_param_value = function_call_param_iterator.next();
       
  3505             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3506             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3507             
       
  3508             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3509             {
       
  3510         
       
  3511                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3512                 s4o.print("(");
       
  3513                 return_type_symbol->accept(*this);
       
  3514                 s4o.print(")int_to_string(");
       
  3515                 IN_param_value->accept(*this);
       
  3516                 s4o.print(", 10)");
       
  3517                 return NULL;
       
  3518                 
       
  3519             }
       
  3520             
       
  3521             ERROR;
       
  3522         }
       
  3523         
       
  3524     }/*function_dint_to_wstring*/
       
  3525     break;
       
  3526 
       
  3527 /****
       
  3528  *DINT_TO_DATE
       
  3529  */
       
  3530     case function_dint_to_date :
       
  3531     {
       
  3532         symbol_c *last_type_symbol = NULL;
       
  3533 
       
  3534         {
       
  3535             identifier_c param_name("IN");
       
  3536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3538             
       
  3539             /* Get the value from a foo(<param_value>) style call */
       
  3540             if (IN_param_value == NULL)
       
  3541               IN_param_value = function_call_param_iterator.next();
       
  3542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3544             
       
  3545             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3546             {
       
  3547         
       
  3548                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3549                 s4o.print("(");
       
  3550                 return_type_symbol->accept(*this);
       
  3551                 s4o.print(")real_to_time(");
       
  3552                 IN_param_value->accept(*this);
       
  3553                 s4o.print(")");
       
  3554                 return NULL;
       
  3555                 
       
  3556             }
       
  3557             
       
  3558             ERROR;
       
  3559         }
       
  3560         
       
  3561     }/*function_dint_to_date*/
       
  3562     break;
       
  3563 
       
  3564 /****
       
  3565  *DINT_TO_TOD
       
  3566  */
       
  3567     case function_dint_to_tod :
       
  3568     {
       
  3569         symbol_c *last_type_symbol = NULL;
       
  3570 
       
  3571         {
       
  3572             identifier_c param_name("IN");
       
  3573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3575             
       
  3576             /* Get the value from a foo(<param_value>) style call */
       
  3577             if (IN_param_value == NULL)
       
  3578               IN_param_value = function_call_param_iterator.next();
       
  3579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3581             
       
  3582             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3583             {
       
  3584         
       
  3585                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3586                 s4o.print("(");
       
  3587                 return_type_symbol->accept(*this);
       
  3588                 s4o.print(")real_to_time(");
       
  3589                 IN_param_value->accept(*this);
       
  3590                 s4o.print(")");
       
  3591                 return NULL;
       
  3592                 
       
  3593             }
       
  3594             
       
  3595             ERROR;
       
  3596         }
       
  3597         
       
  3598     }/*function_dint_to_tod*/
       
  3599     break;
       
  3600 
       
  3601 /****
       
  3602  *DINT_TO_DT
       
  3603  */
       
  3604     case function_dint_to_dt :
       
  3605     {
       
  3606         symbol_c *last_type_symbol = NULL;
       
  3607 
       
  3608         {
       
  3609             identifier_c param_name("IN");
       
  3610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3612             
       
  3613             /* Get the value from a foo(<param_value>) style call */
       
  3614             if (IN_param_value == NULL)
       
  3615               IN_param_value = function_call_param_iterator.next();
       
  3616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3618             
       
  3619             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3620             {
       
  3621         
       
  3622                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3623                 s4o.print("(");
       
  3624                 return_type_symbol->accept(*this);
       
  3625                 s4o.print(")real_to_time(");
       
  3626                 IN_param_value->accept(*this);
       
  3627                 s4o.print(")");
       
  3628                 return NULL;
       
  3629                 
       
  3630             }
       
  3631             
       
  3632             ERROR;
       
  3633         }
       
  3634         
       
  3635     }/*function_dint_to_dt*/
       
  3636     break;
  1531 
  3637 
  1532 /****
  3638 /****
  1533  *LINT_TO_REAL
  3639  *LINT_TO_REAL
  1534  */
  3640  */
  1535 	case function_lint_to_real :
  3641     case function_lint_to_real :
  1536 	{
  3642     {
  1537 		symbol_c *last_type_symbol = NULL;
  3643         symbol_c *last_type_symbol = NULL;
  1538 
  3644 
  1539 		{
  3645         {
  1540 			identifier_c param_name("IN");
  3646             identifier_c param_name("IN");
  1541 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  3647             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1542 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1543 			
  3649             
  1544 			/* Get the value from a foo(<param_value>) style call */
  3650             /* Get the value from a foo(<param_value>) style call */
  1545 			if (IN_param_value == NULL)
  3651             if (IN_param_value == NULL)
  1546 			  IN_param_value = function_call_param_iterator.next();
  3652               IN_param_value = function_call_param_iterator.next();
  1547 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1548 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1549 			
  3655             
  1550 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3656             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1551 			{
  3657             {
  1552 		
  3658         
  1553 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3659                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1554 				s4o.print("(");
  3660                 s4o.print("(");
  1555 				return_type_symbol->accept(*this);
  3661                 return_type_symbol->accept(*this);
  1556 				s4o.print(")");
  3662                 s4o.print(")");
  1557 				IN_param_value->accept(*this);
  3663                 IN_param_value->accept(*this);
  1558 				return NULL;
  3664                 return NULL;
  1559 				
  3665                 
  1560 			}
  3666             }
  1561 			
  3667             
  1562 			ERROR;
  3668             ERROR;
  1563 		}
  3669         }
  1564 		
  3670         
  1565 	}/*function_lint_to_real*/
  3671     }/*function_lint_to_real*/
  1566 	break;
  3672     break;
       
  3673 
       
  3674 /****
       
  3675  *LINT_TO_LREAL
       
  3676  */
       
  3677     case function_lint_to_lreal :
       
  3678     {
       
  3679         symbol_c *last_type_symbol = NULL;
       
  3680 
       
  3681         {
       
  3682             identifier_c param_name("IN");
       
  3683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3685             
       
  3686             /* Get the value from a foo(<param_value>) style call */
       
  3687             if (IN_param_value == NULL)
       
  3688               IN_param_value = function_call_param_iterator.next();
       
  3689             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3690             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3691             
       
  3692             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3693             {
       
  3694         
       
  3695                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3696                 s4o.print("(");
       
  3697                 return_type_symbol->accept(*this);
       
  3698                 s4o.print(")");
       
  3699                 IN_param_value->accept(*this);
       
  3700                 return NULL;
       
  3701                 
       
  3702             }
       
  3703             
       
  3704             ERROR;
       
  3705         }
       
  3706         
       
  3707     }/*function_lint_to_lreal*/
       
  3708     break;
  1567 
  3709 
  1568 /****
  3710 /****
  1569  *LINT_TO_SINT
  3711  *LINT_TO_SINT
  1570  */
  3712  */
  1571 	case function_lint_to_sint :
  3713     case function_lint_to_sint :
  1572 	{
  3714     {
  1573 		symbol_c *last_type_symbol = NULL;
  3715         symbol_c *last_type_symbol = NULL;
  1574 
  3716 
  1575 		{
  3717         {
  1576 			identifier_c param_name("IN");
  3718             identifier_c param_name("IN");
  1577 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  3719             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1578 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1579 			
  3721             
  1580 			/* Get the value from a foo(<param_value>) style call */
  3722             /* Get the value from a foo(<param_value>) style call */
  1581 			if (IN_param_value == NULL)
  3723             if (IN_param_value == NULL)
  1582 			  IN_param_value = function_call_param_iterator.next();
  3724               IN_param_value = function_call_param_iterator.next();
  1583 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3725             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1584 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3726             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1585 			
  3727             
  1586 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3728             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1587 			{
  3729             {
  1588 		
  3730         
  1589 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3731                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1590 				s4o.print("(");
  3732                 s4o.print("(");
  1591 				return_type_symbol->accept(*this);
  3733                 return_type_symbol->accept(*this);
  1592 				s4o.print(")");
  3734                 s4o.print(")");
  1593 				IN_param_value->accept(*this);
  3735                 IN_param_value->accept(*this);
  1594 				return NULL;
  3736                 return NULL;
  1595 				
  3737                 
  1596 			}
  3738             }
  1597 			
  3739             
  1598 			ERROR;
  3740             ERROR;
  1599 		}
  3741         }
  1600 		
  3742         
  1601 	}/*function_lint_to_sint*/
  3743     }/*function_lint_to_sint*/
  1602 	break;
  3744     break;
  1603 
  3745 
  1604 /****
  3746 /****
  1605  *LINT_TO_LINT
  3747  *LINT_TO_INT
  1606  */
  3748  */
  1607 	case function_lint_to_lint :
  3749     case function_lint_to_int :
  1608 	{
  3750     {
  1609 		symbol_c *last_type_symbol = NULL;
  3751         symbol_c *last_type_symbol = NULL;
  1610 
  3752 
  1611 		{
  3753         {
  1612 			identifier_c param_name("IN");
  3754             identifier_c param_name("IN");
  1613 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  3755             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1614 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1615 			
  3757             
  1616 			/* Get the value from a foo(<param_value>) style call */
  3758             /* Get the value from a foo(<param_value>) style call */
  1617 			if (IN_param_value == NULL)
  3759             if (IN_param_value == NULL)
  1618 			  IN_param_value = function_call_param_iterator.next();
  3760               IN_param_value = function_call_param_iterator.next();
  1619 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1620 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1621 			
  3763             
  1622 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3764             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1623 			{
  3765             {
  1624 		
  3766         
  1625 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3767                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1626 				s4o.print("(");
  3768                 s4o.print("(");
  1627 				return_type_symbol->accept(*this);
  3769                 return_type_symbol->accept(*this);
  1628 				s4o.print(")");
  3770                 s4o.print(")");
  1629 				IN_param_value->accept(*this);
  3771                 IN_param_value->accept(*this);
  1630 				return NULL;
  3772                 return NULL;
  1631 				
  3773                 
  1632 			}
  3774             }
  1633 			
  3775             
  1634 			ERROR;
  3776             ERROR;
  1635 		}
  3777         }
  1636 		
  3778         
  1637 	}/*function_lint_to_lint*/
  3779     }/*function_lint_to_int*/
  1638 	break;
  3780     break;
  1639 
  3781 
  1640 /****
  3782 /****
  1641  *LINT_TO_DINT
  3783  *LINT_TO_DINT
  1642  */
  3784  */
  1643 	case function_lint_to_dint :
  3785     case function_lint_to_dint :
  1644 	{
  3786     {
  1645 		symbol_c *last_type_symbol = NULL;
  3787         symbol_c *last_type_symbol = NULL;
  1646 
  3788 
  1647 		{
  3789         {
  1648 			identifier_c param_name("IN");
  3790             identifier_c param_name("IN");
  1649 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  3791             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1650 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3792             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1651 			
  3793             
  1652 			/* Get the value from a foo(<param_value>) style call */
  3794             /* Get the value from a foo(<param_value>) style call */
  1653 			if (IN_param_value == NULL)
  3795             if (IN_param_value == NULL)
  1654 			  IN_param_value = function_call_param_iterator.next();
  3796               IN_param_value = function_call_param_iterator.next();
  1655 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3797             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  3798             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1657 			
  3799             
  1658 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3800             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1659 			{
  3801             {
  1660 		
  3802         
  1661 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3803                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1662 				s4o.print("(");
  3804                 s4o.print("(");
  1663 				return_type_symbol->accept(*this);
  3805                 return_type_symbol->accept(*this);
  1664 				s4o.print(")");
  3806                 s4o.print(")");
  1665 				IN_param_value->accept(*this);
  3807                 IN_param_value->accept(*this);
  1666 				return NULL;
  3808                 return NULL;
  1667 				
  3809                 
  1668 			}
  3810             }
  1669 			
  3811             
  1670 			ERROR;
  3812             ERROR;
  1671 		}
  3813         }
  1672 		
  3814         
  1673 	}/*function_lint_to_dint*/
  3815     }/*function_lint_to_dint*/
  1674 	break;
  3816     break;
       
  3817 
       
  3818 /****
       
  3819  *LINT_TO_USINT
       
  3820  */
       
  3821     case function_lint_to_usint :
       
  3822     {
       
  3823         symbol_c *last_type_symbol = NULL;
       
  3824 
       
  3825         {
       
  3826             identifier_c param_name("IN");
       
  3827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3828             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3829             
       
  3830             /* Get the value from a foo(<param_value>) style call */
       
  3831             if (IN_param_value == NULL)
       
  3832               IN_param_value = function_call_param_iterator.next();
       
  3833             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3834             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3835             
       
  3836             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3837             {
       
  3838         
       
  3839                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3840                 s4o.print("(");
       
  3841                 return_type_symbol->accept(*this);
       
  3842                 s4o.print(")");
       
  3843                 IN_param_value->accept(*this);
       
  3844                 return NULL;
       
  3845                 
       
  3846             }
       
  3847             
       
  3848             ERROR;
       
  3849         }
       
  3850         
       
  3851     }/*function_lint_to_usint*/
       
  3852     break;
       
  3853 
       
  3854 /****
       
  3855  *LINT_TO_UINT
       
  3856  */
       
  3857     case function_lint_to_uint :
       
  3858     {
       
  3859         symbol_c *last_type_symbol = NULL;
       
  3860 
       
  3861         {
       
  3862             identifier_c param_name("IN");
       
  3863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3864             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3865             
       
  3866             /* Get the value from a foo(<param_value>) style call */
       
  3867             if (IN_param_value == NULL)
       
  3868               IN_param_value = function_call_param_iterator.next();
       
  3869             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3870             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3871             
       
  3872             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3873             {
       
  3874         
       
  3875                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3876                 s4o.print("(");
       
  3877                 return_type_symbol->accept(*this);
       
  3878                 s4o.print(")");
       
  3879                 IN_param_value->accept(*this);
       
  3880                 return NULL;
       
  3881                 
       
  3882             }
       
  3883             
       
  3884             ERROR;
       
  3885         }
       
  3886         
       
  3887     }/*function_lint_to_uint*/
       
  3888     break;
       
  3889 
       
  3890 /****
       
  3891  *LINT_TO_UDINT
       
  3892  */
       
  3893     case function_lint_to_udint :
       
  3894     {
       
  3895         symbol_c *last_type_symbol = NULL;
       
  3896 
       
  3897         {
       
  3898             identifier_c param_name("IN");
       
  3899             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3900             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3901             
       
  3902             /* Get the value from a foo(<param_value>) style call */
       
  3903             if (IN_param_value == NULL)
       
  3904               IN_param_value = function_call_param_iterator.next();
       
  3905             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3906             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3907             
       
  3908             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3909             {
       
  3910         
       
  3911                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3912                 s4o.print("(");
       
  3913                 return_type_symbol->accept(*this);
       
  3914                 s4o.print(")");
       
  3915                 IN_param_value->accept(*this);
       
  3916                 return NULL;
       
  3917                 
       
  3918             }
       
  3919             
       
  3920             ERROR;
       
  3921         }
       
  3922         
       
  3923     }/*function_lint_to_udint*/
       
  3924     break;
       
  3925 
       
  3926 /****
       
  3927  *LINT_TO_ULINT
       
  3928  */
       
  3929     case function_lint_to_ulint :
       
  3930     {
       
  3931         symbol_c *last_type_symbol = NULL;
       
  3932 
       
  3933         {
       
  3934             identifier_c param_name("IN");
       
  3935             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3936             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3937             
       
  3938             /* Get the value from a foo(<param_value>) style call */
       
  3939             if (IN_param_value == NULL)
       
  3940               IN_param_value = function_call_param_iterator.next();
       
  3941             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3942             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3943             
       
  3944             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3945             {
       
  3946         
       
  3947                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3948                 s4o.print("(");
       
  3949                 return_type_symbol->accept(*this);
       
  3950                 s4o.print(")");
       
  3951                 IN_param_value->accept(*this);
       
  3952                 return NULL;
       
  3953                 
       
  3954             }
       
  3955             
       
  3956             ERROR;
       
  3957         }
       
  3958         
       
  3959     }/*function_lint_to_ulint*/
       
  3960     break;
       
  3961 
       
  3962 /****
       
  3963  *LINT_TO_TIME
       
  3964  */
       
  3965     case function_lint_to_time :
       
  3966     {
       
  3967         symbol_c *last_type_symbol = NULL;
       
  3968 
       
  3969         {
       
  3970             identifier_c param_name("IN");
       
  3971             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3972             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3973             
       
  3974             /* Get the value from a foo(<param_value>) style call */
       
  3975             if (IN_param_value == NULL)
       
  3976               IN_param_value = function_call_param_iterator.next();
       
  3977             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3978             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3979             
       
  3980             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3981             {
       
  3982         
       
  3983                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3984                 s4o.print("(");
       
  3985                 return_type_symbol->accept(*this);
       
  3986                 s4o.print(")real_to_time(");
       
  3987                 IN_param_value->accept(*this);
       
  3988                 s4o.print(")");
       
  3989                 return NULL;
       
  3990                 
       
  3991             }
       
  3992             
       
  3993             ERROR;
       
  3994         }
       
  3995         
       
  3996     }/*function_lint_to_time*/
       
  3997     break;
       
  3998 
       
  3999 /****
       
  4000  *LINT_TO_BOOL
       
  4001  */
       
  4002     case function_lint_to_bool :
       
  4003     {
       
  4004         symbol_c *last_type_symbol = NULL;
       
  4005 
       
  4006         {
       
  4007             identifier_c param_name("IN");
       
  4008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4010             
       
  4011             /* Get the value from a foo(<param_value>) style call */
       
  4012             if (IN_param_value == NULL)
       
  4013               IN_param_value = function_call_param_iterator.next();
       
  4014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4016             
       
  4017             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4018             {
       
  4019         
       
  4020                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4021                 s4o.print("(");
       
  4022                 return_type_symbol->accept(*this);
       
  4023                 s4o.print(")");
       
  4024                 IN_param_value->accept(*this);
       
  4025                 return NULL;
       
  4026                 
       
  4027             }
       
  4028             
       
  4029             ERROR;
       
  4030         }
       
  4031         
       
  4032     }/*function_lint_to_bool*/
       
  4033     break;
       
  4034 
       
  4035 /****
       
  4036  *LINT_TO_BYTE
       
  4037  */
       
  4038     case function_lint_to_byte :
       
  4039     {
       
  4040         symbol_c *last_type_symbol = NULL;
       
  4041 
       
  4042         {
       
  4043             identifier_c param_name("IN");
       
  4044             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4045             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4046             
       
  4047             /* Get the value from a foo(<param_value>) style call */
       
  4048             if (IN_param_value == NULL)
       
  4049               IN_param_value = function_call_param_iterator.next();
       
  4050             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4051             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4052             
       
  4053             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4054             {
       
  4055         
       
  4056                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4057                 s4o.print("(");
       
  4058                 return_type_symbol->accept(*this);
       
  4059                 s4o.print(")");
       
  4060                 IN_param_value->accept(*this);
       
  4061                 return NULL;
       
  4062                 
       
  4063             }
       
  4064             
       
  4065             ERROR;
       
  4066         }
       
  4067         
       
  4068     }/*function_lint_to_byte*/
       
  4069     break;
       
  4070 
       
  4071 /****
       
  4072  *LINT_TO_WORD
       
  4073  */
       
  4074     case function_lint_to_word :
       
  4075     {
       
  4076         symbol_c *last_type_symbol = NULL;
       
  4077 
       
  4078         {
       
  4079             identifier_c param_name("IN");
       
  4080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4082             
       
  4083             /* Get the value from a foo(<param_value>) style call */
       
  4084             if (IN_param_value == NULL)
       
  4085               IN_param_value = function_call_param_iterator.next();
       
  4086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4088             
       
  4089             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4090             {
       
  4091         
       
  4092                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4093                 s4o.print("(");
       
  4094                 return_type_symbol->accept(*this);
       
  4095                 s4o.print(")");
       
  4096                 IN_param_value->accept(*this);
       
  4097                 return NULL;
       
  4098                 
       
  4099             }
       
  4100             
       
  4101             ERROR;
       
  4102         }
       
  4103         
       
  4104     }/*function_lint_to_word*/
       
  4105     break;
       
  4106 
       
  4107 /****
       
  4108  *LINT_TO_DWORD
       
  4109  */
       
  4110     case function_lint_to_dword :
       
  4111     {
       
  4112         symbol_c *last_type_symbol = NULL;
       
  4113 
       
  4114         {
       
  4115             identifier_c param_name("IN");
       
  4116             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4117             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4118             
       
  4119             /* Get the value from a foo(<param_value>) style call */
       
  4120             if (IN_param_value == NULL)
       
  4121               IN_param_value = function_call_param_iterator.next();
       
  4122             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4123             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4124             
       
  4125             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4126             {
       
  4127         
       
  4128                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4129                 s4o.print("(");
       
  4130                 return_type_symbol->accept(*this);
       
  4131                 s4o.print(")");
       
  4132                 IN_param_value->accept(*this);
       
  4133                 return NULL;
       
  4134                 
       
  4135             }
       
  4136             
       
  4137             ERROR;
       
  4138         }
       
  4139         
       
  4140     }/*function_lint_to_dword*/
       
  4141     break;
       
  4142 
       
  4143 /****
       
  4144  *LINT_TO_LWORD
       
  4145  */
       
  4146     case function_lint_to_lword :
       
  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(lint_type_name_c))
       
  4162             {
       
  4163         
       
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4165                 s4o.print("(");
       
  4166                 return_type_symbol->accept(*this);
       
  4167                 s4o.print(")");
       
  4168                 IN_param_value->accept(*this);
       
  4169                 return NULL;
       
  4170                 
       
  4171             }
       
  4172             
       
  4173             ERROR;
       
  4174         }
       
  4175         
       
  4176     }/*function_lint_to_lword*/
       
  4177     break;
       
  4178 
       
  4179 /****
       
  4180  *LINT_TO_STRING
       
  4181  */
       
  4182     case function_lint_to_string :
       
  4183     {
       
  4184         symbol_c *last_type_symbol = NULL;
       
  4185 
       
  4186         {
       
  4187             identifier_c param_name("IN");
       
  4188             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4189             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4190             
       
  4191             /* Get the value from a foo(<param_value>) style call */
       
  4192             if (IN_param_value == NULL)
       
  4193               IN_param_value = function_call_param_iterator.next();
       
  4194             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4195             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4196             
       
  4197             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4198             {
       
  4199         
       
  4200                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4201                 s4o.print("(");
       
  4202                 return_type_symbol->accept(*this);
       
  4203                 s4o.print(")int_to_string(");
       
  4204                 IN_param_value->accept(*this);
       
  4205                 s4o.print(", 10)");
       
  4206                 return NULL;
       
  4207                 
       
  4208             }
       
  4209             
       
  4210             ERROR;
       
  4211         }
       
  4212         
       
  4213     }/*function_lint_to_string*/
       
  4214     break;
       
  4215 
       
  4216 /****
       
  4217  *LINT_TO_WSTRING
       
  4218  */
       
  4219     case function_lint_to_wstring :
       
  4220     {
       
  4221         symbol_c *last_type_symbol = NULL;
       
  4222 
       
  4223         {
       
  4224             identifier_c param_name("IN");
       
  4225             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4226             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4227             
       
  4228             /* Get the value from a foo(<param_value>) style call */
       
  4229             if (IN_param_value == NULL)
       
  4230               IN_param_value = function_call_param_iterator.next();
       
  4231             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4232             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4233             
       
  4234             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4235             {
       
  4236         
       
  4237                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  4238                 s4o.print("(");
       
  4239                 return_type_symbol->accept(*this);
       
  4240                 s4o.print(")int_to_string(");
       
  4241                 IN_param_value->accept(*this);
       
  4242                 s4o.print(", 10)");
       
  4243                 return NULL;
       
  4244                 
       
  4245             }
       
  4246             
       
  4247             ERROR;
       
  4248         }
       
  4249         
       
  4250     }/*function_lint_to_wstring*/
       
  4251     break;
  1675 
  4252 
  1676 /****
  4253 /****
  1677  *LINT_TO_DATE
  4254  *LINT_TO_DATE
  1678  */
  4255  */
  1679 	case function_lint_to_date :
  4256     case function_lint_to_date :
  1680 	{
  4257     {
  1681 		symbol_c *last_type_symbol = NULL;
  4258         symbol_c *last_type_symbol = NULL;
  1682 
  4259 
  1683 		{
  4260         {
  1684 			identifier_c param_name("IN");
  4261             identifier_c param_name("IN");
  1685 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4262             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1686 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4263             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1687 			
  4264             
  1688 			/* Get the value from a foo(<param_value>) style call */
  4265             /* Get the value from a foo(<param_value>) style call */
  1689 			if (IN_param_value == NULL)
  4266             if (IN_param_value == NULL)
  1690 			  IN_param_value = function_call_param_iterator.next();
  4267               IN_param_value = function_call_param_iterator.next();
  1691 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4268             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1692 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4269             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1693 			
  4270             
  1694 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4271             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1695 			{
  4272             {
  1696 		
  4273         
  1697 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4274                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1698 				s4o.print("(");
  4275                 s4o.print("(");
  1699 				return_type_symbol->accept(*this);
  4276                 return_type_symbol->accept(*this);
  1700 				s4o.print(")time_to_real(");
  4277                 s4o.print(")real_to_time(");
  1701 				IN_param_value->accept(*this);
  4278                 IN_param_value->accept(*this);
  1702 				s4o.print(")");
  4279                 s4o.print(")");
  1703 				return NULL;
  4280                 return NULL;
  1704 				
  4281                 
  1705 			}
  4282             }
  1706 			
  4283             
  1707 			ERROR;
  4284             ERROR;
  1708 		}
  4285         }
  1709 		
  4286         
  1710 	}/*function_lint_to_date*/
  4287     }/*function_lint_to_date*/
  1711 	break;
  4288     break;
  1712 
  4289 
  1713 /****
  4290 /****
  1714  *LINT_TO_DWORD
  4291  *LINT_TO_TOD
  1715  */
  4292  */
  1716 	case function_lint_to_dword :
  4293     case function_lint_to_tod :
  1717 	{
  4294     {
  1718 		symbol_c *last_type_symbol = NULL;
  4295         symbol_c *last_type_symbol = NULL;
  1719 
  4296 
  1720 		{
  4297         {
  1721 			identifier_c param_name("IN");
  4298             identifier_c param_name("IN");
  1722 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4299             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1723 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1724 			
  4301             
  1725 			/* Get the value from a foo(<param_value>) style call */
  4302             /* Get the value from a foo(<param_value>) style call */
  1726 			if (IN_param_value == NULL)
  4303             if (IN_param_value == NULL)
  1727 			  IN_param_value = function_call_param_iterator.next();
  4304               IN_param_value = function_call_param_iterator.next();
  1728 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4305             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1729 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4306             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1730 			
  4307             
  1731 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4308             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1732 			{
  4309             {
  1733 		
  4310         
  1734 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4311                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1735 				s4o.print("(");
  4312                 s4o.print("(");
  1736 				return_type_symbol->accept(*this);
  4313                 return_type_symbol->accept(*this);
  1737 				s4o.print(")");
  4314                 s4o.print(")real_to_time(");
  1738 				IN_param_value->accept(*this);
  4315                 IN_param_value->accept(*this);
  1739 				return NULL;
  4316                 s4o.print(")");
  1740 				
  4317                 return NULL;
  1741 			}
  4318                 
  1742 			
  4319             }
  1743 			ERROR;
  4320             
  1744 		}
  4321             ERROR;
  1745 		
  4322         }
  1746 	}/*function_lint_to_dword*/
  4323         
  1747 	break;
  4324     }/*function_lint_to_tod*/
       
  4325     break;
  1748 
  4326 
  1749 /****
  4327 /****
  1750  *LINT_TO_DT
  4328  *LINT_TO_DT
  1751  */
  4329  */
  1752 	case function_lint_to_dt :
  4330     case function_lint_to_dt :
  1753 	{
  4331     {
  1754 		symbol_c *last_type_symbol = NULL;
  4332         symbol_c *last_type_symbol = NULL;
  1755 
  4333 
  1756 		{
  4334         {
  1757 			identifier_c param_name("IN");
  4335             identifier_c param_name("IN");
  1758 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4336             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1759 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1760 			
  4338             
  1761 			/* Get the value from a foo(<param_value>) style call */
  4339             /* Get the value from a foo(<param_value>) style call */
  1762 			if (IN_param_value == NULL)
  4340             if (IN_param_value == NULL)
  1763 			  IN_param_value = function_call_param_iterator.next();
  4341               IN_param_value = function_call_param_iterator.next();
  1764 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1765 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1766 			
  4344             
  1767 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4345             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  1768 			{
  4346             {
  1769 		
  4347         
  1770 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4348                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1771 				s4o.print("(");
  4349                 s4o.print("(");
  1772 				return_type_symbol->accept(*this);
  4350                 return_type_symbol->accept(*this);
  1773 				s4o.print(")time_to_real(");
  4351                 s4o.print(")real_to_time(");
  1774 				IN_param_value->accept(*this);
  4352                 IN_param_value->accept(*this);
  1775 				s4o.print(")");
  4353                 s4o.print(")");
  1776 				return NULL;
  4354                 return NULL;
  1777 				
  4355                 
  1778 			}
  4356             }
  1779 			
  4357             
  1780 			ERROR;
  4358             ERROR;
  1781 		}
  4359         }
  1782 		
  4360         
  1783 	}/*function_lint_to_dt*/
  4361     }/*function_lint_to_dt*/
  1784 	break;
  4362     break;
  1785 
  4363 
  1786 /****
  4364 /****
  1787  *LINT_TO_TOD
  4365  *USINT_TO_REAL
  1788  */
  4366  */
  1789 	case function_lint_to_tod :
  4367     case function_usint_to_real :
  1790 	{
  4368     {
  1791 		symbol_c *last_type_symbol = NULL;
  4369         symbol_c *last_type_symbol = NULL;
  1792 
  4370 
  1793 		{
  4371         {
  1794 			identifier_c param_name("IN");
  4372             identifier_c param_name("IN");
  1795 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4373             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1796 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4374             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1797 			
  4375             
  1798 			/* Get the value from a foo(<param_value>) style call */
  4376             /* Get the value from a foo(<param_value>) style call */
  1799 			if (IN_param_value == NULL)
  4377             if (IN_param_value == NULL)
  1800 			  IN_param_value = function_call_param_iterator.next();
  4378               IN_param_value = function_call_param_iterator.next();
  1801 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4379             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1802 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4380             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1803 			
  4381             
  1804 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4382             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1805 			{
  4383             {
  1806 		
  4384         
  1807 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4385                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1808 				s4o.print("(");
  4386                 s4o.print("(");
  1809 				return_type_symbol->accept(*this);
  4387                 return_type_symbol->accept(*this);
  1810 				s4o.print(")time_to_real(");
  4388                 s4o.print(")");
  1811 				IN_param_value->accept(*this);
  4389                 IN_param_value->accept(*this);
  1812 				s4o.print(")");
  4390                 return NULL;
  1813 				return NULL;
  4391                 
  1814 				
  4392             }
  1815 			}
  4393             
  1816 			
  4394             ERROR;
  1817 			ERROR;
  4395         }
  1818 		}
  4396         
  1819 		
  4397     }/*function_usint_to_real*/
  1820 	}/*function_lint_to_tod*/
  4398     break;
  1821 	break;
  4399 
  1822 
  4400 /****
  1823 /****
  4401  *USINT_TO_LREAL
  1824  *LINT_TO_UDINT
  4402  */
  1825  */
  4403     case function_usint_to_lreal :
  1826 	case function_lint_to_udint :
  4404     {
  1827 	{
  4405         symbol_c *last_type_symbol = NULL;
  1828 		symbol_c *last_type_symbol = NULL;
  4406 
  1829 
  4407         {
  1830 		{
  4408             identifier_c param_name("IN");
  1831 			identifier_c param_name("IN");
  4409             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1832 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4410             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1833 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4411             
  1834 			
  4412             /* Get the value from a foo(<param_value>) style call */
  1835 			/* Get the value from a foo(<param_value>) style call */
  4413             if (IN_param_value == NULL)
  1836 			if (IN_param_value == NULL)
  4414               IN_param_value = function_call_param_iterator.next();
  1837 			  IN_param_value = function_call_param_iterator.next();
  4415             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1838 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4416             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1839 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4417             
  1840 			
  4418             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1841 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4419             {
  1842 			{
  4420         
  1843 		
  4421                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1844 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  4422                 s4o.print("(");
  1845 				s4o.print("(");
  4423                 return_type_symbol->accept(*this);
  1846 				return_type_symbol->accept(*this);
  4424                 s4o.print(")");
  1847 				s4o.print(")");
  4425                 IN_param_value->accept(*this);
  1848 				IN_param_value->accept(*this);
  4426                 return NULL;
  1849 				return NULL;
  4427                 
  1850 				
  4428             }
  1851 			}
  4429             
  1852 			
  4430             ERROR;
  1853 			ERROR;
  4431         }
  1854 		}
  4432         
  1855 		
  4433     }/*function_usint_to_lreal*/
  1856 	}/*function_lint_to_udint*/
  4434     break;
  1857 	break;
  4435 
  1858 
  4436 /****
  1859 /****
  4437  *USINT_TO_SINT
  1860  *LINT_TO_WORD
  4438  */
  1861  */
  4439     case function_usint_to_sint :
  1862 	case function_lint_to_word :
  4440     {
  1863 	{
  4441         symbol_c *last_type_symbol = NULL;
  1864 		symbol_c *last_type_symbol = NULL;
  4442 
  1865 
  4443         {
  1866 		{
  4444             identifier_c param_name("IN");
  1867 			identifier_c param_name("IN");
  4445             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1868 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1869 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4447             
  1870 			
  4448             /* Get the value from a foo(<param_value>) style call */
  1871 			/* Get the value from a foo(<param_value>) style call */
  4449             if (IN_param_value == NULL)
  1872 			if (IN_param_value == NULL)
  4450               IN_param_value = function_call_param_iterator.next();
  1873 			  IN_param_value = function_call_param_iterator.next();
  4451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1874 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4452             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1875 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4453             
  1876 			
  4454             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1877 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4455             {
  1878 			{
  4456         
  1879 		
  4457                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1880 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4458                 s4o.print("(");
  1881 				s4o.print("(");
  4459                 return_type_symbol->accept(*this);
  1882 				return_type_symbol->accept(*this);
  4460                 s4o.print(")");
  1883 				s4o.print(")");
  4461                 IN_param_value->accept(*this);
  1884 				IN_param_value->accept(*this);
  4462                 return NULL;
  1885 				return NULL;
  4463                 
  1886 				
  4464             }
  1887 			}
  4465             
  1888 			
  4466             ERROR;
  1889 			ERROR;
  4467         }
  1890 		}
  4468         
  1891 		
  4469     }/*function_usint_to_sint*/
  1892 	}/*function_lint_to_word*/
  4470     break;
  1893 	break;
  4471 
  1894 
  4472 /****
  1895 /****
  4473  *USINT_TO_INT
  1896  *LINT_TO_WSTRING
  4474  */
  1897  */
  4475     case function_usint_to_int :
  1898 	case function_lint_to_wstring :
  4476     {
  1899 	{
  4477         symbol_c *last_type_symbol = NULL;
  1900 		symbol_c *last_type_symbol = NULL;
  4478 
  1901 
  4479         {
  1902 		{
  4480             identifier_c param_name("IN");
  1903 			identifier_c param_name("IN");
  4481             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1904 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4482             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1905 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4483             
  1906 			
  4484             /* Get the value from a foo(<param_value>) style call */
  1907 			/* Get the value from a foo(<param_value>) style call */
  4485             if (IN_param_value == NULL)
  1908 			if (IN_param_value == NULL)
  4486               IN_param_value = function_call_param_iterator.next();
  1909 			  IN_param_value = function_call_param_iterator.next();
  4487             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1910 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4488             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1911 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4489             
  1912 			
  4490             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1913 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4491             {
  1914 			{
  4492         
  1915 		
  4493                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1916 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  4494                 s4o.print("(");
  1917 				s4o.print("(");
  4495                 return_type_symbol->accept(*this);
  1918 				return_type_symbol->accept(*this);
  4496                 s4o.print(")");
  1919 				s4o.print(")string_to_int(");
  4497                 IN_param_value->accept(*this);
  1920 				IN_param_value->accept(*this);
  4498                 return NULL;
  1921 				s4o.print(", 10)");
  4499                 
  1922 				return NULL;
  4500             }
  1923 				
  4501             
  1924 			}
  4502             ERROR;
  1925 			
  4503         }
  1926 			ERROR;
  4504         
  1927 		}
  4505     }/*function_usint_to_int*/
  1928 		
  4506     break;
  1929 	}/*function_lint_to_wstring*/
  4507 
  1930 	break;
  4508 /****
  1931 
  4509  *USINT_TO_DINT
  1932 /****
  4510  */
  1933  *LINT_TO_STRING
  4511     case function_usint_to_dint :
  1934  */
  4512     {
  1935 	case function_lint_to_string :
  4513         symbol_c *last_type_symbol = NULL;
  1936 	{
  4514 
  1937 		symbol_c *last_type_symbol = NULL;
  4515         {
  1938 
  4516             identifier_c param_name("IN");
  1939 		{
  4517             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1940 			identifier_c param_name("IN");
  4518             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1941 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4519             
  1942 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4520             /* Get the value from a foo(<param_value>) style call */
  1943 			
  4521             if (IN_param_value == NULL)
  1944 			/* Get the value from a foo(<param_value>) style call */
  4522               IN_param_value = function_call_param_iterator.next();
  1945 			if (IN_param_value == NULL)
  4523             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1946 			  IN_param_value = function_call_param_iterator.next();
  4524             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1947 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4525             
  1948 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4526             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1949 			
  4527             {
  1950 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4528         
  1951 			{
  4529                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1952 		
  4530                 s4o.print("(");
  1953 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4531                 return_type_symbol->accept(*this);
  1954 				s4o.print("(");
  4532                 s4o.print(")");
  1955 				return_type_symbol->accept(*this);
  4533                 IN_param_value->accept(*this);
  1956 				s4o.print(")string_to_int(");
  4534                 return NULL;
  1957 				IN_param_value->accept(*this);
  4535                 
  1958 				s4o.print(", 10)");
  4536             }
  1959 				return NULL;
  4537             
  1960 				
  4538             ERROR;
  1961 			}
  4539         }
  1962 			
  4540         
  1963 			ERROR;
  4541     }/*function_usint_to_dint*/
  1964 		}
  4542     break;
  1965 		
  4543 
  1966 	}/*function_lint_to_string*/
  4544 /****
  1967 	break;
  4545  *USINT_TO_LINT
  1968 
  4546  */
  1969 /****
  4547     case function_usint_to_lint :
  1970  *LINT_TO_LWORD
  4548     {
  1971  */
  4549         symbol_c *last_type_symbol = NULL;
  1972 	case function_lint_to_lword :
  4550 
  1973 	{
  4551         {
  1974 		symbol_c *last_type_symbol = NULL;
  4552             identifier_c param_name("IN");
  1975 
  4553             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1976 		{
  4554             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1977 			identifier_c param_name("IN");
  4555             
  1978 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4556             /* Get the value from a foo(<param_value>) style call */
  1979 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4557             if (IN_param_value == NULL)
  1980 			
  4558               IN_param_value = function_call_param_iterator.next();
  1981 			/* Get the value from a foo(<param_value>) style call */
  4559             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1982 			if (IN_param_value == NULL)
  4560             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1983 			  IN_param_value = function_call_param_iterator.next();
  4561             
  1984 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4562             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  1985 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4563             {
  1986 			
  4564         
  1987 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4565                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1988 			{
  4566                 s4o.print("(");
  1989 		
  4567                 return_type_symbol->accept(*this);
  1990 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4568                 s4o.print(")");
  1991 				s4o.print("(");
  4569                 IN_param_value->accept(*this);
  1992 				return_type_symbol->accept(*this);
  4570                 return NULL;
  1993 				s4o.print(")");
  4571                 
  1994 				IN_param_value->accept(*this);
  4572             }
  1995 				return NULL;
  4573             
  1996 				
  4574             ERROR;
  1997 			}
  4575         }
  1998 			
  4576         
  1999 			ERROR;
  4577     }/*function_usint_to_lint*/
  2000 		}
  4578     break;
  2001 		
  4579 
  2002 	}/*function_lint_to_lword*/
  4580 /****
  2003 	break;
  4581  *USINT_TO_UINT
  2004 
  4582  */
  2005 /****
  4583     case function_usint_to_uint :
  2006  *LINT_TO_UINT
  4584     {
  2007  */
  4585         symbol_c *last_type_symbol = NULL;
  2008 	case function_lint_to_uint :
  4586 
  2009 	{
  4587         {
  2010 		symbol_c *last_type_symbol = NULL;
  4588             identifier_c param_name("IN");
  2011 
  4589             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2012 		{
  4590             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2013 			identifier_c param_name("IN");
  4591             
  2014 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4592             /* Get the value from a foo(<param_value>) style call */
  2015 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4593             if (IN_param_value == NULL)
  2016 			
  4594               IN_param_value = function_call_param_iterator.next();
  2017 			/* Get the value from a foo(<param_value>) style call */
  4595             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2018 			if (IN_param_value == NULL)
  4596             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2019 			  IN_param_value = function_call_param_iterator.next();
  4597             
  2020 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4598             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2021 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4599             {
  2022 			
  4600         
  2023 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4601                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2024 			{
  4602                 s4o.print("(");
  2025 		
  4603                 return_type_symbol->accept(*this);
  2026 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  4604                 s4o.print(")");
  2027 				s4o.print("(");
  4605                 IN_param_value->accept(*this);
  2028 				return_type_symbol->accept(*this);
  4606                 return NULL;
  2029 				s4o.print(")");
  4607                 
  2030 				IN_param_value->accept(*this);
  4608             }
  2031 				return NULL;
  4609             
  2032 				
  4610             ERROR;
  2033 			}
  4611         }
  2034 			
  4612         
  2035 			ERROR;
  4613     }/*function_usint_to_uint*/
  2036 		}
  4614     break;
  2037 		
  4615 
  2038 	}/*function_lint_to_uint*/
  4616 /****
  2039 	break;
  4617  *USINT_TO_UDINT
  2040 
  4618  */
  2041 /****
  4619     case function_usint_to_udint :
  2042  *LINT_TO_LREAL
  4620     {
  2043  */
  4621         symbol_c *last_type_symbol = NULL;
  2044 	case function_lint_to_lreal :
  4622 
  2045 	{
  4623         {
  2046 		symbol_c *last_type_symbol = NULL;
  4624             identifier_c param_name("IN");
  2047 
  4625             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2048 		{
  4626             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2049 			identifier_c param_name("IN");
  4627             
  2050 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4628             /* Get the value from a foo(<param_value>) style call */
  2051 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4629             if (IN_param_value == NULL)
  2052 			
  4630               IN_param_value = function_call_param_iterator.next();
  2053 			/* Get the value from a foo(<param_value>) style call */
  4631             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2054 			if (IN_param_value == NULL)
  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 ;
  2055 			  IN_param_value = function_call_param_iterator.next();
  4633             
  2056 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4634             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2057 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4635             {
  2058 			
  4636         
  2059 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4637                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2060 			{
  4638                 s4o.print("(");
  2061 		
  4639                 return_type_symbol->accept(*this);
  2062 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  4640                 s4o.print(")");
  2063 				s4o.print("(");
  4641                 IN_param_value->accept(*this);
  2064 				return_type_symbol->accept(*this);
  4642                 return NULL;
  2065 				s4o.print(")");
  4643                 
  2066 				IN_param_value->accept(*this);
  4644             }
  2067 				return NULL;
  4645             
  2068 				
  4646             ERROR;
  2069 			}
  4647         }
  2070 			
  4648         
  2071 			ERROR;
  4649     }/*function_usint_to_udint*/
  2072 		}
  4650     break;
  2073 		
  4651 
  2074 	}/*function_lint_to_lreal*/
  4652 /****
  2075 	break;
  4653  *USINT_TO_ULINT
  2076 
  4654  */
  2077 /****
  4655     case function_usint_to_ulint :
  2078  *LINT_TO_BYTE
  4656     {
  2079  */
  4657         symbol_c *last_type_symbol = NULL;
  2080 	case function_lint_to_byte :
  4658 
  2081 	{
  4659         {
  2082 		symbol_c *last_type_symbol = NULL;
  4660             identifier_c param_name("IN");
  2083 
  4661             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2084 		{
  4662             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2085 			identifier_c param_name("IN");
  4663             
  2086 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4664             /* Get the value from a foo(<param_value>) style call */
  2087 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4665             if (IN_param_value == NULL)
  2088 			
  4666               IN_param_value = function_call_param_iterator.next();
  2089 			/* Get the value from a foo(<param_value>) style call */
  4667             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2090 			if (IN_param_value == NULL)
  4668             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2091 			  IN_param_value = function_call_param_iterator.next();
  4669             
  2092 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4670             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2093 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4671             {
  2094 			
  4672         
  2095 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4673                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2096 			{
  4674                 s4o.print("(");
  2097 		
  4675                 return_type_symbol->accept(*this);
  2098 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4676                 s4o.print(")");
  2099 				s4o.print("(");
  4677                 IN_param_value->accept(*this);
  2100 				return_type_symbol->accept(*this);
  4678                 return NULL;
  2101 				s4o.print(")");
  4679                 
  2102 				IN_param_value->accept(*this);
  4680             }
  2103 				return NULL;
  4681             
  2104 				
  4682             ERROR;
  2105 			}
  4683         }
  2106 			
  4684         
  2107 			ERROR;
  4685     }/*function_usint_to_ulint*/
  2108 		}
  4686     break;
  2109 		
  4687 
  2110 	}/*function_lint_to_byte*/
  4688 /****
  2111 	break;
  4689  *USINT_TO_TIME
  2112 
  4690  */
  2113 /****
  4691     case function_usint_to_time :
  2114  *LINT_TO_USINT
  4692     {
  2115  */
  4693         symbol_c *last_type_symbol = NULL;
  2116 	case function_lint_to_usint :
  4694 
  2117 	{
  4695         {
  2118 		symbol_c *last_type_symbol = NULL;
  4696             identifier_c param_name("IN");
  2119 
  4697             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2120 		{
  4698             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2121 			identifier_c param_name("IN");
  4699             
  2122 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4700             /* Get the value from a foo(<param_value>) style call */
  2123 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4701             if (IN_param_value == NULL)
  2124 			
  4702               IN_param_value = function_call_param_iterator.next();
  2125 			/* Get the value from a foo(<param_value>) style call */
  4703             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2126 			if (IN_param_value == NULL)
  4704             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2127 			  IN_param_value = function_call_param_iterator.next();
  4705             
  2128 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4706             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2129 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4707             {
  2130 			
  4708         
  2131 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4709                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2132 			{
  4710                 s4o.print("(");
  2133 		
  4711                 return_type_symbol->accept(*this);
  2134 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4712                 s4o.print(")real_to_time(");
  2135 				s4o.print("(");
  4713                 IN_param_value->accept(*this);
  2136 				return_type_symbol->accept(*this);
  4714                 s4o.print(")");
  2137 				s4o.print(")");
  4715                 return NULL;
  2138 				IN_param_value->accept(*this);
  4716                 
  2139 				return NULL;
  4717             }
  2140 				
  4718             
  2141 			}
  4719             ERROR;
  2142 			
  4720         }
  2143 			ERROR;
  4721         
  2144 		}
  4722     }/*function_usint_to_time*/
  2145 		
  4723     break;
  2146 	}/*function_lint_to_usint*/
  4724 
  2147 	break;
  4725 /****
  2148 
  4726  *USINT_TO_BOOL
  2149 /****
  4727  */
  2150  *LINT_TO_ULINT
  4728     case function_usint_to_bool :
  2151  */
  4729     {
  2152 	case function_lint_to_ulint :
  4730         symbol_c *last_type_symbol = NULL;
  2153 	{
  4731 
  2154 		symbol_c *last_type_symbol = NULL;
  4732         {
  2155 
  4733             identifier_c param_name("IN");
  2156 		{
  4734             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2157 			identifier_c param_name("IN");
  4735             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2158 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4736             
  2159 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4737             /* Get the value from a foo(<param_value>) style call */
  2160 			
  4738             if (IN_param_value == NULL)
  2161 			/* Get the value from a foo(<param_value>) style call */
  4739               IN_param_value = function_call_param_iterator.next();
  2162 			if (IN_param_value == NULL)
  4740             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2163 			  IN_param_value = function_call_param_iterator.next();
  4741             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2164 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4742             
  2165 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4743             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2166 			
  4744             {
  2167 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4745         
  2168 			{
  4746                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2169 		
  4747                 s4o.print("(");
  2170 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  4748                 return_type_symbol->accept(*this);
  2171 				s4o.print("(");
  4749                 s4o.print(")");
  2172 				return_type_symbol->accept(*this);
  4750                 IN_param_value->accept(*this);
  2173 				s4o.print(")");
  4751                 return NULL;
  2174 				IN_param_value->accept(*this);
  4752                 
  2175 				return NULL;
  4753             }
  2176 				
  4754             
  2177 			}
  4755             ERROR;
  2178 			
  4756         }
  2179 			ERROR;
  4757         
  2180 		}
  4758     }/*function_usint_to_bool*/
  2181 		
  4759     break;
  2182 	}/*function_lint_to_ulint*/
  4760 
  2183 	break;
  4761 /****
  2184 
  4762  *USINT_TO_BYTE
  2185 /****
  4763  */
  2186  *LINT_TO_BOOL
  4764     case function_usint_to_byte :
  2187  */
  4765     {
  2188 	case function_lint_to_bool :
  4766         symbol_c *last_type_symbol = NULL;
  2189 	{
  4767 
  2190 		symbol_c *last_type_symbol = NULL;
  4768         {
  2191 
  4769             identifier_c param_name("IN");
  2192 		{
  4770             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2193 			identifier_c param_name("IN");
  4771             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2194 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4772             
  2195 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4773             /* Get the value from a foo(<param_value>) style call */
  2196 			
  4774             if (IN_param_value == NULL)
  2197 			/* Get the value from a foo(<param_value>) style call */
  4775               IN_param_value = function_call_param_iterator.next();
  2198 			if (IN_param_value == NULL)
  4776             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2199 			  IN_param_value = function_call_param_iterator.next();
  4777             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2200 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4778             
  2201 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4779             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2202 			
  4780             {
  2203 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4781         
  2204 			{
  4782                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2205 		
  4783                 s4o.print("(");
  2206 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4784                 return_type_symbol->accept(*this);
  2207 				s4o.print("(");
  4785                 s4o.print(")");
  2208 				return_type_symbol->accept(*this);
  4786                 IN_param_value->accept(*this);
  2209 				s4o.print(")");
  4787                 return NULL;
  2210 				IN_param_value->accept(*this);
  4788                 
  2211 				return NULL;
  4789             }
  2212 				
  4790             
  2213 			}
  4791             ERROR;
  2214 			
  4792         }
  2215 			ERROR;
  4793         
  2216 		}
  4794     }/*function_usint_to_byte*/
  2217 		
  4795     break;
  2218 	}/*function_lint_to_bool*/
  4796 
  2219 	break;
  4797 /****
  2220 
  4798  *USINT_TO_WORD
  2221 /****
  4799  */
  2222  *LINT_TO_TIME
  4800     case function_usint_to_word :
  2223  */
  4801     {
  2224 	case function_lint_to_time :
  4802         symbol_c *last_type_symbol = NULL;
  2225 	{
  4803 
  2226 		symbol_c *last_type_symbol = NULL;
  4804         {
  2227 
  4805             identifier_c param_name("IN");
  2228 		{
  4806             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2229 			identifier_c param_name("IN");
  4807             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2230 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4808             
  2231 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4809             /* Get the value from a foo(<param_value>) style call */
  2232 			
  4810             if (IN_param_value == NULL)
  2233 			/* Get the value from a foo(<param_value>) style call */
  4811               IN_param_value = function_call_param_iterator.next();
  2234 			if (IN_param_value == NULL)
  4812             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2235 			  IN_param_value = function_call_param_iterator.next();
  4813             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2236 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4814             
  2237 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4815             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2238 			
  4816             {
  2239 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4817         
  2240 			{
  4818                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2241 		
  4819                 s4o.print("(");
  2242 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4820                 return_type_symbol->accept(*this);
  2243 				s4o.print("(");
  4821                 s4o.print(")");
  2244 				return_type_symbol->accept(*this);
  4822                 IN_param_value->accept(*this);
  2245 				s4o.print(")time_to_real(");
  4823                 return NULL;
  2246 				IN_param_value->accept(*this);
  4824                 
  2247 				s4o.print(")");
  4825             }
  2248 				return NULL;
  4826             
  2249 				
  4827             ERROR;
  2250 			}
  4828         }
  2251 			
  4829         
  2252 			ERROR;
  4830     }/*function_usint_to_word*/
  2253 		}
  4831     break;
  2254 		
  4832 
  2255 	}/*function_lint_to_time*/
  4833 /****
  2256 	break;
  4834  *USINT_TO_DWORD
  2257 
  4835  */
  2258 /****
  4836     case function_usint_to_dword :
  2259  *LINT_TO_INT
  4837     {
  2260  */
  4838         symbol_c *last_type_symbol = NULL;
  2261 	case function_lint_to_int :
  4839 
  2262 	{
  4840         {
  2263 		symbol_c *last_type_symbol = NULL;
  4841             identifier_c param_name("IN");
  2264 
  4842             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2265 		{
  4843             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2266 			identifier_c param_name("IN");
  4844             
  2267 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4845             /* Get the value from a foo(<param_value>) style call */
  2268 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4846             if (IN_param_value == NULL)
  2269 			
  4847               IN_param_value = function_call_param_iterator.next();
  2270 			/* Get the value from a foo(<param_value>) style call */
  4848             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2271 			if (IN_param_value == NULL)
  4849             last_type_symbol = last_type_symbol && search_expression_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 			  IN_param_value = function_call_param_iterator.next();
  4850             
  2273 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4851             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2274 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4852             {
  2275 			
  4853         
  2276 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  4854                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2277 			{
  4855                 s4o.print("(");
  2278 		
  4856                 return_type_symbol->accept(*this);
  2279 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4857                 s4o.print(")");
  2280 				s4o.print("(");
  4858                 IN_param_value->accept(*this);
  2281 				return_type_symbol->accept(*this);
  4859                 return NULL;
  2282 				s4o.print(")");
  4860                 
  2283 				IN_param_value->accept(*this);
  4861             }
  2284 				return NULL;
  4862             
  2285 				
  4863             ERROR;
  2286 			}
  4864         }
  2287 			
  4865         
  2288 			ERROR;
  4866     }/*function_usint_to_dword*/
  2289 		}
  4867     break;
  2290 		
  4868 
  2291 	}/*function_lint_to_int*/
  4869 /****
  2292 	break;
  4870  *USINT_TO_LWORD
  2293 
  4871  */
  2294 /****
  4872     case function_usint_to_lword :
  2295  *DINT_TO_REAL
  4873     {
  2296  */
  4874         symbol_c *last_type_symbol = NULL;
  2297 	case function_dint_to_real :
  4875 
  2298 	{
  4876         {
  2299 		symbol_c *last_type_symbol = NULL;
  4877             identifier_c param_name("IN");
  2300 
  4878             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2301 		{
  4879             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2302 			identifier_c param_name("IN");
  4880             
  2303 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4881             /* Get the value from a foo(<param_value>) style call */
  2304 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4882             if (IN_param_value == NULL)
  2305 			
  4883               IN_param_value = function_call_param_iterator.next();
  2306 			/* Get the value from a foo(<param_value>) style call */
  4884             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2307 			if (IN_param_value == NULL)
  4885             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2308 			  IN_param_value = function_call_param_iterator.next();
  4886             
  2309 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4887             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2310 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4888             {
  2311 			
  4889         
  2312 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  4890                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2313 			{
  4891                 s4o.print("(");
  2314 		
  4892                 return_type_symbol->accept(*this);
  2315 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4893                 s4o.print(")");
  2316 				s4o.print("(");
  4894                 IN_param_value->accept(*this);
  2317 				return_type_symbol->accept(*this);
  4895                 return NULL;
  2318 				s4o.print(")");
  4896                 
  2319 				IN_param_value->accept(*this);
  4897             }
  2320 				return NULL;
  4898             
  2321 				
  4899             ERROR;
  2322 			}
  4900         }
  2323 			
  4901         
  2324 			ERROR;
  4902     }/*function_usint_to_lword*/
  2325 		}
  4903     break;
  2326 		
  4904 
  2327 	}/*function_dint_to_real*/
  4905 /****
  2328 	break;
  4906  *USINT_TO_STRING
  2329 
  4907  */
  2330 /****
  4908     case function_usint_to_string :
  2331  *DINT_TO_SINT
  4909     {
  2332  */
  4910         symbol_c *last_type_symbol = NULL;
  2333 	case function_dint_to_sint :
  4911 
  2334 	{
  4912         {
  2335 		symbol_c *last_type_symbol = NULL;
  4913             identifier_c param_name("IN");
  2336 
  4914             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2337 		{
  4915             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2338 			identifier_c param_name("IN");
  4916             
  2339 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4917             /* Get the value from a foo(<param_value>) style call */
  2340 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4918             if (IN_param_value == NULL)
  2341 			
  4919               IN_param_value = function_call_param_iterator.next();
  2342 			/* Get the value from a foo(<param_value>) style call */
  4920             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2343 			if (IN_param_value == NULL)
  4921             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2344 			  IN_param_value = function_call_param_iterator.next();
  4922             
  2345 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4923             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2346 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4924             {
  2347 			
  4925         
  2348 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  4926                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2349 			{
  4927                 s4o.print("(");
  2350 		
  4928                 return_type_symbol->accept(*this);
  2351 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4929                 s4o.print(")int_to_string(");
  2352 				s4o.print("(");
  4930                 IN_param_value->accept(*this);
  2353 				return_type_symbol->accept(*this);
  4931                 s4o.print(", 10)");
  2354 				s4o.print(")");
  4932                 return NULL;
  2355 				IN_param_value->accept(*this);
  4933                 
  2356 				return NULL;
  4934             }
  2357 				
  4935             
  2358 			}
  4936             ERROR;
  2359 			
  4937         }
  2360 			ERROR;
  4938         
  2361 		}
  4939     }/*function_usint_to_string*/
  2362 		
  4940     break;
  2363 	}/*function_dint_to_sint*/
  4941 
  2364 	break;
  4942 /****
  2365 
  4943  *USINT_TO_WSTRING
  2366 /****
  4944  */
  2367  *DINT_TO_LINT
  4945     case function_usint_to_wstring :
  2368  */
  4946     {
  2369 	case function_dint_to_lint :
  4947         symbol_c *last_type_symbol = NULL;
  2370 	{
  4948 
  2371 		symbol_c *last_type_symbol = NULL;
  4949         {
  2372 
  4950             identifier_c param_name("IN");
  2373 		{
  4951             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2374 			identifier_c param_name("IN");
  4952             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2375 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4953             
  2376 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4954             /* Get the value from a foo(<param_value>) style call */
  2377 			
  4955             if (IN_param_value == NULL)
  2378 			/* Get the value from a foo(<param_value>) style call */
  4956               IN_param_value = function_call_param_iterator.next();
  2379 			if (IN_param_value == NULL)
  4957             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2380 			  IN_param_value = function_call_param_iterator.next();
  4958             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2381 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4959             
  2382 			last_type_symbol = last_type_symbol && search_expression_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             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2383 			
  4961             {
  2384 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  4962         
  2385 			{
  4963                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  2386 		
  4964                 s4o.print("(");
  2387 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4965                 return_type_symbol->accept(*this);
  2388 				s4o.print("(");
  4966                 s4o.print(")int_to_string(");
  2389 				return_type_symbol->accept(*this);
  4967                 IN_param_value->accept(*this);
  2390 				s4o.print(")");
  4968                 s4o.print(", 10)");
  2391 				IN_param_value->accept(*this);
  4969                 return NULL;
  2392 				return NULL;
  4970                 
  2393 				
  4971             }
  2394 			}
  4972             
  2395 			
  4973             ERROR;
  2396 			ERROR;
  4974         }
  2397 		}
  4975         
  2398 		
  4976     }/*function_usint_to_wstring*/
  2399 	}/*function_dint_to_lint*/
  4977     break;
  2400 	break;
  4978 
  2401 
  4979 /****
  2402 /****
  4980  *USINT_TO_DATE
  2403  *DINT_TO_DINT
  4981  */
  2404  */
  4982     case function_usint_to_date :
  2405 	case function_dint_to_dint :
  4983     {
  2406 	{
  4984         symbol_c *last_type_symbol = NULL;
  2407 		symbol_c *last_type_symbol = NULL;
  4985 
  2408 
  4986         {
  2409 		{
  4987             identifier_c param_name("IN");
  2410 			identifier_c param_name("IN");
  4988             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2411 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  4989             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2412 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4990             
  2413 			
  4991             /* Get the value from a foo(<param_value>) style call */
  2414 			/* Get the value from a foo(<param_value>) style call */
  4992             if (IN_param_value == NULL)
  2415 			if (IN_param_value == NULL)
  4993               IN_param_value = function_call_param_iterator.next();
  2416 			  IN_param_value = function_call_param_iterator.next();
  4994             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2417 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4995             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2418 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4996             
  2419 			
  4997             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2420 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  4998             {
  2421 			{
  4999         
  2422 		
  5000                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2423 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  5001                 s4o.print("(");
  2424 				s4o.print("(");
  5002                 return_type_symbol->accept(*this);
  2425 				return_type_symbol->accept(*this);
  5003                 s4o.print(")real_to_time(");
  2426 				s4o.print(")");
  5004                 IN_param_value->accept(*this);
  2427 				IN_param_value->accept(*this);
  5005                 s4o.print(")");
  2428 				return NULL;
  5006                 return NULL;
  2429 				
  5007                 
  2430 			}
  5008             }
  2431 			
  5009             
  2432 			ERROR;
  5010             ERROR;
  2433 		}
  5011         }
  2434 		
  5012         
  2435 	}/*function_dint_to_dint*/
  5013     }/*function_usint_to_date*/
  2436 	break;
  5014     break;
  2437 
  5015 
  2438 /****
  5016 /****
  2439  *DINT_TO_DATE
  5017  *USINT_TO_TOD
  2440  */
  5018  */
  2441 	case function_dint_to_date :
  5019     case function_usint_to_tod :
  2442 	{
  5020     {
  2443 		symbol_c *last_type_symbol = NULL;
  5021         symbol_c *last_type_symbol = NULL;
  2444 
  5022 
  2445 		{
  5023         {
  2446 			identifier_c param_name("IN");
  5024             identifier_c param_name("IN");
  2447 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5025             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2448 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5026             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2449 			
  5027             
  2450 			/* Get the value from a foo(<param_value>) style call */
  5028             /* Get the value from a foo(<param_value>) style call */
  2451 			if (IN_param_value == NULL)
  5029             if (IN_param_value == NULL)
  2452 			  IN_param_value = function_call_param_iterator.next();
  5030               IN_param_value = function_call_param_iterator.next();
  2453 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5031             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2454 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5032             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2455 			
  5033             
  2456 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5034             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2457 			{
  5035             {
  2458 		
  5036         
  2459 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5037                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2460 				s4o.print("(");
  5038                 s4o.print("(");
  2461 				return_type_symbol->accept(*this);
  5039                 return_type_symbol->accept(*this);
  2462 				s4o.print(")time_to_real(");
  5040                 s4o.print(")real_to_time(");
  2463 				IN_param_value->accept(*this);
  5041                 IN_param_value->accept(*this);
  2464 				s4o.print(")");
  5042                 s4o.print(")");
  2465 				return NULL;
  5043                 return NULL;
  2466 				
  5044                 
  2467 			}
  5045             }
  2468 			
  5046             
  2469 			ERROR;
  5047             ERROR;
  2470 		}
  5048         }
  2471 		
  5049         
  2472 	}/*function_dint_to_date*/
  5050     }/*function_usint_to_tod*/
  2473 	break;
  5051     break;
  2474 
  5052 
  2475 /****
  5053 /****
  2476  *DINT_TO_DWORD
  5054  *USINT_TO_DT
  2477  */
  5055  */
  2478 	case function_dint_to_dword :
  5056     case function_usint_to_dt :
  2479 	{
  5057     {
  2480 		symbol_c *last_type_symbol = NULL;
  5058         symbol_c *last_type_symbol = NULL;
  2481 
  5059 
  2482 		{
  5060         {
  2483 			identifier_c param_name("IN");
  5061             identifier_c param_name("IN");
  2484 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5062             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2485 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5063             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2486 			
  5064             
  2487 			/* Get the value from a foo(<param_value>) style call */
  5065             /* Get the value from a foo(<param_value>) style call */
  2488 			if (IN_param_value == NULL)
  5066             if (IN_param_value == NULL)
  2489 			  IN_param_value = function_call_param_iterator.next();
  5067               IN_param_value = function_call_param_iterator.next();
  2490 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5068             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2491 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5069             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2492 			
  5070             
  2493 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5071             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  2494 			{
  5072             {
  2495 		
  5073         
  2496 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  5074                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2497 				s4o.print("(");
  5075                 s4o.print("(");
  2498 				return_type_symbol->accept(*this);
  5076                 return_type_symbol->accept(*this);
  2499 				s4o.print(")");
  5077                 s4o.print(")real_to_time(");
  2500 				IN_param_value->accept(*this);
  5078                 IN_param_value->accept(*this);
  2501 				return NULL;
  5079                 s4o.print(")");
  2502 				
  5080                 return NULL;
  2503 			}
  5081                 
  2504 			
  5082             }
  2505 			ERROR;
  5083             
  2506 		}
  5084             ERROR;
  2507 		
  5085         }
  2508 	}/*function_dint_to_dword*/
  5086         
  2509 	break;
  5087     }/*function_usint_to_dt*/
  2510 
  5088     break;
  2511 /****
  5089 
  2512  *DINT_TO_DT
  5090 /****
  2513  */
  5091  *UINT_TO_REAL
  2514 	case function_dint_to_dt :
  5092  */
  2515 	{
  5093     case function_uint_to_real :
  2516 		symbol_c *last_type_symbol = NULL;
  5094     {
  2517 
  5095         symbol_c *last_type_symbol = NULL;
  2518 		{
  5096 
  2519 			identifier_c param_name("IN");
  5097         {
  2520 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5098             identifier_c param_name("IN");
  2521 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5099             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2522 			
  5100             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2523 			/* Get the value from a foo(<param_value>) style call */
  5101             
  2524 			if (IN_param_value == NULL)
  5102             /* Get the value from a foo(<param_value>) style call */
  2525 			  IN_param_value = function_call_param_iterator.next();
  5103             if (IN_param_value == NULL)
  2526 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5104               IN_param_value = function_call_param_iterator.next();
  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 ;
  5105             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2528 			
  5106             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2529 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5107             
  2530 			{
  5108             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2531 		
  5109             {
  2532 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5110         
  2533 				s4o.print("(");
  5111                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2534 				return_type_symbol->accept(*this);
  5112                 s4o.print("(");
  2535 				s4o.print(")time_to_real(");
  5113                 return_type_symbol->accept(*this);
  2536 				IN_param_value->accept(*this);
  5114                 s4o.print(")");
  2537 				s4o.print(")");
  5115                 IN_param_value->accept(*this);
  2538 				return NULL;
  5116                 return NULL;
  2539 				
  5117                 
  2540 			}
  5118             }
  2541 			
  5119             
  2542 			ERROR;
  5120             ERROR;
  2543 		}
  5121         }
  2544 		
  5122         
  2545 	}/*function_dint_to_dt*/
  5123     }/*function_uint_to_real*/
  2546 	break;
  5124     break;
  2547 
  5125 
  2548 /****
  5126 /****
  2549  *DINT_TO_TOD
  5127  *UINT_TO_LREAL
  2550  */
  5128  */
  2551 	case function_dint_to_tod :
  5129     case function_uint_to_lreal :
  2552 	{
  5130     {
  2553 		symbol_c *last_type_symbol = NULL;
  5131         symbol_c *last_type_symbol = NULL;
  2554 
  5132 
  2555 		{
  5133         {
  2556 			identifier_c param_name("IN");
  5134             identifier_c param_name("IN");
  2557 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5135             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2558 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5136             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2559 			
  5137             
  2560 			/* Get the value from a foo(<param_value>) style call */
  5138             /* Get the value from a foo(<param_value>) style call */
  2561 			if (IN_param_value == NULL)
  5139             if (IN_param_value == NULL)
  2562 			  IN_param_value = function_call_param_iterator.next();
  5140               IN_param_value = function_call_param_iterator.next();
  2563 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5141             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2564 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5142             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2565 			
  5143             
  2566 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5144             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2567 			{
  5145             {
  2568 		
  5146         
  2569 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5147                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2570 				s4o.print("(");
  5148                 s4o.print("(");
  2571 				return_type_symbol->accept(*this);
  5149                 return_type_symbol->accept(*this);
  2572 				s4o.print(")time_to_real(");
  5150                 s4o.print(")");
  2573 				IN_param_value->accept(*this);
  5151                 IN_param_value->accept(*this);
  2574 				s4o.print(")");
  5152                 return NULL;
  2575 				return NULL;
  5153                 
  2576 				
  5154             }
  2577 			}
  5155             
  2578 			
  5156             ERROR;
  2579 			ERROR;
  5157         }
  2580 		}
  5158         
  2581 		
  5159     }/*function_uint_to_lreal*/
  2582 	}/*function_dint_to_tod*/
  5160     break;
  2583 	break;
  5161 
  2584 
  5162 /****
  2585 /****
  5163  *UINT_TO_SINT
  2586  *DINT_TO_UDINT
  5164  */
  2587  */
  5165     case function_uint_to_sint :
  2588 	case function_dint_to_udint :
  5166     {
  2589 	{
  5167         symbol_c *last_type_symbol = NULL;
  2590 		symbol_c *last_type_symbol = NULL;
  5168 
  2591 
  5169         {
  2592 		{
  5170             identifier_c param_name("IN");
  2593 			identifier_c param_name("IN");
  5171             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2594 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5172             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2595 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5173             
  2596 			
  5174             /* Get the value from a foo(<param_value>) style call */
  2597 			/* Get the value from a foo(<param_value>) style call */
  5175             if (IN_param_value == NULL)
  2598 			if (IN_param_value == NULL)
  5176               IN_param_value = function_call_param_iterator.next();
  2599 			  IN_param_value = function_call_param_iterator.next();
  5177             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2600 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5178             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2601 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5179             
  2602 			
  5180             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2603 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5181             {
  2604 			{
  5182         
  2605 		
  5183                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2606 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5184                 s4o.print("(");
  2607 				s4o.print("(");
  5185                 return_type_symbol->accept(*this);
  2608 				return_type_symbol->accept(*this);
  5186                 s4o.print(")");
  2609 				s4o.print(")");
  5187                 IN_param_value->accept(*this);
  2610 				IN_param_value->accept(*this);
  5188                 return NULL;
  2611 				return NULL;
  5189                 
  2612 				
  5190             }
  2613 			}
  5191             
  2614 			
  5192             ERROR;
  2615 			ERROR;
  5193         }
  2616 		}
  5194         
  2617 		
  5195     }/*function_uint_to_sint*/
  2618 	}/*function_dint_to_udint*/
  5196     break;
  2619 	break;
  5197 
  2620 
  5198 /****
  2621 /****
  5199  *UINT_TO_INT
  2622  *DINT_TO_WORD
  5200  */
  2623  */
  5201     case function_uint_to_int :
  2624 	case function_dint_to_word :
  5202     {
  2625 	{
  5203         symbol_c *last_type_symbol = NULL;
  2626 		symbol_c *last_type_symbol = NULL;
  5204 
  2627 
  5205         {
  2628 		{
  5206             identifier_c param_name("IN");
  2629 			identifier_c param_name("IN");
  5207             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2630 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5208             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2631 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5209             
  2632 			
  5210             /* Get the value from a foo(<param_value>) style call */
  2633 			/* Get the value from a foo(<param_value>) style call */
  5211             if (IN_param_value == NULL)
  2634 			if (IN_param_value == NULL)
  5212               IN_param_value = function_call_param_iterator.next();
  2635 			  IN_param_value = function_call_param_iterator.next();
  5213             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2636 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5214             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2637 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5215             
  2638 			
  5216             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2639 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5217             {
  2640 			{
  5218         
  2641 		
  5219                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2642 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  5220                 s4o.print("(");
  2643 				s4o.print("(");
  5221                 return_type_symbol->accept(*this);
  2644 				return_type_symbol->accept(*this);
  5222                 s4o.print(")");
  2645 				s4o.print(")");
  5223                 IN_param_value->accept(*this);
  2646 				IN_param_value->accept(*this);
  5224                 return NULL;
  2647 				return NULL;
  5225                 
  2648 				
  5226             }
  2649 			}
  5227             
  2650 			
  5228             ERROR;
  2651 			ERROR;
  5229         }
  2652 		}
  5230         
  2653 		
  5231     }/*function_uint_to_int*/
  2654 	}/*function_dint_to_word*/
  5232     break;
  2655 	break;
  5233 
  2656 
  5234 /****
  2657 /****
  5235  *UINT_TO_DINT
  2658  *DINT_TO_WSTRING
  5236  */
  2659  */
  5237     case function_uint_to_dint :
  2660 	case function_dint_to_wstring :
  5238     {
  2661 	{
  5239         symbol_c *last_type_symbol = NULL;
  2662 		symbol_c *last_type_symbol = NULL;
  5240 
  2663 
  5241         {
  2664 		{
  5242             identifier_c param_name("IN");
  2665 			identifier_c param_name("IN");
  5243             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2666 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5244             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2667 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5245             
  2668 			
  5246             /* Get the value from a foo(<param_value>) style call */
  2669 			/* Get the value from a foo(<param_value>) style call */
  5247             if (IN_param_value == NULL)
  2670 			if (IN_param_value == NULL)
  5248               IN_param_value = function_call_param_iterator.next();
  2671 			  IN_param_value = function_call_param_iterator.next();
  5249             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2672 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5250             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2673 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5251             
  2674 			
  5252             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2675 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5253             {
  2676 			{
  5254         
  2677 		
  5255                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2678 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  5256                 s4o.print("(");
  2679 				s4o.print("(");
  5257                 return_type_symbol->accept(*this);
  2680 				return_type_symbol->accept(*this);
  5258                 s4o.print(")");
  2681 				s4o.print(")string_to_int(");
  5259                 IN_param_value->accept(*this);
  2682 				IN_param_value->accept(*this);
  5260                 return NULL;
  2683 				s4o.print(", 10)");
  5261                 
  2684 				return NULL;
  5262             }
  2685 				
  5263             
  2686 			}
  5264             ERROR;
  2687 			
  5265         }
  2688 			ERROR;
  5266         
  2689 		}
  5267     }/*function_uint_to_dint*/
  2690 		
  5268     break;
  2691 	}/*function_dint_to_wstring*/
  5269 
  2692 	break;
  5270 /****
  2693 
  5271  *UINT_TO_LINT
  2694 /****
  5272  */
  2695  *DINT_TO_STRING
  5273     case function_uint_to_lint :
  2696  */
  5274     {
  2697 	case function_dint_to_string :
  5275         symbol_c *last_type_symbol = NULL;
  2698 	{
  5276 
  2699 		symbol_c *last_type_symbol = NULL;
  5277         {
  2700 
  5278             identifier_c param_name("IN");
  2701 		{
  5279             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2702 			identifier_c param_name("IN");
  5280             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2703 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5281             
  2704 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5282             /* Get the value from a foo(<param_value>) style call */
  2705 			
  5283             if (IN_param_value == NULL)
  2706 			/* Get the value from a foo(<param_value>) style call */
  5284               IN_param_value = function_call_param_iterator.next();
  2707 			if (IN_param_value == NULL)
  5285             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2708 			  IN_param_value = function_call_param_iterator.next();
  5286             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2709 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5287             
  2710 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5288             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2711 			
  5289             {
  2712 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5290         
  2713 			{
  5291                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2714 		
  5292                 s4o.print("(");
  2715 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5293                 return_type_symbol->accept(*this);
  2716 				s4o.print("(");
  5294                 s4o.print(")");
  2717 				return_type_symbol->accept(*this);
  5295                 IN_param_value->accept(*this);
  2718 				s4o.print(")string_to_int(");
  5296                 return NULL;
  2719 				IN_param_value->accept(*this);
  5297                 
  2720 				s4o.print(", 10)");
  5298             }
  2721 				return NULL;
  5299             
  2722 				
  5300             ERROR;
  2723 			}
  5301         }
  2724 			
  5302         
  2725 			ERROR;
  5303     }/*function_uint_to_lint*/
  2726 		}
  5304     break;
  2727 		
  5305 
  2728 	}/*function_dint_to_string*/
  5306 /****
  2729 	break;
  5307  *UINT_TO_USINT
  2730 
  5308  */
  2731 /****
  5309     case function_uint_to_usint :
  2732  *DINT_TO_LWORD
  5310     {
  2733  */
  5311         symbol_c *last_type_symbol = NULL;
  2734 	case function_dint_to_lword :
  5312 
  2735 	{
  5313         {
  2736 		symbol_c *last_type_symbol = NULL;
  5314             identifier_c param_name("IN");
  2737 
  5315             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2738 		{
  5316             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2739 			identifier_c param_name("IN");
  5317             
  2740 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5318             /* Get the value from a foo(<param_value>) style call */
  2741 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5319             if (IN_param_value == NULL)
  2742 			
  5320               IN_param_value = function_call_param_iterator.next();
  2743 			/* Get the value from a foo(<param_value>) style call */
  5321             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2744 			if (IN_param_value == NULL)
  5322             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2745 			  IN_param_value = function_call_param_iterator.next();
  5323             
  2746 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5324             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2747 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5325             {
  2748 			
  5326         
  2749 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5327                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2750 			{
  5328                 s4o.print("(");
  2751 		
  5329                 return_type_symbol->accept(*this);
  2752 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  5330                 s4o.print(")");
  2753 				s4o.print("(");
  5331                 IN_param_value->accept(*this);
  2754 				return_type_symbol->accept(*this);
  5332                 return NULL;
  2755 				s4o.print(")");
  5333                 
  2756 				IN_param_value->accept(*this);
  5334             }
  2757 				return NULL;
  5335             
  2758 				
  5336             ERROR;
  2759 			}
  5337         }
  2760 			
  5338         
  2761 			ERROR;
  5339     }/*function_uint_to_usint*/
  2762 		}
  5340     break;
  2763 		
  5341 
  2764 	}/*function_dint_to_lword*/
  5342 /****
  2765 	break;
  5343  *UINT_TO_UDINT
  2766 
  5344  */
  2767 /****
  5345     case function_uint_to_udint :
  2768  *DINT_TO_UINT
  5346     {
  2769  */
  5347         symbol_c *last_type_symbol = NULL;
  2770 	case function_dint_to_uint :
  5348 
  2771 	{
  5349         {
  2772 		symbol_c *last_type_symbol = NULL;
  5350             identifier_c param_name("IN");
  2773 
  5351             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2774 		{
  5352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2775 			identifier_c param_name("IN");
  5353             
  2776 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5354             /* Get the value from a foo(<param_value>) style call */
  2777 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5355             if (IN_param_value == NULL)
  2778 			
  5356               IN_param_value = function_call_param_iterator.next();
  2779 			/* Get the value from a foo(<param_value>) style call */
  5357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2780 			if (IN_param_value == NULL)
  5358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2781 			  IN_param_value = function_call_param_iterator.next();
  5359             
  2782 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5360             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  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 ;
  5361             {
  2784 			
  5362         
  2785 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5363                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2786 			{
  5364                 s4o.print("(");
  2787 		
  5365                 return_type_symbol->accept(*this);
  2788 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5366                 s4o.print(")");
  2789 				s4o.print("(");
  5367                 IN_param_value->accept(*this);
  2790 				return_type_symbol->accept(*this);
  5368                 return NULL;
  2791 				s4o.print(")");
  5369                 
  2792 				IN_param_value->accept(*this);
  5370             }
  2793 				return NULL;
  5371             
  2794 				
  5372             ERROR;
  2795 			}
  5373         }
  2796 			
  5374         
  2797 			ERROR;
  5375     }/*function_uint_to_udint*/
  2798 		}
  5376     break;
  2799 		
  5377 
  2800 	}/*function_dint_to_uint*/
  5378 /****
  2801 	break;
  5379  *UINT_TO_ULINT
  2802 
  5380  */
  2803 /****
  5381     case function_uint_to_ulint :
  2804  *DINT_TO_LREAL
  5382     {
  2805  */
  5383         symbol_c *last_type_symbol = NULL;
  2806 	case function_dint_to_lreal :
  5384 
  2807 	{
  5385         {
  2808 		symbol_c *last_type_symbol = NULL;
  5386             identifier_c param_name("IN");
  2809 
  5387             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2810 		{
  5388             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2811 			identifier_c param_name("IN");
  5389             
  2812 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5390             /* Get the value from a foo(<param_value>) style call */
  2813 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5391             if (IN_param_value == NULL)
  2814 			
  5392               IN_param_value = function_call_param_iterator.next();
  2815 			/* Get the value from a foo(<param_value>) style call */
  5393             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2816 			if (IN_param_value == NULL)
  5394             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2817 			  IN_param_value = function_call_param_iterator.next();
  5395             
  2818 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5396             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2819 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5397             {
  2820 			
  5398         
  2821 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5399                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2822 			{
  5400                 s4o.print("(");
  2823 		
  5401                 return_type_symbol->accept(*this);
  2824 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5402                 s4o.print(")");
  2825 				s4o.print("(");
  5403                 IN_param_value->accept(*this);
  2826 				return_type_symbol->accept(*this);
  5404                 return NULL;
  2827 				s4o.print(")");
  5405                 
  2828 				IN_param_value->accept(*this);
  5406             }
  2829 				return NULL;
  5407             
  2830 				
  5408             ERROR;
  2831 			}
  5409         }
  2832 			
  5410         
  2833 			ERROR;
  5411     }/*function_uint_to_ulint*/
  2834 		}
  5412     break;
  2835 		
  5413 
  2836 	}/*function_dint_to_lreal*/
  5414 /****
  2837 	break;
  5415  *UINT_TO_TIME
  2838 
  5416  */
  2839 /****
  5417     case function_uint_to_time :
  2840  *DINT_TO_BYTE
  5418     {
  2841  */
  5419         symbol_c *last_type_symbol = NULL;
  2842 	case function_dint_to_byte :
  5420 
  2843 	{
  5421         {
  2844 		symbol_c *last_type_symbol = NULL;
  5422             identifier_c param_name("IN");
  2845 
  5423             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2846 		{
  5424             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2847 			identifier_c param_name("IN");
  5425             
  2848 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5426             /* Get the value from a foo(<param_value>) style call */
  2849 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5427             if (IN_param_value == NULL)
  2850 			
  5428               IN_param_value = function_call_param_iterator.next();
  2851 			/* Get the value from a foo(<param_value>) style call */
  5429             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2852 			if (IN_param_value == NULL)
  5430             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2853 			  IN_param_value = function_call_param_iterator.next();
  5431             
  2854 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5432             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2855 			last_type_symbol = last_type_symbol && search_expression_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             {
  2856 			
  5434         
  2857 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5435                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2858 			{
  5436                 s4o.print("(");
  2859 		
  5437                 return_type_symbol->accept(*this);
  2860 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5438                 s4o.print(")real_to_time(");
  2861 				s4o.print("(");
  5439                 IN_param_value->accept(*this);
  2862 				return_type_symbol->accept(*this);
  5440                 s4o.print(")");
  2863 				s4o.print(")");
  5441                 return NULL;
  2864 				IN_param_value->accept(*this);
  5442                 
  2865 				return NULL;
  5443             }
  2866 				
  5444             
  2867 			}
  5445             ERROR;
  2868 			
  5446         }
  2869 			ERROR;
  5447         
  2870 		}
  5448     }/*function_uint_to_time*/
  2871 		
  5449     break;
  2872 	}/*function_dint_to_byte*/
  5450 
  2873 	break;
  5451 /****
  2874 
  5452  *UINT_TO_BOOL
  2875 /****
  5453  */
  2876  *DINT_TO_USINT
  5454     case function_uint_to_bool :
  2877  */
  5455     {
  2878 	case function_dint_to_usint :
  5456         symbol_c *last_type_symbol = NULL;
  2879 	{
  5457 
  2880 		symbol_c *last_type_symbol = NULL;
  5458         {
  2881 
  5459             identifier_c param_name("IN");
  2882 		{
  5460             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2883 			identifier_c param_name("IN");
  5461             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2884 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5462             
  2885 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5463             /* Get the value from a foo(<param_value>) style call */
  2886 			
  5464             if (IN_param_value == NULL)
  2887 			/* Get the value from a foo(<param_value>) style call */
  5465               IN_param_value = function_call_param_iterator.next();
  2888 			if (IN_param_value == NULL)
  5466             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2889 			  IN_param_value = function_call_param_iterator.next();
  5467             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2890 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5468             
  2891 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5469             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2892 			
  5470             {
  2893 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5471         
  2894 			{
  5472                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2895 		
  5473                 s4o.print("(");
  2896 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5474                 return_type_symbol->accept(*this);
  2897 				s4o.print("(");
  5475                 s4o.print(")");
  2898 				return_type_symbol->accept(*this);
  5476                 IN_param_value->accept(*this);
  2899 				s4o.print(")");
  5477                 return NULL;
  2900 				IN_param_value->accept(*this);
  5478                 
  2901 				return NULL;
  5479             }
  2902 				
  5480             
  2903 			}
  5481             ERROR;
  2904 			
  5482         }
  2905 			ERROR;
  5483         
  2906 		}
  5484     }/*function_uint_to_bool*/
  2907 		
  5485     break;
  2908 	}/*function_dint_to_usint*/
  5486 
  2909 	break;
  5487 /****
  2910 
  5488  *UINT_TO_BYTE
  2911 /****
  5489  */
  2912  *DINT_TO_ULINT
  5490     case function_uint_to_byte :
  2913  */
  5491     {
  2914 	case function_dint_to_ulint :
  5492         symbol_c *last_type_symbol = NULL;
  2915 	{
  5493 
  2916 		symbol_c *last_type_symbol = NULL;
  5494         {
  2917 
  5495             identifier_c param_name("IN");
  2918 		{
  5496             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2919 			identifier_c param_name("IN");
  5497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2920 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5498             
  2921 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5499             /* Get the value from a foo(<param_value>) style call */
  2922 			
  5500             if (IN_param_value == NULL)
  2923 			/* Get the value from a foo(<param_value>) style call */
  5501               IN_param_value = function_call_param_iterator.next();
  2924 			if (IN_param_value == NULL)
  5502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2925 			  IN_param_value = function_call_param_iterator.next();
  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 ;
  2926 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5504             
  2927 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5505             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2928 			
  5506             {
  2929 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5507         
  2930 			{
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2931 		
  5509                 s4o.print("(");
  2932 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  5510                 return_type_symbol->accept(*this);
  2933 				s4o.print("(");
  5511                 s4o.print(")");
  2934 				return_type_symbol->accept(*this);
  5512                 IN_param_value->accept(*this);
  2935 				s4o.print(")");
  5513                 return NULL;
  2936 				IN_param_value->accept(*this);
  5514                 
  2937 				return NULL;
  5515             }
  2938 				
  5516             
  2939 			}
  5517             ERROR;
  2940 			
  5518         }
  2941 			ERROR;
  5519         
  2942 		}
  5520     }/*function_uint_to_byte*/
  2943 		
  5521     break;
  2944 	}/*function_dint_to_ulint*/
  5522 
  2945 	break;
  5523 /****
  2946 
  5524  *UINT_TO_WORD
  2947 /****
  5525  */
  2948  *DINT_TO_BOOL
  5526     case function_uint_to_word :
  2949  */
  5527     {
  2950 	case function_dint_to_bool :
  5528         symbol_c *last_type_symbol = NULL;
  2951 	{
  5529 
  2952 		symbol_c *last_type_symbol = NULL;
  5530         {
  2953 
  5531             identifier_c param_name("IN");
  2954 		{
  5532             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2955 			identifier_c param_name("IN");
  5533             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2956 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5534             
  2957 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5535             /* Get the value from a foo(<param_value>) style call */
  2958 			
  5536             if (IN_param_value == NULL)
  2959 			/* Get the value from a foo(<param_value>) style call */
  5537               IN_param_value = function_call_param_iterator.next();
  2960 			if (IN_param_value == NULL)
  5538             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2961 			  IN_param_value = function_call_param_iterator.next();
  5539             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2962 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5540             
  2963 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5541             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  2964 			
  5542             {
  2965 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5543         
  2966 			{
  5544                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2967 		
  5545                 s4o.print("(");
  2968 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  5546                 return_type_symbol->accept(*this);
  2969 				s4o.print("(");
  5547                 s4o.print(")");
  2970 				return_type_symbol->accept(*this);
  5548                 IN_param_value->accept(*this);
  2971 				s4o.print(")");
  5549                 return NULL;
  2972 				IN_param_value->accept(*this);
  5550                 
  2973 				return NULL;
  5551             }
  2974 				
  5552             
  2975 			}
  5553             ERROR;
  2976 			
  5554         }
  2977 			ERROR;
  5555         
  2978 		}
  5556     }/*function_uint_to_word*/
  2979 		
  5557     break;
  2980 	}/*function_dint_to_bool*/
  5558 
  2981 	break;
  5559 /****
  2982 
  5560  *UINT_TO_DWORD
  2983 /****
  5561  */
  2984  *DINT_TO_TIME
  5562     case function_uint_to_dword :
  2985  */
  5563     {
  2986 	case function_dint_to_time :
  5564         symbol_c *last_type_symbol = NULL;
  2987 	{
  5565 
  2988 		symbol_c *last_type_symbol = NULL;
  5566         {
  2989 
  5567             identifier_c param_name("IN");
  2990 		{
  5568             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2991 			identifier_c param_name("IN");
  5569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2992 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5570             
  2993 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5571             /* Get the value from a foo(<param_value>) style call */
  2994 			
  5572             if (IN_param_value == NULL)
  2995 			/* Get the value from a foo(<param_value>) style call */
  5573               IN_param_value = function_call_param_iterator.next();
  2996 			if (IN_param_value == NULL)
  5574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2997 			  IN_param_value = function_call_param_iterator.next();
  5575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2998 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5576             
  2999 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5577             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3000 			
  5578             {
  3001 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5579         
  3002 			{
  5580                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3003 		
  5581                 s4o.print("(");
  3004 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5582                 return_type_symbol->accept(*this);
  3005 				s4o.print("(");
  5583                 s4o.print(")");
  3006 				return_type_symbol->accept(*this);
  5584                 IN_param_value->accept(*this);
  3007 				s4o.print(")time_to_real(");
  5585                 return NULL;
  3008 				IN_param_value->accept(*this);
  5586                 
  3009 				s4o.print(")");
  5587             }
  3010 				return NULL;
  5588             
  3011 				
  5589             ERROR;
  3012 			}
  5590         }
  3013 			
  5591         
  3014 			ERROR;
  5592     }/*function_uint_to_dword*/
  3015 		}
  5593     break;
  3016 		
  5594 
  3017 	}/*function_dint_to_time*/
  5595 /****
  3018 	break;
  5596  *UINT_TO_LWORD
  3019 
  5597  */
  3020 /****
  5598     case function_uint_to_lword :
  3021  *DINT_TO_INT
  5599     {
  3022  */
  5600         symbol_c *last_type_symbol = NULL;
  3023 	case function_dint_to_int :
  5601 
  3024 	{
  5602         {
  3025 		symbol_c *last_type_symbol = NULL;
  5603             identifier_c param_name("IN");
  3026 
  5604             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3027 		{
  5605             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3028 			identifier_c param_name("IN");
  5606             
  3029 			/* Get the value from a foo(<param_name> = <param_value>) style call */
  5607             /* Get the value from a foo(<param_value>) style call */
  3030 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5608             if (IN_param_value == NULL)
  3031 			
  5609               IN_param_value = function_call_param_iterator.next();
  3032 			/* Get the value from a foo(<param_value>) style call */
  5610             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3033 			if (IN_param_value == NULL)
  5611             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3034 			  IN_param_value = function_call_param_iterator.next();
  5612             
  3035 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5613             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3036 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5614             {
  3037 			
  5615         
  3038 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  5616                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3039 			{
  5617                 s4o.print("(");
  3040 		
  5618                 return_type_symbol->accept(*this);
  3041 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  5619                 s4o.print(")");
  3042 				s4o.print("(");
  5620                 IN_param_value->accept(*this);
  3043 				return_type_symbol->accept(*this);
  5621                 return NULL;
  3044 				s4o.print(")");
  5622                 
  3045 				IN_param_value->accept(*this);
  5623             }
  3046 				return NULL;
  5624             
  3047 				
  5625             ERROR;
  3048 			}
  5626         }
  3049 			
  5627         
  3050 			ERROR;
  5628     }/*function_uint_to_lword*/
  3051 		}
  5629     break;
  3052 		
  5630 
  3053 	}/*function_dint_to_int*/
  5631 /****
  3054 	break;
  5632  *UINT_TO_STRING
       
  5633  */
       
  5634     case function_uint_to_string :
       
  5635     {
       
  5636         symbol_c *last_type_symbol = NULL;
       
  5637 
       
  5638         {
       
  5639             identifier_c param_name("IN");
       
  5640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5642             
       
  5643             /* Get the value from a foo(<param_value>) style call */
       
  5644             if (IN_param_value == NULL)
       
  5645               IN_param_value = function_call_param_iterator.next();
       
  5646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5648             
       
  5649             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5650             {
       
  5651         
       
  5652                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5653                 s4o.print("(");
       
  5654                 return_type_symbol->accept(*this);
       
  5655                 s4o.print(")int_to_string(");
       
  5656                 IN_param_value->accept(*this);
       
  5657                 s4o.print(", 10)");
       
  5658                 return NULL;
       
  5659                 
       
  5660             }
       
  5661             
       
  5662             ERROR;
       
  5663         }
       
  5664         
       
  5665     }/*function_uint_to_string*/
       
  5666     break;
       
  5667 
       
  5668 /****
       
  5669  *UINT_TO_WSTRING
       
  5670  */
       
  5671     case function_uint_to_wstring :
       
  5672     {
       
  5673         symbol_c *last_type_symbol = NULL;
       
  5674 
       
  5675         {
       
  5676             identifier_c param_name("IN");
       
  5677             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5678             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5679             
       
  5680             /* Get the value from a foo(<param_value>) style call */
       
  5681             if (IN_param_value == NULL)
       
  5682               IN_param_value = function_call_param_iterator.next();
       
  5683             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5684             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5685             
       
  5686             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5687             {
       
  5688         
       
  5689                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5690                 s4o.print("(");
       
  5691                 return_type_symbol->accept(*this);
       
  5692                 s4o.print(")int_to_string(");
       
  5693                 IN_param_value->accept(*this);
       
  5694                 s4o.print(", 10)");
       
  5695                 return NULL;
       
  5696                 
       
  5697             }
       
  5698             
       
  5699             ERROR;
       
  5700         }
       
  5701         
       
  5702     }/*function_uint_to_wstring*/
       
  5703     break;
       
  5704 
       
  5705 /****
       
  5706  *UINT_TO_DATE
       
  5707  */
       
  5708     case function_uint_to_date :
       
  5709     {
       
  5710         symbol_c *last_type_symbol = NULL;
       
  5711 
       
  5712         {
       
  5713             identifier_c param_name("IN");
       
  5714             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5715             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5716             
       
  5717             /* Get the value from a foo(<param_value>) style call */
       
  5718             if (IN_param_value == NULL)
       
  5719               IN_param_value = function_call_param_iterator.next();
       
  5720             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5721             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5722             
       
  5723             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5724             {
       
  5725         
       
  5726                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5727                 s4o.print("(");
       
  5728                 return_type_symbol->accept(*this);
       
  5729                 s4o.print(")real_to_time(");
       
  5730                 IN_param_value->accept(*this);
       
  5731                 s4o.print(")");
       
  5732                 return NULL;
       
  5733                 
       
  5734             }
       
  5735             
       
  5736             ERROR;
       
  5737         }
       
  5738         
       
  5739     }/*function_uint_to_date*/
       
  5740     break;
       
  5741 
       
  5742 /****
       
  5743  *UINT_TO_TOD
       
  5744  */
       
  5745     case function_uint_to_tod :
       
  5746     {
       
  5747         symbol_c *last_type_symbol = NULL;
       
  5748 
       
  5749         {
       
  5750             identifier_c param_name("IN");
       
  5751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5752             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5753             
       
  5754             /* Get the value from a foo(<param_value>) style call */
       
  5755             if (IN_param_value == NULL)
       
  5756               IN_param_value = function_call_param_iterator.next();
       
  5757             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5758             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5759             
       
  5760             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5761             {
       
  5762         
       
  5763                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5764                 s4o.print("(");
       
  5765                 return_type_symbol->accept(*this);
       
  5766                 s4o.print(")real_to_time(");
       
  5767                 IN_param_value->accept(*this);
       
  5768                 s4o.print(")");
       
  5769                 return NULL;
       
  5770                 
       
  5771             }
       
  5772             
       
  5773             ERROR;
       
  5774         }
       
  5775         
       
  5776     }/*function_uint_to_tod*/
       
  5777     break;
       
  5778 
       
  5779 /****
       
  5780  *UINT_TO_DT
       
  5781  */
       
  5782     case function_uint_to_dt :
       
  5783     {
       
  5784         symbol_c *last_type_symbol = NULL;
       
  5785 
       
  5786         {
       
  5787             identifier_c param_name("IN");
       
  5788             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5789             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5790             
       
  5791             /* Get the value from a foo(<param_value>) style call */
       
  5792             if (IN_param_value == NULL)
       
  5793               IN_param_value = function_call_param_iterator.next();
       
  5794             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5795             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5796             
       
  5797             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5798             {
       
  5799         
       
  5800                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5801                 s4o.print("(");
       
  5802                 return_type_symbol->accept(*this);
       
  5803                 s4o.print(")real_to_time(");
       
  5804                 IN_param_value->accept(*this);
       
  5805                 s4o.print(")");
       
  5806                 return NULL;
       
  5807                 
       
  5808             }
       
  5809             
       
  5810             ERROR;
       
  5811         }
       
  5812         
       
  5813     }/*function_uint_to_dt*/
       
  5814     break;
       
  5815 
       
  5816 /****
       
  5817  *UDINT_TO_REAL
       
  5818  */
       
  5819     case function_udint_to_real :
       
  5820     {
       
  5821         symbol_c *last_type_symbol = NULL;
       
  5822 
       
  5823         {
       
  5824             identifier_c param_name("IN");
       
  5825             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5826             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5827             
       
  5828             /* Get the value from a foo(<param_value>) style call */
       
  5829             if (IN_param_value == NULL)
       
  5830               IN_param_value = function_call_param_iterator.next();
       
  5831             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5832             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5833             
       
  5834             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5835             {
       
  5836         
       
  5837                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5838                 s4o.print("(");
       
  5839                 return_type_symbol->accept(*this);
       
  5840                 s4o.print(")");
       
  5841                 IN_param_value->accept(*this);
       
  5842                 return NULL;
       
  5843                 
       
  5844             }
       
  5845             
       
  5846             ERROR;
       
  5847         }
       
  5848         
       
  5849     }/*function_udint_to_real*/
       
  5850     break;
       
  5851 
       
  5852 /****
       
  5853  *UDINT_TO_LREAL
       
  5854  */
       
  5855     case function_udint_to_lreal :
       
  5856     {
       
  5857         symbol_c *last_type_symbol = NULL;
       
  5858 
       
  5859         {
       
  5860             identifier_c param_name("IN");
       
  5861             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5862             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5863             
       
  5864             /* Get the value from a foo(<param_value>) style call */
       
  5865             if (IN_param_value == NULL)
       
  5866               IN_param_value = function_call_param_iterator.next();
       
  5867             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5868             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5869             
       
  5870             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5871             {
       
  5872         
       
  5873                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5874                 s4o.print("(");
       
  5875                 return_type_symbol->accept(*this);
       
  5876                 s4o.print(")");
       
  5877                 IN_param_value->accept(*this);
       
  5878                 return NULL;
       
  5879                 
       
  5880             }
       
  5881             
       
  5882             ERROR;
       
  5883         }
       
  5884         
       
  5885     }/*function_udint_to_lreal*/
       
  5886     break;
       
  5887 
       
  5888 /****
       
  5889  *UDINT_TO_SINT
       
  5890  */
       
  5891     case function_udint_to_sint :
       
  5892     {
       
  5893         symbol_c *last_type_symbol = NULL;
       
  5894 
       
  5895         {
       
  5896             identifier_c param_name("IN");
       
  5897             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5898             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5899             
       
  5900             /* Get the value from a foo(<param_value>) style call */
       
  5901             if (IN_param_value == NULL)
       
  5902               IN_param_value = function_call_param_iterator.next();
       
  5903             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5904             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5905             
       
  5906             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5907             {
       
  5908         
       
  5909                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5910                 s4o.print("(");
       
  5911                 return_type_symbol->accept(*this);
       
  5912                 s4o.print(")");
       
  5913                 IN_param_value->accept(*this);
       
  5914                 return NULL;
       
  5915                 
       
  5916             }
       
  5917             
       
  5918             ERROR;
       
  5919         }
       
  5920         
       
  5921     }/*function_udint_to_sint*/
       
  5922     break;
       
  5923 
       
  5924 /****
       
  5925  *UDINT_TO_INT
       
  5926  */
       
  5927     case function_udint_to_int :
       
  5928     {
       
  5929         symbol_c *last_type_symbol = NULL;
       
  5930 
       
  5931         {
       
  5932             identifier_c param_name("IN");
       
  5933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5934             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5935             
       
  5936             /* Get the value from a foo(<param_value>) style call */
       
  5937             if (IN_param_value == NULL)
       
  5938               IN_param_value = function_call_param_iterator.next();
       
  5939             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5940             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5941             
       
  5942             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5943             {
       
  5944         
       
  5945                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5946                 s4o.print("(");
       
  5947                 return_type_symbol->accept(*this);
       
  5948                 s4o.print(")");
       
  5949                 IN_param_value->accept(*this);
       
  5950                 return NULL;
       
  5951                 
       
  5952             }
       
  5953             
       
  5954             ERROR;
       
  5955         }
       
  5956         
       
  5957     }/*function_udint_to_int*/
       
  5958     break;
       
  5959 
       
  5960 /****
       
  5961  *UDINT_TO_DINT
       
  5962  */
       
  5963     case function_udint_to_dint :
       
  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::dint_type_name;
       
  5982                 s4o.print("(");
       
  5983                 return_type_symbol->accept(*this);
       
  5984                 s4o.print(")");
       
  5985                 IN_param_value->accept(*this);
       
  5986                 return NULL;
       
  5987                 
       
  5988             }
       
  5989             
       
  5990             ERROR;
       
  5991         }
       
  5992         
       
  5993     }/*function_udint_to_dint*/
       
  5994     break;
       
  5995 
       
  5996 /****
       
  5997  *UDINT_TO_LINT
       
  5998  */
       
  5999     case function_udint_to_lint :
       
  6000     {
       
  6001         symbol_c *last_type_symbol = NULL;
       
  6002 
       
  6003         {
       
  6004             identifier_c param_name("IN");
       
  6005             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6006             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6007             
       
  6008             /* Get the value from a foo(<param_value>) style call */
       
  6009             if (IN_param_value == NULL)
       
  6010               IN_param_value = function_call_param_iterator.next();
       
  6011             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6012             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6013             
       
  6014             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6015             {
       
  6016         
       
  6017                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6018                 s4o.print("(");
       
  6019                 return_type_symbol->accept(*this);
       
  6020                 s4o.print(")");
       
  6021                 IN_param_value->accept(*this);
       
  6022                 return NULL;
       
  6023                 
       
  6024             }
       
  6025             
       
  6026             ERROR;
       
  6027         }
       
  6028         
       
  6029     }/*function_udint_to_lint*/
       
  6030     break;
       
  6031 
       
  6032 /****
       
  6033  *UDINT_TO_USINT
       
  6034  */
       
  6035     case function_udint_to_usint :
       
  6036     {
       
  6037         symbol_c *last_type_symbol = NULL;
       
  6038 
       
  6039         {
       
  6040             identifier_c param_name("IN");
       
  6041             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6042             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6043             
       
  6044             /* Get the value from a foo(<param_value>) style call */
       
  6045             if (IN_param_value == NULL)
       
  6046               IN_param_value = function_call_param_iterator.next();
       
  6047             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6048             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6049             
       
  6050             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6051             {
       
  6052         
       
  6053                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6054                 s4o.print("(");
       
  6055                 return_type_symbol->accept(*this);
       
  6056                 s4o.print(")");
       
  6057                 IN_param_value->accept(*this);
       
  6058                 return NULL;
       
  6059                 
       
  6060             }
       
  6061             
       
  6062             ERROR;
       
  6063         }
       
  6064         
       
  6065     }/*function_udint_to_usint*/
       
  6066     break;
       
  6067 
       
  6068 /****
       
  6069  *UDINT_TO_UINT
       
  6070  */
       
  6071     case function_udint_to_uint :
       
  6072     {
       
  6073         symbol_c *last_type_symbol = NULL;
       
  6074 
       
  6075         {
       
  6076             identifier_c param_name("IN");
       
  6077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6079             
       
  6080             /* Get the value from a foo(<param_value>) style call */
       
  6081             if (IN_param_value == NULL)
       
  6082               IN_param_value = function_call_param_iterator.next();
       
  6083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6084             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6085             
       
  6086             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6087             {
       
  6088         
       
  6089                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6090                 s4o.print("(");
       
  6091                 return_type_symbol->accept(*this);
       
  6092                 s4o.print(")");
       
  6093                 IN_param_value->accept(*this);
       
  6094                 return NULL;
       
  6095                 
       
  6096             }
       
  6097             
       
  6098             ERROR;
       
  6099         }
       
  6100         
       
  6101     }/*function_udint_to_uint*/
       
  6102     break;
       
  6103 
       
  6104 /****
       
  6105  *UDINT_TO_ULINT
       
  6106  */
       
  6107     case function_udint_to_ulint :
       
  6108     {
       
  6109         symbol_c *last_type_symbol = NULL;
       
  6110 
       
  6111         {
       
  6112             identifier_c param_name("IN");
       
  6113             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6114             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6115             
       
  6116             /* Get the value from a foo(<param_value>) style call */
       
  6117             if (IN_param_value == NULL)
       
  6118               IN_param_value = function_call_param_iterator.next();
       
  6119             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6120             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6121             
       
  6122             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6123             {
       
  6124         
       
  6125                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6126                 s4o.print("(");
       
  6127                 return_type_symbol->accept(*this);
       
  6128                 s4o.print(")");
       
  6129                 IN_param_value->accept(*this);
       
  6130                 return NULL;
       
  6131                 
       
  6132             }
       
  6133             
       
  6134             ERROR;
       
  6135         }
       
  6136         
       
  6137     }/*function_udint_to_ulint*/
       
  6138     break;
       
  6139 
       
  6140 /****
       
  6141  *UDINT_TO_TIME
       
  6142  */
       
  6143     case function_udint_to_time :
       
  6144     {
       
  6145         symbol_c *last_type_symbol = NULL;
       
  6146 
       
  6147         {
       
  6148             identifier_c param_name("IN");
       
  6149             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6150             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6151             
       
  6152             /* Get the value from a foo(<param_value>) style call */
       
  6153             if (IN_param_value == NULL)
       
  6154               IN_param_value = function_call_param_iterator.next();
       
  6155             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6156             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6157             
       
  6158             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6159             {
       
  6160         
       
  6161                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6162                 s4o.print("(");
       
  6163                 return_type_symbol->accept(*this);
       
  6164                 s4o.print(")real_to_time(");
       
  6165                 IN_param_value->accept(*this);
       
  6166                 s4o.print(")");
       
  6167                 return NULL;
       
  6168                 
       
  6169             }
       
  6170             
       
  6171             ERROR;
       
  6172         }
       
  6173         
       
  6174     }/*function_udint_to_time*/
       
  6175     break;
       
  6176 
       
  6177 /****
       
  6178  *UDINT_TO_BOOL
       
  6179  */
       
  6180     case function_udint_to_bool :
       
  6181     {
       
  6182         symbol_c *last_type_symbol = NULL;
       
  6183 
       
  6184         {
       
  6185             identifier_c param_name("IN");
       
  6186             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6187             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6188             
       
  6189             /* Get the value from a foo(<param_value>) style call */
       
  6190             if (IN_param_value == NULL)
       
  6191               IN_param_value = function_call_param_iterator.next();
       
  6192             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6193             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6194             
       
  6195             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6196             {
       
  6197         
       
  6198                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6199                 s4o.print("(");
       
  6200                 return_type_symbol->accept(*this);
       
  6201                 s4o.print(")");
       
  6202                 IN_param_value->accept(*this);
       
  6203                 return NULL;
       
  6204                 
       
  6205             }
       
  6206             
       
  6207             ERROR;
       
  6208         }
       
  6209         
       
  6210     }/*function_udint_to_bool*/
       
  6211     break;
       
  6212 
       
  6213 /****
       
  6214  *UDINT_TO_BYTE
       
  6215  */
       
  6216     case function_udint_to_byte :
       
  6217     {
       
  6218         symbol_c *last_type_symbol = NULL;
       
  6219 
       
  6220         {
       
  6221             identifier_c param_name("IN");
       
  6222             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6223             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6224             
       
  6225             /* Get the value from a foo(<param_value>) style call */
       
  6226             if (IN_param_value == NULL)
       
  6227               IN_param_value = function_call_param_iterator.next();
       
  6228             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6229             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6230             
       
  6231             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6232             {
       
  6233         
       
  6234                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6235                 s4o.print("(");
       
  6236                 return_type_symbol->accept(*this);
       
  6237                 s4o.print(")");
       
  6238                 IN_param_value->accept(*this);
       
  6239                 return NULL;
       
  6240                 
       
  6241             }
       
  6242             
       
  6243             ERROR;
       
  6244         }
       
  6245         
       
  6246     }/*function_udint_to_byte*/
       
  6247     break;
       
  6248 
       
  6249 /****
       
  6250  *UDINT_TO_WORD
       
  6251  */
       
  6252     case function_udint_to_word :
       
  6253     {
       
  6254         symbol_c *last_type_symbol = NULL;
       
  6255 
       
  6256         {
       
  6257             identifier_c param_name("IN");
       
  6258             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6259             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6260             
       
  6261             /* Get the value from a foo(<param_value>) style call */
       
  6262             if (IN_param_value == NULL)
       
  6263               IN_param_value = function_call_param_iterator.next();
       
  6264             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6265             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6266             
       
  6267             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6268             {
       
  6269         
       
  6270                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6271                 s4o.print("(");
       
  6272                 return_type_symbol->accept(*this);
       
  6273                 s4o.print(")");
       
  6274                 IN_param_value->accept(*this);
       
  6275                 return NULL;
       
  6276                 
       
  6277             }
       
  6278             
       
  6279             ERROR;
       
  6280         }
       
  6281         
       
  6282     }/*function_udint_to_word*/
       
  6283     break;
       
  6284 
       
  6285 /****
       
  6286  *UDINT_TO_DWORD
       
  6287  */
       
  6288     case function_udint_to_dword :
       
  6289     {
       
  6290         symbol_c *last_type_symbol = NULL;
       
  6291 
       
  6292         {
       
  6293             identifier_c param_name("IN");
       
  6294             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6295             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6296             
       
  6297             /* Get the value from a foo(<param_value>) style call */
       
  6298             if (IN_param_value == NULL)
       
  6299               IN_param_value = function_call_param_iterator.next();
       
  6300             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6301             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6302             
       
  6303             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6304             {
       
  6305         
       
  6306                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6307                 s4o.print("(");
       
  6308                 return_type_symbol->accept(*this);
       
  6309                 s4o.print(")");
       
  6310                 IN_param_value->accept(*this);
       
  6311                 return NULL;
       
  6312                 
       
  6313             }
       
  6314             
       
  6315             ERROR;
       
  6316         }
       
  6317         
       
  6318     }/*function_udint_to_dword*/
       
  6319     break;
       
  6320 
       
  6321 /****
       
  6322  *UDINT_TO_LWORD
       
  6323  */
       
  6324     case function_udint_to_lword :
       
  6325     {
       
  6326         symbol_c *last_type_symbol = NULL;
       
  6327 
       
  6328         {
       
  6329             identifier_c param_name("IN");
       
  6330             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6331             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6332             
       
  6333             /* Get the value from a foo(<param_value>) style call */
       
  6334             if (IN_param_value == NULL)
       
  6335               IN_param_value = function_call_param_iterator.next();
       
  6336             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6337             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6338             
       
  6339             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6340             {
       
  6341         
       
  6342                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6343                 s4o.print("(");
       
  6344                 return_type_symbol->accept(*this);
       
  6345                 s4o.print(")");
       
  6346                 IN_param_value->accept(*this);
       
  6347                 return NULL;
       
  6348                 
       
  6349             }
       
  6350             
       
  6351             ERROR;
       
  6352         }
       
  6353         
       
  6354     }/*function_udint_to_lword*/
       
  6355     break;
       
  6356 
       
  6357 /****
       
  6358  *UDINT_TO_STRING
       
  6359  */
       
  6360     case function_udint_to_string :
       
  6361     {
       
  6362         symbol_c *last_type_symbol = NULL;
       
  6363 
       
  6364         {
       
  6365             identifier_c param_name("IN");
       
  6366             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6367             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6368             
       
  6369             /* Get the value from a foo(<param_value>) style call */
       
  6370             if (IN_param_value == NULL)
       
  6371               IN_param_value = function_call_param_iterator.next();
       
  6372             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6373             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6374             
       
  6375             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6376             {
       
  6377         
       
  6378                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6379                 s4o.print("(");
       
  6380                 return_type_symbol->accept(*this);
       
  6381                 s4o.print(")int_to_string(");
       
  6382                 IN_param_value->accept(*this);
       
  6383                 s4o.print(", 10)");
       
  6384                 return NULL;
       
  6385                 
       
  6386             }
       
  6387             
       
  6388             ERROR;
       
  6389         }
       
  6390         
       
  6391     }/*function_udint_to_string*/
       
  6392     break;
       
  6393 
       
  6394 /****
       
  6395  *UDINT_TO_WSTRING
       
  6396  */
       
  6397     case function_udint_to_wstring :
       
  6398     {
       
  6399         symbol_c *last_type_symbol = NULL;
       
  6400 
       
  6401         {
       
  6402             identifier_c param_name("IN");
       
  6403             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6404             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6405             
       
  6406             /* Get the value from a foo(<param_value>) style call */
       
  6407             if (IN_param_value == NULL)
       
  6408               IN_param_value = function_call_param_iterator.next();
       
  6409             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6410             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6411             
       
  6412             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6413             {
       
  6414         
       
  6415                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6416                 s4o.print("(");
       
  6417                 return_type_symbol->accept(*this);
       
  6418                 s4o.print(")int_to_string(");
       
  6419                 IN_param_value->accept(*this);
       
  6420                 s4o.print(", 10)");
       
  6421                 return NULL;
       
  6422                 
       
  6423             }
       
  6424             
       
  6425             ERROR;
       
  6426         }
       
  6427         
       
  6428     }/*function_udint_to_wstring*/
       
  6429     break;
       
  6430 
       
  6431 /****
       
  6432  *UDINT_TO_DATE
       
  6433  */
       
  6434     case function_udint_to_date :
       
  6435     {
       
  6436         symbol_c *last_type_symbol = NULL;
       
  6437 
       
  6438         {
       
  6439             identifier_c param_name("IN");
       
  6440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6442             
       
  6443             /* Get the value from a foo(<param_value>) style call */
       
  6444             if (IN_param_value == NULL)
       
  6445               IN_param_value = function_call_param_iterator.next();
       
  6446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6448             
       
  6449             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6450             {
       
  6451         
       
  6452                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6453                 s4o.print("(");
       
  6454                 return_type_symbol->accept(*this);
       
  6455                 s4o.print(")real_to_time(");
       
  6456                 IN_param_value->accept(*this);
       
  6457                 s4o.print(")");
       
  6458                 return NULL;
       
  6459                 
       
  6460             }
       
  6461             
       
  6462             ERROR;
       
  6463         }
       
  6464         
       
  6465     }/*function_udint_to_date*/
       
  6466     break;
       
  6467 
       
  6468 /****
       
  6469  *UDINT_TO_TOD
       
  6470  */
       
  6471     case function_udint_to_tod :
       
  6472     {
       
  6473         symbol_c *last_type_symbol = NULL;
       
  6474 
       
  6475         {
       
  6476             identifier_c param_name("IN");
       
  6477             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6478             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6479             
       
  6480             /* Get the value from a foo(<param_value>) style call */
       
  6481             if (IN_param_value == NULL)
       
  6482               IN_param_value = function_call_param_iterator.next();
       
  6483             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6484             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6485             
       
  6486             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6487             {
       
  6488         
       
  6489                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6490                 s4o.print("(");
       
  6491                 return_type_symbol->accept(*this);
       
  6492                 s4o.print(")real_to_time(");
       
  6493                 IN_param_value->accept(*this);
       
  6494                 s4o.print(")");
       
  6495                 return NULL;
       
  6496                 
       
  6497             }
       
  6498             
       
  6499             ERROR;
       
  6500         }
       
  6501         
       
  6502     }/*function_udint_to_tod*/
       
  6503     break;
       
  6504 
       
  6505 /****
       
  6506  *UDINT_TO_DT
       
  6507  */
       
  6508     case function_udint_to_dt :
       
  6509     {
       
  6510         symbol_c *last_type_symbol = NULL;
       
  6511 
       
  6512         {
       
  6513             identifier_c param_name("IN");
       
  6514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6515             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6516             
       
  6517             /* Get the value from a foo(<param_value>) style call */
       
  6518             if (IN_param_value == NULL)
       
  6519               IN_param_value = function_call_param_iterator.next();
       
  6520             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6521             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6522             
       
  6523             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6524             {
       
  6525         
       
  6526                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6527                 s4o.print("(");
       
  6528                 return_type_symbol->accept(*this);
       
  6529                 s4o.print(")real_to_time(");
       
  6530                 IN_param_value->accept(*this);
       
  6531                 s4o.print(")");
       
  6532                 return NULL;
       
  6533                 
       
  6534             }
       
  6535             
       
  6536             ERROR;
       
  6537         }
       
  6538         
       
  6539     }/*function_udint_to_dt*/
       
  6540     break;
       
  6541 
       
  6542 /****
       
  6543  *ULINT_TO_REAL
       
  6544  */
       
  6545     case function_ulint_to_real :
       
  6546     {
       
  6547         symbol_c *last_type_symbol = NULL;
       
  6548 
       
  6549         {
       
  6550             identifier_c param_name("IN");
       
  6551             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6552             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6553             
       
  6554             /* Get the value from a foo(<param_value>) style call */
       
  6555             if (IN_param_value == NULL)
       
  6556               IN_param_value = function_call_param_iterator.next();
       
  6557             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6558             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6559             
       
  6560             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6561             {
       
  6562         
       
  6563                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6564                 s4o.print("(");
       
  6565                 return_type_symbol->accept(*this);
       
  6566                 s4o.print(")");
       
  6567                 IN_param_value->accept(*this);
       
  6568                 return NULL;
       
  6569                 
       
  6570             }
       
  6571             
       
  6572             ERROR;
       
  6573         }
       
  6574         
       
  6575     }/*function_ulint_to_real*/
       
  6576     break;
       
  6577 
       
  6578 /****
       
  6579  *ULINT_TO_LREAL
       
  6580  */
       
  6581     case function_ulint_to_lreal :
       
  6582     {
       
  6583         symbol_c *last_type_symbol = NULL;
       
  6584 
       
  6585         {
       
  6586             identifier_c param_name("IN");
       
  6587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6588             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6589             
       
  6590             /* Get the value from a foo(<param_value>) style call */
       
  6591             if (IN_param_value == NULL)
       
  6592               IN_param_value = function_call_param_iterator.next();
       
  6593             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6594             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6595             
       
  6596             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6597             {
       
  6598         
       
  6599                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6600                 s4o.print("(");
       
  6601                 return_type_symbol->accept(*this);
       
  6602                 s4o.print(")");
       
  6603                 IN_param_value->accept(*this);
       
  6604                 return NULL;
       
  6605                 
       
  6606             }
       
  6607             
       
  6608             ERROR;
       
  6609         }
       
  6610         
       
  6611     }/*function_ulint_to_lreal*/
       
  6612     break;
       
  6613 
       
  6614 /****
       
  6615  *ULINT_TO_SINT
       
  6616  */
       
  6617     case function_ulint_to_sint :
       
  6618     {
       
  6619         symbol_c *last_type_symbol = NULL;
       
  6620 
       
  6621         {
       
  6622             identifier_c param_name("IN");
       
  6623             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6624             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6625             
       
  6626             /* Get the value from a foo(<param_value>) style call */
       
  6627             if (IN_param_value == NULL)
       
  6628               IN_param_value = function_call_param_iterator.next();
       
  6629             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6630             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6631             
       
  6632             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6633             {
       
  6634         
       
  6635                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6636                 s4o.print("(");
       
  6637                 return_type_symbol->accept(*this);
       
  6638                 s4o.print(")");
       
  6639                 IN_param_value->accept(*this);
       
  6640                 return NULL;
       
  6641                 
       
  6642             }
       
  6643             
       
  6644             ERROR;
       
  6645         }
       
  6646         
       
  6647     }/*function_ulint_to_sint*/
       
  6648     break;
       
  6649 
       
  6650 /****
       
  6651  *ULINT_TO_INT
       
  6652  */
       
  6653     case function_ulint_to_int :
       
  6654     {
       
  6655         symbol_c *last_type_symbol = NULL;
       
  6656 
       
  6657         {
       
  6658             identifier_c param_name("IN");
       
  6659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6660             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6661             
       
  6662             /* Get the value from a foo(<param_value>) style call */
       
  6663             if (IN_param_value == NULL)
       
  6664               IN_param_value = function_call_param_iterator.next();
       
  6665             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6666             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6667             
       
  6668             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6669             {
       
  6670         
       
  6671                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6672                 s4o.print("(");
       
  6673                 return_type_symbol->accept(*this);
       
  6674                 s4o.print(")");
       
  6675                 IN_param_value->accept(*this);
       
  6676                 return NULL;
       
  6677                 
       
  6678             }
       
  6679             
       
  6680             ERROR;
       
  6681         }
       
  6682         
       
  6683     }/*function_ulint_to_int*/
       
  6684     break;
       
  6685 
       
  6686 /****
       
  6687  *ULINT_TO_DINT
       
  6688  */
       
  6689     case function_ulint_to_dint :
       
  6690     {
       
  6691         symbol_c *last_type_symbol = NULL;
       
  6692 
       
  6693         {
       
  6694             identifier_c param_name("IN");
       
  6695             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6696             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6697             
       
  6698             /* Get the value from a foo(<param_value>) style call */
       
  6699             if (IN_param_value == NULL)
       
  6700               IN_param_value = function_call_param_iterator.next();
       
  6701             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6702             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6703             
       
  6704             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6705             {
       
  6706         
       
  6707                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6708                 s4o.print("(");
       
  6709                 return_type_symbol->accept(*this);
       
  6710                 s4o.print(")");
       
  6711                 IN_param_value->accept(*this);
       
  6712                 return NULL;
       
  6713                 
       
  6714             }
       
  6715             
       
  6716             ERROR;
       
  6717         }
       
  6718         
       
  6719     }/*function_ulint_to_dint*/
       
  6720     break;
       
  6721 
       
  6722 /****
       
  6723  *ULINT_TO_LINT
       
  6724  */
       
  6725     case function_ulint_to_lint :
       
  6726     {
       
  6727         symbol_c *last_type_symbol = NULL;
       
  6728 
       
  6729         {
       
  6730             identifier_c param_name("IN");
       
  6731             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6732             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6733             
       
  6734             /* Get the value from a foo(<param_value>) style call */
       
  6735             if (IN_param_value == NULL)
       
  6736               IN_param_value = function_call_param_iterator.next();
       
  6737             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6738             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6739             
       
  6740             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6741             {
       
  6742         
       
  6743                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6744                 s4o.print("(");
       
  6745                 return_type_symbol->accept(*this);
       
  6746                 s4o.print(")");
       
  6747                 IN_param_value->accept(*this);
       
  6748                 return NULL;
       
  6749                 
       
  6750             }
       
  6751             
       
  6752             ERROR;
       
  6753         }
       
  6754         
       
  6755     }/*function_ulint_to_lint*/
       
  6756     break;
       
  6757 
       
  6758 /****
       
  6759  *ULINT_TO_USINT
       
  6760  */
       
  6761     case function_ulint_to_usint :
       
  6762     {
       
  6763         symbol_c *last_type_symbol = NULL;
       
  6764 
       
  6765         {
       
  6766             identifier_c param_name("IN");
       
  6767             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6768             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6769             
       
  6770             /* Get the value from a foo(<param_value>) style call */
       
  6771             if (IN_param_value == NULL)
       
  6772               IN_param_value = function_call_param_iterator.next();
       
  6773             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6774             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6775             
       
  6776             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6777             {
       
  6778         
       
  6779                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6780                 s4o.print("(");
       
  6781                 return_type_symbol->accept(*this);
       
  6782                 s4o.print(")");
       
  6783                 IN_param_value->accept(*this);
       
  6784                 return NULL;
       
  6785                 
       
  6786             }
       
  6787             
       
  6788             ERROR;
       
  6789         }
       
  6790         
       
  6791     }/*function_ulint_to_usint*/
       
  6792     break;
       
  6793 
       
  6794 /****
       
  6795  *ULINT_TO_UINT
       
  6796  */
       
  6797     case function_ulint_to_uint :
       
  6798     {
       
  6799         symbol_c *last_type_symbol = NULL;
       
  6800 
       
  6801         {
       
  6802             identifier_c param_name("IN");
       
  6803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6804             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6805             
       
  6806             /* Get the value from a foo(<param_value>) style call */
       
  6807             if (IN_param_value == NULL)
       
  6808               IN_param_value = function_call_param_iterator.next();
       
  6809             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6810             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6811             
       
  6812             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6813             {
       
  6814         
       
  6815                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6816                 s4o.print("(");
       
  6817                 return_type_symbol->accept(*this);
       
  6818                 s4o.print(")");
       
  6819                 IN_param_value->accept(*this);
       
  6820                 return NULL;
       
  6821                 
       
  6822             }
       
  6823             
       
  6824             ERROR;
       
  6825         }
       
  6826         
       
  6827     }/*function_ulint_to_uint*/
       
  6828     break;
       
  6829 
       
  6830 /****
       
  6831  *ULINT_TO_UDINT
       
  6832  */
       
  6833     case function_ulint_to_udint :
       
  6834     {
       
  6835         symbol_c *last_type_symbol = NULL;
       
  6836 
       
  6837         {
       
  6838             identifier_c param_name("IN");
       
  6839             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6840             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6841             
       
  6842             /* Get the value from a foo(<param_value>) style call */
       
  6843             if (IN_param_value == NULL)
       
  6844               IN_param_value = function_call_param_iterator.next();
       
  6845             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6846             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6847             
       
  6848             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6849             {
       
  6850         
       
  6851                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6852                 s4o.print("(");
       
  6853                 return_type_symbol->accept(*this);
       
  6854                 s4o.print(")");
       
  6855                 IN_param_value->accept(*this);
       
  6856                 return NULL;
       
  6857                 
       
  6858             }
       
  6859             
       
  6860             ERROR;
       
  6861         }
       
  6862         
       
  6863     }/*function_ulint_to_udint*/
       
  6864     break;
       
  6865 
       
  6866 /****
       
  6867  *ULINT_TO_TIME
       
  6868  */
       
  6869     case function_ulint_to_time :
       
  6870     {
       
  6871         symbol_c *last_type_symbol = NULL;
       
  6872 
       
  6873         {
       
  6874             identifier_c param_name("IN");
       
  6875             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6876             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6877             
       
  6878             /* Get the value from a foo(<param_value>) style call */
       
  6879             if (IN_param_value == NULL)
       
  6880               IN_param_value = function_call_param_iterator.next();
       
  6881             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6882             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6883             
       
  6884             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6885             {
       
  6886         
       
  6887                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6888                 s4o.print("(");
       
  6889                 return_type_symbol->accept(*this);
       
  6890                 s4o.print(")real_to_time(");
       
  6891                 IN_param_value->accept(*this);
       
  6892                 s4o.print(")");
       
  6893                 return NULL;
       
  6894                 
       
  6895             }
       
  6896             
       
  6897             ERROR;
       
  6898         }
       
  6899         
       
  6900     }/*function_ulint_to_time*/
       
  6901     break;
       
  6902 
       
  6903 /****
       
  6904  *ULINT_TO_BOOL
       
  6905  */
       
  6906     case function_ulint_to_bool :
       
  6907     {
       
  6908         symbol_c *last_type_symbol = NULL;
       
  6909 
       
  6910         {
       
  6911             identifier_c param_name("IN");
       
  6912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6914             
       
  6915             /* Get the value from a foo(<param_value>) style call */
       
  6916             if (IN_param_value == NULL)
       
  6917               IN_param_value = function_call_param_iterator.next();
       
  6918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6920             
       
  6921             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6922             {
       
  6923         
       
  6924                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6925                 s4o.print("(");
       
  6926                 return_type_symbol->accept(*this);
       
  6927                 s4o.print(")");
       
  6928                 IN_param_value->accept(*this);
       
  6929                 return NULL;
       
  6930                 
       
  6931             }
       
  6932             
       
  6933             ERROR;
       
  6934         }
       
  6935         
       
  6936     }/*function_ulint_to_bool*/
       
  6937     break;
       
  6938 
       
  6939 /****
       
  6940  *ULINT_TO_BYTE
       
  6941  */
       
  6942     case function_ulint_to_byte :
       
  6943     {
       
  6944         symbol_c *last_type_symbol = NULL;
       
  6945 
       
  6946         {
       
  6947             identifier_c param_name("IN");
       
  6948             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6949             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6950             
       
  6951             /* Get the value from a foo(<param_value>) style call */
       
  6952             if (IN_param_value == NULL)
       
  6953               IN_param_value = function_call_param_iterator.next();
       
  6954             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6955             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6956             
       
  6957             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6958             {
       
  6959         
       
  6960                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6961                 s4o.print("(");
       
  6962                 return_type_symbol->accept(*this);
       
  6963                 s4o.print(")");
       
  6964                 IN_param_value->accept(*this);
       
  6965                 return NULL;
       
  6966                 
       
  6967             }
       
  6968             
       
  6969             ERROR;
       
  6970         }
       
  6971         
       
  6972     }/*function_ulint_to_byte*/
       
  6973     break;
       
  6974 
       
  6975 /****
       
  6976  *ULINT_TO_WORD
       
  6977  */
       
  6978     case function_ulint_to_word :
       
  6979     {
       
  6980         symbol_c *last_type_symbol = NULL;
       
  6981 
       
  6982         {
       
  6983             identifier_c param_name("IN");
       
  6984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6986             
       
  6987             /* Get the value from a foo(<param_value>) style call */
       
  6988             if (IN_param_value == NULL)
       
  6989               IN_param_value = function_call_param_iterator.next();
       
  6990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6992             
       
  6993             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6994             {
       
  6995         
       
  6996                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6997                 s4o.print("(");
       
  6998                 return_type_symbol->accept(*this);
       
  6999                 s4o.print(")");
       
  7000                 IN_param_value->accept(*this);
       
  7001                 return NULL;
       
  7002                 
       
  7003             }
       
  7004             
       
  7005             ERROR;
       
  7006         }
       
  7007         
       
  7008     }/*function_ulint_to_word*/
       
  7009     break;
       
  7010 
       
  7011 /****
       
  7012  *ULINT_TO_DWORD
       
  7013  */
       
  7014     case function_ulint_to_dword :
       
  7015     {
       
  7016         symbol_c *last_type_symbol = NULL;
       
  7017 
       
  7018         {
       
  7019             identifier_c param_name("IN");
       
  7020             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7021             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7022             
       
  7023             /* Get the value from a foo(<param_value>) style call */
       
  7024             if (IN_param_value == NULL)
       
  7025               IN_param_value = function_call_param_iterator.next();
       
  7026             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7027             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7028             
       
  7029             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7030             {
       
  7031         
       
  7032                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7033                 s4o.print("(");
       
  7034                 return_type_symbol->accept(*this);
       
  7035                 s4o.print(")");
       
  7036                 IN_param_value->accept(*this);
       
  7037                 return NULL;
       
  7038                 
       
  7039             }
       
  7040             
       
  7041             ERROR;
       
  7042         }
       
  7043         
       
  7044     }/*function_ulint_to_dword*/
       
  7045     break;
       
  7046 
       
  7047 /****
       
  7048  *ULINT_TO_LWORD
       
  7049  */
       
  7050     case function_ulint_to_lword :
       
  7051     {
       
  7052         symbol_c *last_type_symbol = NULL;
       
  7053 
       
  7054         {
       
  7055             identifier_c param_name("IN");
       
  7056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7058             
       
  7059             /* Get the value from a foo(<param_value>) style call */
       
  7060             if (IN_param_value == NULL)
       
  7061               IN_param_value = function_call_param_iterator.next();
       
  7062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7064             
       
  7065             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7066             {
       
  7067         
       
  7068                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7069                 s4o.print("(");
       
  7070                 return_type_symbol->accept(*this);
       
  7071                 s4o.print(")");
       
  7072                 IN_param_value->accept(*this);
       
  7073                 return NULL;
       
  7074                 
       
  7075             }
       
  7076             
       
  7077             ERROR;
       
  7078         }
       
  7079         
       
  7080     }/*function_ulint_to_lword*/
       
  7081     break;
       
  7082 
       
  7083 /****
       
  7084  *ULINT_TO_STRING
       
  7085  */
       
  7086     case function_ulint_to_string :
       
  7087     {
       
  7088         symbol_c *last_type_symbol = NULL;
       
  7089 
       
  7090         {
       
  7091             identifier_c param_name("IN");
       
  7092             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7093             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7094             
       
  7095             /* Get the value from a foo(<param_value>) style call */
       
  7096             if (IN_param_value == NULL)
       
  7097               IN_param_value = function_call_param_iterator.next();
       
  7098             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7099             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7100             
       
  7101             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7102             {
       
  7103         
       
  7104                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7105                 s4o.print("(");
       
  7106                 return_type_symbol->accept(*this);
       
  7107                 s4o.print(")int_to_string(");
       
  7108                 IN_param_value->accept(*this);
       
  7109                 s4o.print(", 10)");
       
  7110                 return NULL;
       
  7111                 
       
  7112             }
       
  7113             
       
  7114             ERROR;
       
  7115         }
       
  7116         
       
  7117     }/*function_ulint_to_string*/
       
  7118     break;
       
  7119 
       
  7120 /****
       
  7121  *ULINT_TO_WSTRING
       
  7122  */
       
  7123     case function_ulint_to_wstring :
       
  7124     {
       
  7125         symbol_c *last_type_symbol = NULL;
       
  7126 
       
  7127         {
       
  7128             identifier_c param_name("IN");
       
  7129             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7130             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7131             
       
  7132             /* Get the value from a foo(<param_value>) style call */
       
  7133             if (IN_param_value == NULL)
       
  7134               IN_param_value = function_call_param_iterator.next();
       
  7135             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7136             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7137             
       
  7138             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7139             {
       
  7140         
       
  7141                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7142                 s4o.print("(");
       
  7143                 return_type_symbol->accept(*this);
       
  7144                 s4o.print(")int_to_string(");
       
  7145                 IN_param_value->accept(*this);
       
  7146                 s4o.print(", 10)");
       
  7147                 return NULL;
       
  7148                 
       
  7149             }
       
  7150             
       
  7151             ERROR;
       
  7152         }
       
  7153         
       
  7154     }/*function_ulint_to_wstring*/
       
  7155     break;
       
  7156 
       
  7157 /****
       
  7158  *ULINT_TO_DATE
       
  7159  */
       
  7160     case function_ulint_to_date :
       
  7161     {
       
  7162         symbol_c *last_type_symbol = NULL;
       
  7163 
       
  7164         {
       
  7165             identifier_c param_name("IN");
       
  7166             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7167             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7168             
       
  7169             /* Get the value from a foo(<param_value>) style call */
       
  7170             if (IN_param_value == NULL)
       
  7171               IN_param_value = function_call_param_iterator.next();
       
  7172             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7173             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7174             
       
  7175             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7176             {
       
  7177         
       
  7178                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7179                 s4o.print("(");
       
  7180                 return_type_symbol->accept(*this);
       
  7181                 s4o.print(")real_to_time(");
       
  7182                 IN_param_value->accept(*this);
       
  7183                 s4o.print(")");
       
  7184                 return NULL;
       
  7185                 
       
  7186             }
       
  7187             
       
  7188             ERROR;
       
  7189         }
       
  7190         
       
  7191     }/*function_ulint_to_date*/
       
  7192     break;
       
  7193 
       
  7194 /****
       
  7195  *ULINT_TO_TOD
       
  7196  */
       
  7197     case function_ulint_to_tod :
       
  7198     {
       
  7199         symbol_c *last_type_symbol = NULL;
       
  7200 
       
  7201         {
       
  7202             identifier_c param_name("IN");
       
  7203             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7205             
       
  7206             /* Get the value from a foo(<param_value>) style call */
       
  7207             if (IN_param_value == NULL)
       
  7208               IN_param_value = function_call_param_iterator.next();
       
  7209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7211             
       
  7212             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7213             {
       
  7214         
       
  7215                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7216                 s4o.print("(");
       
  7217                 return_type_symbol->accept(*this);
       
  7218                 s4o.print(")real_to_time(");
       
  7219                 IN_param_value->accept(*this);
       
  7220                 s4o.print(")");
       
  7221                 return NULL;
       
  7222                 
       
  7223             }
       
  7224             
       
  7225             ERROR;
       
  7226         }
       
  7227         
       
  7228     }/*function_ulint_to_tod*/
       
  7229     break;
       
  7230 
       
  7231 /****
       
  7232  *ULINT_TO_DT
       
  7233  */
       
  7234     case function_ulint_to_dt :
       
  7235     {
       
  7236         symbol_c *last_type_symbol = NULL;
       
  7237 
       
  7238         {
       
  7239             identifier_c param_name("IN");
       
  7240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7242             
       
  7243             /* Get the value from a foo(<param_value>) style call */
       
  7244             if (IN_param_value == NULL)
       
  7245               IN_param_value = function_call_param_iterator.next();
       
  7246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7248             
       
  7249             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  7250             {
       
  7251         
       
  7252                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7253                 s4o.print("(");
       
  7254                 return_type_symbol->accept(*this);
       
  7255                 s4o.print(")real_to_time(");
       
  7256                 IN_param_value->accept(*this);
       
  7257                 s4o.print(")");
       
  7258                 return NULL;
       
  7259                 
       
  7260             }
       
  7261             
       
  7262             ERROR;
       
  7263         }
       
  7264         
       
  7265     }/*function_ulint_to_dt*/
       
  7266     break;
       
  7267 
       
  7268 /****
       
  7269  *TIME_TO_REAL
       
  7270  */
       
  7271     case function_time_to_real :
       
  7272     {
       
  7273         symbol_c *last_type_symbol = NULL;
       
  7274 
       
  7275         {
       
  7276             identifier_c param_name("IN");
       
  7277             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7278             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7279             
       
  7280             /* Get the value from a foo(<param_value>) style call */
       
  7281             if (IN_param_value == NULL)
       
  7282               IN_param_value = function_call_param_iterator.next();
       
  7283             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7284             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7285             
       
  7286             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7287             {
       
  7288         
       
  7289                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7290                 s4o.print("(");
       
  7291                 return_type_symbol->accept(*this);
       
  7292                 s4o.print(")time_to_real(");
       
  7293                 IN_param_value->accept(*this);
       
  7294                 s4o.print(")");
       
  7295                 return NULL;
       
  7296                 
       
  7297             }
       
  7298             
       
  7299             ERROR;
       
  7300         }
       
  7301         
       
  7302     }/*function_time_to_real*/
       
  7303     break;
       
  7304 
       
  7305 /****
       
  7306  *TIME_TO_LREAL
       
  7307  */
       
  7308     case function_time_to_lreal :
       
  7309     {
       
  7310         symbol_c *last_type_symbol = NULL;
       
  7311 
       
  7312         {
       
  7313             identifier_c param_name("IN");
       
  7314             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7315             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7316             
       
  7317             /* Get the value from a foo(<param_value>) style call */
       
  7318             if (IN_param_value == NULL)
       
  7319               IN_param_value = function_call_param_iterator.next();
       
  7320             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7321             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7322             
       
  7323             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7324             {
       
  7325         
       
  7326                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7327                 s4o.print("(");
       
  7328                 return_type_symbol->accept(*this);
       
  7329                 s4o.print(")time_to_real(");
       
  7330                 IN_param_value->accept(*this);
       
  7331                 s4o.print(")");
       
  7332                 return NULL;
       
  7333                 
       
  7334             }
       
  7335             
       
  7336             ERROR;
       
  7337         }
       
  7338         
       
  7339     }/*function_time_to_lreal*/
       
  7340     break;
       
  7341 
       
  7342 /****
       
  7343  *TIME_TO_SINT
       
  7344  */
       
  7345     case function_time_to_sint :
       
  7346     {
       
  7347         symbol_c *last_type_symbol = NULL;
       
  7348 
       
  7349         {
       
  7350             identifier_c param_name("IN");
       
  7351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7353             
       
  7354             /* Get the value from a foo(<param_value>) style call */
       
  7355             if (IN_param_value == NULL)
       
  7356               IN_param_value = function_call_param_iterator.next();
       
  7357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7359             
       
  7360             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7361             {
       
  7362         
       
  7363                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7364                 s4o.print("(");
       
  7365                 return_type_symbol->accept(*this);
       
  7366                 s4o.print(")time_to_real(");
       
  7367                 IN_param_value->accept(*this);
       
  7368                 s4o.print(")");
       
  7369                 return NULL;
       
  7370                 
       
  7371             }
       
  7372             
       
  7373             ERROR;
       
  7374         }
       
  7375         
       
  7376     }/*function_time_to_sint*/
       
  7377     break;
       
  7378 
       
  7379 /****
       
  7380  *TIME_TO_INT
       
  7381  */
       
  7382     case function_time_to_int :
       
  7383     {
       
  7384         symbol_c *last_type_symbol = NULL;
       
  7385 
       
  7386         {
       
  7387             identifier_c param_name("IN");
       
  7388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7390             
       
  7391             /* Get the value from a foo(<param_value>) style call */
       
  7392             if (IN_param_value == NULL)
       
  7393               IN_param_value = function_call_param_iterator.next();
       
  7394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7396             
       
  7397             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7398             {
       
  7399         
       
  7400                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7401                 s4o.print("(");
       
  7402                 return_type_symbol->accept(*this);
       
  7403                 s4o.print(")time_to_real(");
       
  7404                 IN_param_value->accept(*this);
       
  7405                 s4o.print(")");
       
  7406                 return NULL;
       
  7407                 
       
  7408             }
       
  7409             
       
  7410             ERROR;
       
  7411         }
       
  7412         
       
  7413     }/*function_time_to_int*/
       
  7414     break;
       
  7415 
       
  7416 /****
       
  7417  *TIME_TO_DINT
       
  7418  */
       
  7419     case function_time_to_dint :
       
  7420     {
       
  7421         symbol_c *last_type_symbol = NULL;
       
  7422 
       
  7423         {
       
  7424             identifier_c param_name("IN");
       
  7425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7427             
       
  7428             /* Get the value from a foo(<param_value>) style call */
       
  7429             if (IN_param_value == NULL)
       
  7430               IN_param_value = function_call_param_iterator.next();
       
  7431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7432             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7433             
       
  7434             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7435             {
       
  7436         
       
  7437                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7438                 s4o.print("(");
       
  7439                 return_type_symbol->accept(*this);
       
  7440                 s4o.print(")time_to_real(");
       
  7441                 IN_param_value->accept(*this);
       
  7442                 s4o.print(")");
       
  7443                 return NULL;
       
  7444                 
       
  7445             }
       
  7446             
       
  7447             ERROR;
       
  7448         }
       
  7449         
       
  7450     }/*function_time_to_dint*/
       
  7451     break;
       
  7452 
       
  7453 /****
       
  7454  *TIME_TO_LINT
       
  7455  */
       
  7456     case function_time_to_lint :
       
  7457     {
       
  7458         symbol_c *last_type_symbol = NULL;
       
  7459 
       
  7460         {
       
  7461             identifier_c param_name("IN");
       
  7462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7464             
       
  7465             /* Get the value from a foo(<param_value>) style call */
       
  7466             if (IN_param_value == NULL)
       
  7467               IN_param_value = function_call_param_iterator.next();
       
  7468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7470             
       
  7471             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7472             {
       
  7473         
       
  7474                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7475                 s4o.print("(");
       
  7476                 return_type_symbol->accept(*this);
       
  7477                 s4o.print(")time_to_real(");
       
  7478                 IN_param_value->accept(*this);
       
  7479                 s4o.print(")");
       
  7480                 return NULL;
       
  7481                 
       
  7482             }
       
  7483             
       
  7484             ERROR;
       
  7485         }
       
  7486         
       
  7487     }/*function_time_to_lint*/
       
  7488     break;
       
  7489 
       
  7490 /****
       
  7491  *TIME_TO_USINT
       
  7492  */
       
  7493     case function_time_to_usint :
       
  7494     {
       
  7495         symbol_c *last_type_symbol = NULL;
       
  7496 
       
  7497         {
       
  7498             identifier_c param_name("IN");
       
  7499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7501             
       
  7502             /* Get the value from a foo(<param_value>) style call */
       
  7503             if (IN_param_value == NULL)
       
  7504               IN_param_value = function_call_param_iterator.next();
       
  7505             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7506             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7507             
       
  7508             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7509             {
       
  7510         
       
  7511                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7512                 s4o.print("(");
       
  7513                 return_type_symbol->accept(*this);
       
  7514                 s4o.print(")time_to_real(");
       
  7515                 IN_param_value->accept(*this);
       
  7516                 s4o.print(")");
       
  7517                 return NULL;
       
  7518                 
       
  7519             }
       
  7520             
       
  7521             ERROR;
       
  7522         }
       
  7523         
       
  7524     }/*function_time_to_usint*/
       
  7525     break;
       
  7526 
       
  7527 /****
       
  7528  *TIME_TO_UINT
       
  7529  */
       
  7530     case function_time_to_uint :
       
  7531     {
       
  7532         symbol_c *last_type_symbol = NULL;
       
  7533 
       
  7534         {
       
  7535             identifier_c param_name("IN");
       
  7536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7538             
       
  7539             /* Get the value from a foo(<param_value>) style call */
       
  7540             if (IN_param_value == NULL)
       
  7541               IN_param_value = function_call_param_iterator.next();
       
  7542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7544             
       
  7545             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7546             {
       
  7547         
       
  7548                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7549                 s4o.print("(");
       
  7550                 return_type_symbol->accept(*this);
       
  7551                 s4o.print(")time_to_real(");
       
  7552                 IN_param_value->accept(*this);
       
  7553                 s4o.print(")");
       
  7554                 return NULL;
       
  7555                 
       
  7556             }
       
  7557             
       
  7558             ERROR;
       
  7559         }
       
  7560         
       
  7561     }/*function_time_to_uint*/
       
  7562     break;
       
  7563 
       
  7564 /****
       
  7565  *TIME_TO_UDINT
       
  7566  */
       
  7567     case function_time_to_udint :
       
  7568     {
       
  7569         symbol_c *last_type_symbol = NULL;
       
  7570 
       
  7571         {
       
  7572             identifier_c param_name("IN");
       
  7573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7575             
       
  7576             /* Get the value from a foo(<param_value>) style call */
       
  7577             if (IN_param_value == NULL)
       
  7578               IN_param_value = function_call_param_iterator.next();
       
  7579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7581             
       
  7582             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7583             {
       
  7584         
       
  7585                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7586                 s4o.print("(");
       
  7587                 return_type_symbol->accept(*this);
       
  7588                 s4o.print(")time_to_real(");
       
  7589                 IN_param_value->accept(*this);
       
  7590                 s4o.print(")");
       
  7591                 return NULL;
       
  7592                 
       
  7593             }
       
  7594             
       
  7595             ERROR;
       
  7596         }
       
  7597         
       
  7598     }/*function_time_to_udint*/
       
  7599     break;
       
  7600 
       
  7601 /****
       
  7602  *TIME_TO_ULINT
       
  7603  */
       
  7604     case function_time_to_ulint :
       
  7605     {
       
  7606         symbol_c *last_type_symbol = NULL;
       
  7607 
       
  7608         {
       
  7609             identifier_c param_name("IN");
       
  7610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7612             
       
  7613             /* Get the value from a foo(<param_value>) style call */
       
  7614             if (IN_param_value == NULL)
       
  7615               IN_param_value = function_call_param_iterator.next();
       
  7616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7618             
       
  7619             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7620             {
       
  7621         
       
  7622                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7623                 s4o.print("(");
       
  7624                 return_type_symbol->accept(*this);
       
  7625                 s4o.print(")time_to_real(");
       
  7626                 IN_param_value->accept(*this);
       
  7627                 s4o.print(")");
       
  7628                 return NULL;
       
  7629                 
       
  7630             }
       
  7631             
       
  7632             ERROR;
       
  7633         }
       
  7634         
       
  7635     }/*function_time_to_ulint*/
       
  7636     break;
       
  7637 
       
  7638 /****
       
  7639  *TIME_TO_BOOL
       
  7640  */
       
  7641     case function_time_to_bool :
       
  7642     {
       
  7643         symbol_c *last_type_symbol = NULL;
       
  7644 
       
  7645         {
       
  7646             identifier_c param_name("IN");
       
  7647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7649             
       
  7650             /* Get the value from a foo(<param_value>) style call */
       
  7651             if (IN_param_value == NULL)
       
  7652               IN_param_value = function_call_param_iterator.next();
       
  7653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7655             
       
  7656             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7657             {
       
  7658         
       
  7659                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7660                 s4o.print("(");
       
  7661                 return_type_symbol->accept(*this);
       
  7662                 s4o.print(")time_to_real(");
       
  7663                 IN_param_value->accept(*this);
       
  7664                 s4o.print(")");
       
  7665                 return NULL;
       
  7666                 
       
  7667             }
       
  7668             
       
  7669             ERROR;
       
  7670         }
       
  7671         
       
  7672     }/*function_time_to_bool*/
       
  7673     break;
       
  7674 
       
  7675 /****
       
  7676  *TIME_TO_BYTE
       
  7677  */
       
  7678     case function_time_to_byte :
       
  7679     {
       
  7680         symbol_c *last_type_symbol = NULL;
       
  7681 
       
  7682         {
       
  7683             identifier_c param_name("IN");
       
  7684             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7685             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7686             
       
  7687             /* Get the value from a foo(<param_value>) style call */
       
  7688             if (IN_param_value == NULL)
       
  7689               IN_param_value = function_call_param_iterator.next();
       
  7690             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7691             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7692             
       
  7693             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7694             {
       
  7695         
       
  7696                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7697                 s4o.print("(");
       
  7698                 return_type_symbol->accept(*this);
       
  7699                 s4o.print(")time_to_real(");
       
  7700                 IN_param_value->accept(*this);
       
  7701                 s4o.print(")");
       
  7702                 return NULL;
       
  7703                 
       
  7704             }
       
  7705             
       
  7706             ERROR;
       
  7707         }
       
  7708         
       
  7709     }/*function_time_to_byte*/
       
  7710     break;
       
  7711 
       
  7712 /****
       
  7713  *TIME_TO_WORD
       
  7714  */
       
  7715     case function_time_to_word :
       
  7716     {
       
  7717         symbol_c *last_type_symbol = NULL;
       
  7718 
       
  7719         {
       
  7720             identifier_c param_name("IN");
       
  7721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7722             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7723             
       
  7724             /* Get the value from a foo(<param_value>) style call */
       
  7725             if (IN_param_value == NULL)
       
  7726               IN_param_value = function_call_param_iterator.next();
       
  7727             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7728             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7729             
       
  7730             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7731             {
       
  7732         
       
  7733                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7734                 s4o.print("(");
       
  7735                 return_type_symbol->accept(*this);
       
  7736                 s4o.print(")time_to_real(");
       
  7737                 IN_param_value->accept(*this);
       
  7738                 s4o.print(")");
       
  7739                 return NULL;
       
  7740                 
       
  7741             }
       
  7742             
       
  7743             ERROR;
       
  7744         }
       
  7745         
       
  7746     }/*function_time_to_word*/
       
  7747     break;
       
  7748 
       
  7749 /****
       
  7750  *TIME_TO_DWORD
       
  7751  */
       
  7752     case function_time_to_dword :
       
  7753     {
       
  7754         symbol_c *last_type_symbol = NULL;
       
  7755 
       
  7756         {
       
  7757             identifier_c param_name("IN");
       
  7758             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7759             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7760             
       
  7761             /* Get the value from a foo(<param_value>) style call */
       
  7762             if (IN_param_value == NULL)
       
  7763               IN_param_value = function_call_param_iterator.next();
       
  7764             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7765             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7766             
       
  7767             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7768             {
       
  7769         
       
  7770                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7771                 s4o.print("(");
       
  7772                 return_type_symbol->accept(*this);
       
  7773                 s4o.print(")time_to_real(");
       
  7774                 IN_param_value->accept(*this);
       
  7775                 s4o.print(")");
       
  7776                 return NULL;
       
  7777                 
       
  7778             }
       
  7779             
       
  7780             ERROR;
       
  7781         }
       
  7782         
       
  7783     }/*function_time_to_dword*/
       
  7784     break;
       
  7785 
       
  7786 /****
       
  7787  *TIME_TO_LWORD
       
  7788  */
       
  7789     case function_time_to_lword :
       
  7790     {
       
  7791         symbol_c *last_type_symbol = NULL;
       
  7792 
       
  7793         {
       
  7794             identifier_c param_name("IN");
       
  7795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7796             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7797             
       
  7798             /* Get the value from a foo(<param_value>) style call */
       
  7799             if (IN_param_value == NULL)
       
  7800               IN_param_value = function_call_param_iterator.next();
       
  7801             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7802             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7803             
       
  7804             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7805             {
       
  7806         
       
  7807                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7808                 s4o.print("(");
       
  7809                 return_type_symbol->accept(*this);
       
  7810                 s4o.print(")time_to_real(");
       
  7811                 IN_param_value->accept(*this);
       
  7812                 s4o.print(")");
       
  7813                 return NULL;
       
  7814                 
       
  7815             }
       
  7816             
       
  7817             ERROR;
       
  7818         }
       
  7819         
       
  7820     }/*function_time_to_lword*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *TIME_TO_STRING
       
  7825  */
       
  7826     case function_time_to_string :
       
  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(time_type_name_c))
       
  7842             {
       
  7843         
       
  7844                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7845                 s4o.print("(");
       
  7846                 return_type_symbol->accept(*this);
       
  7847                 s4o.print(")time_to_string(");
       
  7848                 IN_param_value->accept(*this);
       
  7849                 s4o.print(")");
       
  7850                 return NULL;
       
  7851                 
       
  7852             }
       
  7853             
       
  7854             ERROR;
       
  7855         }
       
  7856         
       
  7857     }/*function_time_to_string*/
       
  7858     break;
       
  7859 
       
  7860 /****
       
  7861  *TIME_TO_WSTRING
       
  7862  */
       
  7863     case function_time_to_wstring :
       
  7864     {
       
  7865         symbol_c *last_type_symbol = NULL;
       
  7866 
       
  7867         {
       
  7868             identifier_c param_name("IN");
       
  7869             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7870             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7871             
       
  7872             /* Get the value from a foo(<param_value>) style call */
       
  7873             if (IN_param_value == NULL)
       
  7874               IN_param_value = function_call_param_iterator.next();
       
  7875             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7876             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7877             
       
  7878             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7879             {
       
  7880         
       
  7881                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7882                 s4o.print("(");
       
  7883                 return_type_symbol->accept(*this);
       
  7884                 s4o.print(")time_to_string(");
       
  7885                 IN_param_value->accept(*this);
       
  7886                 s4o.print(")");
       
  7887                 return NULL;
       
  7888                 
       
  7889             }
       
  7890             
       
  7891             ERROR;
       
  7892         }
       
  7893         
       
  7894     }/*function_time_to_wstring*/
       
  7895     break;
       
  7896 
       
  7897 /****
       
  7898  *BOOL_TO_REAL
       
  7899  */
       
  7900     case function_bool_to_real :
       
  7901     {
       
  7902         symbol_c *last_type_symbol = NULL;
       
  7903 
       
  7904         {
       
  7905             identifier_c param_name("IN");
       
  7906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7907             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7908             
       
  7909             /* Get the value from a foo(<param_value>) style call */
       
  7910             if (IN_param_value == NULL)
       
  7911               IN_param_value = function_call_param_iterator.next();
       
  7912             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7913             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7914             
       
  7915             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7916             {
       
  7917         
       
  7918                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7919                 s4o.print("(");
       
  7920                 return_type_symbol->accept(*this);
       
  7921                 s4o.print(")");
       
  7922                 IN_param_value->accept(*this);
       
  7923                 return NULL;
       
  7924                 
       
  7925             }
       
  7926             
       
  7927             ERROR;
       
  7928         }
       
  7929         
       
  7930     }/*function_bool_to_real*/
       
  7931     break;
       
  7932 
       
  7933 /****
       
  7934  *BOOL_TO_LREAL
       
  7935  */
       
  7936     case function_bool_to_lreal :
       
  7937     {
       
  7938         symbol_c *last_type_symbol = NULL;
       
  7939 
       
  7940         {
       
  7941             identifier_c param_name("IN");
       
  7942             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7943             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7944             
       
  7945             /* Get the value from a foo(<param_value>) style call */
       
  7946             if (IN_param_value == NULL)
       
  7947               IN_param_value = function_call_param_iterator.next();
       
  7948             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7949             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7950             
       
  7951             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7952             {
       
  7953         
       
  7954                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7955                 s4o.print("(");
       
  7956                 return_type_symbol->accept(*this);
       
  7957                 s4o.print(")");
       
  7958                 IN_param_value->accept(*this);
       
  7959                 return NULL;
       
  7960                 
       
  7961             }
       
  7962             
       
  7963             ERROR;
       
  7964         }
       
  7965         
       
  7966     }/*function_bool_to_lreal*/
       
  7967     break;
       
  7968 
       
  7969 /****
       
  7970  *BOOL_TO_SINT
       
  7971  */
       
  7972     case function_bool_to_sint :
       
  7973     {
       
  7974         symbol_c *last_type_symbol = NULL;
       
  7975 
       
  7976         {
       
  7977             identifier_c param_name("IN");
       
  7978             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7979             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7980             
       
  7981             /* Get the value from a foo(<param_value>) style call */
       
  7982             if (IN_param_value == NULL)
       
  7983               IN_param_value = function_call_param_iterator.next();
       
  7984             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7985             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7986             
       
  7987             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7988             {
       
  7989         
       
  7990                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7991                 s4o.print("(");
       
  7992                 return_type_symbol->accept(*this);
       
  7993                 s4o.print(")");
       
  7994                 IN_param_value->accept(*this);
       
  7995                 return NULL;
       
  7996                 
       
  7997             }
       
  7998             
       
  7999             ERROR;
       
  8000         }
       
  8001         
       
  8002     }/*function_bool_to_sint*/
       
  8003     break;
       
  8004 
       
  8005 /****
       
  8006  *BOOL_TO_INT
       
  8007  */
       
  8008     case function_bool_to_int :
       
  8009     {
       
  8010         symbol_c *last_type_symbol = NULL;
       
  8011 
       
  8012         {
       
  8013             identifier_c param_name("IN");
       
  8014             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8015             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8016             
       
  8017             /* Get the value from a foo(<param_value>) style call */
       
  8018             if (IN_param_value == NULL)
       
  8019               IN_param_value = function_call_param_iterator.next();
       
  8020             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8021             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8022             
       
  8023             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8024             {
       
  8025         
       
  8026                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8027                 s4o.print("(");
       
  8028                 return_type_symbol->accept(*this);
       
  8029                 s4o.print(")");
       
  8030                 IN_param_value->accept(*this);
       
  8031                 return NULL;
       
  8032                 
       
  8033             }
       
  8034             
       
  8035             ERROR;
       
  8036         }
       
  8037         
       
  8038     }/*function_bool_to_int*/
       
  8039     break;
       
  8040 
       
  8041 /****
       
  8042  *BOOL_TO_DINT
       
  8043  */
       
  8044     case function_bool_to_dint :
       
  8045     {
       
  8046         symbol_c *last_type_symbol = NULL;
       
  8047 
       
  8048         {
       
  8049             identifier_c param_name("IN");
       
  8050             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8051             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8052             
       
  8053             /* Get the value from a foo(<param_value>) style call */
       
  8054             if (IN_param_value == NULL)
       
  8055               IN_param_value = function_call_param_iterator.next();
       
  8056             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8057             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8058             
       
  8059             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8060             {
       
  8061         
       
  8062                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8063                 s4o.print("(");
       
  8064                 return_type_symbol->accept(*this);
       
  8065                 s4o.print(")");
       
  8066                 IN_param_value->accept(*this);
       
  8067                 return NULL;
       
  8068                 
       
  8069             }
       
  8070             
       
  8071             ERROR;
       
  8072         }
       
  8073         
       
  8074     }/*function_bool_to_dint*/
       
  8075     break;
       
  8076 
       
  8077 /****
       
  8078  *BOOL_TO_LINT
       
  8079  */
       
  8080     case function_bool_to_lint :
       
  8081     {
       
  8082         symbol_c *last_type_symbol = NULL;
       
  8083 
       
  8084         {
       
  8085             identifier_c param_name("IN");
       
  8086             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8087             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8088             
       
  8089             /* Get the value from a foo(<param_value>) style call */
       
  8090             if (IN_param_value == NULL)
       
  8091               IN_param_value = function_call_param_iterator.next();
       
  8092             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8093             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8094             
       
  8095             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8096             {
       
  8097         
       
  8098                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8099                 s4o.print("(");
       
  8100                 return_type_symbol->accept(*this);
       
  8101                 s4o.print(")");
       
  8102                 IN_param_value->accept(*this);
       
  8103                 return NULL;
       
  8104                 
       
  8105             }
       
  8106             
       
  8107             ERROR;
       
  8108         }
       
  8109         
       
  8110     }/*function_bool_to_lint*/
       
  8111     break;
       
  8112 
       
  8113 /****
       
  8114  *BOOL_TO_USINT
       
  8115  */
       
  8116     case function_bool_to_usint :
       
  8117     {
       
  8118         symbol_c *last_type_symbol = NULL;
       
  8119 
       
  8120         {
       
  8121             identifier_c param_name("IN");
       
  8122             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8123             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8124             
       
  8125             /* Get the value from a foo(<param_value>) style call */
       
  8126             if (IN_param_value == NULL)
       
  8127               IN_param_value = function_call_param_iterator.next();
       
  8128             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8129             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8130             
       
  8131             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8132             {
       
  8133         
       
  8134                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8135                 s4o.print("(");
       
  8136                 return_type_symbol->accept(*this);
       
  8137                 s4o.print(")");
       
  8138                 IN_param_value->accept(*this);
       
  8139                 return NULL;
       
  8140                 
       
  8141             }
       
  8142             
       
  8143             ERROR;
       
  8144         }
       
  8145         
       
  8146     }/*function_bool_to_usint*/
       
  8147     break;
       
  8148 
       
  8149 /****
       
  8150  *BOOL_TO_UINT
       
  8151  */
       
  8152     case function_bool_to_uint :
       
  8153     {
       
  8154         symbol_c *last_type_symbol = NULL;
       
  8155 
       
  8156         {
       
  8157             identifier_c param_name("IN");
       
  8158             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8159             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8160             
       
  8161             /* Get the value from a foo(<param_value>) style call */
       
  8162             if (IN_param_value == NULL)
       
  8163               IN_param_value = function_call_param_iterator.next();
       
  8164             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8165             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8166             
       
  8167             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8168             {
       
  8169         
       
  8170                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8171                 s4o.print("(");
       
  8172                 return_type_symbol->accept(*this);
       
  8173                 s4o.print(")");
       
  8174                 IN_param_value->accept(*this);
       
  8175                 return NULL;
       
  8176                 
       
  8177             }
       
  8178             
       
  8179             ERROR;
       
  8180         }
       
  8181         
       
  8182     }/*function_bool_to_uint*/
       
  8183     break;
       
  8184 
       
  8185 /****
       
  8186  *BOOL_TO_UDINT
       
  8187  */
       
  8188     case function_bool_to_udint :
       
  8189     {
       
  8190         symbol_c *last_type_symbol = NULL;
       
  8191 
       
  8192         {
       
  8193             identifier_c param_name("IN");
       
  8194             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8195             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8196             
       
  8197             /* Get the value from a foo(<param_value>) style call */
       
  8198             if (IN_param_value == NULL)
       
  8199               IN_param_value = function_call_param_iterator.next();
       
  8200             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8201             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8202             
       
  8203             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8204             {
       
  8205         
       
  8206                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8207                 s4o.print("(");
       
  8208                 return_type_symbol->accept(*this);
       
  8209                 s4o.print(")");
       
  8210                 IN_param_value->accept(*this);
       
  8211                 return NULL;
       
  8212                 
       
  8213             }
       
  8214             
       
  8215             ERROR;
       
  8216         }
       
  8217         
       
  8218     }/*function_bool_to_udint*/
       
  8219     break;
       
  8220 
       
  8221 /****
       
  8222  *BOOL_TO_ULINT
       
  8223  */
       
  8224     case function_bool_to_ulint :
       
  8225     {
       
  8226         symbol_c *last_type_symbol = NULL;
       
  8227 
       
  8228         {
       
  8229             identifier_c param_name("IN");
       
  8230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8231             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8232             
       
  8233             /* Get the value from a foo(<param_value>) style call */
       
  8234             if (IN_param_value == NULL)
       
  8235               IN_param_value = function_call_param_iterator.next();
       
  8236             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8237             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8238             
       
  8239             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8240             {
       
  8241         
       
  8242                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8243                 s4o.print("(");
       
  8244                 return_type_symbol->accept(*this);
       
  8245                 s4o.print(")");
       
  8246                 IN_param_value->accept(*this);
       
  8247                 return NULL;
       
  8248                 
       
  8249             }
       
  8250             
       
  8251             ERROR;
       
  8252         }
       
  8253         
       
  8254     }/*function_bool_to_ulint*/
       
  8255     break;
       
  8256 
       
  8257 /****
       
  8258  *BOOL_TO_TIME
       
  8259  */
       
  8260     case function_bool_to_time :
       
  8261     {
       
  8262         symbol_c *last_type_symbol = NULL;
       
  8263 
       
  8264         {
       
  8265             identifier_c param_name("IN");
       
  8266             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8267             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8268             
       
  8269             /* Get the value from a foo(<param_value>) style call */
       
  8270             if (IN_param_value == NULL)
       
  8271               IN_param_value = function_call_param_iterator.next();
       
  8272             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8273             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8274             
       
  8275             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8276             {
       
  8277         
       
  8278                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8279                 s4o.print("(");
       
  8280                 return_type_symbol->accept(*this);
       
  8281                 s4o.print(")real_to_time(");
       
  8282                 IN_param_value->accept(*this);
       
  8283                 s4o.print(")");
       
  8284                 return NULL;
       
  8285                 
       
  8286             }
       
  8287             
       
  8288             ERROR;
       
  8289         }
       
  8290         
       
  8291     }/*function_bool_to_time*/
       
  8292     break;
       
  8293 
       
  8294 /****
       
  8295  *BOOL_TO_BYTE
       
  8296  */
       
  8297     case function_bool_to_byte :
       
  8298     {
       
  8299         symbol_c *last_type_symbol = NULL;
       
  8300 
       
  8301         {
       
  8302             identifier_c param_name("IN");
       
  8303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8304             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8305             
       
  8306             /* Get the value from a foo(<param_value>) style call */
       
  8307             if (IN_param_value == NULL)
       
  8308               IN_param_value = function_call_param_iterator.next();
       
  8309             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8310             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8311             
       
  8312             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8313             {
       
  8314         
       
  8315                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8316                 s4o.print("(");
       
  8317                 return_type_symbol->accept(*this);
       
  8318                 s4o.print(")");
       
  8319                 IN_param_value->accept(*this);
       
  8320                 return NULL;
       
  8321                 
       
  8322             }
       
  8323             
       
  8324             ERROR;
       
  8325         }
       
  8326         
       
  8327     }/*function_bool_to_byte*/
       
  8328     break;
       
  8329 
       
  8330 /****
       
  8331  *BOOL_TO_WORD
       
  8332  */
       
  8333     case function_bool_to_word :
       
  8334     {
       
  8335         symbol_c *last_type_symbol = NULL;
       
  8336 
       
  8337         {
       
  8338             identifier_c param_name("IN");
       
  8339             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8340             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8341             
       
  8342             /* Get the value from a foo(<param_value>) style call */
       
  8343             if (IN_param_value == NULL)
       
  8344               IN_param_value = function_call_param_iterator.next();
       
  8345             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8346             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8347             
       
  8348             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8349             {
       
  8350         
       
  8351                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8352                 s4o.print("(");
       
  8353                 return_type_symbol->accept(*this);
       
  8354                 s4o.print(")");
       
  8355                 IN_param_value->accept(*this);
       
  8356                 return NULL;
       
  8357                 
       
  8358             }
       
  8359             
       
  8360             ERROR;
       
  8361         }
       
  8362         
       
  8363     }/*function_bool_to_word*/
       
  8364     break;
       
  8365 
       
  8366 /****
       
  8367  *BOOL_TO_DWORD
       
  8368  */
       
  8369     case function_bool_to_dword :
       
  8370     {
       
  8371         symbol_c *last_type_symbol = NULL;
       
  8372 
       
  8373         {
       
  8374             identifier_c param_name("IN");
       
  8375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8376             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8377             
       
  8378             /* Get the value from a foo(<param_value>) style call */
       
  8379             if (IN_param_value == NULL)
       
  8380               IN_param_value = function_call_param_iterator.next();
       
  8381             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8382             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8383             
       
  8384             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8385             {
       
  8386         
       
  8387                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8388                 s4o.print("(");
       
  8389                 return_type_symbol->accept(*this);
       
  8390                 s4o.print(")");
       
  8391                 IN_param_value->accept(*this);
       
  8392                 return NULL;
       
  8393                 
       
  8394             }
       
  8395             
       
  8396             ERROR;
       
  8397         }
       
  8398         
       
  8399     }/*function_bool_to_dword*/
       
  8400     break;
       
  8401 
       
  8402 /****
       
  8403  *BOOL_TO_LWORD
       
  8404  */
       
  8405     case function_bool_to_lword :
       
  8406     {
       
  8407         symbol_c *last_type_symbol = NULL;
       
  8408 
       
  8409         {
       
  8410             identifier_c param_name("IN");
       
  8411             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8412             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8413             
       
  8414             /* Get the value from a foo(<param_value>) style call */
       
  8415             if (IN_param_value == NULL)
       
  8416               IN_param_value = function_call_param_iterator.next();
       
  8417             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8418             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8419             
       
  8420             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8421             {
       
  8422         
       
  8423                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8424                 s4o.print("(");
       
  8425                 return_type_symbol->accept(*this);
       
  8426                 s4o.print(")");
       
  8427                 IN_param_value->accept(*this);
       
  8428                 return NULL;
       
  8429                 
       
  8430             }
       
  8431             
       
  8432             ERROR;
       
  8433         }
       
  8434         
       
  8435     }/*function_bool_to_lword*/
       
  8436     break;
       
  8437 
       
  8438 /****
       
  8439  *BOOL_TO_STRING
       
  8440  */
       
  8441     case function_bool_to_string :
       
  8442     {
       
  8443         symbol_c *last_type_symbol = NULL;
       
  8444 
       
  8445         {
       
  8446             identifier_c param_name("IN");
       
  8447             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8449             
       
  8450             /* Get the value from a foo(<param_value>) style call */
       
  8451             if (IN_param_value == NULL)
       
  8452               IN_param_value = function_call_param_iterator.next();
       
  8453             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8454             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8455             
       
  8456             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8457             {
       
  8458         
       
  8459                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8460                 s4o.print("(");
       
  8461                 return_type_symbol->accept(*this);
       
  8462                 s4o.print(")int_to_string(");
       
  8463                 IN_param_value->accept(*this);
       
  8464                 s4o.print(", 16)");
       
  8465                 return NULL;
       
  8466                 
       
  8467             }
       
  8468             
       
  8469             ERROR;
       
  8470         }
       
  8471         
       
  8472     }/*function_bool_to_string*/
       
  8473     break;
       
  8474 
       
  8475 /****
       
  8476  *BOOL_TO_WSTRING
       
  8477  */
       
  8478     case function_bool_to_wstring :
       
  8479     {
       
  8480         symbol_c *last_type_symbol = NULL;
       
  8481 
       
  8482         {
       
  8483             identifier_c param_name("IN");
       
  8484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8485             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next();
       
  8490             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8491             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8492             
       
  8493             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8494             {
       
  8495         
       
  8496                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8497                 s4o.print("(");
       
  8498                 return_type_symbol->accept(*this);
       
  8499                 s4o.print(")int_to_string(");
       
  8500                 IN_param_value->accept(*this);
       
  8501                 s4o.print(", 16)");
       
  8502                 return NULL;
       
  8503                 
       
  8504             }
       
  8505             
       
  8506             ERROR;
       
  8507         }
       
  8508         
       
  8509     }/*function_bool_to_wstring*/
       
  8510     break;
       
  8511 
       
  8512 /****
       
  8513  *BOOL_TO_DATE
       
  8514  */
       
  8515     case function_bool_to_date :
       
  8516     {
       
  8517         symbol_c *last_type_symbol = NULL;
       
  8518 
       
  8519         {
       
  8520             identifier_c param_name("IN");
       
  8521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8522             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8523             
       
  8524             /* Get the value from a foo(<param_value>) style call */
       
  8525             if (IN_param_value == NULL)
       
  8526               IN_param_value = function_call_param_iterator.next();
       
  8527             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8528             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8529             
       
  8530             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8531             {
       
  8532         
       
  8533                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8534                 s4o.print("(");
       
  8535                 return_type_symbol->accept(*this);
       
  8536                 s4o.print(")real_to_time(");
       
  8537                 IN_param_value->accept(*this);
       
  8538                 s4o.print(")");
       
  8539                 return NULL;
       
  8540                 
       
  8541             }
       
  8542             
       
  8543             ERROR;
       
  8544         }
       
  8545         
       
  8546     }/*function_bool_to_date*/
       
  8547     break;
       
  8548 
       
  8549 /****
       
  8550  *BOOL_TO_TOD
       
  8551  */
       
  8552     case function_bool_to_tod :
       
  8553     {
       
  8554         symbol_c *last_type_symbol = NULL;
       
  8555 
       
  8556         {
       
  8557             identifier_c param_name("IN");
       
  8558             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8560             
       
  8561             /* Get the value from a foo(<param_value>) style call */
       
  8562             if (IN_param_value == NULL)
       
  8563               IN_param_value = function_call_param_iterator.next();
       
  8564             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8566             
       
  8567             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8568             {
       
  8569         
       
  8570                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8571                 s4o.print("(");
       
  8572                 return_type_symbol->accept(*this);
       
  8573                 s4o.print(")real_to_time(");
       
  8574                 IN_param_value->accept(*this);
       
  8575                 s4o.print(")");
       
  8576                 return NULL;
       
  8577                 
       
  8578             }
       
  8579             
       
  8580             ERROR;
       
  8581         }
       
  8582         
       
  8583     }/*function_bool_to_tod*/
       
  8584     break;
       
  8585 
       
  8586 /****
       
  8587  *BOOL_TO_DT
       
  8588  */
       
  8589     case function_bool_to_dt :
       
  8590     {
       
  8591         symbol_c *last_type_symbol = NULL;
       
  8592 
       
  8593         {
       
  8594             identifier_c param_name("IN");
       
  8595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8597             
       
  8598             /* Get the value from a foo(<param_value>) style call */
       
  8599             if (IN_param_value == NULL)
       
  8600               IN_param_value = function_call_param_iterator.next();
       
  8601             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8603             
       
  8604             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8605             {
       
  8606         
       
  8607                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8608                 s4o.print("(");
       
  8609                 return_type_symbol->accept(*this);
       
  8610                 s4o.print(")real_to_time(");
       
  8611                 IN_param_value->accept(*this);
       
  8612                 s4o.print(")");
       
  8613                 return NULL;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_bool_to_dt*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *BYTE_TO_REAL
       
  8625  */
       
  8626     case function_byte_to_real :
       
  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(byte_type_name_c))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8645                 s4o.print("(");
       
  8646                 return_type_symbol->accept(*this);
       
  8647                 s4o.print(")");
       
  8648                 IN_param_value->accept(*this);
       
  8649                 return NULL;
       
  8650                 
       
  8651             }
       
  8652             
       
  8653             ERROR;
       
  8654         }
       
  8655         
       
  8656     }/*function_byte_to_real*/
       
  8657     break;
       
  8658 
       
  8659 /****
       
  8660  *BYTE_TO_LREAL
       
  8661  */
       
  8662     case function_byte_to_lreal :
       
  8663     {
       
  8664         symbol_c *last_type_symbol = NULL;
       
  8665 
       
  8666         {
       
  8667             identifier_c param_name("IN");
       
  8668             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8669             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8670             
       
  8671             /* Get the value from a foo(<param_value>) style call */
       
  8672             if (IN_param_value == NULL)
       
  8673               IN_param_value = function_call_param_iterator.next();
       
  8674             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8675             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8676             
       
  8677             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8678             {
       
  8679         
       
  8680                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8681                 s4o.print("(");
       
  8682                 return_type_symbol->accept(*this);
       
  8683                 s4o.print(")");
       
  8684                 IN_param_value->accept(*this);
       
  8685                 return NULL;
       
  8686                 
       
  8687             }
       
  8688             
       
  8689             ERROR;
       
  8690         }
       
  8691         
       
  8692     }/*function_byte_to_lreal*/
       
  8693     break;
       
  8694 
       
  8695 /****
       
  8696  *BYTE_TO_SINT
       
  8697  */
       
  8698     case function_byte_to_sint :
       
  8699     {
       
  8700         symbol_c *last_type_symbol = NULL;
       
  8701 
       
  8702         {
       
  8703             identifier_c param_name("IN");
       
  8704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8706             
       
  8707             /* Get the value from a foo(<param_value>) style call */
       
  8708             if (IN_param_value == NULL)
       
  8709               IN_param_value = function_call_param_iterator.next();
       
  8710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8712             
       
  8713             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8714             {
       
  8715         
       
  8716                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8717                 s4o.print("(");
       
  8718                 return_type_symbol->accept(*this);
       
  8719                 s4o.print(")");
       
  8720                 IN_param_value->accept(*this);
       
  8721                 return NULL;
       
  8722                 
       
  8723             }
       
  8724             
       
  8725             ERROR;
       
  8726         }
       
  8727         
       
  8728     }/*function_byte_to_sint*/
       
  8729     break;
       
  8730 
       
  8731 /****
       
  8732  *BYTE_TO_INT
       
  8733  */
       
  8734     case function_byte_to_int :
       
  8735     {
       
  8736         symbol_c *last_type_symbol = NULL;
       
  8737 
       
  8738         {
       
  8739             identifier_c param_name("IN");
       
  8740             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8741             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8742             
       
  8743             /* Get the value from a foo(<param_value>) style call */
       
  8744             if (IN_param_value == NULL)
       
  8745               IN_param_value = function_call_param_iterator.next();
       
  8746             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8747             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8748             
       
  8749             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8750             {
       
  8751         
       
  8752                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8753                 s4o.print("(");
       
  8754                 return_type_symbol->accept(*this);
       
  8755                 s4o.print(")");
       
  8756                 IN_param_value->accept(*this);
       
  8757                 return NULL;
       
  8758                 
       
  8759             }
       
  8760             
       
  8761             ERROR;
       
  8762         }
       
  8763         
       
  8764     }/*function_byte_to_int*/
       
  8765     break;
       
  8766 
       
  8767 /****
       
  8768  *BYTE_TO_DINT
       
  8769  */
       
  8770     case function_byte_to_dint :
       
  8771     {
       
  8772         symbol_c *last_type_symbol = NULL;
       
  8773 
       
  8774         {
       
  8775             identifier_c param_name("IN");
       
  8776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8778             
       
  8779             /* Get the value from a foo(<param_value>) style call */
       
  8780             if (IN_param_value == NULL)
       
  8781               IN_param_value = function_call_param_iterator.next();
       
  8782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8784             
       
  8785             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8786             {
       
  8787         
       
  8788                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8789                 s4o.print("(");
       
  8790                 return_type_symbol->accept(*this);
       
  8791                 s4o.print(")");
       
  8792                 IN_param_value->accept(*this);
       
  8793                 return NULL;
       
  8794                 
       
  8795             }
       
  8796             
       
  8797             ERROR;
       
  8798         }
       
  8799         
       
  8800     }/*function_byte_to_dint*/
       
  8801     break;
       
  8802 
       
  8803 /****
       
  8804  *BYTE_TO_LINT
       
  8805  */
       
  8806     case function_byte_to_lint :
       
  8807     {
       
  8808         symbol_c *last_type_symbol = NULL;
       
  8809 
       
  8810         {
       
  8811             identifier_c param_name("IN");
       
  8812             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8813             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8814             
       
  8815             /* Get the value from a foo(<param_value>) style call */
       
  8816             if (IN_param_value == NULL)
       
  8817               IN_param_value = function_call_param_iterator.next();
       
  8818             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8819             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8820             
       
  8821             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8822             {
       
  8823         
       
  8824                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8825                 s4o.print("(");
       
  8826                 return_type_symbol->accept(*this);
       
  8827                 s4o.print(")");
       
  8828                 IN_param_value->accept(*this);
       
  8829                 return NULL;
       
  8830                 
       
  8831             }
       
  8832             
       
  8833             ERROR;
       
  8834         }
       
  8835         
       
  8836     }/*function_byte_to_lint*/
       
  8837     break;
       
  8838 
       
  8839 /****
       
  8840  *BYTE_TO_USINT
       
  8841  */
       
  8842     case function_byte_to_usint :
       
  8843     {
       
  8844         symbol_c *last_type_symbol = NULL;
       
  8845 
       
  8846         {
       
  8847             identifier_c param_name("IN");
       
  8848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8850             
       
  8851             /* Get the value from a foo(<param_value>) style call */
       
  8852             if (IN_param_value == NULL)
       
  8853               IN_param_value = function_call_param_iterator.next();
       
  8854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8856             
       
  8857             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8858             {
       
  8859         
       
  8860                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8861                 s4o.print("(");
       
  8862                 return_type_symbol->accept(*this);
       
  8863                 s4o.print(")");
       
  8864                 IN_param_value->accept(*this);
       
  8865                 return NULL;
       
  8866                 
       
  8867             }
       
  8868             
       
  8869             ERROR;
       
  8870         }
       
  8871         
       
  8872     }/*function_byte_to_usint*/
       
  8873     break;
       
  8874 
       
  8875 /****
       
  8876  *BYTE_TO_UINT
       
  8877  */
       
  8878     case function_byte_to_uint :
       
  8879     {
       
  8880         symbol_c *last_type_symbol = NULL;
       
  8881 
       
  8882         {
       
  8883             identifier_c param_name("IN");
       
  8884             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8885             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8886             
       
  8887             /* Get the value from a foo(<param_value>) style call */
       
  8888             if (IN_param_value == NULL)
       
  8889               IN_param_value = function_call_param_iterator.next();
       
  8890             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8891             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8892             
       
  8893             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8894             {
       
  8895         
       
  8896                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8897                 s4o.print("(");
       
  8898                 return_type_symbol->accept(*this);
       
  8899                 s4o.print(")");
       
  8900                 IN_param_value->accept(*this);
       
  8901                 return NULL;
       
  8902                 
       
  8903             }
       
  8904             
       
  8905             ERROR;
       
  8906         }
       
  8907         
       
  8908     }/*function_byte_to_uint*/
       
  8909     break;
       
  8910 
       
  8911 /****
       
  8912  *BYTE_TO_UDINT
       
  8913  */
       
  8914     case function_byte_to_udint :
       
  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(byte_type_name_c))
       
  8930             {
       
  8931         
       
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8933                 s4o.print("(");
       
  8934                 return_type_symbol->accept(*this);
       
  8935                 s4o.print(")");
       
  8936                 IN_param_value->accept(*this);
       
  8937                 return NULL;
       
  8938                 
       
  8939             }
       
  8940             
       
  8941             ERROR;
       
  8942         }
       
  8943         
       
  8944     }/*function_byte_to_udint*/
       
  8945     break;
       
  8946 
       
  8947 /****
       
  8948  *BYTE_TO_ULINT
       
  8949  */
       
  8950     case function_byte_to_ulint :
       
  8951     {
       
  8952         symbol_c *last_type_symbol = NULL;
       
  8953 
       
  8954         {
       
  8955             identifier_c param_name("IN");
       
  8956             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8957             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8958             
       
  8959             /* Get the value from a foo(<param_value>) style call */
       
  8960             if (IN_param_value == NULL)
       
  8961               IN_param_value = function_call_param_iterator.next();
       
  8962             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8963             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8964             
       
  8965             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8966             {
       
  8967         
       
  8968                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8969                 s4o.print("(");
       
  8970                 return_type_symbol->accept(*this);
       
  8971                 s4o.print(")");
       
  8972                 IN_param_value->accept(*this);
       
  8973                 return NULL;
       
  8974                 
       
  8975             }
       
  8976             
       
  8977             ERROR;
       
  8978         }
       
  8979         
       
  8980     }/*function_byte_to_ulint*/
       
  8981     break;
       
  8982 
       
  8983 /****
       
  8984  *BYTE_TO_TIME
       
  8985  */
       
  8986     case function_byte_to_time :
       
  8987     {
       
  8988         symbol_c *last_type_symbol = NULL;
       
  8989 
       
  8990         {
       
  8991             identifier_c param_name("IN");
       
  8992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8994             
       
  8995             /* Get the value from a foo(<param_value>) style call */
       
  8996             if (IN_param_value == NULL)
       
  8997               IN_param_value = function_call_param_iterator.next();
       
  8998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9000             
       
  9001             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9002             {
       
  9003         
       
  9004                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9005                 s4o.print("(");
       
  9006                 return_type_symbol->accept(*this);
       
  9007                 s4o.print(")real_to_time(");
       
  9008                 IN_param_value->accept(*this);
       
  9009                 s4o.print(")");
       
  9010                 return NULL;
       
  9011                 
       
  9012             }
       
  9013             
       
  9014             ERROR;
       
  9015         }
       
  9016         
       
  9017     }/*function_byte_to_time*/
       
  9018     break;
       
  9019 
       
  9020 /****
       
  9021  *BYTE_TO_BOOL
       
  9022  */
       
  9023     case function_byte_to_bool :
       
  9024     {
       
  9025         symbol_c *last_type_symbol = NULL;
       
  9026 
       
  9027         {
       
  9028             identifier_c param_name("IN");
       
  9029             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9030             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9031             
       
  9032             /* Get the value from a foo(<param_value>) style call */
       
  9033             if (IN_param_value == NULL)
       
  9034               IN_param_value = function_call_param_iterator.next();
       
  9035             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9036             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9037             
       
  9038             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9039             {
       
  9040         
       
  9041                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9042                 s4o.print("(");
       
  9043                 return_type_symbol->accept(*this);
       
  9044                 s4o.print(")");
       
  9045                 IN_param_value->accept(*this);
       
  9046                 return NULL;
       
  9047                 
       
  9048             }
       
  9049             
       
  9050             ERROR;
       
  9051         }
       
  9052         
       
  9053     }/*function_byte_to_bool*/
       
  9054     break;
       
  9055 
       
  9056 /****
       
  9057  *BYTE_TO_WORD
       
  9058  */
       
  9059     case function_byte_to_word :
       
  9060     {
       
  9061         symbol_c *last_type_symbol = NULL;
       
  9062 
       
  9063         {
       
  9064             identifier_c param_name("IN");
       
  9065             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9066             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9067             
       
  9068             /* Get the value from a foo(<param_value>) style call */
       
  9069             if (IN_param_value == NULL)
       
  9070               IN_param_value = function_call_param_iterator.next();
       
  9071             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9072             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9073             
       
  9074             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9075             {
       
  9076         
       
  9077                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9078                 s4o.print("(");
       
  9079                 return_type_symbol->accept(*this);
       
  9080                 s4o.print(")");
       
  9081                 IN_param_value->accept(*this);
       
  9082                 return NULL;
       
  9083                 
       
  9084             }
       
  9085             
       
  9086             ERROR;
       
  9087         }
       
  9088         
       
  9089     }/*function_byte_to_word*/
       
  9090     break;
       
  9091 
       
  9092 /****
       
  9093  *BYTE_TO_DWORD
       
  9094  */
       
  9095     case function_byte_to_dword :
       
  9096     {
       
  9097         symbol_c *last_type_symbol = NULL;
       
  9098 
       
  9099         {
       
  9100             identifier_c param_name("IN");
       
  9101             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9102             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9103             
       
  9104             /* Get the value from a foo(<param_value>) style call */
       
  9105             if (IN_param_value == NULL)
       
  9106               IN_param_value = function_call_param_iterator.next();
       
  9107             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9108             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9109             
       
  9110             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9111             {
       
  9112         
       
  9113                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9114                 s4o.print("(");
       
  9115                 return_type_symbol->accept(*this);
       
  9116                 s4o.print(")");
       
  9117                 IN_param_value->accept(*this);
       
  9118                 return NULL;
       
  9119                 
       
  9120             }
       
  9121             
       
  9122             ERROR;
       
  9123         }
       
  9124         
       
  9125     }/*function_byte_to_dword*/
       
  9126     break;
       
  9127 
       
  9128 /****
       
  9129  *BYTE_TO_LWORD
       
  9130  */
       
  9131     case function_byte_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(byte_type_name_c))
       
  9147             {
       
  9148         
       
  9149                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9150                 s4o.print("(");
       
  9151                 return_type_symbol->accept(*this);
       
  9152                 s4o.print(")");
       
  9153                 IN_param_value->accept(*this);
       
  9154                 return NULL;
       
  9155                 
       
  9156             }
       
  9157             
       
  9158             ERROR;
       
  9159         }
       
  9160         
       
  9161     }/*function_byte_to_lword*/
       
  9162     break;
       
  9163 
       
  9164 /****
       
  9165  *BYTE_TO_STRING
       
  9166  */
       
  9167     case function_byte_to_string :
       
  9168     {
       
  9169         symbol_c *last_type_symbol = NULL;
       
  9170 
       
  9171         {
       
  9172             identifier_c param_name("IN");
       
  9173             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9174             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9175             
       
  9176             /* Get the value from a foo(<param_value>) style call */
       
  9177             if (IN_param_value == NULL)
       
  9178               IN_param_value = function_call_param_iterator.next();
       
  9179             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9180             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9181             
       
  9182             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9183             {
       
  9184         
       
  9185                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9186                 s4o.print("(");
       
  9187                 return_type_symbol->accept(*this);
       
  9188                 s4o.print(")int_to_string(");
       
  9189                 IN_param_value->accept(*this);
       
  9190                 s4o.print(", 16)");
       
  9191                 return NULL;
       
  9192                 
       
  9193             }
       
  9194             
       
  9195             ERROR;
       
  9196         }
       
  9197         
       
  9198     }/*function_byte_to_string*/
       
  9199     break;
       
  9200 
       
  9201 /****
       
  9202  *BYTE_TO_WSTRING
       
  9203  */
       
  9204     case function_byte_to_wstring :
       
  9205     {
       
  9206         symbol_c *last_type_symbol = NULL;
       
  9207 
       
  9208         {
       
  9209             identifier_c param_name("IN");
       
  9210             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9211             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9212             
       
  9213             /* Get the value from a foo(<param_value>) style call */
       
  9214             if (IN_param_value == NULL)
       
  9215               IN_param_value = function_call_param_iterator.next();
       
  9216             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9217             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9218             
       
  9219             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9220             {
       
  9221         
       
  9222                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9223                 s4o.print("(");
       
  9224                 return_type_symbol->accept(*this);
       
  9225                 s4o.print(")int_to_string(");
       
  9226                 IN_param_value->accept(*this);
       
  9227                 s4o.print(", 16)");
       
  9228                 return NULL;
       
  9229                 
       
  9230             }
       
  9231             
       
  9232             ERROR;
       
  9233         }
       
  9234         
       
  9235     }/*function_byte_to_wstring*/
       
  9236     break;
       
  9237 
       
  9238 /****
       
  9239  *BYTE_TO_DATE
       
  9240  */
       
  9241     case function_byte_to_date :
       
  9242     {
       
  9243         symbol_c *last_type_symbol = NULL;
       
  9244 
       
  9245         {
       
  9246             identifier_c param_name("IN");
       
  9247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9248             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9249             
       
  9250             /* Get the value from a foo(<param_value>) style call */
       
  9251             if (IN_param_value == NULL)
       
  9252               IN_param_value = function_call_param_iterator.next();
       
  9253             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9254             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9255             
       
  9256             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9257             {
       
  9258         
       
  9259                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9260                 s4o.print("(");
       
  9261                 return_type_symbol->accept(*this);
       
  9262                 s4o.print(")real_to_time(");
       
  9263                 IN_param_value->accept(*this);
       
  9264                 s4o.print(")");
       
  9265                 return NULL;
       
  9266                 
       
  9267             }
       
  9268             
       
  9269             ERROR;
       
  9270         }
       
  9271         
       
  9272     }/*function_byte_to_date*/
       
  9273     break;
       
  9274 
       
  9275 /****
       
  9276  *BYTE_TO_TOD
       
  9277  */
       
  9278     case function_byte_to_tod :
       
  9279     {
       
  9280         symbol_c *last_type_symbol = NULL;
       
  9281 
       
  9282         {
       
  9283             identifier_c param_name("IN");
       
  9284             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9285             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9286             
       
  9287             /* Get the value from a foo(<param_value>) style call */
       
  9288             if (IN_param_value == NULL)
       
  9289               IN_param_value = function_call_param_iterator.next();
       
  9290             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9291             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9292             
       
  9293             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9294             {
       
  9295         
       
  9296                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9297                 s4o.print("(");
       
  9298                 return_type_symbol->accept(*this);
       
  9299                 s4o.print(")real_to_time(");
       
  9300                 IN_param_value->accept(*this);
       
  9301                 s4o.print(")");
       
  9302                 return NULL;
       
  9303                 
       
  9304             }
       
  9305             
       
  9306             ERROR;
       
  9307         }
       
  9308         
       
  9309     }/*function_byte_to_tod*/
       
  9310     break;
       
  9311 
       
  9312 /****
       
  9313  *BYTE_TO_DT
       
  9314  */
       
  9315     case function_byte_to_dt :
       
  9316     {
       
  9317         symbol_c *last_type_symbol = NULL;
       
  9318 
       
  9319         {
       
  9320             identifier_c param_name("IN");
       
  9321             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9322             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9323             
       
  9324             /* Get the value from a foo(<param_value>) style call */
       
  9325             if (IN_param_value == NULL)
       
  9326               IN_param_value = function_call_param_iterator.next();
       
  9327             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9328             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9329             
       
  9330             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9331             {
       
  9332         
       
  9333                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9334                 s4o.print("(");
       
  9335                 return_type_symbol->accept(*this);
       
  9336                 s4o.print(")real_to_time(");
       
  9337                 IN_param_value->accept(*this);
       
  9338                 s4o.print(")");
       
  9339                 return NULL;
       
  9340                 
       
  9341             }
       
  9342             
       
  9343             ERROR;
       
  9344         }
       
  9345         
       
  9346     }/*function_byte_to_dt*/
       
  9347     break;
       
  9348 
       
  9349 /****
       
  9350  *WORD_TO_REAL
       
  9351  */
       
  9352     case function_word_to_real :
       
  9353     {
       
  9354         symbol_c *last_type_symbol = NULL;
       
  9355 
       
  9356         {
       
  9357             identifier_c param_name("IN");
       
  9358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9359             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9360             
       
  9361             /* Get the value from a foo(<param_value>) style call */
       
  9362             if (IN_param_value == NULL)
       
  9363               IN_param_value = function_call_param_iterator.next();
       
  9364             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9365             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9366             
       
  9367             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9368             {
       
  9369         
       
  9370                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9371                 s4o.print("(");
       
  9372                 return_type_symbol->accept(*this);
       
  9373                 s4o.print(")");
       
  9374                 IN_param_value->accept(*this);
       
  9375                 return NULL;
       
  9376                 
       
  9377             }
       
  9378             
       
  9379             ERROR;
       
  9380         }
       
  9381         
       
  9382     }/*function_word_to_real*/
       
  9383     break;
       
  9384 
       
  9385 /****
       
  9386  *WORD_TO_LREAL
       
  9387  */
       
  9388     case function_word_to_lreal :
       
  9389     {
       
  9390         symbol_c *last_type_symbol = NULL;
       
  9391 
       
  9392         {
       
  9393             identifier_c param_name("IN");
       
  9394             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9395             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9396             
       
  9397             /* Get the value from a foo(<param_value>) style call */
       
  9398             if (IN_param_value == NULL)
       
  9399               IN_param_value = function_call_param_iterator.next();
       
  9400             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9401             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9402             
       
  9403             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9404             {
       
  9405         
       
  9406                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9407                 s4o.print("(");
       
  9408                 return_type_symbol->accept(*this);
       
  9409                 s4o.print(")");
       
  9410                 IN_param_value->accept(*this);
       
  9411                 return NULL;
       
  9412                 
       
  9413             }
       
  9414             
       
  9415             ERROR;
       
  9416         }
       
  9417         
       
  9418     }/*function_word_to_lreal*/
       
  9419     break;
       
  9420 
       
  9421 /****
       
  9422  *WORD_TO_SINT
       
  9423  */
       
  9424     case function_word_to_sint :
       
  9425     {
       
  9426         symbol_c *last_type_symbol = NULL;
       
  9427 
       
  9428         {
       
  9429             identifier_c param_name("IN");
       
  9430             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9431             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9432             
       
  9433             /* Get the value from a foo(<param_value>) style call */
       
  9434             if (IN_param_value == NULL)
       
  9435               IN_param_value = function_call_param_iterator.next();
       
  9436             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9437             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9438             
       
  9439             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9440             {
       
  9441         
       
  9442                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9443                 s4o.print("(");
       
  9444                 return_type_symbol->accept(*this);
       
  9445                 s4o.print(")");
       
  9446                 IN_param_value->accept(*this);
       
  9447                 return NULL;
       
  9448                 
       
  9449             }
       
  9450             
       
  9451             ERROR;
       
  9452         }
       
  9453         
       
  9454     }/*function_word_to_sint*/
       
  9455     break;
       
  9456 
       
  9457 /****
       
  9458  *WORD_TO_INT
       
  9459  */
       
  9460     case function_word_to_int :
       
  9461     {
       
  9462         symbol_c *last_type_symbol = NULL;
       
  9463 
       
  9464         {
       
  9465             identifier_c param_name("IN");
       
  9466             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9467             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9468             
       
  9469             /* Get the value from a foo(<param_value>) style call */
       
  9470             if (IN_param_value == NULL)
       
  9471               IN_param_value = function_call_param_iterator.next();
       
  9472             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9473             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9474             
       
  9475             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9476             {
       
  9477         
       
  9478                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9479                 s4o.print("(");
       
  9480                 return_type_symbol->accept(*this);
       
  9481                 s4o.print(")");
       
  9482                 IN_param_value->accept(*this);
       
  9483                 return NULL;
       
  9484                 
       
  9485             }
       
  9486             
       
  9487             ERROR;
       
  9488         }
       
  9489         
       
  9490     }/*function_word_to_int*/
       
  9491     break;
       
  9492 
       
  9493 /****
       
  9494  *WORD_TO_DINT
       
  9495  */
       
  9496     case function_word_to_dint :
       
  9497     {
       
  9498         symbol_c *last_type_symbol = NULL;
       
  9499 
       
  9500         {
       
  9501             identifier_c param_name("IN");
       
  9502             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9503             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9504             
       
  9505             /* Get the value from a foo(<param_value>) style call */
       
  9506             if (IN_param_value == NULL)
       
  9507               IN_param_value = function_call_param_iterator.next();
       
  9508             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9509             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9510             
       
  9511             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9512             {
       
  9513         
       
  9514                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9515                 s4o.print("(");
       
  9516                 return_type_symbol->accept(*this);
       
  9517                 s4o.print(")");
       
  9518                 IN_param_value->accept(*this);
       
  9519                 return NULL;
       
  9520                 
       
  9521             }
       
  9522             
       
  9523             ERROR;
       
  9524         }
       
  9525         
       
  9526     }/*function_word_to_dint*/
       
  9527     break;
       
  9528 
       
  9529 /****
       
  9530  *WORD_TO_LINT
       
  9531  */
       
  9532     case function_word_to_lint :
       
  9533     {
       
  9534         symbol_c *last_type_symbol = NULL;
       
  9535 
       
  9536         {
       
  9537             identifier_c param_name("IN");
       
  9538             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9539             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9540             
       
  9541             /* Get the value from a foo(<param_value>) style call */
       
  9542             if (IN_param_value == NULL)
       
  9543               IN_param_value = function_call_param_iterator.next();
       
  9544             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9545             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9546             
       
  9547             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9548             {
       
  9549         
       
  9550                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9551                 s4o.print("(");
       
  9552                 return_type_symbol->accept(*this);
       
  9553                 s4o.print(")");
       
  9554                 IN_param_value->accept(*this);
       
  9555                 return NULL;
       
  9556                 
       
  9557             }
       
  9558             
       
  9559             ERROR;
       
  9560         }
       
  9561         
       
  9562     }/*function_word_to_lint*/
       
  9563     break;
       
  9564 
       
  9565 /****
       
  9566  *WORD_TO_USINT
       
  9567  */
       
  9568     case function_word_to_usint :
       
  9569     {
       
  9570         symbol_c *last_type_symbol = NULL;
       
  9571 
       
  9572         {
       
  9573             identifier_c param_name("IN");
       
  9574             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9575             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9576             
       
  9577             /* Get the value from a foo(<param_value>) style call */
       
  9578             if (IN_param_value == NULL)
       
  9579               IN_param_value = function_call_param_iterator.next();
       
  9580             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9581             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9582             
       
  9583             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9584             {
       
  9585         
       
  9586                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9587                 s4o.print("(");
       
  9588                 return_type_symbol->accept(*this);
       
  9589                 s4o.print(")");
       
  9590                 IN_param_value->accept(*this);
       
  9591                 return NULL;
       
  9592                 
       
  9593             }
       
  9594             
       
  9595             ERROR;
       
  9596         }
       
  9597         
       
  9598     }/*function_word_to_usint*/
       
  9599     break;
       
  9600 
       
  9601 /****
       
  9602  *WORD_TO_UINT
       
  9603  */
       
  9604     case function_word_to_uint :
       
  9605     {
       
  9606         symbol_c *last_type_symbol = NULL;
       
  9607 
       
  9608         {
       
  9609             identifier_c param_name("IN");
       
  9610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9612             
       
  9613             /* Get the value from a foo(<param_value>) style call */
       
  9614             if (IN_param_value == NULL)
       
  9615               IN_param_value = function_call_param_iterator.next();
       
  9616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9618             
       
  9619             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9620             {
       
  9621         
       
  9622                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9623                 s4o.print("(");
       
  9624                 return_type_symbol->accept(*this);
       
  9625                 s4o.print(")");
       
  9626                 IN_param_value->accept(*this);
       
  9627                 return NULL;
       
  9628                 
       
  9629             }
       
  9630             
       
  9631             ERROR;
       
  9632         }
       
  9633         
       
  9634     }/*function_word_to_uint*/
       
  9635     break;
       
  9636 
       
  9637 /****
       
  9638  *WORD_TO_UDINT
       
  9639  */
       
  9640     case function_word_to_udint :
       
  9641     {
       
  9642         symbol_c *last_type_symbol = NULL;
       
  9643 
       
  9644         {
       
  9645             identifier_c param_name("IN");
       
  9646             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9647             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9648             
       
  9649             /* Get the value from a foo(<param_value>) style call */
       
  9650             if (IN_param_value == NULL)
       
  9651               IN_param_value = function_call_param_iterator.next();
       
  9652             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9653             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9654             
       
  9655             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9656             {
       
  9657         
       
  9658                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9659                 s4o.print("(");
       
  9660                 return_type_symbol->accept(*this);
       
  9661                 s4o.print(")");
       
  9662                 IN_param_value->accept(*this);
       
  9663                 return NULL;
       
  9664                 
       
  9665             }
       
  9666             
       
  9667             ERROR;
       
  9668         }
       
  9669         
       
  9670     }/*function_word_to_udint*/
       
  9671     break;
       
  9672 
       
  9673 /****
       
  9674  *WORD_TO_ULINT
       
  9675  */
       
  9676     case function_word_to_ulint :
       
  9677     {
       
  9678         symbol_c *last_type_symbol = NULL;
       
  9679 
       
  9680         {
       
  9681             identifier_c param_name("IN");
       
  9682             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9683             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9684             
       
  9685             /* Get the value from a foo(<param_value>) style call */
       
  9686             if (IN_param_value == NULL)
       
  9687               IN_param_value = function_call_param_iterator.next();
       
  9688             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9689             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9690             
       
  9691             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9692             {
       
  9693         
       
  9694                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9695                 s4o.print("(");
       
  9696                 return_type_symbol->accept(*this);
       
  9697                 s4o.print(")");
       
  9698                 IN_param_value->accept(*this);
       
  9699                 return NULL;
       
  9700                 
       
  9701             }
       
  9702             
       
  9703             ERROR;
       
  9704         }
       
  9705         
       
  9706     }/*function_word_to_ulint*/
       
  9707     break;
       
  9708 
       
  9709 /****
       
  9710  *WORD_TO_TIME
       
  9711  */
       
  9712     case function_word_to_time :
       
  9713     {
       
  9714         symbol_c *last_type_symbol = NULL;
       
  9715 
       
  9716         {
       
  9717             identifier_c param_name("IN");
       
  9718             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9719             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9720             
       
  9721             /* Get the value from a foo(<param_value>) style call */
       
  9722             if (IN_param_value == NULL)
       
  9723               IN_param_value = function_call_param_iterator.next();
       
  9724             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9725             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9726             
       
  9727             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9728             {
       
  9729         
       
  9730                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9731                 s4o.print("(");
       
  9732                 return_type_symbol->accept(*this);
       
  9733                 s4o.print(")real_to_time(");
       
  9734                 IN_param_value->accept(*this);
       
  9735                 s4o.print(")");
       
  9736                 return NULL;
       
  9737                 
       
  9738             }
       
  9739             
       
  9740             ERROR;
       
  9741         }
       
  9742         
       
  9743     }/*function_word_to_time*/
       
  9744     break;
       
  9745 
       
  9746 /****
       
  9747  *WORD_TO_BOOL
       
  9748  */
       
  9749     case function_word_to_bool :
       
  9750     {
       
  9751         symbol_c *last_type_symbol = NULL;
       
  9752 
       
  9753         {
       
  9754             identifier_c param_name("IN");
       
  9755             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9757             
       
  9758             /* Get the value from a foo(<param_value>) style call */
       
  9759             if (IN_param_value == NULL)
       
  9760               IN_param_value = function_call_param_iterator.next();
       
  9761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9763             
       
  9764             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9765             {
       
  9766         
       
  9767                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9768                 s4o.print("(");
       
  9769                 return_type_symbol->accept(*this);
       
  9770                 s4o.print(")");
       
  9771                 IN_param_value->accept(*this);
       
  9772                 return NULL;
       
  9773                 
       
  9774             }
       
  9775             
       
  9776             ERROR;
       
  9777         }
       
  9778         
       
  9779     }/*function_word_to_bool*/
       
  9780     break;
       
  9781 
       
  9782 /****
       
  9783  *WORD_TO_BYTE
       
  9784  */
       
  9785     case function_word_to_byte :
       
  9786     {
       
  9787         symbol_c *last_type_symbol = NULL;
       
  9788 
       
  9789         {
       
  9790             identifier_c param_name("IN");
       
  9791             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9792             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9793             
       
  9794             /* Get the value from a foo(<param_value>) style call */
       
  9795             if (IN_param_value == NULL)
       
  9796               IN_param_value = function_call_param_iterator.next();
       
  9797             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9798             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9799             
       
  9800             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9801             {
       
  9802         
       
  9803                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9804                 s4o.print("(");
       
  9805                 return_type_symbol->accept(*this);
       
  9806                 s4o.print(")");
       
  9807                 IN_param_value->accept(*this);
       
  9808                 return NULL;
       
  9809                 
       
  9810             }
       
  9811             
       
  9812             ERROR;
       
  9813         }
       
  9814         
       
  9815     }/*function_word_to_byte*/
       
  9816     break;
       
  9817 
       
  9818 /****
       
  9819  *WORD_TO_DWORD
       
  9820  */
       
  9821     case function_word_to_dword :
       
  9822     {
       
  9823         symbol_c *last_type_symbol = NULL;
       
  9824 
       
  9825         {
       
  9826             identifier_c param_name("IN");
       
  9827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9828             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9829             
       
  9830             /* Get the value from a foo(<param_value>) style call */
       
  9831             if (IN_param_value == NULL)
       
  9832               IN_param_value = function_call_param_iterator.next();
       
  9833             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9834             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9835             
       
  9836             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9837             {
       
  9838         
       
  9839                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9840                 s4o.print("(");
       
  9841                 return_type_symbol->accept(*this);
       
  9842                 s4o.print(")");
       
  9843                 IN_param_value->accept(*this);
       
  9844                 return NULL;
       
  9845                 
       
  9846             }
       
  9847             
       
  9848             ERROR;
       
  9849         }
       
  9850         
       
  9851     }/*function_word_to_dword*/
       
  9852     break;
       
  9853 
       
  9854 /****
       
  9855  *WORD_TO_LWORD
       
  9856  */
       
  9857     case function_word_to_lword :
       
  9858     {
       
  9859         symbol_c *last_type_symbol = NULL;
       
  9860 
       
  9861         {
       
  9862             identifier_c param_name("IN");
       
  9863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9864             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9865             
       
  9866             /* Get the value from a foo(<param_value>) style call */
       
  9867             if (IN_param_value == NULL)
       
  9868               IN_param_value = function_call_param_iterator.next();
       
  9869             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9870             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9871             
       
  9872             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9873             {
       
  9874         
       
  9875                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9876                 s4o.print("(");
       
  9877                 return_type_symbol->accept(*this);
       
  9878                 s4o.print(")");
       
  9879                 IN_param_value->accept(*this);
       
  9880                 return NULL;
       
  9881                 
       
  9882             }
       
  9883             
       
  9884             ERROR;
       
  9885         }
       
  9886         
       
  9887     }/*function_word_to_lword*/
       
  9888     break;
       
  9889 
       
  9890 /****
       
  9891  *WORD_TO_STRING
       
  9892  */
       
  9893     case function_word_to_string :
       
  9894     {
       
  9895         symbol_c *last_type_symbol = NULL;
       
  9896 
       
  9897         {
       
  9898             identifier_c param_name("IN");
       
  9899             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9900             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9901             
       
  9902             /* Get the value from a foo(<param_value>) style call */
       
  9903             if (IN_param_value == NULL)
       
  9904               IN_param_value = function_call_param_iterator.next();
       
  9905             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9906             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9907             
       
  9908             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9909             {
       
  9910         
       
  9911                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9912                 s4o.print("(");
       
  9913                 return_type_symbol->accept(*this);
       
  9914                 s4o.print(")int_to_string(");
       
  9915                 IN_param_value->accept(*this);
       
  9916                 s4o.print(", 16)");
       
  9917                 return NULL;
       
  9918                 
       
  9919             }
       
  9920             
       
  9921             ERROR;
       
  9922         }
       
  9923         
       
  9924     }/*function_word_to_string*/
       
  9925     break;
       
  9926 
       
  9927 /****
       
  9928  *WORD_TO_WSTRING
       
  9929  */
       
  9930     case function_word_to_wstring :
       
  9931     {
       
  9932         symbol_c *last_type_symbol = NULL;
       
  9933 
       
  9934         {
       
  9935             identifier_c param_name("IN");
       
  9936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9938             
       
  9939             /* Get the value from a foo(<param_value>) style call */
       
  9940             if (IN_param_value == NULL)
       
  9941               IN_param_value = function_call_param_iterator.next();
       
  9942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9944             
       
  9945             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9946             {
       
  9947         
       
  9948                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9949                 s4o.print("(");
       
  9950                 return_type_symbol->accept(*this);
       
  9951                 s4o.print(")int_to_string(");
       
  9952                 IN_param_value->accept(*this);
       
  9953                 s4o.print(", 16)");
       
  9954                 return NULL;
       
  9955                 
       
  9956             }
       
  9957             
       
  9958             ERROR;
       
  9959         }
       
  9960         
       
  9961     }/*function_word_to_wstring*/
       
  9962     break;
       
  9963 
       
  9964 /****
       
  9965  *WORD_TO_DATE
       
  9966  */
       
  9967     case function_word_to_date :
       
  9968     {
       
  9969         symbol_c *last_type_symbol = NULL;
       
  9970 
       
  9971         {
       
  9972             identifier_c param_name("IN");
       
  9973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9974             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9975             
       
  9976             /* Get the value from a foo(<param_value>) style call */
       
  9977             if (IN_param_value == NULL)
       
  9978               IN_param_value = function_call_param_iterator.next();
       
  9979             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9980             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9981             
       
  9982             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9983             {
       
  9984         
       
  9985                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9986                 s4o.print("(");
       
  9987                 return_type_symbol->accept(*this);
       
  9988                 s4o.print(")real_to_time(");
       
  9989                 IN_param_value->accept(*this);
       
  9990                 s4o.print(")");
       
  9991                 return NULL;
       
  9992                 
       
  9993             }
       
  9994             
       
  9995             ERROR;
       
  9996         }
       
  9997         
       
  9998     }/*function_word_to_date*/
       
  9999     break;
       
 10000 
       
 10001 /****
       
 10002  *WORD_TO_TOD
       
 10003  */
       
 10004     case function_word_to_tod :
       
 10005     {
       
 10006         symbol_c *last_type_symbol = NULL;
       
 10007 
       
 10008         {
       
 10009             identifier_c param_name("IN");
       
 10010             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10011             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10012             
       
 10013             /* Get the value from a foo(<param_value>) style call */
       
 10014             if (IN_param_value == NULL)
       
 10015               IN_param_value = function_call_param_iterator.next();
       
 10016             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10017             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10018             
       
 10019             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10020             {
       
 10021         
       
 10022                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10023                 s4o.print("(");
       
 10024                 return_type_symbol->accept(*this);
       
 10025                 s4o.print(")real_to_time(");
       
 10026                 IN_param_value->accept(*this);
       
 10027                 s4o.print(")");
       
 10028                 return NULL;
       
 10029                 
       
 10030             }
       
 10031             
       
 10032             ERROR;
       
 10033         }
       
 10034         
       
 10035     }/*function_word_to_tod*/
       
 10036     break;
       
 10037 
       
 10038 /****
       
 10039  *WORD_TO_DT
       
 10040  */
       
 10041     case function_word_to_dt :
       
 10042     {
       
 10043         symbol_c *last_type_symbol = NULL;
       
 10044 
       
 10045         {
       
 10046             identifier_c param_name("IN");
       
 10047             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10048             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10049             
       
 10050             /* Get the value from a foo(<param_value>) style call */
       
 10051             if (IN_param_value == NULL)
       
 10052               IN_param_value = function_call_param_iterator.next();
       
 10053             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10054             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10055             
       
 10056             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10057             {
       
 10058         
       
 10059                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10060                 s4o.print("(");
       
 10061                 return_type_symbol->accept(*this);
       
 10062                 s4o.print(")real_to_time(");
       
 10063                 IN_param_value->accept(*this);
       
 10064                 s4o.print(")");
       
 10065                 return NULL;
       
 10066                 
       
 10067             }
       
 10068             
       
 10069             ERROR;
       
 10070         }
       
 10071         
       
 10072     }/*function_word_to_dt*/
       
 10073     break;
       
 10074 
       
 10075 /****
       
 10076  *DWORD_TO_REAL
       
 10077  */
       
 10078     case function_dword_to_real :
       
 10079     {
       
 10080         symbol_c *last_type_symbol = NULL;
       
 10081 
       
 10082         {
       
 10083             identifier_c param_name("IN");
       
 10084             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10085             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10086             
       
 10087             /* Get the value from a foo(<param_value>) style call */
       
 10088             if (IN_param_value == NULL)
       
 10089               IN_param_value = function_call_param_iterator.next();
       
 10090             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10091             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10092             
       
 10093             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10094             {
       
 10095         
       
 10096                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10097                 s4o.print("(");
       
 10098                 return_type_symbol->accept(*this);
       
 10099                 s4o.print(")");
       
 10100                 IN_param_value->accept(*this);
       
 10101                 return NULL;
       
 10102                 
       
 10103             }
       
 10104             
       
 10105             ERROR;
       
 10106         }
       
 10107         
       
 10108     }/*function_dword_to_real*/
       
 10109     break;
       
 10110 
       
 10111 /****
       
 10112  *DWORD_TO_LREAL
       
 10113  */
       
 10114     case function_dword_to_lreal :
       
 10115     {
       
 10116         symbol_c *last_type_symbol = NULL;
       
 10117 
       
 10118         {
       
 10119             identifier_c param_name("IN");
       
 10120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10122             
       
 10123             /* Get the value from a foo(<param_value>) style call */
       
 10124             if (IN_param_value == NULL)
       
 10125               IN_param_value = function_call_param_iterator.next();
       
 10126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10128             
       
 10129             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10130             {
       
 10131         
       
 10132                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10133                 s4o.print("(");
       
 10134                 return_type_symbol->accept(*this);
       
 10135                 s4o.print(")");
       
 10136                 IN_param_value->accept(*this);
       
 10137                 return NULL;
       
 10138                 
       
 10139             }
       
 10140             
       
 10141             ERROR;
       
 10142         }
       
 10143         
       
 10144     }/*function_dword_to_lreal*/
       
 10145     break;
       
 10146 
       
 10147 /****
       
 10148  *DWORD_TO_SINT
       
 10149  */
       
 10150     case function_dword_to_sint :
       
 10151     {
       
 10152         symbol_c *last_type_symbol = NULL;
       
 10153 
       
 10154         {
       
 10155             identifier_c param_name("IN");
       
 10156             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10157             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10158             
       
 10159             /* Get the value from a foo(<param_value>) style call */
       
 10160             if (IN_param_value == NULL)
       
 10161               IN_param_value = function_call_param_iterator.next();
       
 10162             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10163             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10164             
       
 10165             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10166             {
       
 10167         
       
 10168                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10169                 s4o.print("(");
       
 10170                 return_type_symbol->accept(*this);
       
 10171                 s4o.print(")");
       
 10172                 IN_param_value->accept(*this);
       
 10173                 return NULL;
       
 10174                 
       
 10175             }
       
 10176             
       
 10177             ERROR;
       
 10178         }
       
 10179         
       
 10180     }/*function_dword_to_sint*/
       
 10181     break;
       
 10182 
       
 10183 /****
       
 10184  *DWORD_TO_INT
       
 10185  */
       
 10186     case function_dword_to_int :
       
 10187     {
       
 10188         symbol_c *last_type_symbol = NULL;
       
 10189 
       
 10190         {
       
 10191             identifier_c param_name("IN");
       
 10192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10194             
       
 10195             /* Get the value from a foo(<param_value>) style call */
       
 10196             if (IN_param_value == NULL)
       
 10197               IN_param_value = function_call_param_iterator.next();
       
 10198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10200             
       
 10201             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10202             {
       
 10203         
       
 10204                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10205                 s4o.print("(");
       
 10206                 return_type_symbol->accept(*this);
       
 10207                 s4o.print(")");
       
 10208                 IN_param_value->accept(*this);
       
 10209                 return NULL;
       
 10210                 
       
 10211             }
       
 10212             
       
 10213             ERROR;
       
 10214         }
       
 10215         
       
 10216     }/*function_dword_to_int*/
       
 10217     break;
       
 10218 
       
 10219 /****
       
 10220  *DWORD_TO_DINT
       
 10221  */
       
 10222     case function_dword_to_dint :
       
 10223     {
       
 10224         symbol_c *last_type_symbol = NULL;
       
 10225 
       
 10226         {
       
 10227             identifier_c param_name("IN");
       
 10228             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10229             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10230             
       
 10231             /* Get the value from a foo(<param_value>) style call */
       
 10232             if (IN_param_value == NULL)
       
 10233               IN_param_value = function_call_param_iterator.next();
       
 10234             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10235             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10236             
       
 10237             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10238             {
       
 10239         
       
 10240                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10241                 s4o.print("(");
       
 10242                 return_type_symbol->accept(*this);
       
 10243                 s4o.print(")");
       
 10244                 IN_param_value->accept(*this);
       
 10245                 return NULL;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_dword_to_dint*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *DWORD_TO_LINT
       
 10257  */
       
 10258     case function_dword_to_lint :
       
 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(dword_type_name_c))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10277                 s4o.print("(");
       
 10278                 return_type_symbol->accept(*this);
       
 10279                 s4o.print(")");
       
 10280                 IN_param_value->accept(*this);
       
 10281                 return NULL;
       
 10282                 
       
 10283             }
       
 10284             
       
 10285             ERROR;
       
 10286         }
       
 10287         
       
 10288     }/*function_dword_to_lint*/
       
 10289     break;
       
 10290 
       
 10291 /****
       
 10292  *DWORD_TO_USINT
       
 10293  */
       
 10294     case function_dword_to_usint :
       
 10295     {
       
 10296         symbol_c *last_type_symbol = NULL;
       
 10297 
       
 10298         {
       
 10299             identifier_c param_name("IN");
       
 10300             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10301             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10302             
       
 10303             /* Get the value from a foo(<param_value>) style call */
       
 10304             if (IN_param_value == NULL)
       
 10305               IN_param_value = function_call_param_iterator.next();
       
 10306             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10307             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10308             
       
 10309             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10310             {
       
 10311         
       
 10312                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10313                 s4o.print("(");
       
 10314                 return_type_symbol->accept(*this);
       
 10315                 s4o.print(")");
       
 10316                 IN_param_value->accept(*this);
       
 10317                 return NULL;
       
 10318                 
       
 10319             }
       
 10320             
       
 10321             ERROR;
       
 10322         }
       
 10323         
       
 10324     }/*function_dword_to_usint*/
       
 10325     break;
       
 10326 
       
 10327 /****
       
 10328  *DWORD_TO_UINT
       
 10329  */
       
 10330     case function_dword_to_uint :
       
 10331     {
       
 10332         symbol_c *last_type_symbol = NULL;
       
 10333 
       
 10334         {
       
 10335             identifier_c param_name("IN");
       
 10336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10338             
       
 10339             /* Get the value from a foo(<param_value>) style call */
       
 10340             if (IN_param_value == NULL)
       
 10341               IN_param_value = function_call_param_iterator.next();
       
 10342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10344             
       
 10345             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10346             {
       
 10347         
       
 10348                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10349                 s4o.print("(");
       
 10350                 return_type_symbol->accept(*this);
       
 10351                 s4o.print(")");
       
 10352                 IN_param_value->accept(*this);
       
 10353                 return NULL;
       
 10354                 
       
 10355             }
       
 10356             
       
 10357             ERROR;
       
 10358         }
       
 10359         
       
 10360     }/*function_dword_to_uint*/
       
 10361     break;
       
 10362 
       
 10363 /****
       
 10364  *DWORD_TO_UDINT
       
 10365  */
       
 10366     case function_dword_to_udint :
       
 10367     {
       
 10368         symbol_c *last_type_symbol = NULL;
       
 10369 
       
 10370         {
       
 10371             identifier_c param_name("IN");
       
 10372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10374             
       
 10375             /* Get the value from a foo(<param_value>) style call */
       
 10376             if (IN_param_value == NULL)
       
 10377               IN_param_value = function_call_param_iterator.next();
       
 10378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10380             
       
 10381             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10382             {
       
 10383         
       
 10384                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10385                 s4o.print("(");
       
 10386                 return_type_symbol->accept(*this);
       
 10387                 s4o.print(")");
       
 10388                 IN_param_value->accept(*this);
       
 10389                 return NULL;
       
 10390                 
       
 10391             }
       
 10392             
       
 10393             ERROR;
       
 10394         }
       
 10395         
       
 10396     }/*function_dword_to_udint*/
       
 10397     break;
       
 10398 
       
 10399 /****
       
 10400  *DWORD_TO_ULINT
       
 10401  */
       
 10402     case function_dword_to_ulint :
       
 10403     {
       
 10404         symbol_c *last_type_symbol = NULL;
       
 10405 
       
 10406         {
       
 10407             identifier_c param_name("IN");
       
 10408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10410             
       
 10411             /* Get the value from a foo(<param_value>) style call */
       
 10412             if (IN_param_value == NULL)
       
 10413               IN_param_value = function_call_param_iterator.next();
       
 10414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10416             
       
 10417             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10418             {
       
 10419         
       
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10421                 s4o.print("(");
       
 10422                 return_type_symbol->accept(*this);
       
 10423                 s4o.print(")");
       
 10424                 IN_param_value->accept(*this);
       
 10425                 return NULL;
       
 10426                 
       
 10427             }
       
 10428             
       
 10429             ERROR;
       
 10430         }
       
 10431         
       
 10432     }/*function_dword_to_ulint*/
       
 10433     break;
       
 10434 
       
 10435 /****
       
 10436  *DWORD_TO_TIME
       
 10437  */
       
 10438     case function_dword_to_time :
       
 10439     {
       
 10440         symbol_c *last_type_symbol = NULL;
       
 10441 
       
 10442         {
       
 10443             identifier_c param_name("IN");
       
 10444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10445             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10446             
       
 10447             /* Get the value from a foo(<param_value>) style call */
       
 10448             if (IN_param_value == NULL)
       
 10449               IN_param_value = function_call_param_iterator.next();
       
 10450             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10451             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10452             
       
 10453             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10454             {
       
 10455         
       
 10456                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10457                 s4o.print("(");
       
 10458                 return_type_symbol->accept(*this);
       
 10459                 s4o.print(")real_to_time(");
       
 10460                 IN_param_value->accept(*this);
       
 10461                 s4o.print(")");
       
 10462                 return NULL;
       
 10463                 
       
 10464             }
       
 10465             
       
 10466             ERROR;
       
 10467         }
       
 10468         
       
 10469     }/*function_dword_to_time*/
       
 10470     break;
       
 10471 
       
 10472 /****
       
 10473  *DWORD_TO_BOOL
       
 10474  */
       
 10475     case function_dword_to_bool :
       
 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(dword_type_name_c))
       
 10491             {
       
 10492         
       
 10493                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10494                 s4o.print("(");
       
 10495                 return_type_symbol->accept(*this);
       
 10496                 s4o.print(")");
       
 10497                 IN_param_value->accept(*this);
       
 10498                 return NULL;
       
 10499                 
       
 10500             }
       
 10501             
       
 10502             ERROR;
       
 10503         }
       
 10504         
       
 10505     }/*function_dword_to_bool*/
       
 10506     break;
       
 10507 
       
 10508 /****
       
 10509  *DWORD_TO_BYTE
       
 10510  */
       
 10511     case function_dword_to_byte :
       
 10512     {
       
 10513         symbol_c *last_type_symbol = NULL;
       
 10514 
       
 10515         {
       
 10516             identifier_c param_name("IN");
       
 10517             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10518             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10519             
       
 10520             /* Get the value from a foo(<param_value>) style call */
       
 10521             if (IN_param_value == NULL)
       
 10522               IN_param_value = function_call_param_iterator.next();
       
 10523             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10524             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10525             
       
 10526             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10527             {
       
 10528         
       
 10529                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10530                 s4o.print("(");
       
 10531                 return_type_symbol->accept(*this);
       
 10532                 s4o.print(")");
       
 10533                 IN_param_value->accept(*this);
       
 10534                 return NULL;
       
 10535                 
       
 10536             }
       
 10537             
       
 10538             ERROR;
       
 10539         }
       
 10540         
       
 10541     }/*function_dword_to_byte*/
       
 10542     break;
       
 10543 
       
 10544 /****
       
 10545  *DWORD_TO_WORD
       
 10546  */
       
 10547     case function_dword_to_word :
       
 10548     {
       
 10549         symbol_c *last_type_symbol = NULL;
       
 10550 
       
 10551         {
       
 10552             identifier_c param_name("IN");
       
 10553             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10554             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10555             
       
 10556             /* Get the value from a foo(<param_value>) style call */
       
 10557             if (IN_param_value == NULL)
       
 10558               IN_param_value = function_call_param_iterator.next();
       
 10559             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10560             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10561             
       
 10562             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10563             {
       
 10564         
       
 10565                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10566                 s4o.print("(");
       
 10567                 return_type_symbol->accept(*this);
       
 10568                 s4o.print(")");
       
 10569                 IN_param_value->accept(*this);
       
 10570                 return NULL;
       
 10571                 
       
 10572             }
       
 10573             
       
 10574             ERROR;
       
 10575         }
       
 10576         
       
 10577     }/*function_dword_to_word*/
       
 10578     break;
       
 10579 
       
 10580 /****
       
 10581  *DWORD_TO_LWORD
       
 10582  */
       
 10583     case function_dword_to_lword :
       
 10584     {
       
 10585         symbol_c *last_type_symbol = NULL;
       
 10586 
       
 10587         {
       
 10588             identifier_c param_name("IN");
       
 10589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10590             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10591             
       
 10592             /* Get the value from a foo(<param_value>) style call */
       
 10593             if (IN_param_value == NULL)
       
 10594               IN_param_value = function_call_param_iterator.next();
       
 10595             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10596             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10597             
       
 10598             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10599             {
       
 10600         
       
 10601                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10602                 s4o.print("(");
       
 10603                 return_type_symbol->accept(*this);
       
 10604                 s4o.print(")");
       
 10605                 IN_param_value->accept(*this);
       
 10606                 return NULL;
       
 10607                 
       
 10608             }
       
 10609             
       
 10610             ERROR;
       
 10611         }
       
 10612         
       
 10613     }/*function_dword_to_lword*/
       
 10614     break;
       
 10615 
       
 10616 /****
       
 10617  *DWORD_TO_STRING
       
 10618  */
       
 10619     case function_dword_to_string :
       
 10620     {
       
 10621         symbol_c *last_type_symbol = NULL;
       
 10622 
       
 10623         {
       
 10624             identifier_c param_name("IN");
       
 10625             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10626             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10627             
       
 10628             /* Get the value from a foo(<param_value>) style call */
       
 10629             if (IN_param_value == NULL)
       
 10630               IN_param_value = function_call_param_iterator.next();
       
 10631             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10632             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10633             
       
 10634             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10635             {
       
 10636         
       
 10637                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10638                 s4o.print("(");
       
 10639                 return_type_symbol->accept(*this);
       
 10640                 s4o.print(")int_to_string(");
       
 10641                 IN_param_value->accept(*this);
       
 10642                 s4o.print(", 16)");
       
 10643                 return NULL;
       
 10644                 
       
 10645             }
       
 10646             
       
 10647             ERROR;
       
 10648         }
       
 10649         
       
 10650     }/*function_dword_to_string*/
       
 10651     break;
       
 10652 
       
 10653 /****
       
 10654  *DWORD_TO_WSTRING
       
 10655  */
       
 10656     case function_dword_to_wstring :
       
 10657     {
       
 10658         symbol_c *last_type_symbol = NULL;
       
 10659 
       
 10660         {
       
 10661             identifier_c param_name("IN");
       
 10662             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10663             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10664             
       
 10665             /* Get the value from a foo(<param_value>) style call */
       
 10666             if (IN_param_value == NULL)
       
 10667               IN_param_value = function_call_param_iterator.next();
       
 10668             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10669             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10670             
       
 10671             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10672             {
       
 10673         
       
 10674                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 10675                 s4o.print("(");
       
 10676                 return_type_symbol->accept(*this);
       
 10677                 s4o.print(")int_to_string(");
       
 10678                 IN_param_value->accept(*this);
       
 10679                 s4o.print(", 16)");
       
 10680                 return NULL;
       
 10681                 
       
 10682             }
       
 10683             
       
 10684             ERROR;
       
 10685         }
       
 10686         
       
 10687     }/*function_dword_to_wstring*/
       
 10688     break;
       
 10689 
       
 10690 /****
       
 10691  *DWORD_TO_DATE
       
 10692  */
       
 10693     case function_dword_to_date :
       
 10694     {
       
 10695         symbol_c *last_type_symbol = NULL;
       
 10696 
       
 10697         {
       
 10698             identifier_c param_name("IN");
       
 10699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10701             
       
 10702             /* Get the value from a foo(<param_value>) style call */
       
 10703             if (IN_param_value == NULL)
       
 10704               IN_param_value = function_call_param_iterator.next();
       
 10705             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10706             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10707             
       
 10708             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10709             {
       
 10710         
       
 10711                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10712                 s4o.print("(");
       
 10713                 return_type_symbol->accept(*this);
       
 10714                 s4o.print(")real_to_time(");
       
 10715                 IN_param_value->accept(*this);
       
 10716                 s4o.print(")");
       
 10717                 return NULL;
       
 10718                 
       
 10719             }
       
 10720             
       
 10721             ERROR;
       
 10722         }
       
 10723         
       
 10724     }/*function_dword_to_date*/
       
 10725     break;
       
 10726 
       
 10727 /****
       
 10728  *DWORD_TO_TOD
       
 10729  */
       
 10730     case function_dword_to_tod :
       
 10731     {
       
 10732         symbol_c *last_type_symbol = NULL;
       
 10733 
       
 10734         {
       
 10735             identifier_c param_name("IN");
       
 10736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10738             
       
 10739             /* Get the value from a foo(<param_value>) style call */
       
 10740             if (IN_param_value == NULL)
       
 10741               IN_param_value = function_call_param_iterator.next();
       
 10742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10744             
       
 10745             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10746             {
       
 10747         
       
 10748                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10749                 s4o.print("(");
       
 10750                 return_type_symbol->accept(*this);
       
 10751                 s4o.print(")real_to_time(");
       
 10752                 IN_param_value->accept(*this);
       
 10753                 s4o.print(")");
       
 10754                 return NULL;
       
 10755                 
       
 10756             }
       
 10757             
       
 10758             ERROR;
       
 10759         }
       
 10760         
       
 10761     }/*function_dword_to_tod*/
       
 10762     break;
       
 10763 
       
 10764 /****
       
 10765  *DWORD_TO_DT
       
 10766  */
       
 10767     case function_dword_to_dt :
       
 10768     {
       
 10769         symbol_c *last_type_symbol = NULL;
       
 10770 
       
 10771         {
       
 10772             identifier_c param_name("IN");
       
 10773             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10774             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10775             
       
 10776             /* Get the value from a foo(<param_value>) style call */
       
 10777             if (IN_param_value == NULL)
       
 10778               IN_param_value = function_call_param_iterator.next();
       
 10779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10781             
       
 10782             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10783             {
       
 10784         
       
 10785                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10786                 s4o.print("(");
       
 10787                 return_type_symbol->accept(*this);
       
 10788                 s4o.print(")real_to_time(");
       
 10789                 IN_param_value->accept(*this);
       
 10790                 s4o.print(")");
       
 10791                 return NULL;
       
 10792                 
       
 10793             }
       
 10794             
       
 10795             ERROR;
       
 10796         }
       
 10797         
       
 10798     }/*function_dword_to_dt*/
       
 10799     break;
       
 10800 
       
 10801 /****
       
 10802  *LWORD_TO_REAL
       
 10803  */
       
 10804     case function_lword_to_real :
       
 10805     {
       
 10806         symbol_c *last_type_symbol = NULL;
       
 10807 
       
 10808         {
       
 10809             identifier_c param_name("IN");
       
 10810             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10811             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10812             
       
 10813             /* Get the value from a foo(<param_value>) style call */
       
 10814             if (IN_param_value == NULL)
       
 10815               IN_param_value = function_call_param_iterator.next();
       
 10816             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10817             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10818             
       
 10819             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10820             {
       
 10821         
       
 10822                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10823                 s4o.print("(");
       
 10824                 return_type_symbol->accept(*this);
       
 10825                 s4o.print(")");
       
 10826                 IN_param_value->accept(*this);
       
 10827                 return NULL;
       
 10828                 
       
 10829             }
       
 10830             
       
 10831             ERROR;
       
 10832         }
       
 10833         
       
 10834     }/*function_lword_to_real*/
       
 10835     break;
       
 10836 
       
 10837 /****
       
 10838  *LWORD_TO_LREAL
       
 10839  */
       
 10840     case function_lword_to_lreal :
       
 10841     {
       
 10842         symbol_c *last_type_symbol = NULL;
       
 10843 
       
 10844         {
       
 10845             identifier_c param_name("IN");
       
 10846             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10847             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10848             
       
 10849             /* Get the value from a foo(<param_value>) style call */
       
 10850             if (IN_param_value == NULL)
       
 10851               IN_param_value = function_call_param_iterator.next();
       
 10852             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10853             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10854             
       
 10855             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10856             {
       
 10857         
       
 10858                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10859                 s4o.print("(");
       
 10860                 return_type_symbol->accept(*this);
       
 10861                 s4o.print(")");
       
 10862                 IN_param_value->accept(*this);
       
 10863                 return NULL;
       
 10864                 
       
 10865             }
       
 10866             
       
 10867             ERROR;
       
 10868         }
       
 10869         
       
 10870     }/*function_lword_to_lreal*/
       
 10871     break;
       
 10872 
       
 10873 /****
       
 10874  *LWORD_TO_SINT
       
 10875  */
       
 10876     case function_lword_to_sint :
       
 10877     {
       
 10878         symbol_c *last_type_symbol = NULL;
       
 10879 
       
 10880         {
       
 10881             identifier_c param_name("IN");
       
 10882             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10883             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10884             
       
 10885             /* Get the value from a foo(<param_value>) style call */
       
 10886             if (IN_param_value == NULL)
       
 10887               IN_param_value = function_call_param_iterator.next();
       
 10888             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10889             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10890             
       
 10891             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10892             {
       
 10893         
       
 10894                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10895                 s4o.print("(");
       
 10896                 return_type_symbol->accept(*this);
       
 10897                 s4o.print(")");
       
 10898                 IN_param_value->accept(*this);
       
 10899                 return NULL;
       
 10900                 
       
 10901             }
       
 10902             
       
 10903             ERROR;
       
 10904         }
       
 10905         
       
 10906     }/*function_lword_to_sint*/
       
 10907     break;
       
 10908 
       
 10909 /****
       
 10910  *LWORD_TO_INT
       
 10911  */
       
 10912     case function_lword_to_int :
       
 10913     {
       
 10914         symbol_c *last_type_symbol = NULL;
       
 10915 
       
 10916         {
       
 10917             identifier_c param_name("IN");
       
 10918             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10919             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10920             
       
 10921             /* Get the value from a foo(<param_value>) style call */
       
 10922             if (IN_param_value == NULL)
       
 10923               IN_param_value = function_call_param_iterator.next();
       
 10924             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10925             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10926             
       
 10927             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10928             {
       
 10929         
       
 10930                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10931                 s4o.print("(");
       
 10932                 return_type_symbol->accept(*this);
       
 10933                 s4o.print(")");
       
 10934                 IN_param_value->accept(*this);
       
 10935                 return NULL;
       
 10936                 
       
 10937             }
       
 10938             
       
 10939             ERROR;
       
 10940         }
       
 10941         
       
 10942     }/*function_lword_to_int*/
       
 10943     break;
       
 10944 
       
 10945 /****
       
 10946  *LWORD_TO_DINT
       
 10947  */
       
 10948     case function_lword_to_dint :
       
 10949     {
       
 10950         symbol_c *last_type_symbol = NULL;
       
 10951 
       
 10952         {
       
 10953             identifier_c param_name("IN");
       
 10954             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10955             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10956             
       
 10957             /* Get the value from a foo(<param_value>) style call */
       
 10958             if (IN_param_value == NULL)
       
 10959               IN_param_value = function_call_param_iterator.next();
       
 10960             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10961             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10962             
       
 10963             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10964             {
       
 10965         
       
 10966                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10967                 s4o.print("(");
       
 10968                 return_type_symbol->accept(*this);
       
 10969                 s4o.print(")");
       
 10970                 IN_param_value->accept(*this);
       
 10971                 return NULL;
       
 10972                 
       
 10973             }
       
 10974             
       
 10975             ERROR;
       
 10976         }
       
 10977         
       
 10978     }/*function_lword_to_dint*/
       
 10979     break;
       
 10980 
       
 10981 /****
       
 10982  *LWORD_TO_LINT
       
 10983  */
       
 10984     case function_lword_to_lint :
       
 10985     {
       
 10986         symbol_c *last_type_symbol = NULL;
       
 10987 
       
 10988         {
       
 10989             identifier_c param_name("IN");
       
 10990             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10991             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10992             
       
 10993             /* Get the value from a foo(<param_value>) style call */
       
 10994             if (IN_param_value == NULL)
       
 10995               IN_param_value = function_call_param_iterator.next();
       
 10996             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10997             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10998             
       
 10999             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11000             {
       
 11001         
       
 11002                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11003                 s4o.print("(");
       
 11004                 return_type_symbol->accept(*this);
       
 11005                 s4o.print(")");
       
 11006                 IN_param_value->accept(*this);
       
 11007                 return NULL;
       
 11008                 
       
 11009             }
       
 11010             
       
 11011             ERROR;
       
 11012         }
       
 11013         
       
 11014     }/*function_lword_to_lint*/
       
 11015     break;
       
 11016 
       
 11017 /****
       
 11018  *LWORD_TO_USINT
       
 11019  */
       
 11020     case function_lword_to_usint :
       
 11021     {
       
 11022         symbol_c *last_type_symbol = NULL;
       
 11023 
       
 11024         {
       
 11025             identifier_c param_name("IN");
       
 11026             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11027             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11028             
       
 11029             /* Get the value from a foo(<param_value>) style call */
       
 11030             if (IN_param_value == NULL)
       
 11031               IN_param_value = function_call_param_iterator.next();
       
 11032             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11033             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11034             
       
 11035             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11036             {
       
 11037         
       
 11038                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11039                 s4o.print("(");
       
 11040                 return_type_symbol->accept(*this);
       
 11041                 s4o.print(")");
       
 11042                 IN_param_value->accept(*this);
       
 11043                 return NULL;
       
 11044                 
       
 11045             }
       
 11046             
       
 11047             ERROR;
       
 11048         }
       
 11049         
       
 11050     }/*function_lword_to_usint*/
       
 11051     break;
       
 11052 
       
 11053 /****
       
 11054  *LWORD_TO_UINT
       
 11055  */
       
 11056     case function_lword_to_uint :
       
 11057     {
       
 11058         symbol_c *last_type_symbol = NULL;
       
 11059 
       
 11060         {
       
 11061             identifier_c param_name("IN");
       
 11062             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11063             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11064             
       
 11065             /* Get the value from a foo(<param_value>) style call */
       
 11066             if (IN_param_value == NULL)
       
 11067               IN_param_value = function_call_param_iterator.next();
       
 11068             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11069             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11070             
       
 11071             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11072             {
       
 11073         
       
 11074                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11075                 s4o.print("(");
       
 11076                 return_type_symbol->accept(*this);
       
 11077                 s4o.print(")");
       
 11078                 IN_param_value->accept(*this);
       
 11079                 return NULL;
       
 11080                 
       
 11081             }
       
 11082             
       
 11083             ERROR;
       
 11084         }
       
 11085         
       
 11086     }/*function_lword_to_uint*/
       
 11087     break;
       
 11088 
       
 11089 /****
       
 11090  *LWORD_TO_UDINT
       
 11091  */
       
 11092     case function_lword_to_udint :
       
 11093     {
       
 11094         symbol_c *last_type_symbol = NULL;
       
 11095 
       
 11096         {
       
 11097             identifier_c param_name("IN");
       
 11098             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11099             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11100             
       
 11101             /* Get the value from a foo(<param_value>) style call */
       
 11102             if (IN_param_value == NULL)
       
 11103               IN_param_value = function_call_param_iterator.next();
       
 11104             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11105             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11106             
       
 11107             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11108             {
       
 11109         
       
 11110                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11111                 s4o.print("(");
       
 11112                 return_type_symbol->accept(*this);
       
 11113                 s4o.print(")");
       
 11114                 IN_param_value->accept(*this);
       
 11115                 return NULL;
       
 11116                 
       
 11117             }
       
 11118             
       
 11119             ERROR;
       
 11120         }
       
 11121         
       
 11122     }/*function_lword_to_udint*/
       
 11123     break;
       
 11124 
       
 11125 /****
       
 11126  *LWORD_TO_ULINT
       
 11127  */
       
 11128     case function_lword_to_ulint :
       
 11129     {
       
 11130         symbol_c *last_type_symbol = NULL;
       
 11131 
       
 11132         {
       
 11133             identifier_c param_name("IN");
       
 11134             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11135             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11136             
       
 11137             /* Get the value from a foo(<param_value>) style call */
       
 11138             if (IN_param_value == NULL)
       
 11139               IN_param_value = function_call_param_iterator.next();
       
 11140             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11141             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11142             
       
 11143             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11144             {
       
 11145         
       
 11146                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11147                 s4o.print("(");
       
 11148                 return_type_symbol->accept(*this);
       
 11149                 s4o.print(")");
       
 11150                 IN_param_value->accept(*this);
       
 11151                 return NULL;
       
 11152                 
       
 11153             }
       
 11154             
       
 11155             ERROR;
       
 11156         }
       
 11157         
       
 11158     }/*function_lword_to_ulint*/
       
 11159     break;
       
 11160 
       
 11161 /****
       
 11162  *LWORD_TO_TIME
       
 11163  */
       
 11164     case function_lword_to_time :
       
 11165     {
       
 11166         symbol_c *last_type_symbol = NULL;
       
 11167 
       
 11168         {
       
 11169             identifier_c param_name("IN");
       
 11170             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11171             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11172             
       
 11173             /* Get the value from a foo(<param_value>) style call */
       
 11174             if (IN_param_value == NULL)
       
 11175               IN_param_value = function_call_param_iterator.next();
       
 11176             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11177             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11178             
       
 11179             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11180             {
       
 11181         
       
 11182                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11183                 s4o.print("(");
       
 11184                 return_type_symbol->accept(*this);
       
 11185                 s4o.print(")real_to_time(");
       
 11186                 IN_param_value->accept(*this);
       
 11187                 s4o.print(")");
       
 11188                 return NULL;
       
 11189                 
       
 11190             }
       
 11191             
       
 11192             ERROR;
       
 11193         }
       
 11194         
       
 11195     }/*function_lword_to_time*/
       
 11196     break;
       
 11197 
       
 11198 /****
       
 11199  *LWORD_TO_BOOL
       
 11200  */
       
 11201     case function_lword_to_bool :
       
 11202     {
       
 11203         symbol_c *last_type_symbol = NULL;
       
 11204 
       
 11205         {
       
 11206             identifier_c param_name("IN");
       
 11207             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11208             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11209             
       
 11210             /* Get the value from a foo(<param_value>) style call */
       
 11211             if (IN_param_value == NULL)
       
 11212               IN_param_value = function_call_param_iterator.next();
       
 11213             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11214             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11215             
       
 11216             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11217             {
       
 11218         
       
 11219                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11220                 s4o.print("(");
       
 11221                 return_type_symbol->accept(*this);
       
 11222                 s4o.print(")");
       
 11223                 IN_param_value->accept(*this);
       
 11224                 return NULL;
       
 11225                 
       
 11226             }
       
 11227             
       
 11228             ERROR;
       
 11229         }
       
 11230         
       
 11231     }/*function_lword_to_bool*/
       
 11232     break;
       
 11233 
       
 11234 /****
       
 11235  *LWORD_TO_BYTE
       
 11236  */
       
 11237     case function_lword_to_byte :
       
 11238     {
       
 11239         symbol_c *last_type_symbol = NULL;
       
 11240 
       
 11241         {
       
 11242             identifier_c param_name("IN");
       
 11243             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11244             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11245             
       
 11246             /* Get the value from a foo(<param_value>) style call */
       
 11247             if (IN_param_value == NULL)
       
 11248               IN_param_value = function_call_param_iterator.next();
       
 11249             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11250             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11251             
       
 11252             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11253             {
       
 11254         
       
 11255                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11256                 s4o.print("(");
       
 11257                 return_type_symbol->accept(*this);
       
 11258                 s4o.print(")");
       
 11259                 IN_param_value->accept(*this);
       
 11260                 return NULL;
       
 11261                 
       
 11262             }
       
 11263             
       
 11264             ERROR;
       
 11265         }
       
 11266         
       
 11267     }/*function_lword_to_byte*/
       
 11268     break;
       
 11269 
       
 11270 /****
       
 11271  *LWORD_TO_WORD
       
 11272  */
       
 11273     case function_lword_to_word :
       
 11274     {
       
 11275         symbol_c *last_type_symbol = NULL;
       
 11276 
       
 11277         {
       
 11278             identifier_c param_name("IN");
       
 11279             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11280             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11281             
       
 11282             /* Get the value from a foo(<param_value>) style call */
       
 11283             if (IN_param_value == NULL)
       
 11284               IN_param_value = function_call_param_iterator.next();
       
 11285             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11286             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11287             
       
 11288             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11289             {
       
 11290         
       
 11291                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11292                 s4o.print("(");
       
 11293                 return_type_symbol->accept(*this);
       
 11294                 s4o.print(")");
       
 11295                 IN_param_value->accept(*this);
       
 11296                 return NULL;
       
 11297                 
       
 11298             }
       
 11299             
       
 11300             ERROR;
       
 11301         }
       
 11302         
       
 11303     }/*function_lword_to_word*/
       
 11304     break;
       
 11305 
       
 11306 /****
       
 11307  *LWORD_TO_DWORD
       
 11308  */
       
 11309     case function_lword_to_dword :
       
 11310     {
       
 11311         symbol_c *last_type_symbol = NULL;
       
 11312 
       
 11313         {
       
 11314             identifier_c param_name("IN");
       
 11315             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11316             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11317             
       
 11318             /* Get the value from a foo(<param_value>) style call */
       
 11319             if (IN_param_value == NULL)
       
 11320               IN_param_value = function_call_param_iterator.next();
       
 11321             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11322             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11323             
       
 11324             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11325             {
       
 11326         
       
 11327                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11328                 s4o.print("(");
       
 11329                 return_type_symbol->accept(*this);
       
 11330                 s4o.print(")");
       
 11331                 IN_param_value->accept(*this);
       
 11332                 return NULL;
       
 11333                 
       
 11334             }
       
 11335             
       
 11336             ERROR;
       
 11337         }
       
 11338         
       
 11339     }/*function_lword_to_dword*/
       
 11340     break;
       
 11341 
       
 11342 /****
       
 11343  *LWORD_TO_STRING
       
 11344  */
       
 11345     case function_lword_to_string :
       
 11346     {
       
 11347         symbol_c *last_type_symbol = NULL;
       
 11348 
       
 11349         {
       
 11350             identifier_c param_name("IN");
       
 11351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11353             
       
 11354             /* Get the value from a foo(<param_value>) style call */
       
 11355             if (IN_param_value == NULL)
       
 11356               IN_param_value = function_call_param_iterator.next();
       
 11357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11359             
       
 11360             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11361             {
       
 11362         
       
 11363                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11364                 s4o.print("(");
       
 11365                 return_type_symbol->accept(*this);
       
 11366                 s4o.print(")int_to_string(");
       
 11367                 IN_param_value->accept(*this);
       
 11368                 s4o.print(", 16)");
       
 11369                 return NULL;
       
 11370                 
       
 11371             }
       
 11372             
       
 11373             ERROR;
       
 11374         }
       
 11375         
       
 11376     }/*function_lword_to_string*/
       
 11377     break;
       
 11378 
       
 11379 /****
       
 11380  *LWORD_TO_WSTRING
       
 11381  */
       
 11382     case function_lword_to_wstring :
       
 11383     {
       
 11384         symbol_c *last_type_symbol = NULL;
       
 11385 
       
 11386         {
       
 11387             identifier_c param_name("IN");
       
 11388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11390             
       
 11391             /* Get the value from a foo(<param_value>) style call */
       
 11392             if (IN_param_value == NULL)
       
 11393               IN_param_value = function_call_param_iterator.next();
       
 11394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11396             
       
 11397             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11398             {
       
 11399         
       
 11400                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11401                 s4o.print("(");
       
 11402                 return_type_symbol->accept(*this);
       
 11403                 s4o.print(")int_to_string(");
       
 11404                 IN_param_value->accept(*this);
       
 11405                 s4o.print(", 16)");
       
 11406                 return NULL;
       
 11407                 
       
 11408             }
       
 11409             
       
 11410             ERROR;
       
 11411         }
       
 11412         
       
 11413     }/*function_lword_to_wstring*/
       
 11414     break;
       
 11415 
       
 11416 /****
       
 11417  *LWORD_TO_DATE
       
 11418  */
       
 11419     case function_lword_to_date :
       
 11420     {
       
 11421         symbol_c *last_type_symbol = NULL;
       
 11422 
       
 11423         {
       
 11424             identifier_c param_name("IN");
       
 11425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11427             
       
 11428             /* Get the value from a foo(<param_value>) style call */
       
 11429             if (IN_param_value == NULL)
       
 11430               IN_param_value = function_call_param_iterator.next();
       
 11431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11432             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11433             
       
 11434             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11435             {
       
 11436         
       
 11437                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11438                 s4o.print("(");
       
 11439                 return_type_symbol->accept(*this);
       
 11440                 s4o.print(")real_to_time(");
       
 11441                 IN_param_value->accept(*this);
       
 11442                 s4o.print(")");
       
 11443                 return NULL;
       
 11444                 
       
 11445             }
       
 11446             
       
 11447             ERROR;
       
 11448         }
       
 11449         
       
 11450     }/*function_lword_to_date*/
       
 11451     break;
       
 11452 
       
 11453 /****
       
 11454  *LWORD_TO_TOD
       
 11455  */
       
 11456     case function_lword_to_tod :
       
 11457     {
       
 11458         symbol_c *last_type_symbol = NULL;
       
 11459 
       
 11460         {
       
 11461             identifier_c param_name("IN");
       
 11462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11464             
       
 11465             /* Get the value from a foo(<param_value>) style call */
       
 11466             if (IN_param_value == NULL)
       
 11467               IN_param_value = function_call_param_iterator.next();
       
 11468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11470             
       
 11471             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11472             {
       
 11473         
       
 11474                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11475                 s4o.print("(");
       
 11476                 return_type_symbol->accept(*this);
       
 11477                 s4o.print(")real_to_time(");
       
 11478                 IN_param_value->accept(*this);
       
 11479                 s4o.print(")");
       
 11480                 return NULL;
       
 11481                 
       
 11482             }
       
 11483             
       
 11484             ERROR;
       
 11485         }
       
 11486         
       
 11487     }/*function_lword_to_tod*/
       
 11488     break;
       
 11489 
       
 11490 /****
       
 11491  *LWORD_TO_DT
       
 11492  */
       
 11493     case function_lword_to_dt :
       
 11494     {
       
 11495         symbol_c *last_type_symbol = NULL;
       
 11496 
       
 11497         {
       
 11498             identifier_c param_name("IN");
       
 11499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11501             
       
 11502             /* Get the value from a foo(<param_value>) style call */
       
 11503             if (IN_param_value == NULL)
       
 11504               IN_param_value = function_call_param_iterator.next();
       
 11505             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11506             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11507             
       
 11508             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11509             {
       
 11510         
       
 11511                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11512                 s4o.print("(");
       
 11513                 return_type_symbol->accept(*this);
       
 11514                 s4o.print(")real_to_time(");
       
 11515                 IN_param_value->accept(*this);
       
 11516                 s4o.print(")");
       
 11517                 return NULL;
       
 11518                 
       
 11519             }
       
 11520             
       
 11521             ERROR;
       
 11522         }
       
 11523         
       
 11524     }/*function_lword_to_dt*/
       
 11525     break;
       
 11526 
       
 11527 /****
       
 11528  *STRING_TO_REAL
       
 11529  */
       
 11530     case function_string_to_real :
       
 11531     {
       
 11532         symbol_c *last_type_symbol = NULL;
       
 11533 
       
 11534         {
       
 11535             identifier_c param_name("IN");
       
 11536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11538             
       
 11539             /* Get the value from a foo(<param_value>) style call */
       
 11540             if (IN_param_value == NULL)
       
 11541               IN_param_value = function_call_param_iterator.next();
       
 11542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11544             
       
 11545             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11546             {
       
 11547         
       
 11548                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11549                 s4o.print("(");
       
 11550                 return_type_symbol->accept(*this);
       
 11551                 s4o.print(")string_to_int(");
       
 11552                 IN_param_value->accept(*this);
       
 11553                 s4o.print(", 10)");
       
 11554                 return NULL;
       
 11555                 
       
 11556             }
       
 11557             
       
 11558             ERROR;
       
 11559         }
       
 11560         
       
 11561     }/*function_string_to_real*/
       
 11562     break;
       
 11563 
       
 11564 /****
       
 11565  *STRING_TO_LREAL
       
 11566  */
       
 11567     case function_string_to_lreal :
       
 11568     {
       
 11569         symbol_c *last_type_symbol = NULL;
       
 11570 
       
 11571         {
       
 11572             identifier_c param_name("IN");
       
 11573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11575             
       
 11576             /* Get the value from a foo(<param_value>) style call */
       
 11577             if (IN_param_value == NULL)
       
 11578               IN_param_value = function_call_param_iterator.next();
       
 11579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11581             
       
 11582             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11583             {
       
 11584         
       
 11585                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11586                 s4o.print("(");
       
 11587                 return_type_symbol->accept(*this);
       
 11588                 s4o.print(")string_to_int(");
       
 11589                 IN_param_value->accept(*this);
       
 11590                 s4o.print(", 10)");
       
 11591                 return NULL;
       
 11592                 
       
 11593             }
       
 11594             
       
 11595             ERROR;
       
 11596         }
       
 11597         
       
 11598     }/*function_string_to_lreal*/
       
 11599     break;
       
 11600 
       
 11601 /****
       
 11602  *STRING_TO_SINT
       
 11603  */
       
 11604     case function_string_to_sint :
       
 11605     {
       
 11606         symbol_c *last_type_symbol = NULL;
       
 11607 
       
 11608         {
       
 11609             identifier_c param_name("IN");
       
 11610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11612             
       
 11613             /* Get the value from a foo(<param_value>) style call */
       
 11614             if (IN_param_value == NULL)
       
 11615               IN_param_value = function_call_param_iterator.next();
       
 11616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11618             
       
 11619             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11620             {
       
 11621         
       
 11622                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11623                 s4o.print("(");
       
 11624                 return_type_symbol->accept(*this);
       
 11625                 s4o.print(")string_to_int(");
       
 11626                 IN_param_value->accept(*this);
       
 11627                 s4o.print(", 10)");
       
 11628                 return NULL;
       
 11629                 
       
 11630             }
       
 11631             
       
 11632             ERROR;
       
 11633         }
       
 11634         
       
 11635     }/*function_string_to_sint*/
       
 11636     break;
       
 11637 
       
 11638 /****
       
 11639  *STRING_TO_INT
       
 11640  */
       
 11641     case function_string_to_int :
       
 11642     {
       
 11643         symbol_c *last_type_symbol = NULL;
       
 11644 
       
 11645         {
       
 11646             identifier_c param_name("IN");
       
 11647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11649             
       
 11650             /* Get the value from a foo(<param_value>) style call */
       
 11651             if (IN_param_value == NULL)
       
 11652               IN_param_value = function_call_param_iterator.next();
       
 11653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11655             
       
 11656             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11657             {
       
 11658         
       
 11659                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11660                 s4o.print("(");
       
 11661                 return_type_symbol->accept(*this);
       
 11662                 s4o.print(")string_to_int(");
       
 11663                 IN_param_value->accept(*this);
       
 11664                 s4o.print(", 10)");
       
 11665                 return NULL;
       
 11666                 
       
 11667             }
       
 11668             
       
 11669             ERROR;
       
 11670         }
       
 11671         
       
 11672     }/*function_string_to_int*/
       
 11673     break;
       
 11674 
       
 11675 /****
       
 11676  *STRING_TO_DINT
       
 11677  */
       
 11678     case function_string_to_dint :
       
 11679     {
       
 11680         symbol_c *last_type_symbol = NULL;
       
 11681 
       
 11682         {
       
 11683             identifier_c param_name("IN");
       
 11684             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11685             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11686             
       
 11687             /* Get the value from a foo(<param_value>) style call */
       
 11688             if (IN_param_value == NULL)
       
 11689               IN_param_value = function_call_param_iterator.next();
       
 11690             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11691             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11692             
       
 11693             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11694             {
       
 11695         
       
 11696                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11697                 s4o.print("(");
       
 11698                 return_type_symbol->accept(*this);
       
 11699                 s4o.print(")string_to_int(");
       
 11700                 IN_param_value->accept(*this);
       
 11701                 s4o.print(", 10)");
       
 11702                 return NULL;
       
 11703                 
       
 11704             }
       
 11705             
       
 11706             ERROR;
       
 11707         }
       
 11708         
       
 11709     }/*function_string_to_dint*/
       
 11710     break;
       
 11711 
       
 11712 /****
       
 11713  *STRING_TO_LINT
       
 11714  */
       
 11715     case function_string_to_lint :
       
 11716     {
       
 11717         symbol_c *last_type_symbol = NULL;
       
 11718 
       
 11719         {
       
 11720             identifier_c param_name("IN");
       
 11721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11722             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11723             
       
 11724             /* Get the value from a foo(<param_value>) style call */
       
 11725             if (IN_param_value == NULL)
       
 11726               IN_param_value = function_call_param_iterator.next();
       
 11727             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11728             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11729             
       
 11730             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11731             {
       
 11732         
       
 11733                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11734                 s4o.print("(");
       
 11735                 return_type_symbol->accept(*this);
       
 11736                 s4o.print(")string_to_int(");
       
 11737                 IN_param_value->accept(*this);
       
 11738                 s4o.print(", 10)");
       
 11739                 return NULL;
       
 11740                 
       
 11741             }
       
 11742             
       
 11743             ERROR;
       
 11744         }
       
 11745         
       
 11746     }/*function_string_to_lint*/
       
 11747     break;
       
 11748 
       
 11749 /****
       
 11750  *STRING_TO_USINT
       
 11751  */
       
 11752     case function_string_to_usint :
       
 11753     {
       
 11754         symbol_c *last_type_symbol = NULL;
       
 11755 
       
 11756         {
       
 11757             identifier_c param_name("IN");
       
 11758             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11759             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11760             
       
 11761             /* Get the value from a foo(<param_value>) style call */
       
 11762             if (IN_param_value == NULL)
       
 11763               IN_param_value = function_call_param_iterator.next();
       
 11764             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11765             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11766             
       
 11767             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11768             {
       
 11769         
       
 11770                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11771                 s4o.print("(");
       
 11772                 return_type_symbol->accept(*this);
       
 11773                 s4o.print(")string_to_int(");
       
 11774                 IN_param_value->accept(*this);
       
 11775                 s4o.print(", 10)");
       
 11776                 return NULL;
       
 11777                 
       
 11778             }
       
 11779             
       
 11780             ERROR;
       
 11781         }
       
 11782         
       
 11783     }/*function_string_to_usint*/
       
 11784     break;
       
 11785 
       
 11786 /****
       
 11787  *STRING_TO_UINT
       
 11788  */
       
 11789     case function_string_to_uint :
       
 11790     {
       
 11791         symbol_c *last_type_symbol = NULL;
       
 11792 
       
 11793         {
       
 11794             identifier_c param_name("IN");
       
 11795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11796             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11797             
       
 11798             /* Get the value from a foo(<param_value>) style call */
       
 11799             if (IN_param_value == NULL)
       
 11800               IN_param_value = function_call_param_iterator.next();
       
 11801             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11802             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11803             
       
 11804             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11805             {
       
 11806         
       
 11807                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11808                 s4o.print("(");
       
 11809                 return_type_symbol->accept(*this);
       
 11810                 s4o.print(")string_to_int(");
       
 11811                 IN_param_value->accept(*this);
       
 11812                 s4o.print(", 10)");
       
 11813                 return NULL;
       
 11814                 
       
 11815             }
       
 11816             
       
 11817             ERROR;
       
 11818         }
       
 11819         
       
 11820     }/*function_string_to_uint*/
       
 11821     break;
       
 11822 
       
 11823 /****
       
 11824  *STRING_TO_UDINT
       
 11825  */
       
 11826     case function_string_to_udint :
       
 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(string_type_name_c))
       
 11842             {
       
 11843         
       
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11845                 s4o.print("(");
       
 11846                 return_type_symbol->accept(*this);
       
 11847                 s4o.print(")string_to_int(");
       
 11848                 IN_param_value->accept(*this);
       
 11849                 s4o.print(", 10)");
       
 11850                 return NULL;
       
 11851                 
       
 11852             }
       
 11853             
       
 11854             ERROR;
       
 11855         }
       
 11856         
       
 11857     }/*function_string_to_udint*/
       
 11858     break;
       
 11859 
       
 11860 /****
       
 11861  *STRING_TO_ULINT
       
 11862  */
       
 11863     case function_string_to_ulint :
       
 11864     {
       
 11865         symbol_c *last_type_symbol = NULL;
       
 11866 
       
 11867         {
       
 11868             identifier_c param_name("IN");
       
 11869             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11870             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11871             
       
 11872             /* Get the value from a foo(<param_value>) style call */
       
 11873             if (IN_param_value == NULL)
       
 11874               IN_param_value = function_call_param_iterator.next();
       
 11875             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11876             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11877             
       
 11878             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11879             {
       
 11880         
       
 11881                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11882                 s4o.print("(");
       
 11883                 return_type_symbol->accept(*this);
       
 11884                 s4o.print(")string_to_int(");
       
 11885                 IN_param_value->accept(*this);
       
 11886                 s4o.print(", 10)");
       
 11887                 return NULL;
       
 11888                 
       
 11889             }
       
 11890             
       
 11891             ERROR;
       
 11892         }
       
 11893         
       
 11894     }/*function_string_to_ulint*/
       
 11895     break;
       
 11896 
       
 11897 /****
       
 11898  *STRING_TO_TIME
       
 11899  */
       
 11900     case function_string_to_time :
       
 11901     {
       
 11902         symbol_c *last_type_symbol = NULL;
       
 11903 
       
 11904         {
       
 11905             identifier_c param_name("IN");
       
 11906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11907             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11908             
       
 11909             /* Get the value from a foo(<param_value>) style call */
       
 11910             if (IN_param_value == NULL)
       
 11911               IN_param_value = function_call_param_iterator.next();
       
 11912             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11913             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11914             
       
 11915             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11916             {
       
 11917         
       
 11918                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11919                 s4o.print("(");
       
 11920                 return_type_symbol->accept(*this);
       
 11921                 s4o.print(")string_to_time(");
       
 11922                 IN_param_value->accept(*this);
       
 11923                 s4o.print(")");
       
 11924                 return NULL;
       
 11925                 
       
 11926             }
       
 11927             
       
 11928             ERROR;
       
 11929         }
       
 11930         
       
 11931     }/*function_string_to_time*/
       
 11932     break;
       
 11933 
       
 11934 /****
       
 11935  *STRING_TO_BOOL
       
 11936  */
       
 11937     case function_string_to_bool :
       
 11938     {
       
 11939         symbol_c *last_type_symbol = NULL;
       
 11940 
       
 11941         {
       
 11942             identifier_c param_name("IN");
       
 11943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11944             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11945             
       
 11946             /* Get the value from a foo(<param_value>) style call */
       
 11947             if (IN_param_value == NULL)
       
 11948               IN_param_value = function_call_param_iterator.next();
       
 11949             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11950             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11951             
       
 11952             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11953             {
       
 11954         
       
 11955                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11956                 s4o.print("(");
       
 11957                 return_type_symbol->accept(*this);
       
 11958                 s4o.print(")string_to_int(");
       
 11959                 IN_param_value->accept(*this);
       
 11960                 s4o.print(", 16)");
       
 11961                 return NULL;
       
 11962                 
       
 11963             }
       
 11964             
       
 11965             ERROR;
       
 11966         }
       
 11967         
       
 11968     }/*function_string_to_bool*/
       
 11969     break;
       
 11970 
       
 11971 /****
       
 11972  *STRING_TO_BYTE
       
 11973  */
       
 11974     case function_string_to_byte :
       
 11975     {
       
 11976         symbol_c *last_type_symbol = NULL;
       
 11977 
       
 11978         {
       
 11979             identifier_c param_name("IN");
       
 11980             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11981             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11982             
       
 11983             /* Get the value from a foo(<param_value>) style call */
       
 11984             if (IN_param_value == NULL)
       
 11985               IN_param_value = function_call_param_iterator.next();
       
 11986             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11987             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11988             
       
 11989             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11990             {
       
 11991         
       
 11992                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11993                 s4o.print("(");
       
 11994                 return_type_symbol->accept(*this);
       
 11995                 s4o.print(")string_to_int(");
       
 11996                 IN_param_value->accept(*this);
       
 11997                 s4o.print(", 16)");
       
 11998                 return NULL;
       
 11999                 
       
 12000             }
       
 12001             
       
 12002             ERROR;
       
 12003         }
       
 12004         
       
 12005     }/*function_string_to_byte*/
       
 12006     break;
       
 12007 
       
 12008 /****
       
 12009  *STRING_TO_WORD
       
 12010  */
       
 12011     case function_string_to_word :
       
 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(string_type_name_c))
       
 12027             {
       
 12028         
       
 12029                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12030                 s4o.print("(");
       
 12031                 return_type_symbol->accept(*this);
       
 12032                 s4o.print(")string_to_int(");
       
 12033                 IN_param_value->accept(*this);
       
 12034                 s4o.print(", 16)");
       
 12035                 return NULL;
       
 12036                 
       
 12037             }
       
 12038             
       
 12039             ERROR;
       
 12040         }
       
 12041         
       
 12042     }/*function_string_to_word*/
       
 12043     break;
       
 12044 
       
 12045 /****
       
 12046  *STRING_TO_DWORD
       
 12047  */
       
 12048     case function_string_to_dword :
       
 12049     {
       
 12050         symbol_c *last_type_symbol = NULL;
       
 12051 
       
 12052         {
       
 12053             identifier_c param_name("IN");
       
 12054             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12055             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12056             
       
 12057             /* Get the value from a foo(<param_value>) style call */
       
 12058             if (IN_param_value == NULL)
       
 12059               IN_param_value = function_call_param_iterator.next();
       
 12060             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12061             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12062             
       
 12063             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 12064             {
       
 12065         
       
 12066                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12067                 s4o.print("(");
       
 12068                 return_type_symbol->accept(*this);
       
 12069                 s4o.print(")string_to_int(");
       
 12070                 IN_param_value->accept(*this);
       
 12071                 s4o.print(", 16)");
       
 12072                 return NULL;
       
 12073                 
       
 12074             }
       
 12075             
       
 12076             ERROR;
       
 12077         }
       
 12078         
       
 12079     }/*function_string_to_dword*/
       
 12080     break;
       
 12081 
       
 12082 /****
       
 12083  *STRING_TO_LWORD
       
 12084  */
       
 12085     case function_string_to_lword :
       
 12086     {
       
 12087         symbol_c *last_type_symbol = NULL;
       
 12088 
       
 12089         {
       
 12090             identifier_c param_name("IN");
       
 12091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12092             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12093             
       
 12094             /* Get the value from a foo(<param_value>) style call */
       
 12095             if (IN_param_value == NULL)
       
 12096               IN_param_value = function_call_param_iterator.next();
       
 12097             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12098             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12099             
       
 12100             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 12101             {
       
 12102         
       
 12103                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12104                 s4o.print("(");
       
 12105                 return_type_symbol->accept(*this);
       
 12106                 s4o.print(")string_to_int(");
       
 12107                 IN_param_value->accept(*this);
       
 12108                 s4o.print(", 16)");
       
 12109                 return NULL;
       
 12110                 
       
 12111             }
       
 12112             
       
 12113             ERROR;
       
 12114         }
       
 12115         
       
 12116     }/*function_string_to_lword*/
       
 12117     break;
       
 12118 
       
 12119 /****
       
 12120  *STRING_TO_DATE
       
 12121  */
       
 12122     case function_string_to_date :
       
 12123     {
       
 12124         symbol_c *last_type_symbol = NULL;
       
 12125 
       
 12126         {
       
 12127             identifier_c param_name("IN");
       
 12128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12130             
       
 12131             /* Get the value from a foo(<param_value>) style call */
       
 12132             if (IN_param_value == NULL)
       
 12133               IN_param_value = function_call_param_iterator.next();
       
 12134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12136             
       
 12137             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 12138             {
       
 12139         
       
 12140                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12141                 s4o.print("(");
       
 12142                 return_type_symbol->accept(*this);
       
 12143                 s4o.print(")string_to_time(");
       
 12144                 IN_param_value->accept(*this);
       
 12145                 s4o.print(")");
       
 12146                 return NULL;
       
 12147                 
       
 12148             }
       
 12149             
       
 12150             ERROR;
       
 12151         }
       
 12152         
       
 12153     }/*function_string_to_date*/
       
 12154     break;
       
 12155 
       
 12156 /****
       
 12157  *STRING_TO_TOD
       
 12158  */
       
 12159     case function_string_to_tod :
       
 12160     {
       
 12161         symbol_c *last_type_symbol = NULL;
       
 12162 
       
 12163         {
       
 12164             identifier_c param_name("IN");
       
 12165             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12166             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12167             
       
 12168             /* Get the value from a foo(<param_value>) style call */
       
 12169             if (IN_param_value == NULL)
       
 12170               IN_param_value = function_call_param_iterator.next();
       
 12171             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12172             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12173             
       
 12174             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 12175             {
       
 12176         
       
 12177                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12178                 s4o.print("(");
       
 12179                 return_type_symbol->accept(*this);
       
 12180                 s4o.print(")string_to_time(");
       
 12181                 IN_param_value->accept(*this);
       
 12182                 s4o.print(")");
       
 12183                 return NULL;
       
 12184                 
       
 12185             }
       
 12186             
       
 12187             ERROR;
       
 12188         }
       
 12189         
       
 12190     }/*function_string_to_tod*/
       
 12191     break;
       
 12192 
       
 12193 /****
       
 12194  *STRING_TO_DT
       
 12195  */
       
 12196     case function_string_to_dt :
       
 12197     {
       
 12198         symbol_c *last_type_symbol = NULL;
       
 12199 
       
 12200         {
       
 12201             identifier_c param_name("IN");
       
 12202             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12203             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12204             
       
 12205             /* Get the value from a foo(<param_value>) style call */
       
 12206             if (IN_param_value == NULL)
       
 12207               IN_param_value = function_call_param_iterator.next();
       
 12208             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12209             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12210             
       
 12211             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 12212             {
       
 12213         
       
 12214                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12215                 s4o.print("(");
       
 12216                 return_type_symbol->accept(*this);
       
 12217                 s4o.print(")string_to_time(");
       
 12218                 IN_param_value->accept(*this);
       
 12219                 s4o.print(")");
       
 12220                 return NULL;
       
 12221                 
       
 12222             }
       
 12223             
       
 12224             ERROR;
       
 12225         }
       
 12226         
       
 12227     }/*function_string_to_dt*/
       
 12228     break;
       
 12229 
       
 12230 /****
       
 12231  *WSTRING_TO_REAL
       
 12232  */
       
 12233     case function_wstring_to_real :
       
 12234     {
       
 12235         symbol_c *last_type_symbol = NULL;
       
 12236 
       
 12237         {
       
 12238             identifier_c param_name("IN");
       
 12239             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12240             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12241             
       
 12242             /* Get the value from a foo(<param_value>) style call */
       
 12243             if (IN_param_value == NULL)
       
 12244               IN_param_value = function_call_param_iterator.next();
       
 12245             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12246             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12247             
       
 12248             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12249             {
       
 12250         
       
 12251                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12252                 s4o.print("(");
       
 12253                 return_type_symbol->accept(*this);
       
 12254                 s4o.print(")string_to_int(");
       
 12255                 IN_param_value->accept(*this);
       
 12256                 s4o.print(", 10)");
       
 12257                 return NULL;
       
 12258                 
       
 12259             }
       
 12260             
       
 12261             ERROR;
       
 12262         }
       
 12263         
       
 12264     }/*function_wstring_to_real*/
       
 12265     break;
       
 12266 
       
 12267 /****
       
 12268  *WSTRING_TO_LREAL
       
 12269  */
       
 12270     case function_wstring_to_lreal :
       
 12271     {
       
 12272         symbol_c *last_type_symbol = NULL;
       
 12273 
       
 12274         {
       
 12275             identifier_c param_name("IN");
       
 12276             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12277             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12278             
       
 12279             /* Get the value from a foo(<param_value>) style call */
       
 12280             if (IN_param_value == NULL)
       
 12281               IN_param_value = function_call_param_iterator.next();
       
 12282             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12283             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12284             
       
 12285             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12286             {
       
 12287         
       
 12288                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12289                 s4o.print("(");
       
 12290                 return_type_symbol->accept(*this);
       
 12291                 s4o.print(")string_to_int(");
       
 12292                 IN_param_value->accept(*this);
       
 12293                 s4o.print(", 10)");
       
 12294                 return NULL;
       
 12295                 
       
 12296             }
       
 12297             
       
 12298             ERROR;
       
 12299         }
       
 12300         
       
 12301     }/*function_wstring_to_lreal*/
       
 12302     break;
       
 12303 
       
 12304 /****
       
 12305  *WSTRING_TO_SINT
       
 12306  */
       
 12307     case function_wstring_to_sint :
       
 12308     {
       
 12309         symbol_c *last_type_symbol = NULL;
       
 12310 
       
 12311         {
       
 12312             identifier_c param_name("IN");
       
 12313             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12314             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12315             
       
 12316             /* Get the value from a foo(<param_value>) style call */
       
 12317             if (IN_param_value == NULL)
       
 12318               IN_param_value = function_call_param_iterator.next();
       
 12319             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12320             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12321             
       
 12322             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12323             {
       
 12324         
       
 12325                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12326                 s4o.print("(");
       
 12327                 return_type_symbol->accept(*this);
       
 12328                 s4o.print(")string_to_int(");
       
 12329                 IN_param_value->accept(*this);
       
 12330                 s4o.print(", 10)");
       
 12331                 return NULL;
       
 12332                 
       
 12333             }
       
 12334             
       
 12335             ERROR;
       
 12336         }
       
 12337         
       
 12338     }/*function_wstring_to_sint*/
       
 12339     break;
       
 12340 
       
 12341 /****
       
 12342  *WSTRING_TO_INT
       
 12343  */
       
 12344     case function_wstring_to_int :
       
 12345     {
       
 12346         symbol_c *last_type_symbol = NULL;
       
 12347 
       
 12348         {
       
 12349             identifier_c param_name("IN");
       
 12350             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12351             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12352             
       
 12353             /* Get the value from a foo(<param_value>) style call */
       
 12354             if (IN_param_value == NULL)
       
 12355               IN_param_value = function_call_param_iterator.next();
       
 12356             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12357             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12358             
       
 12359             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12360             {
       
 12361         
       
 12362                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12363                 s4o.print("(");
       
 12364                 return_type_symbol->accept(*this);
       
 12365                 s4o.print(")string_to_int(");
       
 12366                 IN_param_value->accept(*this);
       
 12367                 s4o.print(", 10)");
       
 12368                 return NULL;
       
 12369                 
       
 12370             }
       
 12371             
       
 12372             ERROR;
       
 12373         }
       
 12374         
       
 12375     }/*function_wstring_to_int*/
       
 12376     break;
       
 12377 
       
 12378 /****
       
 12379  *WSTRING_TO_DINT
       
 12380  */
       
 12381     case function_wstring_to_dint :
       
 12382     {
       
 12383         symbol_c *last_type_symbol = NULL;
       
 12384 
       
 12385         {
       
 12386             identifier_c param_name("IN");
       
 12387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12388             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12389             
       
 12390             /* Get the value from a foo(<param_value>) style call */
       
 12391             if (IN_param_value == NULL)
       
 12392               IN_param_value = function_call_param_iterator.next();
       
 12393             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12394             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12395             
       
 12396             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12397             {
       
 12398         
       
 12399                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12400                 s4o.print("(");
       
 12401                 return_type_symbol->accept(*this);
       
 12402                 s4o.print(")string_to_int(");
       
 12403                 IN_param_value->accept(*this);
       
 12404                 s4o.print(", 10)");
       
 12405                 return NULL;
       
 12406                 
       
 12407             }
       
 12408             
       
 12409             ERROR;
       
 12410         }
       
 12411         
       
 12412     }/*function_wstring_to_dint*/
       
 12413     break;
       
 12414 
       
 12415 /****
       
 12416  *WSTRING_TO_LINT
       
 12417  */
       
 12418     case function_wstring_to_lint :
       
 12419     {
       
 12420         symbol_c *last_type_symbol = NULL;
       
 12421 
       
 12422         {
       
 12423             identifier_c param_name("IN");
       
 12424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12426             
       
 12427             /* Get the value from a foo(<param_value>) style call */
       
 12428             if (IN_param_value == NULL)
       
 12429               IN_param_value = function_call_param_iterator.next();
       
 12430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12432             
       
 12433             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12434             {
       
 12435         
       
 12436                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12437                 s4o.print("(");
       
 12438                 return_type_symbol->accept(*this);
       
 12439                 s4o.print(")string_to_int(");
       
 12440                 IN_param_value->accept(*this);
       
 12441                 s4o.print(", 10)");
       
 12442                 return NULL;
       
 12443                 
       
 12444             }
       
 12445             
       
 12446             ERROR;
       
 12447         }
       
 12448         
       
 12449     }/*function_wstring_to_lint*/
       
 12450     break;
       
 12451 
       
 12452 /****
       
 12453  *WSTRING_TO_USINT
       
 12454  */
       
 12455     case function_wstring_to_usint :
       
 12456     {
       
 12457         symbol_c *last_type_symbol = NULL;
       
 12458 
       
 12459         {
       
 12460             identifier_c param_name("IN");
       
 12461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12462             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12463             
       
 12464             /* Get the value from a foo(<param_value>) style call */
       
 12465             if (IN_param_value == NULL)
       
 12466               IN_param_value = function_call_param_iterator.next();
       
 12467             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12468             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12469             
       
 12470             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12471             {
       
 12472         
       
 12473                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12474                 s4o.print("(");
       
 12475                 return_type_symbol->accept(*this);
       
 12476                 s4o.print(")string_to_int(");
       
 12477                 IN_param_value->accept(*this);
       
 12478                 s4o.print(", 10)");
       
 12479                 return NULL;
       
 12480                 
       
 12481             }
       
 12482             
       
 12483             ERROR;
       
 12484         }
       
 12485         
       
 12486     }/*function_wstring_to_usint*/
       
 12487     break;
       
 12488 
       
 12489 /****
       
 12490  *WSTRING_TO_UINT
       
 12491  */
       
 12492     case function_wstring_to_uint :
       
 12493     {
       
 12494         symbol_c *last_type_symbol = NULL;
       
 12495 
       
 12496         {
       
 12497             identifier_c param_name("IN");
       
 12498             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12499             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12500             
       
 12501             /* Get the value from a foo(<param_value>) style call */
       
 12502             if (IN_param_value == NULL)
       
 12503               IN_param_value = function_call_param_iterator.next();
       
 12504             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12505             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12506             
       
 12507             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12508             {
       
 12509         
       
 12510                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12511                 s4o.print("(");
       
 12512                 return_type_symbol->accept(*this);
       
 12513                 s4o.print(")string_to_int(");
       
 12514                 IN_param_value->accept(*this);
       
 12515                 s4o.print(", 10)");
       
 12516                 return NULL;
       
 12517                 
       
 12518             }
       
 12519             
       
 12520             ERROR;
       
 12521         }
       
 12522         
       
 12523     }/*function_wstring_to_uint*/
       
 12524     break;
       
 12525 
       
 12526 /****
       
 12527  *WSTRING_TO_UDINT
       
 12528  */
       
 12529     case function_wstring_to_udint :
       
 12530     {
       
 12531         symbol_c *last_type_symbol = NULL;
       
 12532 
       
 12533         {
       
 12534             identifier_c param_name("IN");
       
 12535             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12536             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12537             
       
 12538             /* Get the value from a foo(<param_value>) style call */
       
 12539             if (IN_param_value == NULL)
       
 12540               IN_param_value = function_call_param_iterator.next();
       
 12541             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12542             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12543             
       
 12544             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12545             {
       
 12546         
       
 12547                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12548                 s4o.print("(");
       
 12549                 return_type_symbol->accept(*this);
       
 12550                 s4o.print(")string_to_int(");
       
 12551                 IN_param_value->accept(*this);
       
 12552                 s4o.print(", 10)");
       
 12553                 return NULL;
       
 12554                 
       
 12555             }
       
 12556             
       
 12557             ERROR;
       
 12558         }
       
 12559         
       
 12560     }/*function_wstring_to_udint*/
       
 12561     break;
       
 12562 
       
 12563 /****
       
 12564  *WSTRING_TO_ULINT
       
 12565  */
       
 12566     case function_wstring_to_ulint :
       
 12567     {
       
 12568         symbol_c *last_type_symbol = NULL;
       
 12569 
       
 12570         {
       
 12571             identifier_c param_name("IN");
       
 12572             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12573             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12574             
       
 12575             /* Get the value from a foo(<param_value>) style call */
       
 12576             if (IN_param_value == NULL)
       
 12577               IN_param_value = function_call_param_iterator.next();
       
 12578             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12579             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12580             
       
 12581             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12582             {
       
 12583         
       
 12584                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12585                 s4o.print("(");
       
 12586                 return_type_symbol->accept(*this);
       
 12587                 s4o.print(")string_to_int(");
       
 12588                 IN_param_value->accept(*this);
       
 12589                 s4o.print(", 10)");
       
 12590                 return NULL;
       
 12591                 
       
 12592             }
       
 12593             
       
 12594             ERROR;
       
 12595         }
       
 12596         
       
 12597     }/*function_wstring_to_ulint*/
       
 12598     break;
       
 12599 
       
 12600 /****
       
 12601  *WSTRING_TO_TIME
       
 12602  */
       
 12603     case function_wstring_to_time :
       
 12604     {
       
 12605         symbol_c *last_type_symbol = NULL;
       
 12606 
       
 12607         {
       
 12608             identifier_c param_name("IN");
       
 12609             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12610             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12611             
       
 12612             /* Get the value from a foo(<param_value>) style call */
       
 12613             if (IN_param_value == NULL)
       
 12614               IN_param_value = function_call_param_iterator.next();
       
 12615             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12616             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12617             
       
 12618             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12619             {
       
 12620         
       
 12621                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12622                 s4o.print("(");
       
 12623                 return_type_symbol->accept(*this);
       
 12624                 s4o.print(")string_to_time(");
       
 12625                 IN_param_value->accept(*this);
       
 12626                 s4o.print(")");
       
 12627                 return NULL;
       
 12628                 
       
 12629             }
       
 12630             
       
 12631             ERROR;
       
 12632         }
       
 12633         
       
 12634     }/*function_wstring_to_time*/
       
 12635     break;
       
 12636 
       
 12637 /****
       
 12638  *WSTRING_TO_BOOL
       
 12639  */
       
 12640     case function_wstring_to_bool :
       
 12641     {
       
 12642         symbol_c *last_type_symbol = NULL;
       
 12643 
       
 12644         {
       
 12645             identifier_c param_name("IN");
       
 12646             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12647             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12648             
       
 12649             /* Get the value from a foo(<param_value>) style call */
       
 12650             if (IN_param_value == NULL)
       
 12651               IN_param_value = function_call_param_iterator.next();
       
 12652             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12653             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12654             
       
 12655             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12656             {
       
 12657         
       
 12658                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12659                 s4o.print("(");
       
 12660                 return_type_symbol->accept(*this);
       
 12661                 s4o.print(")string_to_int(");
       
 12662                 IN_param_value->accept(*this);
       
 12663                 s4o.print(", 16)");
       
 12664                 return NULL;
       
 12665                 
       
 12666             }
       
 12667             
       
 12668             ERROR;
       
 12669         }
       
 12670         
       
 12671     }/*function_wstring_to_bool*/
       
 12672     break;
       
 12673 
       
 12674 /****
       
 12675  *WSTRING_TO_BYTE
       
 12676  */
       
 12677     case function_wstring_to_byte :
       
 12678     {
       
 12679         symbol_c *last_type_symbol = NULL;
       
 12680 
       
 12681         {
       
 12682             identifier_c param_name("IN");
       
 12683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12685             
       
 12686             /* Get the value from a foo(<param_value>) style call */
       
 12687             if (IN_param_value == NULL)
       
 12688               IN_param_value = function_call_param_iterator.next();
       
 12689             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12690             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12691             
       
 12692             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12693             {
       
 12694         
       
 12695                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12696                 s4o.print("(");
       
 12697                 return_type_symbol->accept(*this);
       
 12698                 s4o.print(")string_to_int(");
       
 12699                 IN_param_value->accept(*this);
       
 12700                 s4o.print(", 16)");
       
 12701                 return NULL;
       
 12702                 
       
 12703             }
       
 12704             
       
 12705             ERROR;
       
 12706         }
       
 12707         
       
 12708     }/*function_wstring_to_byte*/
       
 12709     break;
       
 12710 
       
 12711 /****
       
 12712  *WSTRING_TO_WORD
       
 12713  */
       
 12714     case function_wstring_to_word :
       
 12715     {
       
 12716         symbol_c *last_type_symbol = NULL;
       
 12717 
       
 12718         {
       
 12719             identifier_c param_name("IN");
       
 12720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12722             
       
 12723             /* Get the value from a foo(<param_value>) style call */
       
 12724             if (IN_param_value == NULL)
       
 12725               IN_param_value = function_call_param_iterator.next();
       
 12726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12728             
       
 12729             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12730             {
       
 12731         
       
 12732                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12733                 s4o.print("(");
       
 12734                 return_type_symbol->accept(*this);
       
 12735                 s4o.print(")string_to_int(");
       
 12736                 IN_param_value->accept(*this);
       
 12737                 s4o.print(", 16)");
       
 12738                 return NULL;
       
 12739                 
       
 12740             }
       
 12741             
       
 12742             ERROR;
       
 12743         }
       
 12744         
       
 12745     }/*function_wstring_to_word*/
       
 12746     break;
       
 12747 
       
 12748 /****
       
 12749  *WSTRING_TO_DWORD
       
 12750  */
       
 12751     case function_wstring_to_dword :
       
 12752     {
       
 12753         symbol_c *last_type_symbol = NULL;
       
 12754 
       
 12755         {
       
 12756             identifier_c param_name("IN");
       
 12757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12758             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12759             
       
 12760             /* Get the value from a foo(<param_value>) style call */
       
 12761             if (IN_param_value == NULL)
       
 12762               IN_param_value = function_call_param_iterator.next();
       
 12763             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12764             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12765             
       
 12766             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12767             {
       
 12768         
       
 12769                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12770                 s4o.print("(");
       
 12771                 return_type_symbol->accept(*this);
       
 12772                 s4o.print(")string_to_int(");
       
 12773                 IN_param_value->accept(*this);
       
 12774                 s4o.print(", 16)");
       
 12775                 return NULL;
       
 12776                 
       
 12777             }
       
 12778             
       
 12779             ERROR;
       
 12780         }
       
 12781         
       
 12782     }/*function_wstring_to_dword*/
       
 12783     break;
       
 12784 
       
 12785 /****
       
 12786  *WSTRING_TO_LWORD
       
 12787  */
       
 12788     case function_wstring_to_lword :
       
 12789     {
       
 12790         symbol_c *last_type_symbol = NULL;
       
 12791 
       
 12792         {
       
 12793             identifier_c param_name("IN");
       
 12794             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12795             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12796             
       
 12797             /* Get the value from a foo(<param_value>) style call */
       
 12798             if (IN_param_value == NULL)
       
 12799               IN_param_value = function_call_param_iterator.next();
       
 12800             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12801             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12802             
       
 12803             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12804             {
       
 12805         
       
 12806                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12807                 s4o.print("(");
       
 12808                 return_type_symbol->accept(*this);
       
 12809                 s4o.print(")string_to_int(");
       
 12810                 IN_param_value->accept(*this);
       
 12811                 s4o.print(", 16)");
       
 12812                 return NULL;
       
 12813                 
       
 12814             }
       
 12815             
       
 12816             ERROR;
       
 12817         }
       
 12818         
       
 12819     }/*function_wstring_to_lword*/
       
 12820     break;
       
 12821 
       
 12822 /****
       
 12823  *WSTRING_TO_DATE
       
 12824  */
       
 12825     case function_wstring_to_date :
       
 12826     {
       
 12827         symbol_c *last_type_symbol = NULL;
       
 12828 
       
 12829         {
       
 12830             identifier_c param_name("IN");
       
 12831             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12832             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12833             
       
 12834             /* Get the value from a foo(<param_value>) style call */
       
 12835             if (IN_param_value == NULL)
       
 12836               IN_param_value = function_call_param_iterator.next();
       
 12837             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12838             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12839             
       
 12840             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12841             {
       
 12842         
       
 12843                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12844                 s4o.print("(");
       
 12845                 return_type_symbol->accept(*this);
       
 12846                 s4o.print(")string_to_time(");
       
 12847                 IN_param_value->accept(*this);
       
 12848                 s4o.print(")");
       
 12849                 return NULL;
       
 12850                 
       
 12851             }
       
 12852             
       
 12853             ERROR;
       
 12854         }
       
 12855         
       
 12856     }/*function_wstring_to_date*/
       
 12857     break;
       
 12858 
       
 12859 /****
       
 12860  *WSTRING_TO_TOD
       
 12861  */
       
 12862     case function_wstring_to_tod :
       
 12863     {
       
 12864         symbol_c *last_type_symbol = NULL;
       
 12865 
       
 12866         {
       
 12867             identifier_c param_name("IN");
       
 12868             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12869             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12870             
       
 12871             /* Get the value from a foo(<param_value>) style call */
       
 12872             if (IN_param_value == NULL)
       
 12873               IN_param_value = function_call_param_iterator.next();
       
 12874             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12875             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12876             
       
 12877             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12878             {
       
 12879         
       
 12880                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12881                 s4o.print("(");
       
 12882                 return_type_symbol->accept(*this);
       
 12883                 s4o.print(")string_to_time(");
       
 12884                 IN_param_value->accept(*this);
       
 12885                 s4o.print(")");
       
 12886                 return NULL;
       
 12887                 
       
 12888             }
       
 12889             
       
 12890             ERROR;
       
 12891         }
       
 12892         
       
 12893     }/*function_wstring_to_tod*/
       
 12894     break;
       
 12895 
       
 12896 /****
       
 12897  *WSTRING_TO_DT
       
 12898  */
       
 12899     case function_wstring_to_dt :
       
 12900     {
       
 12901         symbol_c *last_type_symbol = NULL;
       
 12902 
       
 12903         {
       
 12904             identifier_c param_name("IN");
       
 12905             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12906             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12907             
       
 12908             /* Get the value from a foo(<param_value>) style call */
       
 12909             if (IN_param_value == NULL)
       
 12910               IN_param_value = function_call_param_iterator.next();
       
 12911             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12912             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12913             
       
 12914             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 12915             {
       
 12916         
       
 12917                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12918                 s4o.print("(");
       
 12919                 return_type_symbol->accept(*this);
       
 12920                 s4o.print(")string_to_time(");
       
 12921                 IN_param_value->accept(*this);
       
 12922                 s4o.print(")");
       
 12923                 return NULL;
       
 12924                 
       
 12925             }
       
 12926             
       
 12927             ERROR;
       
 12928         }
       
 12929         
       
 12930     }/*function_wstring_to_dt*/
       
 12931     break;
  3055 
 12932 
  3056 /****
 12933 /****
  3057  *DATE_TO_REAL
 12934  *DATE_TO_REAL
  3058  */
 12935  */
  3059 	case function_date_to_real :
 12936     case function_date_to_real :
  3060 	{
 12937     {
  3061 		symbol_c *last_type_symbol = NULL;
 12938         symbol_c *last_type_symbol = NULL;
  3062 
 12939 
  3063 		{
 12940         {
  3064 			identifier_c param_name("IN");
 12941             identifier_c param_name("IN");
  3065 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 12942             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3066 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12943             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3067 			
 12944             
  3068 			/* Get the value from a foo(<param_value>) style call */
 12945             /* Get the value from a foo(<param_value>) style call */
  3069 			if (IN_param_value == NULL)
 12946             if (IN_param_value == NULL)
  3070 			  IN_param_value = function_call_param_iterator.next();
 12947               IN_param_value = function_call_param_iterator.next();
  3071 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12948             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3072 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12949             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3073 			
 12950             
  3074 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 12951             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3075 			{
 12952             {
  3076 		
 12953         
  3077 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 12954                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3078 				s4o.print("(");
 12955                 s4o.print("(");
  3079 				return_type_symbol->accept(*this);
 12956                 return_type_symbol->accept(*this);
  3080 				s4o.print(")real_to_time(");
 12957                 s4o.print(")time_to_real(");
  3081 				IN_param_value->accept(*this);
 12958                 IN_param_value->accept(*this);
  3082 				s4o.print(")");
 12959                 s4o.print(")");
  3083 				return NULL;
 12960                 return NULL;
  3084 				
 12961                 
  3085 			}
 12962             }
  3086 			
 12963             
  3087 			ERROR;
 12964             ERROR;
  3088 		}
 12965         }
  3089 		
 12966         
  3090 	}/*function_date_to_real*/
 12967     }/*function_date_to_real*/
  3091 	break;
 12968     break;
       
 12969 
       
 12970 /****
       
 12971  *DATE_TO_LREAL
       
 12972  */
       
 12973     case function_date_to_lreal :
       
 12974     {
       
 12975         symbol_c *last_type_symbol = NULL;
       
 12976 
       
 12977         {
       
 12978             identifier_c param_name("IN");
       
 12979             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12980             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12981             
       
 12982             /* Get the value from a foo(<param_value>) style call */
       
 12983             if (IN_param_value == NULL)
       
 12984               IN_param_value = function_call_param_iterator.next();
       
 12985             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12986             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12987             
       
 12988             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12989             {
       
 12990         
       
 12991                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12992                 s4o.print("(");
       
 12993                 return_type_symbol->accept(*this);
       
 12994                 s4o.print(")time_to_real(");
       
 12995                 IN_param_value->accept(*this);
       
 12996                 s4o.print(")");
       
 12997                 return NULL;
       
 12998                 
       
 12999             }
       
 13000             
       
 13001             ERROR;
       
 13002         }
       
 13003         
       
 13004     }/*function_date_to_lreal*/
       
 13005     break;
  3092 
 13006 
  3093 /****
 13007 /****
  3094  *DATE_TO_SINT
 13008  *DATE_TO_SINT
  3095  */
 13009  */
  3096 	case function_date_to_sint :
 13010     case function_date_to_sint :
  3097 	{
 13011     {
  3098 		symbol_c *last_type_symbol = NULL;
 13012         symbol_c *last_type_symbol = NULL;
  3099 
 13013 
  3100 		{
 13014         {
  3101 			identifier_c param_name("IN");
 13015             identifier_c param_name("IN");
  3102 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13016             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3103 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3104 			
 13018             
  3105 			/* Get the value from a foo(<param_value>) style call */
 13019             /* Get the value from a foo(<param_value>) style call */
  3106 			if (IN_param_value == NULL)
 13020             if (IN_param_value == NULL)
  3107 			  IN_param_value = function_call_param_iterator.next();
 13021               IN_param_value = function_call_param_iterator.next();
  3108 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3109 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  3110 			
 13024             
  3111 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13025             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3112 			{
 13026             {
  3113 		
 13027         
  3114 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 13028                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3115 				s4o.print("(");
 13029                 s4o.print("(");
  3116 				return_type_symbol->accept(*this);
 13030                 return_type_symbol->accept(*this);
  3117 				s4o.print(")real_to_time(");
 13031                 s4o.print(")time_to_real(");
  3118 				IN_param_value->accept(*this);
 13032                 IN_param_value->accept(*this);
  3119 				s4o.print(")");
 13033                 s4o.print(")");
  3120 				return NULL;
 13034                 return NULL;
  3121 				
 13035                 
  3122 			}
 13036             }
  3123 			
 13037             
  3124 			ERROR;
 13038             ERROR;
  3125 		}
 13039         }
  3126 		
 13040         
  3127 	}/*function_date_to_sint*/
 13041     }/*function_date_to_sint*/
  3128 	break;
 13042     break;
       
 13043 
       
 13044 /****
       
 13045  *DATE_TO_INT
       
 13046  */
       
 13047     case function_date_to_int :
       
 13048     {
       
 13049         symbol_c *last_type_symbol = NULL;
       
 13050 
       
 13051         {
       
 13052             identifier_c param_name("IN");
       
 13053             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13054             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13055             
       
 13056             /* Get the value from a foo(<param_value>) style call */
       
 13057             if (IN_param_value == NULL)
       
 13058               IN_param_value = function_call_param_iterator.next();
       
 13059             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13060             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13061             
       
 13062             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13063             {
       
 13064         
       
 13065                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13066                 s4o.print("(");
       
 13067                 return_type_symbol->accept(*this);
       
 13068                 s4o.print(")time_to_real(");
       
 13069                 IN_param_value->accept(*this);
       
 13070                 s4o.print(")");
       
 13071                 return NULL;
       
 13072                 
       
 13073             }
       
 13074             
       
 13075             ERROR;
       
 13076         }
       
 13077         
       
 13078     }/*function_date_to_int*/
       
 13079     break;
       
 13080 
       
 13081 /****
       
 13082  *DATE_TO_DINT
       
 13083  */
       
 13084     case function_date_to_dint :
       
 13085     {
       
 13086         symbol_c *last_type_symbol = NULL;
       
 13087 
       
 13088         {
       
 13089             identifier_c param_name("IN");
       
 13090             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13091             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13092             
       
 13093             /* Get the value from a foo(<param_value>) style call */
       
 13094             if (IN_param_value == NULL)
       
 13095               IN_param_value = function_call_param_iterator.next();
       
 13096             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13097             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13098             
       
 13099             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13100             {
       
 13101         
       
 13102                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13103                 s4o.print("(");
       
 13104                 return_type_symbol->accept(*this);
       
 13105                 s4o.print(")time_to_real(");
       
 13106                 IN_param_value->accept(*this);
       
 13107                 s4o.print(")");
       
 13108                 return NULL;
       
 13109                 
       
 13110             }
       
 13111             
       
 13112             ERROR;
       
 13113         }
       
 13114         
       
 13115     }/*function_date_to_dint*/
       
 13116     break;
  3129 
 13117 
  3130 /****
 13118 /****
  3131  *DATE_TO_LINT
 13119  *DATE_TO_LINT
  3132  */
 13120  */
  3133 	case function_date_to_lint :
 13121     case function_date_to_lint :
  3134 	{
 13122     {
  3135 		symbol_c *last_type_symbol = NULL;
 13123         symbol_c *last_type_symbol = NULL;
  3136 
 13124 
  3137 		{
 13125         {
  3138 			identifier_c param_name("IN");
 13126             identifier_c param_name("IN");
  3139 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13127             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3140 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13128             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3141 			
 13129             
  3142 			/* Get the value from a foo(<param_value>) style call */
 13130             /* Get the value from a foo(<param_value>) style call */
  3143 			if (IN_param_value == NULL)
 13131             if (IN_param_value == NULL)
  3144 			  IN_param_value = function_call_param_iterator.next();
 13132               IN_param_value = function_call_param_iterator.next();
  3145 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13133             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3146 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13134             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3147 			
 13135             
  3148 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13136             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3149 			{
 13137             {
  3150 		
 13138         
  3151 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 13139                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3152 				s4o.print("(");
 13140                 s4o.print("(");
  3153 				return_type_symbol->accept(*this);
 13141                 return_type_symbol->accept(*this);
  3154 				s4o.print(")real_to_time(");
 13142                 s4o.print(")time_to_real(");
  3155 				IN_param_value->accept(*this);
 13143                 IN_param_value->accept(*this);
  3156 				s4o.print(")");
 13144                 s4o.print(")");
  3157 				return NULL;
 13145                 return NULL;
  3158 				
 13146                 
  3159 			}
 13147             }
  3160 			
 13148             
  3161 			ERROR;
 13149             ERROR;
  3162 		}
 13150         }
  3163 		
 13151         
  3164 	}/*function_date_to_lint*/
 13152     }/*function_date_to_lint*/
  3165 	break;
 13153     break;
  3166 
 13154 
  3167 /****
 13155 /****
  3168  *DATE_TO_DINT
 13156  *DATE_TO_USINT
  3169  */
 13157  */
  3170 	case function_date_to_dint :
 13158     case function_date_to_usint :
  3171 	{
 13159     {
  3172 		symbol_c *last_type_symbol = NULL;
 13160         symbol_c *last_type_symbol = NULL;
  3173 
 13161 
  3174 		{
 13162         {
  3175 			identifier_c param_name("IN");
 13163             identifier_c param_name("IN");
  3176 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13164             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3177 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13165             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3178 			
 13166             
  3179 			/* Get the value from a foo(<param_value>) style call */
 13167             /* Get the value from a foo(<param_value>) style call */
  3180 			if (IN_param_value == NULL)
 13168             if (IN_param_value == NULL)
  3181 			  IN_param_value = function_call_param_iterator.next();
 13169               IN_param_value = function_call_param_iterator.next();
  3182 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13170             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3183 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13171             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3184 			
 13172             
  3185 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13173             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3186 			{
 13174             {
  3187 		
 13175         
  3188 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 13176                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  3189 				s4o.print("(");
 13177                 s4o.print("(");
  3190 				return_type_symbol->accept(*this);
 13178                 return_type_symbol->accept(*this);
  3191 				s4o.print(")real_to_time(");
 13179                 s4o.print(")time_to_real(");
  3192 				IN_param_value->accept(*this);
 13180                 IN_param_value->accept(*this);
  3193 				s4o.print(")");
 13181                 s4o.print(")");
  3194 				return NULL;
 13182                 return NULL;
  3195 				
 13183                 
  3196 			}
 13184             }
  3197 			
 13185             
  3198 			ERROR;
 13186             ERROR;
  3199 		}
 13187         }
  3200 		
 13188         
  3201 	}/*function_date_to_dint*/
 13189     }/*function_date_to_usint*/
  3202 	break;
 13190     break;
  3203 
 13191 
  3204 /****
 13192 /****
  3205  *DATE_TO_DATE
 13193  *DATE_TO_UINT
  3206  */
 13194  */
  3207 	case function_date_to_date :
 13195     case function_date_to_uint :
  3208 	{
 13196     {
  3209 		symbol_c *last_type_symbol = NULL;
 13197         symbol_c *last_type_symbol = NULL;
  3210 
 13198 
  3211 		{
 13199         {
  3212 			identifier_c param_name("IN");
 13200             identifier_c param_name("IN");
  3213 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13201             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3214 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13202             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3215 			
 13203             
  3216 			/* Get the value from a foo(<param_value>) style call */
 13204             /* Get the value from a foo(<param_value>) style call */
  3217 			if (IN_param_value == NULL)
 13205             if (IN_param_value == NULL)
  3218 			  IN_param_value = function_call_param_iterator.next();
 13206               IN_param_value = function_call_param_iterator.next();
  3219 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13207             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3220 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  3221 			
 13209             
  3222 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13210             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3223 			{
 13211             {
  3224 		
 13212         
  3225 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 13213                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3226 				s4o.print("#error DATE_TO_DATE not implemented!");
 13214                 s4o.print("(");
  3227 				return NULL;
 13215                 return_type_symbol->accept(*this);
  3228 				
 13216                 s4o.print(")time_to_real(");
  3229 			}
 13217                 IN_param_value->accept(*this);
  3230 			
 13218                 s4o.print(")");
  3231 			ERROR;
 13219                 return NULL;
  3232 		}
 13220                 
  3233 		
 13221             }
  3234 	}/*function_date_to_date*/
 13222             
  3235 	break;
 13223             ERROR;
       
 13224         }
       
 13225         
       
 13226     }/*function_date_to_uint*/
       
 13227     break;
       
 13228 
       
 13229 /****
       
 13230  *DATE_TO_UDINT
       
 13231  */
       
 13232     case function_date_to_udint :
       
 13233     {
       
 13234         symbol_c *last_type_symbol = NULL;
       
 13235 
       
 13236         {
       
 13237             identifier_c param_name("IN");
       
 13238             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13239             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13240             
       
 13241             /* Get the value from a foo(<param_value>) style call */
       
 13242             if (IN_param_value == NULL)
       
 13243               IN_param_value = function_call_param_iterator.next();
       
 13244             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13245             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13246             
       
 13247             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13248             {
       
 13249         
       
 13250                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13251                 s4o.print("(");
       
 13252                 return_type_symbol->accept(*this);
       
 13253                 s4o.print(")time_to_real(");
       
 13254                 IN_param_value->accept(*this);
       
 13255                 s4o.print(")");
       
 13256                 return NULL;
       
 13257                 
       
 13258             }
       
 13259             
       
 13260             ERROR;
       
 13261         }
       
 13262         
       
 13263     }/*function_date_to_udint*/
       
 13264     break;
       
 13265 
       
 13266 /****
       
 13267  *DATE_TO_ULINT
       
 13268  */
       
 13269     case function_date_to_ulint :
       
 13270     {
       
 13271         symbol_c *last_type_symbol = NULL;
       
 13272 
       
 13273         {
       
 13274             identifier_c param_name("IN");
       
 13275             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13276             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13277             
       
 13278             /* Get the value from a foo(<param_value>) style call */
       
 13279             if (IN_param_value == NULL)
       
 13280               IN_param_value = function_call_param_iterator.next();
       
 13281             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13282             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13283             
       
 13284             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13285             {
       
 13286         
       
 13287                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13288                 s4o.print("(");
       
 13289                 return_type_symbol->accept(*this);
       
 13290                 s4o.print(")time_to_real(");
       
 13291                 IN_param_value->accept(*this);
       
 13292                 s4o.print(")");
       
 13293                 return NULL;
       
 13294                 
       
 13295             }
       
 13296             
       
 13297             ERROR;
       
 13298         }
       
 13299         
       
 13300     }/*function_date_to_ulint*/
       
 13301     break;
       
 13302 
       
 13303 /****
       
 13304  *DATE_TO_BOOL
       
 13305  */
       
 13306     case function_date_to_bool :
       
 13307     {
       
 13308         symbol_c *last_type_symbol = NULL;
       
 13309 
       
 13310         {
       
 13311             identifier_c param_name("IN");
       
 13312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13314             
       
 13315             /* Get the value from a foo(<param_value>) style call */
       
 13316             if (IN_param_value == NULL)
       
 13317               IN_param_value = function_call_param_iterator.next();
       
 13318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13320             
       
 13321             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13322             {
       
 13323         
       
 13324                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13325                 s4o.print("(");
       
 13326                 return_type_symbol->accept(*this);
       
 13327                 s4o.print(")time_to_real(");
       
 13328                 IN_param_value->accept(*this);
       
 13329                 s4o.print(")");
       
 13330                 return NULL;
       
 13331                 
       
 13332             }
       
 13333             
       
 13334             ERROR;
       
 13335         }
       
 13336         
       
 13337     }/*function_date_to_bool*/
       
 13338     break;
       
 13339 
       
 13340 /****
       
 13341  *DATE_TO_BYTE
       
 13342  */
       
 13343     case function_date_to_byte :
       
 13344     {
       
 13345         symbol_c *last_type_symbol = NULL;
       
 13346 
       
 13347         {
       
 13348             identifier_c param_name("IN");
       
 13349             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13350             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13351             
       
 13352             /* Get the value from a foo(<param_value>) style call */
       
 13353             if (IN_param_value == NULL)
       
 13354               IN_param_value = function_call_param_iterator.next();
       
 13355             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13356             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13357             
       
 13358             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13359             {
       
 13360         
       
 13361                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13362                 s4o.print("(");
       
 13363                 return_type_symbol->accept(*this);
       
 13364                 s4o.print(")time_to_real(");
       
 13365                 IN_param_value->accept(*this);
       
 13366                 s4o.print(")");
       
 13367                 return NULL;
       
 13368                 
       
 13369             }
       
 13370             
       
 13371             ERROR;
       
 13372         }
       
 13373         
       
 13374     }/*function_date_to_byte*/
       
 13375     break;
       
 13376 
       
 13377 /****
       
 13378  *DATE_TO_WORD
       
 13379  */
       
 13380     case function_date_to_word :
       
 13381     {
       
 13382         symbol_c *last_type_symbol = NULL;
       
 13383 
       
 13384         {
       
 13385             identifier_c param_name("IN");
       
 13386             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13387             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13388             
       
 13389             /* Get the value from a foo(<param_value>) style call */
       
 13390             if (IN_param_value == NULL)
       
 13391               IN_param_value = function_call_param_iterator.next();
       
 13392             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13393             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13394             
       
 13395             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 13396             {
       
 13397         
       
 13398                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13399                 s4o.print("(");
       
 13400                 return_type_symbol->accept(*this);
       
 13401                 s4o.print(")time_to_real(");
       
 13402                 IN_param_value->accept(*this);
       
 13403                 s4o.print(")");
       
 13404                 return NULL;
       
 13405                 
       
 13406             }
       
 13407             
       
 13408             ERROR;
       
 13409         }
       
 13410         
       
 13411     }/*function_date_to_word*/
       
 13412     break;
  3236 
 13413 
  3237 /****
 13414 /****
  3238  *DATE_TO_DWORD
 13415  *DATE_TO_DWORD
  3239  */
 13416  */
  3240 	case function_date_to_dword :
 13417     case function_date_to_dword :
  3241 	{
 13418     {
  3242 		symbol_c *last_type_symbol = NULL;
 13419         symbol_c *last_type_symbol = NULL;
  3243 
 13420 
  3244 		{
 13421         {
  3245 			identifier_c param_name("IN");
 13422             identifier_c param_name("IN");
  3246 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13423             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3247 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13424             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3248 			
 13425             
  3249 			/* Get the value from a foo(<param_value>) style call */
 13426             /* Get the value from a foo(<param_value>) style call */
  3250 			if (IN_param_value == NULL)
 13427             if (IN_param_value == NULL)
  3251 			  IN_param_value = function_call_param_iterator.next();
 13428               IN_param_value = function_call_param_iterator.next();
  3252 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13429             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3253 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13430             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3254 			
 13431             
  3255 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13432             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3256 			{
 13433             {
  3257 		
 13434         
  3258 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 13435                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3259 				s4o.print("(");
 13436                 s4o.print("(");
  3260 				return_type_symbol->accept(*this);
 13437                 return_type_symbol->accept(*this);
  3261 				s4o.print(")real_to_time(");
 13438                 s4o.print(")time_to_real(");
  3262 				IN_param_value->accept(*this);
 13439                 IN_param_value->accept(*this);
  3263 				s4o.print(")");
 13440                 s4o.print(")");
  3264 				return NULL;
 13441                 return NULL;
  3265 				
 13442                 
  3266 			}
 13443             }
  3267 			
 13444             
  3268 			ERROR;
 13445             ERROR;
  3269 		}
 13446         }
  3270 		
 13447         
  3271 	}/*function_date_to_dword*/
 13448     }/*function_date_to_dword*/
  3272 	break;
 13449     break;
  3273 
 13450 
  3274 /****
 13451 /****
  3275  *DATE_TO_DT
 13452  *DATE_TO_LWORD
  3276  */
 13453  */
  3277 	case function_date_to_dt :
 13454     case function_date_to_lword :
  3278 	{
 13455     {
  3279 		symbol_c *last_type_symbol = NULL;
 13456         symbol_c *last_type_symbol = NULL;
  3280 
 13457 
  3281 		{
 13458         {
  3282 			identifier_c param_name("IN");
 13459             identifier_c param_name("IN");
  3283 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13460             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3284 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13461             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3285 			
 13462             
  3286 			/* Get the value from a foo(<param_value>) style call */
 13463             /* Get the value from a foo(<param_value>) style call */
  3287 			if (IN_param_value == NULL)
 13464             if (IN_param_value == NULL)
  3288 			  IN_param_value = function_call_param_iterator.next();
 13465               IN_param_value = function_call_param_iterator.next();
  3289 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13466             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3290 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13467             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3291 			
 13468             
  3292 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13469             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3293 			{
 13470             {
  3294 		
 13471         
  3295 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 13472                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3296 				s4o.print("#error DATE_TO_DT not implemented!");
 13473                 s4o.print("(");
  3297 				return NULL;
 13474                 return_type_symbol->accept(*this);
  3298 				
 13475                 s4o.print(")time_to_real(");
  3299 			}
 13476                 IN_param_value->accept(*this);
  3300 			
 13477                 s4o.print(")");
  3301 			ERROR;
 13478                 return NULL;
  3302 		}
 13479                 
  3303 		
 13480             }
  3304 	}/*function_date_to_dt*/
 13481             
  3305 	break;
 13482             ERROR;
  3306 
 13483         }
  3307 /****
 13484         
  3308  *DATE_TO_TOD
 13485     }/*function_date_to_lword*/
  3309  */
 13486     break;
  3310 	case function_date_to_tod :
 13487 
  3311 	{
 13488 /****
  3312 		symbol_c *last_type_symbol = NULL;
 13489  *DATE_TO_STRING
  3313 
 13490  */
  3314 		{
 13491     case function_date_to_string :
  3315 			identifier_c param_name("IN");
 13492     {
  3316 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13493         symbol_c *last_type_symbol = NULL;
  3317 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13494 
  3318 			
 13495         {
  3319 			/* Get the value from a foo(<param_value>) style call */
 13496             identifier_c param_name("IN");
  3320 			if (IN_param_value == NULL)
 13497             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3321 			  IN_param_value = function_call_param_iterator.next();
 13498             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3322 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13499             
  3323 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13500             /* Get the value from a foo(<param_value>) style call */
  3324 			
 13501             if (IN_param_value == NULL)
  3325 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13502               IN_param_value = function_call_param_iterator.next();
  3326 			{
 13503             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3327 		
 13504             last_type_symbol = last_type_symbol && search_expression_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 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 13505             
  3329 				s4o.print("#error DATE_TO_TOD not implemented!");
 13506             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3330 				return NULL;
 13507             {
  3331 				
 13508         
  3332 			}
 13509                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3333 			
 13510                 s4o.print("(");
  3334 			ERROR;
 13511                 return_type_symbol->accept(*this);
  3335 		}
 13512                 s4o.print(")time_to_string(");
  3336 		
 13513                 IN_param_value->accept(*this);
  3337 	}/*function_date_to_tod*/
 13514                 s4o.print(")");
  3338 	break;
 13515                 return NULL;
  3339 
 13516                 
  3340 /****
 13517             }
  3341  *DATE_TO_UDINT
 13518             
  3342  */
 13519             ERROR;
  3343 	case function_date_to_udint :
 13520         }
  3344 	{
 13521         
  3345 		symbol_c *last_type_symbol = NULL;
 13522     }/*function_date_to_string*/
  3346 
 13523     break;
  3347 		{
       
  3348 			identifier_c param_name("IN");
       
  3349 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3350 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3351 			
       
  3352 			/* Get the value from a foo(<param_value>) style call */
       
  3353 			if (IN_param_value == NULL)
       
  3354 			  IN_param_value = function_call_param_iterator.next();
       
  3355 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3356 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3357 			
       
  3358 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3359 			{
       
  3360 		
       
  3361 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3362 				s4o.print("(");
       
  3363 				return_type_symbol->accept(*this);
       
  3364 				s4o.print(")real_to_time(");
       
  3365 				IN_param_value->accept(*this);
       
  3366 				s4o.print(")");
       
  3367 				return NULL;
       
  3368 				
       
  3369 			}
       
  3370 			
       
  3371 			ERROR;
       
  3372 		}
       
  3373 		
       
  3374 	}/*function_date_to_udint*/
       
  3375 	break;
       
  3376 
       
  3377 /****
       
  3378  *DATE_TO_WORD
       
  3379  */
       
  3380 	case function_date_to_word :
       
  3381 	{
       
  3382 		symbol_c *last_type_symbol = NULL;
       
  3383 
       
  3384 		{
       
  3385 			identifier_c param_name("IN");
       
  3386 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3387 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3388 			
       
  3389 			/* Get the value from a foo(<param_value>) style call */
       
  3390 			if (IN_param_value == NULL)
       
  3391 			  IN_param_value = function_call_param_iterator.next();
       
  3392 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3393 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3394 			
       
  3395 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3396 			{
       
  3397 		
       
  3398 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3399 				s4o.print("(");
       
  3400 				return_type_symbol->accept(*this);
       
  3401 				s4o.print(")real_to_time(");
       
  3402 				IN_param_value->accept(*this);
       
  3403 				s4o.print(")");
       
  3404 				return NULL;
       
  3405 				
       
  3406 			}
       
  3407 			
       
  3408 			ERROR;
       
  3409 		}
       
  3410 		
       
  3411 	}/*function_date_to_word*/
       
  3412 	break;
       
  3413 
 13524 
  3414 /****
 13525 /****
  3415  *DATE_TO_WSTRING
 13526  *DATE_TO_WSTRING
  3416  */
 13527  */
  3417 	case function_date_to_wstring :
 13528     case function_date_to_wstring :
  3418 	{
 13529     {
  3419 		symbol_c *last_type_symbol = NULL;
 13530         symbol_c *last_type_symbol = NULL;
  3420 
 13531 
  3421 		{
 13532         {
  3422 			identifier_c param_name("IN");
 13533             identifier_c param_name("IN");
  3423 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13534             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3424 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13535             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3425 			
 13536             
  3426 			/* Get the value from a foo(<param_value>) style call */
 13537             /* Get the value from a foo(<param_value>) style call */
  3427 			if (IN_param_value == NULL)
 13538             if (IN_param_value == NULL)
  3428 			  IN_param_value = function_call_param_iterator.next();
 13539               IN_param_value = function_call_param_iterator.next();
  3429 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13540             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3430 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13541             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3431 			
 13542             
  3432 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13543             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  3433 			{
 13544             {
  3434 		
 13545         
  3435 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 13546                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  3436 				s4o.print("(");
 13547                 s4o.print("(");
  3437 				return_type_symbol->accept(*this);
 13548                 return_type_symbol->accept(*this);
  3438 				s4o.print(")string_to_time(");
 13549                 s4o.print(")time_to_string(");
  3439 				IN_param_value->accept(*this);
 13550                 IN_param_value->accept(*this);
  3440 				s4o.print(")");
 13551                 s4o.print(")");
  3441 				return NULL;
 13552                 return NULL;
  3442 				
 13553                 
  3443 			}
 13554             }
  3444 			
 13555             
  3445 			ERROR;
 13556             ERROR;
  3446 		}
 13557         }
  3447 		
 13558         
  3448 	}/*function_date_to_wstring*/
 13559     }/*function_date_to_wstring*/
  3449 	break;
 13560     break;
  3450 
 13561 
  3451 /****
 13562 /****
  3452  *DATE_TO_STRING
 13563  *TOD_TO_REAL
  3453  */
 13564  */
  3454 	case function_date_to_string :
 13565     case function_tod_to_real :
  3455 	{
 13566     {
  3456 		symbol_c *last_type_symbol = NULL;
 13567         symbol_c *last_type_symbol = NULL;
  3457 
 13568 
  3458 		{
 13569         {
  3459 			identifier_c param_name("IN");
 13570             identifier_c param_name("IN");
  3460 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13571             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3461 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13572             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3462 			
 13573             
  3463 			/* Get the value from a foo(<param_value>) style call */
 13574             /* Get the value from a foo(<param_value>) style call */
  3464 			if (IN_param_value == NULL)
 13575             if (IN_param_value == NULL)
  3465 			  IN_param_value = function_call_param_iterator.next();
 13576               IN_param_value = function_call_param_iterator.next();
  3466 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13577             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3467 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13578             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3468 			
 13579             
  3469 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13580             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3470 			{
 13581             {
  3471 		
 13582         
  3472 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 13583                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3473 				s4o.print("(");
 13584                 s4o.print("(");
  3474 				return_type_symbol->accept(*this);
 13585                 return_type_symbol->accept(*this);
  3475 				s4o.print(")string_to_time(");
 13586                 s4o.print(")time_to_real(");
  3476 				IN_param_value->accept(*this);
 13587                 IN_param_value->accept(*this);
  3477 				s4o.print(")");
 13588                 s4o.print(")");
  3478 				return NULL;
 13589                 return NULL;
  3479 				
 13590                 
  3480 			}
 13591             }
  3481 			
 13592             
  3482 			ERROR;
 13593             ERROR;
  3483 		}
 13594         }
  3484 		
 13595         
  3485 	}/*function_date_to_string*/
 13596     }/*function_tod_to_real*/
  3486 	break;
 13597     break;
  3487 
 13598 
  3488 /****
 13599 /****
  3489  *DATE_TO_LWORD
 13600  *TOD_TO_LREAL
  3490  */
 13601  */
  3491 	case function_date_to_lword :
 13602     case function_tod_to_lreal :
  3492 	{
 13603     {
  3493 		symbol_c *last_type_symbol = NULL;
 13604         symbol_c *last_type_symbol = NULL;
  3494 
 13605 
  3495 		{
 13606         {
  3496 			identifier_c param_name("IN");
 13607             identifier_c param_name("IN");
  3497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13608             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3499 			
 13610             
  3500 			/* Get the value from a foo(<param_value>) style call */
 13611             /* Get the value from a foo(<param_value>) style call */
  3501 			if (IN_param_value == NULL)
 13612             if (IN_param_value == NULL)
  3502 			  IN_param_value = function_call_param_iterator.next();
 13613               IN_param_value = function_call_param_iterator.next();
  3503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3505 			
 13616             
  3506 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13617             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3507 			{
 13618             {
  3508 		
 13619         
  3509 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 13620                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3510 				s4o.print("(");
 13621                 s4o.print("(");
  3511 				return_type_symbol->accept(*this);
 13622                 return_type_symbol->accept(*this);
  3512 				s4o.print(")real_to_time(");
 13623                 s4o.print(")time_to_real(");
  3513 				IN_param_value->accept(*this);
 13624                 IN_param_value->accept(*this);
  3514 				s4o.print(")");
 13625                 s4o.print(")");
  3515 				return NULL;
 13626                 return NULL;
  3516 				
 13627                 
  3517 			}
 13628             }
  3518 			
 13629             
  3519 			ERROR;
 13630             ERROR;
  3520 		}
 13631         }
  3521 		
 13632         
  3522 	}/*function_date_to_lword*/
 13633     }/*function_tod_to_lreal*/
  3523 	break;
 13634     break;
  3524 
 13635 
  3525 /****
 13636 /****
  3526  *DATE_TO_UINT
 13637  *TOD_TO_SINT
  3527  */
 13638  */
  3528 	case function_date_to_uint :
 13639     case function_tod_to_sint :
  3529 	{
 13640     {
  3530 		symbol_c *last_type_symbol = NULL;
 13641         symbol_c *last_type_symbol = NULL;
  3531 
 13642 
  3532 		{
 13643         {
  3533 			identifier_c param_name("IN");
 13644             identifier_c param_name("IN");
  3534 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13645             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3535 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13646             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3536 			
 13647             
  3537 			/* Get the value from a foo(<param_value>) style call */
 13648             /* Get the value from a foo(<param_value>) style call */
  3538 			if (IN_param_value == NULL)
 13649             if (IN_param_value == NULL)
  3539 			  IN_param_value = function_call_param_iterator.next();
 13650               IN_param_value = function_call_param_iterator.next();
  3540 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13651             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3541 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13652             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3542 			
 13653             
  3543 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13654             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3544 			{
 13655             {
  3545 		
 13656         
  3546 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 13657                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3547 				s4o.print("(");
 13658                 s4o.print("(");
  3548 				return_type_symbol->accept(*this);
 13659                 return_type_symbol->accept(*this);
  3549 				s4o.print(")real_to_time(");
 13660                 s4o.print(")time_to_real(");
  3550 				IN_param_value->accept(*this);
 13661                 IN_param_value->accept(*this);
  3551 				s4o.print(")");
 13662                 s4o.print(")");
  3552 				return NULL;
 13663                 return NULL;
  3553 				
 13664                 
  3554 			}
 13665             }
  3555 			
 13666             
  3556 			ERROR;
 13667             ERROR;
  3557 		}
 13668         }
  3558 		
 13669         
  3559 	}/*function_date_to_uint*/
 13670     }/*function_tod_to_sint*/
  3560 	break;
 13671     break;
  3561 
 13672 
  3562 /****
 13673 /****
  3563  *DATE_TO_LREAL
 13674  *TOD_TO_INT
  3564  */
 13675  */
  3565 	case function_date_to_lreal :
 13676     case function_tod_to_int :
  3566 	{
 13677     {
  3567 		symbol_c *last_type_symbol = NULL;
 13678         symbol_c *last_type_symbol = NULL;
  3568 
 13679 
  3569 		{
 13680         {
  3570 			identifier_c param_name("IN");
 13681             identifier_c param_name("IN");
  3571 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13682             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3572 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13683             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3573 			
 13684             
  3574 			/* Get the value from a foo(<param_value>) style call */
 13685             /* Get the value from a foo(<param_value>) style call */
  3575 			if (IN_param_value == NULL)
 13686             if (IN_param_value == NULL)
  3576 			  IN_param_value = function_call_param_iterator.next();
 13687               IN_param_value = function_call_param_iterator.next();
  3577 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13688             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3578 			last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3579 			
 13690             
  3580 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13691             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3581 			{
 13692             {
  3582 		
 13693         
  3583 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 13694                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3584 				s4o.print("(");
 13695                 s4o.print("(");
  3585 				return_type_symbol->accept(*this);
 13696                 return_type_symbol->accept(*this);
  3586 				s4o.print(")real_to_time(");
 13697                 s4o.print(")time_to_real(");
  3587 				IN_param_value->accept(*this);
 13698                 IN_param_value->accept(*this);
  3588 				s4o.print(")");
 13699                 s4o.print(")");
  3589 				return NULL;
 13700                 return NULL;
  3590 				
 13701                 
  3591 			}
 13702             }
  3592 			
 13703             
  3593 			ERROR;
 13704             ERROR;
  3594 		}
 13705         }
  3595 		
 13706         
  3596 	}/*function_date_to_lreal*/
 13707     }/*function_tod_to_int*/
  3597 	break;
 13708     break;
  3598 
 13709 
  3599 /****
 13710 /****
  3600  *DATE_TO_BYTE
 13711  *TOD_TO_DINT
  3601  */
 13712  */
  3602 	case function_date_to_byte :
 13713     case function_tod_to_dint :
  3603 	{
 13714     {
  3604 		symbol_c *last_type_symbol = NULL;
 13715         symbol_c *last_type_symbol = NULL;
  3605 
 13716 
  3606 		{
 13717         {
  3607 			identifier_c param_name("IN");
 13718             identifier_c param_name("IN");
  3608 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13719             /* 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);
 13720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3610 			
 13721             
  3611 			/* Get the value from a foo(<param_value>) style call */
 13722             /* Get the value from a foo(<param_value>) style call */
  3612 			if (IN_param_value == NULL)
 13723             if (IN_param_value == NULL)
  3613 			  IN_param_value = function_call_param_iterator.next();
 13724               IN_param_value = function_call_param_iterator.next();
  3614 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13725             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 ;
 13726             last_type_symbol = last_type_symbol && search_expression_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 			
 13727             
  3617 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13728             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3618 			{
 13729             {
  3619 		
 13730         
  3620 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 13731                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3621 				s4o.print("(");
 13732                 s4o.print("(");
  3622 				return_type_symbol->accept(*this);
 13733                 return_type_symbol->accept(*this);
  3623 				s4o.print(")real_to_time(");
 13734                 s4o.print(")time_to_real(");
  3624 				IN_param_value->accept(*this);
 13735                 IN_param_value->accept(*this);
  3625 				s4o.print(")");
 13736                 s4o.print(")");
  3626 				return NULL;
 13737                 return NULL;
  3627 				
 13738                 
  3628 			}
 13739             }
  3629 			
 13740             
  3630 			ERROR;
 13741             ERROR;
  3631 		}
 13742         }
  3632 		
 13743         
  3633 	}/*function_date_to_byte*/
 13744     }/*function_tod_to_dint*/
  3634 	break;
 13745     break;
  3635 
 13746 
  3636 /****
 13747 /****
  3637  *DATE_TO_USINT
 13748  *TOD_TO_LINT
  3638  */
 13749  */
  3639 	case function_date_to_usint :
 13750     case function_tod_to_lint :
  3640 	{
 13751     {
  3641 		symbol_c *last_type_symbol = NULL;
 13752         symbol_c *last_type_symbol = NULL;
  3642 
 13753 
  3643 		{
 13754         {
  3644 			identifier_c param_name("IN");
 13755             identifier_c param_name("IN");
  3645 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13756             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3646 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13757             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3647 			
 13758             
  3648 			/* Get the value from a foo(<param_value>) style call */
 13759             /* Get the value from a foo(<param_value>) style call */
  3649 			if (IN_param_value == NULL)
 13760             if (IN_param_value == NULL)
  3650 			  IN_param_value = function_call_param_iterator.next();
 13761               IN_param_value = function_call_param_iterator.next();
  3651 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13762             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3652 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13763             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3653 			
 13764             
  3654 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13765             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3655 			{
 13766             {
  3656 		
 13767         
  3657 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 13768                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3658 				s4o.print("(");
 13769                 s4o.print("(");
  3659 				return_type_symbol->accept(*this);
 13770                 return_type_symbol->accept(*this);
  3660 				s4o.print(")real_to_time(");
 13771                 s4o.print(")time_to_real(");
  3661 				IN_param_value->accept(*this);
 13772                 IN_param_value->accept(*this);
  3662 				s4o.print(")");
 13773                 s4o.print(")");
  3663 				return NULL;
 13774                 return NULL;
  3664 				
 13775                 
  3665 			}
 13776             }
  3666 			
 13777             
  3667 			ERROR;
 13778             ERROR;
  3668 		}
 13779         }
  3669 		
 13780         
  3670 	}/*function_date_to_usint*/
 13781     }/*function_tod_to_lint*/
  3671 	break;
 13782     break;
  3672 
 13783 
  3673 /****
 13784 /****
  3674  *DATE_TO_ULINT
 13785  *TOD_TO_USINT
  3675  */
 13786  */
  3676 	case function_date_to_ulint :
 13787     case function_tod_to_usint :
  3677 	{
 13788     {
  3678 		symbol_c *last_type_symbol = NULL;
 13789         symbol_c *last_type_symbol = NULL;
  3679 
 13790 
  3680 		{
 13791         {
  3681 			identifier_c param_name("IN");
 13792             identifier_c param_name("IN");
  3682 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13793             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3683 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13794             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3684 			
 13795             
  3685 			/* Get the value from a foo(<param_value>) style call */
 13796             /* Get the value from a foo(<param_value>) style call */
  3686 			if (IN_param_value == NULL)
 13797             if (IN_param_value == NULL)
  3687 			  IN_param_value = function_call_param_iterator.next();
 13798               IN_param_value = function_call_param_iterator.next();
  3688 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13799             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3689 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13800             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3690 			
 13801             
  3691 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13802             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3692 			{
 13803             {
  3693 		
 13804         
  3694 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 13805                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  3695 				s4o.print("(");
 13806                 s4o.print("(");
  3696 				return_type_symbol->accept(*this);
 13807                 return_type_symbol->accept(*this);
  3697 				s4o.print(")real_to_time(");
 13808                 s4o.print(")time_to_real(");
  3698 				IN_param_value->accept(*this);
 13809                 IN_param_value->accept(*this);
  3699 				s4o.print(")");
 13810                 s4o.print(")");
  3700 				return NULL;
 13811                 return NULL;
  3701 				
 13812                 
  3702 			}
 13813             }
  3703 			
 13814             
  3704 			ERROR;
 13815             ERROR;
  3705 		}
 13816         }
  3706 		
 13817         
  3707 	}/*function_date_to_ulint*/
 13818     }/*function_tod_to_usint*/
  3708 	break;
 13819     break;
  3709 
 13820 
  3710 /****
 13821 /****
  3711  *DATE_TO_BOOL
 13822  *TOD_TO_UINT
  3712  */
 13823  */
  3713 	case function_date_to_bool :
 13824     case function_tod_to_uint :
  3714 	{
 13825     {
  3715 		symbol_c *last_type_symbol = NULL;
 13826         symbol_c *last_type_symbol = NULL;
  3716 
 13827 
  3717 		{
 13828         {
  3718 			identifier_c param_name("IN");
 13829             identifier_c param_name("IN");
  3719 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13830             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3720 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13831             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3721 			
 13832             
  3722 			/* Get the value from a foo(<param_value>) style call */
 13833             /* Get the value from a foo(<param_value>) style call */
  3723 			if (IN_param_value == NULL)
 13834             if (IN_param_value == NULL)
  3724 			  IN_param_value = function_call_param_iterator.next();
 13835               IN_param_value = function_call_param_iterator.next();
  3725 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13836             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3726 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13837             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3727 			
 13838             
  3728 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13839             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3729 			{
 13840             {
  3730 		
 13841         
  3731 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13842                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3732 				s4o.print("(");
 13843                 s4o.print("(");
  3733 				return_type_symbol->accept(*this);
 13844                 return_type_symbol->accept(*this);
  3734 				s4o.print(")real_to_time(");
 13845                 s4o.print(")time_to_real(");
  3735 				IN_param_value->accept(*this);
 13846                 IN_param_value->accept(*this);
  3736 				s4o.print(")");
 13847                 s4o.print(")");
  3737 				return NULL;
 13848                 return NULL;
  3738 				
 13849                 
  3739 			}
 13850             }
  3740 			
 13851             
  3741 			ERROR;
 13852             ERROR;
  3742 		}
 13853         }
  3743 		
 13854         
  3744 	}/*function_date_to_bool*/
 13855     }/*function_tod_to_uint*/
  3745 	break;
 13856     break;
  3746 
 13857 
  3747 /****
 13858 /****
  3748  *DATE_TO_TIME
 13859  *TOD_TO_UDINT
  3749  */
 13860  */
  3750 	case function_date_to_time :
 13861     case function_tod_to_udint :
  3751 	{
 13862     {
  3752 		symbol_c *last_type_symbol = NULL;
 13863         symbol_c *last_type_symbol = NULL;
  3753 
 13864 
  3754 		{
 13865         {
  3755 			identifier_c param_name("IN");
 13866             identifier_c param_name("IN");
  3756 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13867             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3757 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13868             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3758 			
 13869             
  3759 			/* Get the value from a foo(<param_value>) style call */
 13870             /* Get the value from a foo(<param_value>) style call */
  3760 			if (IN_param_value == NULL)
 13871             if (IN_param_value == NULL)
  3761 			  IN_param_value = function_call_param_iterator.next();
 13872               IN_param_value = function_call_param_iterator.next();
  3762 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13873             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3763 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13874             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3764 			
 13875             
  3765 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13876             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3766 			{
 13877             {
  3767 		
 13878         
  3768 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 13879                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3769 				s4o.print("#error DATE_TO_TIME not implemented!");
 13880                 s4o.print("(");
  3770 				return NULL;
 13881                 return_type_symbol->accept(*this);
  3771 				
 13882                 s4o.print(")time_to_real(");
  3772 			}
 13883                 IN_param_value->accept(*this);
  3773 			
 13884                 s4o.print(")");
  3774 			ERROR;
 13885                 return NULL;
  3775 		}
 13886                 
  3776 		
 13887             }
  3777 	}/*function_date_to_time*/
 13888             
  3778 	break;
 13889             ERROR;
  3779 
 13890         }
  3780 /****
 13891         
  3781  *DATE_TO_INT
 13892     }/*function_tod_to_udint*/
  3782  */
 13893     break;
  3783 	case function_date_to_int :
 13894 
  3784 	{
 13895 /****
  3785 		symbol_c *last_type_symbol = NULL;
 13896  *TOD_TO_ULINT
  3786 
 13897  */
  3787 		{
 13898     case function_tod_to_ulint :
  3788 			identifier_c param_name("IN");
 13899     {
  3789 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13900         symbol_c *last_type_symbol = NULL;
  3790 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13901 
  3791 			
 13902         {
  3792 			/* Get the value from a foo(<param_value>) style call */
 13903             identifier_c param_name("IN");
  3793 			if (IN_param_value == NULL)
 13904             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3794 			  IN_param_value = function_call_param_iterator.next();
 13905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3795 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13906             
  3796 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13907             /* Get the value from a foo(<param_value>) style call */
  3797 			
 13908             if (IN_param_value == NULL)
  3798 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13909               IN_param_value = function_call_param_iterator.next();
  3799 			{
 13910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3800 		
 13911             last_type_symbol = last_type_symbol && search_expression_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 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 13912             
  3802 				s4o.print("(");
 13913             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3803 				return_type_symbol->accept(*this);
 13914             {
  3804 				s4o.print(")real_to_time(");
 13915         
  3805 				IN_param_value->accept(*this);
 13916                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3806 				s4o.print(")");
 13917                 s4o.print("(");
  3807 				return NULL;
 13918                 return_type_symbol->accept(*this);
  3808 				
 13919                 s4o.print(")time_to_real(");
  3809 			}
 13920                 IN_param_value->accept(*this);
  3810 			
 13921                 s4o.print(")");
  3811 			ERROR;
 13922                 return NULL;
  3812 		}
 13923                 
  3813 		
 13924             }
  3814 	}/*function_date_to_int*/
 13925             
  3815 	break;
 13926             ERROR;
  3816 
 13927         }
  3817 /****
 13928         
  3818  *DWORD_TO_REAL
 13929     }/*function_tod_to_ulint*/
  3819  */
 13930     break;
  3820 	case function_dword_to_real :
 13931 
  3821 	{
 13932 /****
  3822 		symbol_c *last_type_symbol = NULL;
 13933  *TOD_TO_BOOL
  3823 
 13934  */
  3824 		{
 13935     case function_tod_to_bool :
  3825 			identifier_c param_name("IN");
 13936     {
  3826 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13937         symbol_c *last_type_symbol = NULL;
  3827 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13938 
  3828 			
 13939         {
  3829 			/* Get the value from a foo(<param_value>) style call */
 13940             identifier_c param_name("IN");
  3830 			if (IN_param_value == NULL)
 13941             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3831 			  IN_param_value = function_call_param_iterator.next();
 13942             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3832 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13943             
  3833 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13944             /* Get the value from a foo(<param_value>) style call */
  3834 			
 13945             if (IN_param_value == NULL)
  3835 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 13946               IN_param_value = function_call_param_iterator.next();
  3836 			{
 13947             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3837 		
 13948             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3838 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 13949             
  3839 				s4o.print("(");
 13950             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3840 				return_type_symbol->accept(*this);
 13951             {
  3841 				s4o.print(")");
 13952         
  3842 				IN_param_value->accept(*this);
 13953                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3843 				return NULL;
 13954                 s4o.print("(");
  3844 				
 13955                 return_type_symbol->accept(*this);
  3845 			}
 13956                 s4o.print(")time_to_real(");
  3846 			
 13957                 IN_param_value->accept(*this);
  3847 			ERROR;
 13958                 s4o.print(")");
  3848 		}
 13959                 return NULL;
  3849 		
 13960                 
  3850 	}/*function_dword_to_real*/
 13961             }
  3851 	break;
 13962             
  3852 
 13963             ERROR;
  3853 /****
 13964         }
  3854  *DWORD_TO_SINT
 13965         
  3855  */
 13966     }/*function_tod_to_bool*/
  3856 	case function_dword_to_sint :
 13967     break;
  3857 	{
 13968 
  3858 		symbol_c *last_type_symbol = NULL;
 13969 /****
  3859 
 13970  *TOD_TO_BYTE
  3860 		{
 13971  */
  3861 			identifier_c param_name("IN");
 13972     case function_tod_to_byte :
  3862 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 13973     {
  3863 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13974         symbol_c *last_type_symbol = NULL;
  3864 			
 13975 
  3865 			/* Get the value from a foo(<param_value>) style call */
 13976         {
  3866 			if (IN_param_value == NULL)
 13977             identifier_c param_name("IN");
  3867 			  IN_param_value = function_call_param_iterator.next();
 13978             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3868 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13979             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3869 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13980             
  3870 			
 13981             /* Get the value from a foo(<param_value>) style call */
  3871 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 13982             if (IN_param_value == NULL)
  3872 			{
 13983               IN_param_value = function_call_param_iterator.next();
  3873 		
 13984             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3874 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 13985             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3875 				s4o.print("(");
 13986             
  3876 				return_type_symbol->accept(*this);
 13987             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3877 				s4o.print(")");
 13988             {
  3878 				IN_param_value->accept(*this);
 13989         
  3879 				return NULL;
 13990                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3880 				
 13991                 s4o.print("(");
  3881 			}
 13992                 return_type_symbol->accept(*this);
  3882 			
 13993                 s4o.print(")time_to_real(");
  3883 			ERROR;
 13994                 IN_param_value->accept(*this);
  3884 		}
 13995                 s4o.print(")");
  3885 		
 13996                 return NULL;
  3886 	}/*function_dword_to_sint*/
 13997                 
  3887 	break;
 13998             }
  3888 
 13999             
  3889 /****
 14000             ERROR;
  3890  *DWORD_TO_LINT
 14001         }
  3891  */
 14002         
  3892 	case function_dword_to_lint :
 14003     }/*function_tod_to_byte*/
  3893 	{
 14004     break;
  3894 		symbol_c *last_type_symbol = NULL;
 14005 
  3895 
 14006 /****
  3896 		{
 14007  *TOD_TO_WORD
  3897 			identifier_c param_name("IN");
 14008  */
  3898 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14009     case function_tod_to_word :
  3899 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14010     {
  3900 			
 14011         symbol_c *last_type_symbol = NULL;
  3901 			/* Get the value from a foo(<param_value>) style call */
 14012 
  3902 			if (IN_param_value == NULL)
 14013         {
  3903 			  IN_param_value = function_call_param_iterator.next();
 14014             identifier_c param_name("IN");
  3904 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14015             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3905 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14016             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3906 			
 14017             
  3907 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 14018             /* Get the value from a foo(<param_value>) style call */
  3908 			{
 14019             if (IN_param_value == NULL)
  3909 		
 14020               IN_param_value = function_call_param_iterator.next();
  3910 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14021             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3911 				s4o.print("(");
 14022             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3912 				return_type_symbol->accept(*this);
 14023             
  3913 				s4o.print(")");
 14024             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3914 				IN_param_value->accept(*this);
 14025             {
  3915 				return NULL;
 14026         
  3916 				
 14027                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3917 			}
 14028                 s4o.print("(");
  3918 			
 14029                 return_type_symbol->accept(*this);
  3919 			ERROR;
 14030                 s4o.print(")time_to_real(");
  3920 		}
 14031                 IN_param_value->accept(*this);
  3921 		
 14032                 s4o.print(")");
  3922 	}/*function_dword_to_lint*/
 14033                 return NULL;
  3923 	break;
 14034                 
  3924 
 14035             }
  3925 /****
 14036             
  3926  *DWORD_TO_DINT
 14037             ERROR;
  3927  */
 14038         }
  3928 	case function_dword_to_dint :
 14039         
  3929 	{
 14040     }/*function_tod_to_word*/
  3930 		symbol_c *last_type_symbol = NULL;
 14041     break;
  3931 
 14042 
  3932 		{
 14043 /****
  3933 			identifier_c param_name("IN");
 14044  *TOD_TO_DWORD
  3934 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14045  */
  3935 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14046     case function_tod_to_dword :
  3936 			
 14047     {
  3937 			/* Get the value from a foo(<param_value>) style call */
 14048         symbol_c *last_type_symbol = NULL;
  3938 			if (IN_param_value == NULL)
 14049 
  3939 			  IN_param_value = function_call_param_iterator.next();
 14050         {
  3940 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14051             identifier_c param_name("IN");
  3941 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14052             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3942 			
 14053             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3943 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 14054             
  3944 			{
 14055             /* Get the value from a foo(<param_value>) style call */
  3945 		
 14056             if (IN_param_value == NULL)
  3946 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 14057               IN_param_value = function_call_param_iterator.next();
  3947 				s4o.print("(");
 14058             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3948 				return_type_symbol->accept(*this);
 14059             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3949 				s4o.print(")");
 14060             
  3950 				IN_param_value->accept(*this);
 14061             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3951 				return NULL;
 14062             {
  3952 				
 14063         
  3953 			}
 14064                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3954 			
 14065                 s4o.print("(");
  3955 			ERROR;
 14066                 return_type_symbol->accept(*this);
  3956 		}
 14067                 s4o.print(")time_to_real(");
  3957 		
 14068                 IN_param_value->accept(*this);
  3958 	}/*function_dword_to_dint*/
 14069                 s4o.print(")");
  3959 	break;
 14070                 return NULL;
  3960 
 14071                 
  3961 /****
 14072             }
  3962  *DWORD_TO_DATE
 14073             
  3963  */
 14074             ERROR;
  3964 	case function_dword_to_date :
 14075         }
  3965 	{
 14076         
  3966 		symbol_c *last_type_symbol = NULL;
 14077     }/*function_tod_to_dword*/
  3967 
 14078     break;
  3968 		{
 14079 
  3969 			identifier_c param_name("IN");
 14080 /****
  3970 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14081  *TOD_TO_LWORD
  3971 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14082  */
  3972 			
 14083     case function_tod_to_lword :
  3973 			/* Get the value from a foo(<param_value>) style call */
 14084     {
  3974 			if (IN_param_value == NULL)
 14085         symbol_c *last_type_symbol = NULL;
  3975 			  IN_param_value = function_call_param_iterator.next();
 14086 
  3976 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14087         {
  3977 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14088             identifier_c param_name("IN");
  3978 			
 14089             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3979 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 14090             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3980 			{
 14091             
  3981 		
 14092             /* Get the value from a foo(<param_value>) style call */
  3982 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14093             if (IN_param_value == NULL)
  3983 				s4o.print("(");
 14094               IN_param_value = function_call_param_iterator.next();
  3984 				return_type_symbol->accept(*this);
 14095             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3985 				s4o.print(")time_to_real(");
 14096             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3986 				IN_param_value->accept(*this);
 14097             
  3987 				s4o.print(")");
 14098             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  3988 				return NULL;
 14099             {
  3989 				
 14100         
  3990 			}
 14101                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3991 			
 14102                 s4o.print("(");
  3992 			ERROR;
 14103                 return_type_symbol->accept(*this);
  3993 		}
 14104                 s4o.print(")time_to_real(");
  3994 		
 14105                 IN_param_value->accept(*this);
  3995 	}/*function_dword_to_date*/
 14106                 s4o.print(")");
  3996 	break;
 14107                 return NULL;
  3997 
 14108                 
  3998 /****
 14109             }
  3999  *DWORD_TO_DWORD
 14110             
  4000  */
 14111             ERROR;
  4001 	case function_dword_to_dword :
 14112         }
  4002 	{
 14113         
  4003 		symbol_c *last_type_symbol = NULL;
 14114     }/*function_tod_to_lword*/
  4004 
 14115     break;
  4005 		{
 14116 
  4006 			identifier_c param_name("IN");
 14117 /****
  4007 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14118  *TOD_TO_STRING
  4008 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14119  */
  4009 			
 14120     case function_tod_to_string :
  4010 			/* Get the value from a foo(<param_value>) style call */
 14121     {
  4011 			if (IN_param_value == NULL)
 14122         symbol_c *last_type_symbol = NULL;
  4012 			  IN_param_value = function_call_param_iterator.next();
 14123 
  4013 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14124         {
  4014 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14125             identifier_c param_name("IN");
  4015 			
 14126             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4016 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 14127             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4017 			{
 14128             
  4018 		
 14129             /* Get the value from a foo(<param_value>) style call */
  4019 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 14130             if (IN_param_value == NULL)
  4020 				s4o.print("(");
 14131               IN_param_value = function_call_param_iterator.next();
  4021 				return_type_symbol->accept(*this);
 14132             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4022 				s4o.print(")");
 14133             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4023 				IN_param_value->accept(*this);
 14134             
  4024 				return NULL;
 14135             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  4025 				
 14136             {
  4026 			}
 14137         
  4027 			
 14138                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4028 			ERROR;
 14139                 s4o.print("(");
  4029 		}
 14140                 return_type_symbol->accept(*this);
  4030 		
 14141                 s4o.print(")time_to_string(");
  4031 	}/*function_dword_to_dword*/
 14142                 IN_param_value->accept(*this);
  4032 	break;
 14143                 s4o.print(")");
  4033 
 14144                 return NULL;
  4034 /****
 14145                 
  4035  *DWORD_TO_DT
 14146             }
  4036  */
 14147             
  4037 	case function_dword_to_dt :
 14148             ERROR;
  4038 	{
 14149         }
  4039 		symbol_c *last_type_symbol = NULL;
 14150         
  4040 
 14151     }/*function_tod_to_string*/
  4041 		{
 14152     break;
  4042 			identifier_c param_name("IN");
 14153 
  4043 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14154 /****
  4044 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14155  *TOD_TO_WSTRING
  4045 			
 14156  */
  4046 			/* Get the value from a foo(<param_value>) style call */
 14157     case function_tod_to_wstring :
  4047 			if (IN_param_value == NULL)
 14158     {
  4048 			  IN_param_value = function_call_param_iterator.next();
 14159         symbol_c *last_type_symbol = NULL;
  4049 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14160 
  4050 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14161         {
  4051 			
 14162             identifier_c param_name("IN");
  4052 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 14163             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4053 			{
 14164             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4054 		
 14165             
  4055 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14166             /* Get the value from a foo(<param_value>) style call */
  4056 				s4o.print("(");
 14167             if (IN_param_value == NULL)
  4057 				return_type_symbol->accept(*this);
 14168               IN_param_value = function_call_param_iterator.next();
  4058 				s4o.print(")time_to_real(");
 14169             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4059 				IN_param_value->accept(*this);
 14170             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4060 				s4o.print(")");
 14171             
  4061 				return NULL;
 14172             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  4062 				
 14173             {
  4063 			}
 14174         
  4064 			
 14175                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  4065 			ERROR;
 14176                 s4o.print("(");
  4066 		}
 14177                 return_type_symbol->accept(*this);
  4067 		
 14178                 s4o.print(")time_to_string(");
  4068 	}/*function_dword_to_dt*/
 14179                 IN_param_value->accept(*this);
  4069 	break;
 14180                 s4o.print(")");
  4070 
 14181                 return NULL;
  4071 /****
 14182                 
  4072  *DWORD_TO_TOD
 14183             }
  4073  */
 14184             
  4074 	case function_dword_to_tod :
 14185             ERROR;
  4075 	{
 14186         }
  4076 		symbol_c *last_type_symbol = NULL;
 14187         
  4077 
 14188     }/*function_tod_to_wstring*/
  4078 		{
 14189     break;
  4079 			identifier_c param_name("IN");
       
  4080 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4081 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4082 			
       
  4083 			/* Get the value from a foo(<param_value>) style call */
       
  4084 			if (IN_param_value == NULL)
       
  4085 			  IN_param_value = function_call_param_iterator.next();
       
  4086 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4087 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4088 			
       
  4089 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4090 			{
       
  4091 		
       
  4092 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4093 				s4o.print("(");
       
  4094 				return_type_symbol->accept(*this);
       
  4095 				s4o.print(")time_to_real(");
       
  4096 				IN_param_value->accept(*this);
       
  4097 				s4o.print(")");
       
  4098 				return NULL;
       
  4099 				
       
  4100 			}
       
  4101 			
       
  4102 			ERROR;
       
  4103 		}
       
  4104 		
       
  4105 	}/*function_dword_to_tod*/
       
  4106 	break;
       
  4107 
       
  4108 /****
       
  4109  *DWORD_TO_UDINT
       
  4110  */
       
  4111 	case function_dword_to_udint :
       
  4112 	{
       
  4113 		symbol_c *last_type_symbol = NULL;
       
  4114 
       
  4115 		{
       
  4116 			identifier_c param_name("IN");
       
  4117 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4118 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4119 			
       
  4120 			/* Get the value from a foo(<param_value>) style call */
       
  4121 			if (IN_param_value == NULL)
       
  4122 			  IN_param_value = function_call_param_iterator.next();
       
  4123 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4124 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4125 			
       
  4126 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4127 			{
       
  4128 		
       
  4129 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4130 				s4o.print("(");
       
  4131 				return_type_symbol->accept(*this);
       
  4132 				s4o.print(")");
       
  4133 				IN_param_value->accept(*this);
       
  4134 				return NULL;
       
  4135 				
       
  4136 			}
       
  4137 			
       
  4138 			ERROR;
       
  4139 		}
       
  4140 		
       
  4141 	}/*function_dword_to_udint*/
       
  4142 	break;
       
  4143 
       
  4144 /****
       
  4145  *DWORD_TO_WORD
       
  4146  */
       
  4147 	case function_dword_to_word :
       
  4148 	{
       
  4149 		symbol_c *last_type_symbol = NULL;
       
  4150 
       
  4151 		{
       
  4152 			identifier_c param_name("IN");
       
  4153 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4154 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4155 			
       
  4156 			/* Get the value from a foo(<param_value>) style call */
       
  4157 			if (IN_param_value == NULL)
       
  4158 			  IN_param_value = function_call_param_iterator.next();
       
  4159 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4160 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4161 			
       
  4162 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4163 			{
       
  4164 		
       
  4165 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4166 				s4o.print("(");
       
  4167 				return_type_symbol->accept(*this);
       
  4168 				s4o.print(")");
       
  4169 				IN_param_value->accept(*this);
       
  4170 				return NULL;
       
  4171 				
       
  4172 			}
       
  4173 			
       
  4174 			ERROR;
       
  4175 		}
       
  4176 		
       
  4177 	}/*function_dword_to_word*/
       
  4178 	break;
       
  4179 
       
  4180 /****
       
  4181  *DWORD_TO_WSTRING
       
  4182  */
       
  4183 	case function_dword_to_wstring :
       
  4184 	{
       
  4185 		symbol_c *last_type_symbol = NULL;
       
  4186 
       
  4187 		{
       
  4188 			identifier_c param_name("IN");
       
  4189 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4190 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4191 			
       
  4192 			/* Get the value from a foo(<param_value>) style call */
       
  4193 			if (IN_param_value == NULL)
       
  4194 			  IN_param_value = function_call_param_iterator.next();
       
  4195 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4196 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4197 			
       
  4198 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4199 			{
       
  4200 		
       
  4201 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  4202 				s4o.print("(");
       
  4203 				return_type_symbol->accept(*this);
       
  4204 				s4o.print(")string_to_int(");
       
  4205 				IN_param_value->accept(*this);
       
  4206 				s4o.print(", 16)");
       
  4207 				return NULL;
       
  4208 				
       
  4209 			}
       
  4210 			
       
  4211 			ERROR;
       
  4212 		}
       
  4213 		
       
  4214 	}/*function_dword_to_wstring*/
       
  4215 	break;
       
  4216 
       
  4217 /****
       
  4218  *DWORD_TO_STRING
       
  4219  */
       
  4220 	case function_dword_to_string :
       
  4221 	{
       
  4222 		symbol_c *last_type_symbol = NULL;
       
  4223 
       
  4224 		{
       
  4225 			identifier_c param_name("IN");
       
  4226 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4227 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4228 			
       
  4229 			/* Get the value from a foo(<param_value>) style call */
       
  4230 			if (IN_param_value == NULL)
       
  4231 			  IN_param_value = function_call_param_iterator.next();
       
  4232 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4233 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4234 			
       
  4235 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4236 			{
       
  4237 		
       
  4238 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4239 				s4o.print("(");
       
  4240 				return_type_symbol->accept(*this);
       
  4241 				s4o.print(")string_to_int(");
       
  4242 				IN_param_value->accept(*this);
       
  4243 				s4o.print(", 16)");
       
  4244 				return NULL;
       
  4245 				
       
  4246 			}
       
  4247 			
       
  4248 			ERROR;
       
  4249 		}
       
  4250 		
       
  4251 	}/*function_dword_to_string*/
       
  4252 	break;
       
  4253 
       
  4254 /****
       
  4255  *DWORD_TO_LWORD
       
  4256  */
       
  4257 	case function_dword_to_lword :
       
  4258 	{
       
  4259 		symbol_c *last_type_symbol = NULL;
       
  4260 
       
  4261 		{
       
  4262 			identifier_c param_name("IN");
       
  4263 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4264 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4265 			
       
  4266 			/* Get the value from a foo(<param_value>) style call */
       
  4267 			if (IN_param_value == NULL)
       
  4268 			  IN_param_value = function_call_param_iterator.next();
       
  4269 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4270 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4271 			
       
  4272 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4273 			{
       
  4274 		
       
  4275 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4276 				s4o.print("(");
       
  4277 				return_type_symbol->accept(*this);
       
  4278 				s4o.print(")");
       
  4279 				IN_param_value->accept(*this);
       
  4280 				return NULL;
       
  4281 				
       
  4282 			}
       
  4283 			
       
  4284 			ERROR;
       
  4285 		}
       
  4286 		
       
  4287 	}/*function_dword_to_lword*/
       
  4288 	break;
       
  4289 
       
  4290 /****
       
  4291  *DWORD_TO_UINT
       
  4292  */
       
  4293 	case function_dword_to_uint :
       
  4294 	{
       
  4295 		symbol_c *last_type_symbol = NULL;
       
  4296 
       
  4297 		{
       
  4298 			identifier_c param_name("IN");
       
  4299 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4300 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4301 			
       
  4302 			/* Get the value from a foo(<param_value>) style call */
       
  4303 			if (IN_param_value == NULL)
       
  4304 			  IN_param_value = function_call_param_iterator.next();
       
  4305 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4306 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4307 			
       
  4308 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4309 			{
       
  4310 		
       
  4311 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4312 				s4o.print("(");
       
  4313 				return_type_symbol->accept(*this);
       
  4314 				s4o.print(")");
       
  4315 				IN_param_value->accept(*this);
       
  4316 				return NULL;
       
  4317 				
       
  4318 			}
       
  4319 			
       
  4320 			ERROR;
       
  4321 		}
       
  4322 		
       
  4323 	}/*function_dword_to_uint*/
       
  4324 	break;
       
  4325 
       
  4326 /****
       
  4327  *DWORD_TO_LREAL
       
  4328  */
       
  4329 	case function_dword_to_lreal :
       
  4330 	{
       
  4331 		symbol_c *last_type_symbol = NULL;
       
  4332 
       
  4333 		{
       
  4334 			identifier_c param_name("IN");
       
  4335 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4336 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4337 			
       
  4338 			/* Get the value from a foo(<param_value>) style call */
       
  4339 			if (IN_param_value == NULL)
       
  4340 			  IN_param_value = function_call_param_iterator.next();
       
  4341 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4342 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4343 			
       
  4344 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4345 			{
       
  4346 		
       
  4347 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4348 				s4o.print("(");
       
  4349 				return_type_symbol->accept(*this);
       
  4350 				s4o.print(")");
       
  4351 				IN_param_value->accept(*this);
       
  4352 				return NULL;
       
  4353 				
       
  4354 			}
       
  4355 			
       
  4356 			ERROR;
       
  4357 		}
       
  4358 		
       
  4359 	}/*function_dword_to_lreal*/
       
  4360 	break;
       
  4361 
       
  4362 /****
       
  4363  *DWORD_TO_BYTE
       
  4364  */
       
  4365 	case function_dword_to_byte :
       
  4366 	{
       
  4367 		symbol_c *last_type_symbol = NULL;
       
  4368 
       
  4369 		{
       
  4370 			identifier_c param_name("IN");
       
  4371 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4372 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4373 			
       
  4374 			/* Get the value from a foo(<param_value>) style call */
       
  4375 			if (IN_param_value == NULL)
       
  4376 			  IN_param_value = function_call_param_iterator.next();
       
  4377 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4378 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4379 			
       
  4380 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4381 			{
       
  4382 		
       
  4383 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4384 				s4o.print("(");
       
  4385 				return_type_symbol->accept(*this);
       
  4386 				s4o.print(")");
       
  4387 				IN_param_value->accept(*this);
       
  4388 				return NULL;
       
  4389 				
       
  4390 			}
       
  4391 			
       
  4392 			ERROR;
       
  4393 		}
       
  4394 		
       
  4395 	}/*function_dword_to_byte*/
       
  4396 	break;
       
  4397 
       
  4398 /****
       
  4399  *DWORD_TO_USINT
       
  4400  */
       
  4401 	case function_dword_to_usint :
       
  4402 	{
       
  4403 		symbol_c *last_type_symbol = NULL;
       
  4404 
       
  4405 		{
       
  4406 			identifier_c param_name("IN");
       
  4407 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4408 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4409 			
       
  4410 			/* Get the value from a foo(<param_value>) style call */
       
  4411 			if (IN_param_value == NULL)
       
  4412 			  IN_param_value = function_call_param_iterator.next();
       
  4413 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4414 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4415 			
       
  4416 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4417 			{
       
  4418 		
       
  4419 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4420 				s4o.print("(");
       
  4421 				return_type_symbol->accept(*this);
       
  4422 				s4o.print(")");
       
  4423 				IN_param_value->accept(*this);
       
  4424 				return NULL;
       
  4425 				
       
  4426 			}
       
  4427 			
       
  4428 			ERROR;
       
  4429 		}
       
  4430 		
       
  4431 	}/*function_dword_to_usint*/
       
  4432 	break;
       
  4433 
       
  4434 /****
       
  4435  *DWORD_TO_ULINT
       
  4436  */
       
  4437 	case function_dword_to_ulint :
       
  4438 	{
       
  4439 		symbol_c *last_type_symbol = NULL;
       
  4440 
       
  4441 		{
       
  4442 			identifier_c param_name("IN");
       
  4443 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4444 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4445 			
       
  4446 			/* Get the value from a foo(<param_value>) style call */
       
  4447 			if (IN_param_value == NULL)
       
  4448 			  IN_param_value = function_call_param_iterator.next();
       
  4449 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4450 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4451 			
       
  4452 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4453 			{
       
  4454 		
       
  4455 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4456 				s4o.print("(");
       
  4457 				return_type_symbol->accept(*this);
       
  4458 				s4o.print(")");
       
  4459 				IN_param_value->accept(*this);
       
  4460 				return NULL;
       
  4461 				
       
  4462 			}
       
  4463 			
       
  4464 			ERROR;
       
  4465 		}
       
  4466 		
       
  4467 	}/*function_dword_to_ulint*/
       
  4468 	break;
       
  4469 
       
  4470 /****
       
  4471  *DWORD_TO_BOOL
       
  4472  */
       
  4473 	case function_dword_to_bool :
       
  4474 	{
       
  4475 		symbol_c *last_type_symbol = NULL;
       
  4476 
       
  4477 		{
       
  4478 			identifier_c param_name("IN");
       
  4479 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4480 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4481 			
       
  4482 			/* Get the value from a foo(<param_value>) style call */
       
  4483 			if (IN_param_value == NULL)
       
  4484 			  IN_param_value = function_call_param_iterator.next();
       
  4485 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4486 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4487 			
       
  4488 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4489 			{
       
  4490 		
       
  4491 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4492 				s4o.print("(");
       
  4493 				return_type_symbol->accept(*this);
       
  4494 				s4o.print(")");
       
  4495 				IN_param_value->accept(*this);
       
  4496 				return NULL;
       
  4497 				
       
  4498 			}
       
  4499 			
       
  4500 			ERROR;
       
  4501 		}
       
  4502 		
       
  4503 	}/*function_dword_to_bool*/
       
  4504 	break;
       
  4505 
       
  4506 /****
       
  4507  *DWORD_TO_TIME
       
  4508  */
       
  4509 	case function_dword_to_time :
       
  4510 	{
       
  4511 		symbol_c *last_type_symbol = NULL;
       
  4512 
       
  4513 		{
       
  4514 			identifier_c param_name("IN");
       
  4515 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4516 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4517 			
       
  4518 			/* Get the value from a foo(<param_value>) style call */
       
  4519 			if (IN_param_value == NULL)
       
  4520 			  IN_param_value = function_call_param_iterator.next();
       
  4521 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4522 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4523 			
       
  4524 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4525 			{
       
  4526 		
       
  4527 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4528 				s4o.print("(");
       
  4529 				return_type_symbol->accept(*this);
       
  4530 				s4o.print(")time_to_real(");
       
  4531 				IN_param_value->accept(*this);
       
  4532 				s4o.print(")");
       
  4533 				return NULL;
       
  4534 				
       
  4535 			}
       
  4536 			
       
  4537 			ERROR;
       
  4538 		}
       
  4539 		
       
  4540 	}/*function_dword_to_time*/
       
  4541 	break;
       
  4542 
       
  4543 /****
       
  4544  *DWORD_TO_INT
       
  4545  */
       
  4546 	case function_dword_to_int :
       
  4547 	{
       
  4548 		symbol_c *last_type_symbol = NULL;
       
  4549 
       
  4550 		{
       
  4551 			identifier_c param_name("IN");
       
  4552 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4553 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4554 			
       
  4555 			/* Get the value from a foo(<param_value>) style call */
       
  4556 			if (IN_param_value == NULL)
       
  4557 			  IN_param_value = function_call_param_iterator.next();
       
  4558 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4559 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4560 			
       
  4561 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4562 			{
       
  4563 		
       
  4564 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4565 				s4o.print("(");
       
  4566 				return_type_symbol->accept(*this);
       
  4567 				s4o.print(")");
       
  4568 				IN_param_value->accept(*this);
       
  4569 				return NULL;
       
  4570 				
       
  4571 			}
       
  4572 			
       
  4573 			ERROR;
       
  4574 		}
       
  4575 		
       
  4576 	}/*function_dword_to_int*/
       
  4577 	break;
       
  4578 
 14190 
  4579 /****
 14191 /****
  4580  *DT_TO_REAL
 14192  *DT_TO_REAL
  4581  */
 14193  */
  4582 	case function_dt_to_real :
 14194     case function_dt_to_real :
  4583 	{
 14195     {
  4584 		symbol_c *last_type_symbol = NULL;
 14196         symbol_c *last_type_symbol = NULL;
  4585 
 14197 
  4586 		{
 14198         {
  4587 			identifier_c param_name("IN");
 14199             identifier_c param_name("IN");
  4588 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14200             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4589 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4590 			
 14202             
  4591 			/* Get the value from a foo(<param_value>) style call */
 14203             /* Get the value from a foo(<param_value>) style call */
  4592 			if (IN_param_value == NULL)
 14204             if (IN_param_value == NULL)
  4593 			  IN_param_value = function_call_param_iterator.next();
 14205               IN_param_value = function_call_param_iterator.next();
  4594 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4595 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4596 			
 14208             
  4597 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14209             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4598 			{
 14210             {
  4599 		
 14211         
  4600 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 14212                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4601 				s4o.print("(");
 14213                 s4o.print("(");
  4602 				return_type_symbol->accept(*this);
 14214                 return_type_symbol->accept(*this);
  4603 				s4o.print(")real_to_time(");
 14215                 s4o.print(")time_to_real(");
  4604 				IN_param_value->accept(*this);
 14216                 IN_param_value->accept(*this);
  4605 				s4o.print(")");
 14217                 s4o.print(")");
  4606 				return NULL;
 14218                 return NULL;
  4607 				
 14219                 
  4608 			}
 14220             }
  4609 			
 14221             
  4610 			ERROR;
 14222             ERROR;
  4611 		}
 14223         }
  4612 		
 14224         
  4613 	}/*function_dt_to_real*/
 14225     }/*function_dt_to_real*/
  4614 	break;
 14226     break;
       
 14227 
       
 14228 /****
       
 14229  *DT_TO_LREAL
       
 14230  */
       
 14231     case function_dt_to_lreal :
       
 14232     {
       
 14233         symbol_c *last_type_symbol = NULL;
       
 14234 
       
 14235         {
       
 14236             identifier_c param_name("IN");
       
 14237             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14238             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14239             
       
 14240             /* Get the value from a foo(<param_value>) style call */
       
 14241             if (IN_param_value == NULL)
       
 14242               IN_param_value = function_call_param_iterator.next();
       
 14243             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14244             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14245             
       
 14246             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14247             {
       
 14248         
       
 14249                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14250                 s4o.print("(");
       
 14251                 return_type_symbol->accept(*this);
       
 14252                 s4o.print(")time_to_real(");
       
 14253                 IN_param_value->accept(*this);
       
 14254                 s4o.print(")");
       
 14255                 return NULL;
       
 14256                 
       
 14257             }
       
 14258             
       
 14259             ERROR;
       
 14260         }
       
 14261         
       
 14262     }/*function_dt_to_lreal*/
       
 14263     break;
  4615 
 14264 
  4616 /****
 14265 /****
  4617  *DT_TO_SINT
 14266  *DT_TO_SINT
  4618  */
 14267  */
  4619 	case function_dt_to_sint :
 14268     case function_dt_to_sint :
  4620 	{
 14269     {
  4621 		symbol_c *last_type_symbol = NULL;
 14270         symbol_c *last_type_symbol = NULL;
  4622 
 14271 
  4623 		{
 14272         {
  4624 			identifier_c param_name("IN");
 14273             identifier_c param_name("IN");
  4625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14274             /* 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);
 14275             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4627 			
 14276             
  4628 			/* Get the value from a foo(<param_value>) style call */
 14277             /* Get the value from a foo(<param_value>) style call */
  4629 			if (IN_param_value == NULL)
 14278             if (IN_param_value == NULL)
  4630 			  IN_param_value = function_call_param_iterator.next();
 14279               IN_param_value = function_call_param_iterator.next();
  4631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14280             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 ;
 14281             last_type_symbol = last_type_symbol && search_expression_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 			
 14282             
  4634 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14283             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4635 			{
 14284             {
  4636 		
 14285         
  4637 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14286                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4638 				s4o.print("(");
 14287                 s4o.print("(");
  4639 				return_type_symbol->accept(*this);
 14288                 return_type_symbol->accept(*this);
  4640 				s4o.print(")real_to_time(");
 14289                 s4o.print(")time_to_real(");
  4641 				IN_param_value->accept(*this);
 14290                 IN_param_value->accept(*this);
  4642 				s4o.print(")");
 14291                 s4o.print(")");
  4643 				return NULL;
 14292                 return NULL;
  4644 				
 14293                 
  4645 			}
 14294             }
  4646 			
 14295             
  4647 			ERROR;
 14296             ERROR;
  4648 		}
 14297         }
  4649 		
 14298         
  4650 	}/*function_dt_to_sint*/
 14299     }/*function_dt_to_sint*/
  4651 	break;
 14300     break;
       
 14301 
       
 14302 /****
       
 14303  *DT_TO_INT
       
 14304  */
       
 14305     case function_dt_to_int :
       
 14306     {
       
 14307         symbol_c *last_type_symbol = NULL;
       
 14308 
       
 14309         {
       
 14310             identifier_c param_name("IN");
       
 14311             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14312             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14313             
       
 14314             /* Get the value from a foo(<param_value>) style call */
       
 14315             if (IN_param_value == NULL)
       
 14316               IN_param_value = function_call_param_iterator.next();
       
 14317             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14318             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14319             
       
 14320             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14321             {
       
 14322         
       
 14323                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14324                 s4o.print("(");
       
 14325                 return_type_symbol->accept(*this);
       
 14326                 s4o.print(")time_to_real(");
       
 14327                 IN_param_value->accept(*this);
       
 14328                 s4o.print(")");
       
 14329                 return NULL;
       
 14330                 
       
 14331             }
       
 14332             
       
 14333             ERROR;
       
 14334         }
       
 14335         
       
 14336     }/*function_dt_to_int*/
       
 14337     break;
       
 14338 
       
 14339 /****
       
 14340  *DT_TO_DINT
       
 14341  */
       
 14342     case function_dt_to_dint :
       
 14343     {
       
 14344         symbol_c *last_type_symbol = NULL;
       
 14345 
       
 14346         {
       
 14347             identifier_c param_name("IN");
       
 14348             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14349             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14350             
       
 14351             /* Get the value from a foo(<param_value>) style call */
       
 14352             if (IN_param_value == NULL)
       
 14353               IN_param_value = function_call_param_iterator.next();
       
 14354             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14355             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14356             
       
 14357             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14358             {
       
 14359         
       
 14360                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14361                 s4o.print("(");
       
 14362                 return_type_symbol->accept(*this);
       
 14363                 s4o.print(")time_to_real(");
       
 14364                 IN_param_value->accept(*this);
       
 14365                 s4o.print(")");
       
 14366                 return NULL;
       
 14367                 
       
 14368             }
       
 14369             
       
 14370             ERROR;
       
 14371         }
       
 14372         
       
 14373     }/*function_dt_to_dint*/
       
 14374     break;
  4652 
 14375 
  4653 /****
 14376 /****
  4654  *DT_TO_LINT
 14377  *DT_TO_LINT
  4655  */
 14378  */
  4656 	case function_dt_to_lint :
 14379     case function_dt_to_lint :
  4657 	{
 14380     {
  4658 		symbol_c *last_type_symbol = NULL;
 14381         symbol_c *last_type_symbol = NULL;
  4659 
 14382 
  4660 		{
 14383         {
  4661 			identifier_c param_name("IN");
 14384             identifier_c param_name("IN");
  4662 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14385             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4663 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14386             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4664 			
 14387             
  4665 			/* Get the value from a foo(<param_value>) style call */
 14388             /* Get the value from a foo(<param_value>) style call */
  4666 			if (IN_param_value == NULL)
 14389             if (IN_param_value == NULL)
  4667 			  IN_param_value = function_call_param_iterator.next();
 14390               IN_param_value = function_call_param_iterator.next();
  4668 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14391             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4669 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  4670 			
 14393             
  4671 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14394             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4672 			{
 14395             {
  4673 		
 14396         
  4674 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14397                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4675 				s4o.print("(");
 14398                 s4o.print("(");
  4676 				return_type_symbol->accept(*this);
 14399                 return_type_symbol->accept(*this);
  4677 				s4o.print(")real_to_time(");
 14400                 s4o.print(")time_to_real(");
  4678 				IN_param_value->accept(*this);
 14401                 IN_param_value->accept(*this);
  4679 				s4o.print(")");
 14402                 s4o.print(")");
  4680 				return NULL;
 14403                 return NULL;
  4681 				
 14404                 
  4682 			}
 14405             }
  4683 			
 14406             
  4684 			ERROR;
 14407             ERROR;
  4685 		}
 14408         }
  4686 		
 14409         
  4687 	}/*function_dt_to_lint*/
 14410     }/*function_dt_to_lint*/
  4688 	break;
 14411     break;
  4689 
 14412 
  4690 /****
 14413 /****
  4691  *DT_TO_DINT
 14414  *DT_TO_USINT
  4692  */
 14415  */
  4693 	case function_dt_to_dint :
 14416     case function_dt_to_usint :
  4694 	{
 14417     {
  4695 		symbol_c *last_type_symbol = NULL;
 14418         symbol_c *last_type_symbol = NULL;
  4696 
 14419 
  4697 		{
 14420         {
  4698 			identifier_c param_name("IN");
 14421             identifier_c param_name("IN");
  4699 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14422             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4700 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14423             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4701 			
 14424             
  4702 			/* Get the value from a foo(<param_value>) style call */
 14425             /* Get the value from a foo(<param_value>) style call */
  4703 			if (IN_param_value == NULL)
 14426             if (IN_param_value == NULL)
  4704 			  IN_param_value = function_call_param_iterator.next();
 14427               IN_param_value = function_call_param_iterator.next();
  4705 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14428             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4706 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14429             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4707 			
 14430             
  4708 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14431             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4709 			{
 14432             {
  4710 		
 14433         
  4711 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 14434                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4712 				s4o.print("(");
 14435                 s4o.print("(");
  4713 				return_type_symbol->accept(*this);
 14436                 return_type_symbol->accept(*this);
  4714 				s4o.print(")real_to_time(");
 14437                 s4o.print(")time_to_real(");
  4715 				IN_param_value->accept(*this);
 14438                 IN_param_value->accept(*this);
  4716 				s4o.print(")");
 14439                 s4o.print(")");
  4717 				return NULL;
 14440                 return NULL;
  4718 				
 14441                 
  4719 			}
 14442             }
  4720 			
 14443             
  4721 			ERROR;
 14444             ERROR;
  4722 		}
 14445         }
  4723 		
 14446         
  4724 	}/*function_dt_to_dint*/
 14447     }/*function_dt_to_usint*/
  4725 	break;
 14448     break;
  4726 
 14449 
  4727 /****
 14450 /****
  4728  *DT_TO_DATE
 14451  *DT_TO_UINT
  4729  */
 14452  */
  4730 	case function_dt_to_date :
 14453     case function_dt_to_uint :
  4731 	{
 14454     {
  4732 		symbol_c *last_type_symbol = NULL;
 14455         symbol_c *last_type_symbol = NULL;
  4733 
 14456 
  4734 		{
 14457         {
  4735 			identifier_c param_name("IN");
 14458             identifier_c param_name("IN");
  4736 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14459             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4737 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14460             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4738 			
 14461             
  4739 			/* Get the value from a foo(<param_value>) style call */
 14462             /* Get the value from a foo(<param_value>) style call */
  4740 			if (IN_param_value == NULL)
 14463             if (IN_param_value == NULL)
  4741 			  IN_param_value = function_call_param_iterator.next();
 14464               IN_param_value = function_call_param_iterator.next();
  4742 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14465             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4743 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14466             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4744 			
 14467             
  4745 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14468             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4746 			{
 14469             {
  4747 		
 14470         
  4748 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14471                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  4749 				s4o.print("#error DT_TO_DATE not implemented!");
 14472                 s4o.print("(");
  4750 				return NULL;
 14473                 return_type_symbol->accept(*this);
  4751 				
 14474                 s4o.print(")time_to_real(");
  4752 			}
 14475                 IN_param_value->accept(*this);
  4753 			
 14476                 s4o.print(")");
  4754 			ERROR;
 14477                 return NULL;
  4755 		}
 14478                 
  4756 		
 14479             }
  4757 	}/*function_dt_to_date*/
 14480             
  4758 	break;
 14481             ERROR;
       
 14482         }
       
 14483         
       
 14484     }/*function_dt_to_uint*/
       
 14485     break;
       
 14486 
       
 14487 /****
       
 14488  *DT_TO_UDINT
       
 14489  */
       
 14490     case function_dt_to_udint :
       
 14491     {
       
 14492         symbol_c *last_type_symbol = NULL;
       
 14493 
       
 14494         {
       
 14495             identifier_c param_name("IN");
       
 14496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14498             
       
 14499             /* Get the value from a foo(<param_value>) style call */
       
 14500             if (IN_param_value == NULL)
       
 14501               IN_param_value = function_call_param_iterator.next();
       
 14502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14504             
       
 14505             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14506             {
       
 14507         
       
 14508                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14509                 s4o.print("(");
       
 14510                 return_type_symbol->accept(*this);
       
 14511                 s4o.print(")time_to_real(");
       
 14512                 IN_param_value->accept(*this);
       
 14513                 s4o.print(")");
       
 14514                 return NULL;
       
 14515                 
       
 14516             }
       
 14517             
       
 14518             ERROR;
       
 14519         }
       
 14520         
       
 14521     }/*function_dt_to_udint*/
       
 14522     break;
       
 14523 
       
 14524 /****
       
 14525  *DT_TO_ULINT
       
 14526  */
       
 14527     case function_dt_to_ulint :
       
 14528     {
       
 14529         symbol_c *last_type_symbol = NULL;
       
 14530 
       
 14531         {
       
 14532             identifier_c param_name("IN");
       
 14533             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14534             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14535             
       
 14536             /* Get the value from a foo(<param_value>) style call */
       
 14537             if (IN_param_value == NULL)
       
 14538               IN_param_value = function_call_param_iterator.next();
       
 14539             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14540             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14541             
       
 14542             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14543             {
       
 14544         
       
 14545                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14546                 s4o.print("(");
       
 14547                 return_type_symbol->accept(*this);
       
 14548                 s4o.print(")time_to_real(");
       
 14549                 IN_param_value->accept(*this);
       
 14550                 s4o.print(")");
       
 14551                 return NULL;
       
 14552                 
       
 14553             }
       
 14554             
       
 14555             ERROR;
       
 14556         }
       
 14557         
       
 14558     }/*function_dt_to_ulint*/
       
 14559     break;
       
 14560 
       
 14561 /****
       
 14562  *DT_TO_BOOL
       
 14563  */
       
 14564     case function_dt_to_bool :
       
 14565     {
       
 14566         symbol_c *last_type_symbol = NULL;
       
 14567 
       
 14568         {
       
 14569             identifier_c param_name("IN");
       
 14570             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14571             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14572             
       
 14573             /* Get the value from a foo(<param_value>) style call */
       
 14574             if (IN_param_value == NULL)
       
 14575               IN_param_value = function_call_param_iterator.next();
       
 14576             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14577             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14578             
       
 14579             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14580             {
       
 14581         
       
 14582                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 14583                 s4o.print("(");
       
 14584                 return_type_symbol->accept(*this);
       
 14585                 s4o.print(")time_to_real(");
       
 14586                 IN_param_value->accept(*this);
       
 14587                 s4o.print(")");
       
 14588                 return NULL;
       
 14589                 
       
 14590             }
       
 14591             
       
 14592             ERROR;
       
 14593         }
       
 14594         
       
 14595     }/*function_dt_to_bool*/
       
 14596     break;
       
 14597 
       
 14598 /****
       
 14599  *DT_TO_BYTE
       
 14600  */
       
 14601     case function_dt_to_byte :
       
 14602     {
       
 14603         symbol_c *last_type_symbol = NULL;
       
 14604 
       
 14605         {
       
 14606             identifier_c param_name("IN");
       
 14607             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14608             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14609             
       
 14610             /* Get the value from a foo(<param_value>) style call */
       
 14611             if (IN_param_value == NULL)
       
 14612               IN_param_value = function_call_param_iterator.next();
       
 14613             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14614             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14615             
       
 14616             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14617             {
       
 14618         
       
 14619                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 14620                 s4o.print("(");
       
 14621                 return_type_symbol->accept(*this);
       
 14622                 s4o.print(")time_to_real(");
       
 14623                 IN_param_value->accept(*this);
       
 14624                 s4o.print(")");
       
 14625                 return NULL;
       
 14626                 
       
 14627             }
       
 14628             
       
 14629             ERROR;
       
 14630         }
       
 14631         
       
 14632     }/*function_dt_to_byte*/
       
 14633     break;
       
 14634 
       
 14635 /****
       
 14636  *DT_TO_WORD
       
 14637  */
       
 14638     case function_dt_to_word :
       
 14639     {
       
 14640         symbol_c *last_type_symbol = NULL;
       
 14641 
       
 14642         {
       
 14643             identifier_c param_name("IN");
       
 14644             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14645             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14646             
       
 14647             /* Get the value from a foo(<param_value>) style call */
       
 14648             if (IN_param_value == NULL)
       
 14649               IN_param_value = function_call_param_iterator.next();
       
 14650             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14651             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14652             
       
 14653             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 14654             {
       
 14655         
       
 14656                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14657                 s4o.print("(");
       
 14658                 return_type_symbol->accept(*this);
       
 14659                 s4o.print(")time_to_real(");
       
 14660                 IN_param_value->accept(*this);
       
 14661                 s4o.print(")");
       
 14662                 return NULL;
       
 14663                 
       
 14664             }
       
 14665             
       
 14666             ERROR;
       
 14667         }
       
 14668         
       
 14669     }/*function_dt_to_word*/
       
 14670     break;
  4759 
 14671 
  4760 /****
 14672 /****
  4761  *DT_TO_DWORD
 14673  *DT_TO_DWORD
  4762  */
 14674  */
  4763 	case function_dt_to_dword :
 14675     case function_dt_to_dword :
  4764 	{
 14676     {
  4765 		symbol_c *last_type_symbol = NULL;
 14677         symbol_c *last_type_symbol = NULL;
  4766 
 14678 
  4767 		{
 14679         {
  4768 			identifier_c param_name("IN");
 14680             identifier_c param_name("IN");
  4769 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14681             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4770 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14682             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4771 			
 14683             
  4772 			/* Get the value from a foo(<param_value>) style call */
 14684             /* Get the value from a foo(<param_value>) style call */
  4773 			if (IN_param_value == NULL)
 14685             if (IN_param_value == NULL)
  4774 			  IN_param_value = function_call_param_iterator.next();
 14686               IN_param_value = function_call_param_iterator.next();
  4775 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14687             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4776 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14688             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4777 			
 14689             
  4778 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14690             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4779 			{
 14691             {
  4780 		
 14692         
  4781 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 14693                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4782 				s4o.print("(");
 14694                 s4o.print("(");
  4783 				return_type_symbol->accept(*this);
 14695                 return_type_symbol->accept(*this);
  4784 				s4o.print(")real_to_time(");
 14696                 s4o.print(")time_to_real(");
  4785 				IN_param_value->accept(*this);
 14697                 IN_param_value->accept(*this);
  4786 				s4o.print(")");
 14698                 s4o.print(")");
  4787 				return NULL;
 14699                 return NULL;
  4788 				
 14700                 
  4789 			}
 14701             }
  4790 			
 14702             
  4791 			ERROR;
 14703             ERROR;
  4792 		}
 14704         }
  4793 		
 14705         
  4794 	}/*function_dt_to_dword*/
 14706     }/*function_dt_to_dword*/
  4795 	break;
 14707     break;
  4796 
 14708 
  4797 /****
 14709 /****
  4798  *DT_TO_DT
 14710  *DT_TO_LWORD
  4799  */
 14711  */
  4800 	case function_dt_to_dt :
 14712     case function_dt_to_lword :
  4801 	{
 14713     {
  4802 		symbol_c *last_type_symbol = NULL;
 14714         symbol_c *last_type_symbol = NULL;
  4803 
 14715 
  4804 		{
 14716         {
  4805 			identifier_c param_name("IN");
 14717             identifier_c param_name("IN");
  4806 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14718             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4807 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14719             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4808 			
 14720             
  4809 			/* Get the value from a foo(<param_value>) style call */
 14721             /* Get the value from a foo(<param_value>) style call */
  4810 			if (IN_param_value == NULL)
 14722             if (IN_param_value == NULL)
  4811 			  IN_param_value = function_call_param_iterator.next();
 14723               IN_param_value = function_call_param_iterator.next();
  4812 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14724             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4813 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14725             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4814 			
 14726             
  4815 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14727             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4816 			{
 14728             {
  4817 		
 14729         
  4818 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14730                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4819 				s4o.print("#error DT_TO_DT not implemented!");
 14731                 s4o.print("(");
  4820 				return NULL;
 14732                 return_type_symbol->accept(*this);
  4821 				
 14733                 s4o.print(")time_to_real(");
  4822 			}
 14734                 IN_param_value->accept(*this);
  4823 			
 14735                 s4o.print(")");
  4824 			ERROR;
 14736                 return NULL;
  4825 		}
 14737                 
  4826 		
 14738             }
  4827 	}/*function_dt_to_dt*/
 14739             
  4828 	break;
 14740             ERROR;
  4829 
 14741         }
  4830 /****
 14742         
  4831  *DT_TO_TOD
 14743     }/*function_dt_to_lword*/
  4832  */
 14744     break;
  4833 	case function_dt_to_tod :
 14745 
  4834 	{
 14746 /****
  4835 		symbol_c *last_type_symbol = NULL;
 14747  *DT_TO_STRING
  4836 
 14748  */
  4837 		{
 14749     case function_dt_to_string :
  4838 			identifier_c param_name("IN");
 14750     {
  4839 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14751         symbol_c *last_type_symbol = NULL;
  4840 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14752 
  4841 			
 14753         {
  4842 			/* Get the value from a foo(<param_value>) style call */
 14754             identifier_c param_name("IN");
  4843 			if (IN_param_value == NULL)
 14755             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4844 			  IN_param_value = function_call_param_iterator.next();
 14756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4845 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14757             
  4846 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14758             /* Get the value from a foo(<param_value>) style call */
  4847 			
 14759             if (IN_param_value == NULL)
  4848 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14760               IN_param_value = function_call_param_iterator.next();
  4849 			{
 14761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4850 		
 14762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4851 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14763             
  4852 				s4o.print("#error DT_TO_TOD not implemented!");
 14764             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4853 				return NULL;
 14765             {
  4854 				
 14766         
  4855 			}
 14767                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4856 			
 14768                 s4o.print("(");
  4857 			ERROR;
 14769                 return_type_symbol->accept(*this);
  4858 		}
 14770                 s4o.print(")time_to_string(");
  4859 		
 14771                 IN_param_value->accept(*this);
  4860 	}/*function_dt_to_tod*/
 14772                 s4o.print(")");
  4861 	break;
 14773                 return NULL;
  4862 
 14774                 
  4863 /****
 14775             }
  4864  *DT_TO_UDINT
 14776             
  4865  */
 14777             ERROR;
  4866 	case function_dt_to_udint :
 14778         }
  4867 	{
 14779         
  4868 		symbol_c *last_type_symbol = NULL;
 14780     }/*function_dt_to_string*/
  4869 
 14781     break;
  4870 		{
       
  4871 			identifier_c param_name("IN");
       
  4872 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4873 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4874 			
       
  4875 			/* Get the value from a foo(<param_value>) style call */
       
  4876 			if (IN_param_value == NULL)
       
  4877 			  IN_param_value = function_call_param_iterator.next();
       
  4878 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4879 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4880 			
       
  4881 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4882 			{
       
  4883 		
       
  4884 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4885 				s4o.print("(");
       
  4886 				return_type_symbol->accept(*this);
       
  4887 				s4o.print(")real_to_time(");
       
  4888 				IN_param_value->accept(*this);
       
  4889 				s4o.print(")");
       
  4890 				return NULL;
       
  4891 				
       
  4892 			}
       
  4893 			
       
  4894 			ERROR;
       
  4895 		}
       
  4896 		
       
  4897 	}/*function_dt_to_udint*/
       
  4898 	break;
       
  4899 
       
  4900 /****
       
  4901  *DT_TO_WORD
       
  4902  */
       
  4903 	case function_dt_to_word :
       
  4904 	{
       
  4905 		symbol_c *last_type_symbol = NULL;
       
  4906 
       
  4907 		{
       
  4908 			identifier_c param_name("IN");
       
  4909 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4910 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4911 			
       
  4912 			/* Get the value from a foo(<param_value>) style call */
       
  4913 			if (IN_param_value == NULL)
       
  4914 			  IN_param_value = function_call_param_iterator.next();
       
  4915 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4916 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4917 			
       
  4918 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4919 			{
       
  4920 		
       
  4921 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4922 				s4o.print("(");
       
  4923 				return_type_symbol->accept(*this);
       
  4924 				s4o.print(")real_to_time(");
       
  4925 				IN_param_value->accept(*this);
       
  4926 				s4o.print(")");
       
  4927 				return NULL;
       
  4928 				
       
  4929 			}
       
  4930 			
       
  4931 			ERROR;
       
  4932 		}
       
  4933 		
       
  4934 	}/*function_dt_to_word*/
       
  4935 	break;
       
  4936 
 14782 
  4937 /****
 14783 /****
  4938  *DT_TO_WSTRING
 14784  *DT_TO_WSTRING
  4939  */
 14785  */
  4940 	case function_dt_to_wstring :
 14786     case function_dt_to_wstring :
  4941 	{
 14787     {
  4942 		symbol_c *last_type_symbol = NULL;
 14788         symbol_c *last_type_symbol = NULL;
  4943 
 14789 
  4944 		{
 14790         {
  4945 			identifier_c param_name("IN");
 14791             identifier_c param_name("IN");
  4946 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14792             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4947 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4948 			
 14794             
  4949 			/* Get the value from a foo(<param_value>) style call */
 14795             /* Get the value from a foo(<param_value>) style call */
  4950 			if (IN_param_value == NULL)
 14796             if (IN_param_value == NULL)
  4951 			  IN_param_value = function_call_param_iterator.next();
 14797               IN_param_value = function_call_param_iterator.next();
  4952 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4953 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4954 			
 14800             
  4955 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14801             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  4956 			{
 14802             {
  4957 		
 14803         
  4958 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 14804                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
  4959 				s4o.print("(");
 14805                 s4o.print("(");
  4960 				return_type_symbol->accept(*this);
 14806                 return_type_symbol->accept(*this);
  4961 				s4o.print(")string_to_time(");
 14807                 s4o.print(")time_to_string(");
  4962 				IN_param_value->accept(*this);
 14808                 IN_param_value->accept(*this);
  4963 				s4o.print(")");
 14809                 s4o.print(")");
  4964 				return NULL;
 14810                 return NULL;
  4965 				
 14811                 
  4966 			}
 14812             }
  4967 			
 14813             
  4968 			ERROR;
 14814             ERROR;
  4969 		}
 14815         }
  4970 		
 14816         
  4971 	}/*function_dt_to_wstring*/
 14817     }/*function_dt_to_wstring*/
  4972 	break;
 14818     break;
  4973 
       
  4974 /****
       
  4975  *DT_TO_STRING
       
  4976  */
       
  4977 	case function_dt_to_string :
       
  4978 	{
       
  4979 		symbol_c *last_type_symbol = NULL;
       
  4980 
       
  4981 		{
       
  4982 			identifier_c param_name("IN");
       
  4983 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4984 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4985 			
       
  4986 			/* Get the value from a foo(<param_value>) style call */
       
  4987 			if (IN_param_value == NULL)
       
  4988 			  IN_param_value = function_call_param_iterator.next();
       
  4989 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4990 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4991 			
       
  4992 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4993 			{
       
  4994 		
       
  4995 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4996 				s4o.print("(");
       
  4997 				return_type_symbol->accept(*this);
       
  4998 				s4o.print(")string_to_time(");
       
  4999 				IN_param_value->accept(*this);
       
  5000 				s4o.print(")");
       
  5001 				return NULL;
       
  5002 				
       
  5003 			}
       
  5004 			
       
  5005 			ERROR;
       
  5006 		}
       
  5007 		
       
  5008 	}/*function_dt_to_string*/
       
  5009 	break;
       
  5010 
       
  5011 /****
       
  5012  *DT_TO_LWORD
       
  5013  */
       
  5014 	case function_dt_to_lword :
       
  5015 	{
       
  5016 		symbol_c *last_type_symbol = NULL;
       
  5017 
       
  5018 		{
       
  5019 			identifier_c param_name("IN");
       
  5020 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5021 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5022 			
       
  5023 			/* Get the value from a foo(<param_value>) style call */
       
  5024 			if (IN_param_value == NULL)
       
  5025 			  IN_param_value = function_call_param_iterator.next();
       
  5026 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5027 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5028 			
       
  5029 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5030 			{
       
  5031 		
       
  5032 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5033 				s4o.print("(");
       
  5034 				return_type_symbol->accept(*this);
       
  5035 				s4o.print(")real_to_time(");
       
  5036 				IN_param_value->accept(*this);
       
  5037 				s4o.print(")");
       
  5038 				return NULL;
       
  5039 				
       
  5040 			}
       
  5041 			
       
  5042 			ERROR;
       
  5043 		}
       
  5044 		
       
  5045 	}/*function_dt_to_lword*/
       
  5046 	break;
       
  5047 
       
  5048 /****
       
  5049  *DT_TO_UINT
       
  5050  */
       
  5051 	case function_dt_to_uint :
       
  5052 	{
       
  5053 		symbol_c *last_type_symbol = NULL;
       
  5054 
       
  5055 		{
       
  5056 			identifier_c param_name("IN");
       
  5057 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5058 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5059 			
       
  5060 			/* Get the value from a foo(<param_value>) style call */
       
  5061 			if (IN_param_value == NULL)
       
  5062 			  IN_param_value = function_call_param_iterator.next();
       
  5063 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5064 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5065 			
       
  5066 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5067 			{
       
  5068 		
       
  5069 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5070 				s4o.print("(");
       
  5071 				return_type_symbol->accept(*this);
       
  5072 				s4o.print(")real_to_time(");
       
  5073 				IN_param_value->accept(*this);
       
  5074 				s4o.print(")");
       
  5075 				return NULL;
       
  5076 				
       
  5077 			}
       
  5078 			
       
  5079 			ERROR;
       
  5080 		}
       
  5081 		
       
  5082 	}/*function_dt_to_uint*/
       
  5083 	break;
       
  5084 
       
  5085 /****
       
  5086  *DT_TO_LREAL
       
  5087  */
       
  5088 	case function_dt_to_lreal :
       
  5089 	{
       
  5090 		symbol_c *last_type_symbol = NULL;
       
  5091 
       
  5092 		{
       
  5093 			identifier_c param_name("IN");
       
  5094 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5095 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5096 			
       
  5097 			/* Get the value from a foo(<param_value>) style call */
       
  5098 			if (IN_param_value == NULL)
       
  5099 			  IN_param_value = function_call_param_iterator.next();
       
  5100 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5101 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5102 			
       
  5103 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5104 			{
       
  5105 		
       
  5106 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5107 				s4o.print("(");
       
  5108 				return_type_symbol->accept(*this);
       
  5109 				s4o.print(")real_to_time(");
       
  5110 				IN_param_value->accept(*this);
       
  5111 				s4o.print(")");
       
  5112 				return NULL;
       
  5113 				
       
  5114 			}
       
  5115 			
       
  5116 			ERROR;
       
  5117 		}
       
  5118 		
       
  5119 	}/*function_dt_to_lreal*/
       
  5120 	break;
       
  5121 
       
  5122 /****
       
  5123  *DT_TO_BYTE
       
  5124  */
       
  5125 	case function_dt_to_byte :
       
  5126 	{
       
  5127 		symbol_c *last_type_symbol = NULL;
       
  5128 
       
  5129 		{
       
  5130 			identifier_c param_name("IN");
       
  5131 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5132 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5133 			
       
  5134 			/* Get the value from a foo(<param_value>) style call */
       
  5135 			if (IN_param_value == NULL)
       
  5136 			  IN_param_value = function_call_param_iterator.next();
       
  5137 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5138 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5139 			
       
  5140 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5141 			{
       
  5142 		
       
  5143 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5144 				s4o.print("(");
       
  5145 				return_type_symbol->accept(*this);
       
  5146 				s4o.print(")real_to_time(");
       
  5147 				IN_param_value->accept(*this);
       
  5148 				s4o.print(")");
       
  5149 				return NULL;
       
  5150 				
       
  5151 			}
       
  5152 			
       
  5153 			ERROR;
       
  5154 		}
       
  5155 		
       
  5156 	}/*function_dt_to_byte*/
       
  5157 	break;
       
  5158 
       
  5159 /****
       
  5160  *DT_TO_USINT
       
  5161  */
       
  5162 	case function_dt_to_usint :
       
  5163 	{
       
  5164 		symbol_c *last_type_symbol = NULL;
       
  5165 
       
  5166 		{
       
  5167 			identifier_c param_name("IN");
       
  5168 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5169 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5170 			
       
  5171 			/* Get the value from a foo(<param_value>) style call */
       
  5172 			if (IN_param_value == NULL)
       
  5173 			  IN_param_value = function_call_param_iterator.next();
       
  5174 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5175 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5176 			
       
  5177 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5178 			{
       
  5179 		
       
  5180 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5181 				s4o.print("(");
       
  5182 				return_type_symbol->accept(*this);
       
  5183 				s4o.print(")real_to_time(");
       
  5184 				IN_param_value->accept(*this);
       
  5185 				s4o.print(")");
       
  5186 				return NULL;
       
  5187 				
       
  5188 			}
       
  5189 			
       
  5190 			ERROR;
       
  5191 		}
       
  5192 		
       
  5193 	}/*function_dt_to_usint*/
       
  5194 	break;
       
  5195 
       
  5196 /****
       
  5197  *DT_TO_ULINT
       
  5198  */
       
  5199 	case function_dt_to_ulint :
       
  5200 	{
       
  5201 		symbol_c *last_type_symbol = NULL;
       
  5202 
       
  5203 		{
       
  5204 			identifier_c param_name("IN");
       
  5205 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5206 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5207 			
       
  5208 			/* Get the value from a foo(<param_value>) style call */
       
  5209 			if (IN_param_value == NULL)
       
  5210 			  IN_param_value = function_call_param_iterator.next();
       
  5211 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5212 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5213 			
       
  5214 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5215 			{
       
  5216 		
       
  5217 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5218 				s4o.print("(");
       
  5219 				return_type_symbol->accept(*this);
       
  5220 				s4o.print(")real_to_time(");
       
  5221 				IN_param_value->accept(*this);
       
  5222 				s4o.print(")");
       
  5223 				return NULL;
       
  5224 				
       
  5225 			}
       
  5226 			
       
  5227 			ERROR;
       
  5228 		}
       
  5229 		
       
  5230 	}/*function_dt_to_ulint*/
       
  5231 	break;
       
  5232 
       
  5233 /****
       
  5234  *DT_TO_BOOL
       
  5235  */
       
  5236 	case function_dt_to_bool :
       
  5237 	{
       
  5238 		symbol_c *last_type_symbol = NULL;
       
  5239 
       
  5240 		{
       
  5241 			identifier_c param_name("IN");
       
  5242 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5243 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5244 			
       
  5245 			/* Get the value from a foo(<param_value>) style call */
       
  5246 			if (IN_param_value == NULL)
       
  5247 			  IN_param_value = function_call_param_iterator.next();
       
  5248 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5249 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5250 			
       
  5251 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5252 			{
       
  5253 		
       
  5254 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5255 				s4o.print("(");
       
  5256 				return_type_symbol->accept(*this);
       
  5257 				s4o.print(")real_to_time(");
       
  5258 				IN_param_value->accept(*this);
       
  5259 				s4o.print(")");
       
  5260 				return NULL;
       
  5261 				
       
  5262 			}
       
  5263 			
       
  5264 			ERROR;
       
  5265 		}
       
  5266 		
       
  5267 	}/*function_dt_to_bool*/
       
  5268 	break;
       
  5269 
       
  5270 /****
       
  5271  *DT_TO_TIME
       
  5272  */
       
  5273 	case function_dt_to_time :
       
  5274 	{
       
  5275 		symbol_c *last_type_symbol = NULL;
       
  5276 
       
  5277 		{
       
  5278 			identifier_c param_name("IN");
       
  5279 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5280 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5281 			
       
  5282 			/* Get the value from a foo(<param_value>) style call */
       
  5283 			if (IN_param_value == NULL)
       
  5284 			  IN_param_value = function_call_param_iterator.next();
       
  5285 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5286 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5287 			
       
  5288 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5289 			{
       
  5290 		
       
  5291 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5292 				s4o.print("#error DT_TO_TIME not implemented!");
       
  5293 				return NULL;
       
  5294 				
       
  5295 			}
       
  5296 			
       
  5297 			ERROR;
       
  5298 		}
       
  5299 		
       
  5300 	}/*function_dt_to_time*/
       
  5301 	break;
       
  5302 
       
  5303 /****
       
  5304  *DT_TO_INT
       
  5305  */
       
  5306 	case function_dt_to_int :
       
  5307 	{
       
  5308 		symbol_c *last_type_symbol = NULL;
       
  5309 
       
  5310 		{
       
  5311 			identifier_c param_name("IN");
       
  5312 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5313 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5314 			
       
  5315 			/* Get the value from a foo(<param_value>) style call */
       
  5316 			if (IN_param_value == NULL)
       
  5317 			  IN_param_value = function_call_param_iterator.next();
       
  5318 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5319 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5320 			
       
  5321 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  5322 			{
       
  5323 		
       
  5324 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5325 				s4o.print("(");
       
  5326 				return_type_symbol->accept(*this);
       
  5327 				s4o.print(")real_to_time(");
       
  5328 				IN_param_value->accept(*this);
       
  5329 				s4o.print(")");
       
  5330 				return NULL;
       
  5331 				
       
  5332 			}
       
  5333 			
       
  5334 			ERROR;
       
  5335 		}
       
  5336 		
       
  5337 	}/*function_dt_to_int*/
       
  5338 	break;
       
  5339 
       
  5340 /****
       
  5341  *TOD_TO_REAL
       
  5342  */
       
  5343 	case function_tod_to_real :
       
  5344 	{
       
  5345 		symbol_c *last_type_symbol = NULL;
       
  5346 
       
  5347 		{
       
  5348 			identifier_c param_name("IN");
       
  5349 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5350 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5351 			
       
  5352 			/* Get the value from a foo(<param_value>) style call */
       
  5353 			if (IN_param_value == NULL)
       
  5354 			  IN_param_value = function_call_param_iterator.next();
       
  5355 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5356 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5357 			
       
  5358 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5359 			{
       
  5360 		
       
  5361 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5362 				s4o.print("(");
       
  5363 				return_type_symbol->accept(*this);
       
  5364 				s4o.print(")real_to_time(");
       
  5365 				IN_param_value->accept(*this);
       
  5366 				s4o.print(")");
       
  5367 				return NULL;
       
  5368 				
       
  5369 			}
       
  5370 			
       
  5371 			ERROR;
       
  5372 		}
       
  5373 		
       
  5374 	}/*function_tod_to_real*/
       
  5375 	break;
       
  5376 
       
  5377 /****
       
  5378  *TOD_TO_SINT
       
  5379  */
       
  5380 	case function_tod_to_sint :
       
  5381 	{
       
  5382 		symbol_c *last_type_symbol = NULL;
       
  5383 
       
  5384 		{
       
  5385 			identifier_c param_name("IN");
       
  5386 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5387 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5388 			
       
  5389 			/* Get the value from a foo(<param_value>) style call */
       
  5390 			if (IN_param_value == NULL)
       
  5391 			  IN_param_value = function_call_param_iterator.next();
       
  5392 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5393 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5394 			
       
  5395 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5396 			{
       
  5397 		
       
  5398 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5399 				s4o.print("(");
       
  5400 				return_type_symbol->accept(*this);
       
  5401 				s4o.print(")real_to_time(");
       
  5402 				IN_param_value->accept(*this);
       
  5403 				s4o.print(")");
       
  5404 				return NULL;
       
  5405 				
       
  5406 			}
       
  5407 			
       
  5408 			ERROR;
       
  5409 		}
       
  5410 		
       
  5411 	}/*function_tod_to_sint*/
       
  5412 	break;
       
  5413 
       
  5414 /****
       
  5415  *TOD_TO_LINT
       
  5416  */
       
  5417 	case function_tod_to_lint :
       
  5418 	{
       
  5419 		symbol_c *last_type_symbol = NULL;
       
  5420 
       
  5421 		{
       
  5422 			identifier_c param_name("IN");
       
  5423 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5424 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5425 			
       
  5426 			/* Get the value from a foo(<param_value>) style call */
       
  5427 			if (IN_param_value == NULL)
       
  5428 			  IN_param_value = function_call_param_iterator.next();
       
  5429 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5430 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5431 			
       
  5432 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5433 			{
       
  5434 		
       
  5435 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5436 				s4o.print("(");
       
  5437 				return_type_symbol->accept(*this);
       
  5438 				s4o.print(")real_to_time(");
       
  5439 				IN_param_value->accept(*this);
       
  5440 				s4o.print(")");
       
  5441 				return NULL;
       
  5442 				
       
  5443 			}
       
  5444 			
       
  5445 			ERROR;
       
  5446 		}
       
  5447 		
       
  5448 	}/*function_tod_to_lint*/
       
  5449 	break;
       
  5450 
       
  5451 /****
       
  5452  *TOD_TO_DINT
       
  5453  */
       
  5454 	case function_tod_to_dint :
       
  5455 	{
       
  5456 		symbol_c *last_type_symbol = NULL;
       
  5457 
       
  5458 		{
       
  5459 			identifier_c param_name("IN");
       
  5460 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5461 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5462 			
       
  5463 			/* Get the value from a foo(<param_value>) style call */
       
  5464 			if (IN_param_value == NULL)
       
  5465 			  IN_param_value = function_call_param_iterator.next();
       
  5466 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5467 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5468 			
       
  5469 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5470 			{
       
  5471 		
       
  5472 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5473 				s4o.print("(");
       
  5474 				return_type_symbol->accept(*this);
       
  5475 				s4o.print(")real_to_time(");
       
  5476 				IN_param_value->accept(*this);
       
  5477 				s4o.print(")");
       
  5478 				return NULL;
       
  5479 				
       
  5480 			}
       
  5481 			
       
  5482 			ERROR;
       
  5483 		}
       
  5484 		
       
  5485 	}/*function_tod_to_dint*/
       
  5486 	break;
       
  5487 
       
  5488 /****
       
  5489  *TOD_TO_DATE
       
  5490  */
       
  5491 	case function_tod_to_date :
       
  5492 	{
       
  5493 		symbol_c *last_type_symbol = NULL;
       
  5494 
       
  5495 		{
       
  5496 			identifier_c param_name("IN");
       
  5497 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5498 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5499 			
       
  5500 			/* Get the value from a foo(<param_value>) style call */
       
  5501 			if (IN_param_value == NULL)
       
  5502 			  IN_param_value = function_call_param_iterator.next();
       
  5503 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5504 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5505 			
       
  5506 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5507 			{
       
  5508 		
       
  5509 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5510 				s4o.print("#error TOD_TO_DATE not implemented!");
       
  5511 				return NULL;
       
  5512 				
       
  5513 			}
       
  5514 			
       
  5515 			ERROR;
       
  5516 		}
       
  5517 		
       
  5518 	}/*function_tod_to_date*/
       
  5519 	break;
       
  5520 
       
  5521 /****
       
  5522  *TOD_TO_DWORD
       
  5523  */
       
  5524 	case function_tod_to_dword :
       
  5525 	{
       
  5526 		symbol_c *last_type_symbol = NULL;
       
  5527 
       
  5528 		{
       
  5529 			identifier_c param_name("IN");
       
  5530 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5531 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5532 			
       
  5533 			/* Get the value from a foo(<param_value>) style call */
       
  5534 			if (IN_param_value == NULL)
       
  5535 			  IN_param_value = function_call_param_iterator.next();
       
  5536 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5537 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5538 			
       
  5539 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5540 			{
       
  5541 		
       
  5542 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5543 				s4o.print("(");
       
  5544 				return_type_symbol->accept(*this);
       
  5545 				s4o.print(")real_to_time(");
       
  5546 				IN_param_value->accept(*this);
       
  5547 				s4o.print(")");
       
  5548 				return NULL;
       
  5549 				
       
  5550 			}
       
  5551 			
       
  5552 			ERROR;
       
  5553 		}
       
  5554 		
       
  5555 	}/*function_tod_to_dword*/
       
  5556 	break;
       
  5557 
       
  5558 /****
       
  5559  *TOD_TO_DT
       
  5560  */
       
  5561 	case function_tod_to_dt :
       
  5562 	{
       
  5563 		symbol_c *last_type_symbol = NULL;
       
  5564 
       
  5565 		{
       
  5566 			identifier_c param_name("IN");
       
  5567 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5568 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5569 			
       
  5570 			/* Get the value from a foo(<param_value>) style call */
       
  5571 			if (IN_param_value == NULL)
       
  5572 			  IN_param_value = function_call_param_iterator.next();
       
  5573 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5574 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5575 			
       
  5576 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5577 			{
       
  5578 		
       
  5579 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5580 				s4o.print("#error TOD_TO_DT not implemented!");
       
  5581 				return NULL;
       
  5582 				
       
  5583 			}
       
  5584 			
       
  5585 			ERROR;
       
  5586 		}
       
  5587 		
       
  5588 	}/*function_tod_to_dt*/
       
  5589 	break;
       
  5590 
       
  5591 /****
       
  5592  *TOD_TO_TOD
       
  5593  */
       
  5594 	case function_tod_to_tod :
       
  5595 	{
       
  5596 		symbol_c *last_type_symbol = NULL;
       
  5597 
       
  5598 		{
       
  5599 			identifier_c param_name("IN");
       
  5600 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5601 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5602 			
       
  5603 			/* Get the value from a foo(<param_value>) style call */
       
  5604 			if (IN_param_value == NULL)
       
  5605 			  IN_param_value = function_call_param_iterator.next();
       
  5606 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5607 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5608 			
       
  5609 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5610 			{
       
  5611 		
       
  5612 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5613 				s4o.print("#error TOD_TO_TOD not implemented!");
       
  5614 				return NULL;
       
  5615 				
       
  5616 			}
       
  5617 			
       
  5618 			ERROR;
       
  5619 		}
       
  5620 		
       
  5621 	}/*function_tod_to_tod*/
       
  5622 	break;
       
  5623 
       
  5624 /****
       
  5625  *TOD_TO_UDINT
       
  5626  */
       
  5627 	case function_tod_to_udint :
       
  5628 	{
       
  5629 		symbol_c *last_type_symbol = NULL;
       
  5630 
       
  5631 		{
       
  5632 			identifier_c param_name("IN");
       
  5633 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5634 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5635 			
       
  5636 			/* Get the value from a foo(<param_value>) style call */
       
  5637 			if (IN_param_value == NULL)
       
  5638 			  IN_param_value = function_call_param_iterator.next();
       
  5639 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5640 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5641 			
       
  5642 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5643 			{
       
  5644 		
       
  5645 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5646 				s4o.print("(");
       
  5647 				return_type_symbol->accept(*this);
       
  5648 				s4o.print(")real_to_time(");
       
  5649 				IN_param_value->accept(*this);
       
  5650 				s4o.print(")");
       
  5651 				return NULL;
       
  5652 				
       
  5653 			}
       
  5654 			
       
  5655 			ERROR;
       
  5656 		}
       
  5657 		
       
  5658 	}/*function_tod_to_udint*/
       
  5659 	break;
       
  5660 
       
  5661 /****
       
  5662  *TOD_TO_WORD
       
  5663  */
       
  5664 	case function_tod_to_word :
       
  5665 	{
       
  5666 		symbol_c *last_type_symbol = NULL;
       
  5667 
       
  5668 		{
       
  5669 			identifier_c param_name("IN");
       
  5670 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5671 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5672 			
       
  5673 			/* Get the value from a foo(<param_value>) style call */
       
  5674 			if (IN_param_value == NULL)
       
  5675 			  IN_param_value = function_call_param_iterator.next();
       
  5676 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5677 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5678 			
       
  5679 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5680 			{
       
  5681 		
       
  5682 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5683 				s4o.print("(");
       
  5684 				return_type_symbol->accept(*this);
       
  5685 				s4o.print(")real_to_time(");
       
  5686 				IN_param_value->accept(*this);
       
  5687 				s4o.print(")");
       
  5688 				return NULL;
       
  5689 				
       
  5690 			}
       
  5691 			
       
  5692 			ERROR;
       
  5693 		}
       
  5694 		
       
  5695 	}/*function_tod_to_word*/
       
  5696 	break;
       
  5697 
       
  5698 /****
       
  5699  *TOD_TO_WSTRING
       
  5700  */
       
  5701 	case function_tod_to_wstring :
       
  5702 	{
       
  5703 		symbol_c *last_type_symbol = NULL;
       
  5704 
       
  5705 		{
       
  5706 			identifier_c param_name("IN");
       
  5707 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5708 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5709 			
       
  5710 			/* Get the value from a foo(<param_value>) style call */
       
  5711 			if (IN_param_value == NULL)
       
  5712 			  IN_param_value = function_call_param_iterator.next();
       
  5713 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5714 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5715 			
       
  5716 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5717 			{
       
  5718 		
       
  5719 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5720 				s4o.print("(");
       
  5721 				return_type_symbol->accept(*this);
       
  5722 				s4o.print(")string_to_time(");
       
  5723 				IN_param_value->accept(*this);
       
  5724 				s4o.print(")");
       
  5725 				return NULL;
       
  5726 				
       
  5727 			}
       
  5728 			
       
  5729 			ERROR;
       
  5730 		}
       
  5731 		
       
  5732 	}/*function_tod_to_wstring*/
       
  5733 	break;
       
  5734 
       
  5735 /****
       
  5736  *TOD_TO_STRING
       
  5737  */
       
  5738 	case function_tod_to_string :
       
  5739 	{
       
  5740 		symbol_c *last_type_symbol = NULL;
       
  5741 
       
  5742 		{
       
  5743 			identifier_c param_name("IN");
       
  5744 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5745 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5746 			
       
  5747 			/* Get the value from a foo(<param_value>) style call */
       
  5748 			if (IN_param_value == NULL)
       
  5749 			  IN_param_value = function_call_param_iterator.next();
       
  5750 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5751 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5752 			
       
  5753 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5754 			{
       
  5755 		
       
  5756 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5757 				s4o.print("(");
       
  5758 				return_type_symbol->accept(*this);
       
  5759 				s4o.print(")string_to_time(");
       
  5760 				IN_param_value->accept(*this);
       
  5761 				s4o.print(")");
       
  5762 				return NULL;
       
  5763 				
       
  5764 			}
       
  5765 			
       
  5766 			ERROR;
       
  5767 		}
       
  5768 		
       
  5769 	}/*function_tod_to_string*/
       
  5770 	break;
       
  5771 
       
  5772 /****
       
  5773  *TOD_TO_LWORD
       
  5774  */
       
  5775 	case function_tod_to_lword :
       
  5776 	{
       
  5777 		symbol_c *last_type_symbol = NULL;
       
  5778 
       
  5779 		{
       
  5780 			identifier_c param_name("IN");
       
  5781 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5782 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5783 			
       
  5784 			/* Get the value from a foo(<param_value>) style call */
       
  5785 			if (IN_param_value == NULL)
       
  5786 			  IN_param_value = function_call_param_iterator.next();
       
  5787 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5788 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5789 			
       
  5790 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5791 			{
       
  5792 		
       
  5793 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5794 				s4o.print("(");
       
  5795 				return_type_symbol->accept(*this);
       
  5796 				s4o.print(")real_to_time(");
       
  5797 				IN_param_value->accept(*this);
       
  5798 				s4o.print(")");
       
  5799 				return NULL;
       
  5800 				
       
  5801 			}
       
  5802 			
       
  5803 			ERROR;
       
  5804 		}
       
  5805 		
       
  5806 	}/*function_tod_to_lword*/
       
  5807 	break;
       
  5808 
       
  5809 /****
       
  5810  *TOD_TO_UINT
       
  5811  */
       
  5812 	case function_tod_to_uint :
       
  5813 	{
       
  5814 		symbol_c *last_type_symbol = NULL;
       
  5815 
       
  5816 		{
       
  5817 			identifier_c param_name("IN");
       
  5818 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5819 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5820 			
       
  5821 			/* Get the value from a foo(<param_value>) style call */
       
  5822 			if (IN_param_value == NULL)
       
  5823 			  IN_param_value = function_call_param_iterator.next();
       
  5824 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5825 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5826 			
       
  5827 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5828 			{
       
  5829 		
       
  5830 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5831 				s4o.print("(");
       
  5832 				return_type_symbol->accept(*this);
       
  5833 				s4o.print(")real_to_time(");
       
  5834 				IN_param_value->accept(*this);
       
  5835 				s4o.print(")");
       
  5836 				return NULL;
       
  5837 				
       
  5838 			}
       
  5839 			
       
  5840 			ERROR;
       
  5841 		}
       
  5842 		
       
  5843 	}/*function_tod_to_uint*/
       
  5844 	break;
       
  5845 
       
  5846 /****
       
  5847  *TOD_TO_LREAL
       
  5848  */
       
  5849 	case function_tod_to_lreal :
       
  5850 	{
       
  5851 		symbol_c *last_type_symbol = NULL;
       
  5852 
       
  5853 		{
       
  5854 			identifier_c param_name("IN");
       
  5855 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5856 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5857 			
       
  5858 			/* Get the value from a foo(<param_value>) style call */
       
  5859 			if (IN_param_value == NULL)
       
  5860 			  IN_param_value = function_call_param_iterator.next();
       
  5861 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5862 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5863 			
       
  5864 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5865 			{
       
  5866 		
       
  5867 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5868 				s4o.print("(");
       
  5869 				return_type_symbol->accept(*this);
       
  5870 				s4o.print(")real_to_time(");
       
  5871 				IN_param_value->accept(*this);
       
  5872 				s4o.print(")");
       
  5873 				return NULL;
       
  5874 				
       
  5875 			}
       
  5876 			
       
  5877 			ERROR;
       
  5878 		}
       
  5879 		
       
  5880 	}/*function_tod_to_lreal*/
       
  5881 	break;
       
  5882 
       
  5883 /****
       
  5884  *TOD_TO_BYTE
       
  5885  */
       
  5886 	case function_tod_to_byte :
       
  5887 	{
       
  5888 		symbol_c *last_type_symbol = NULL;
       
  5889 
       
  5890 		{
       
  5891 			identifier_c param_name("IN");
       
  5892 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5893 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5894 			
       
  5895 			/* Get the value from a foo(<param_value>) style call */
       
  5896 			if (IN_param_value == NULL)
       
  5897 			  IN_param_value = function_call_param_iterator.next();
       
  5898 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5899 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5900 			
       
  5901 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5902 			{
       
  5903 		
       
  5904 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5905 				s4o.print("(");
       
  5906 				return_type_symbol->accept(*this);
       
  5907 				s4o.print(")real_to_time(");
       
  5908 				IN_param_value->accept(*this);
       
  5909 				s4o.print(")");
       
  5910 				return NULL;
       
  5911 				
       
  5912 			}
       
  5913 			
       
  5914 			ERROR;
       
  5915 		}
       
  5916 		
       
  5917 	}/*function_tod_to_byte*/
       
  5918 	break;
       
  5919 
       
  5920 /****
       
  5921  *TOD_TO_USINT
       
  5922  */
       
  5923 	case function_tod_to_usint :
       
  5924 	{
       
  5925 		symbol_c *last_type_symbol = NULL;
       
  5926 
       
  5927 		{
       
  5928 			identifier_c param_name("IN");
       
  5929 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5930 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5931 			
       
  5932 			/* Get the value from a foo(<param_value>) style call */
       
  5933 			if (IN_param_value == NULL)
       
  5934 			  IN_param_value = function_call_param_iterator.next();
       
  5935 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5936 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5937 			
       
  5938 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5939 			{
       
  5940 		
       
  5941 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5942 				s4o.print("(");
       
  5943 				return_type_symbol->accept(*this);
       
  5944 				s4o.print(")real_to_time(");
       
  5945 				IN_param_value->accept(*this);
       
  5946 				s4o.print(")");
       
  5947 				return NULL;
       
  5948 				
       
  5949 			}
       
  5950 			
       
  5951 			ERROR;
       
  5952 		}
       
  5953 		
       
  5954 	}/*function_tod_to_usint*/
       
  5955 	break;
       
  5956 
       
  5957 /****
       
  5958  *TOD_TO_ULINT
       
  5959  */
       
  5960 	case function_tod_to_ulint :
       
  5961 	{
       
  5962 		symbol_c *last_type_symbol = NULL;
       
  5963 
       
  5964 		{
       
  5965 			identifier_c param_name("IN");
       
  5966 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5967 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5968 			
       
  5969 			/* Get the value from a foo(<param_value>) style call */
       
  5970 			if (IN_param_value == NULL)
       
  5971 			  IN_param_value = function_call_param_iterator.next();
       
  5972 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5973 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5974 			
       
  5975 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  5976 			{
       
  5977 		
       
  5978 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5979 				s4o.print("(");
       
  5980 				return_type_symbol->accept(*this);
       
  5981 				s4o.print(")real_to_time(");
       
  5982 				IN_param_value->accept(*this);
       
  5983 				s4o.print(")");
       
  5984 				return NULL;
       
  5985 				
       
  5986 			}
       
  5987 			
       
  5988 			ERROR;
       
  5989 		}
       
  5990 		
       
  5991 	}/*function_tod_to_ulint*/
       
  5992 	break;
       
  5993 
       
  5994 /****
       
  5995  *TOD_TO_BOOL
       
  5996  */
       
  5997 	case function_tod_to_bool :
       
  5998 	{
       
  5999 		symbol_c *last_type_symbol = NULL;
       
  6000 
       
  6001 		{
       
  6002 			identifier_c param_name("IN");
       
  6003 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6004 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6005 			
       
  6006 			/* Get the value from a foo(<param_value>) style call */
       
  6007 			if (IN_param_value == NULL)
       
  6008 			  IN_param_value = function_call_param_iterator.next();
       
  6009 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6010 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6011 			
       
  6012 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  6013 			{
       
  6014 		
       
  6015 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6016 				s4o.print("(");
       
  6017 				return_type_symbol->accept(*this);
       
  6018 				s4o.print(")real_to_time(");
       
  6019 				IN_param_value->accept(*this);
       
  6020 				s4o.print(")");
       
  6021 				return NULL;
       
  6022 				
       
  6023 			}
       
  6024 			
       
  6025 			ERROR;
       
  6026 		}
       
  6027 		
       
  6028 	}/*function_tod_to_bool*/
       
  6029 	break;
       
  6030 
       
  6031 /****
       
  6032  *TOD_TO_TIME
       
  6033  */
       
  6034 	case function_tod_to_time :
       
  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(tod_type_name_c))
       
  6050 			{
       
  6051 		
       
  6052 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6053 				s4o.print("#error TOD_TO_TIME not implemented!");
       
  6054 				return NULL;
       
  6055 				
       
  6056 			}
       
  6057 			
       
  6058 			ERROR;
       
  6059 		}
       
  6060 		
       
  6061 	}/*function_tod_to_time*/
       
  6062 	break;
       
  6063 
       
  6064 /****
       
  6065  *TOD_TO_INT
       
  6066  */
       
  6067 	case function_tod_to_int :
       
  6068 	{
       
  6069 		symbol_c *last_type_symbol = NULL;
       
  6070 
       
  6071 		{
       
  6072 			identifier_c param_name("IN");
       
  6073 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6074 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6075 			
       
  6076 			/* Get the value from a foo(<param_value>) style call */
       
  6077 			if (IN_param_value == NULL)
       
  6078 			  IN_param_value = function_call_param_iterator.next();
       
  6079 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6080 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6081 			
       
  6082 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  6083 			{
       
  6084 		
       
  6085 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6086 				s4o.print("(");
       
  6087 				return_type_symbol->accept(*this);
       
  6088 				s4o.print(")real_to_time(");
       
  6089 				IN_param_value->accept(*this);
       
  6090 				s4o.print(")");
       
  6091 				return NULL;
       
  6092 				
       
  6093 			}
       
  6094 			
       
  6095 			ERROR;
       
  6096 		}
       
  6097 		
       
  6098 	}/*function_tod_to_int*/
       
  6099 	break;
       
  6100 
       
  6101 /****
       
  6102  *UDINT_TO_REAL
       
  6103  */
       
  6104 	case function_udint_to_real :
       
  6105 	{
       
  6106 		symbol_c *last_type_symbol = NULL;
       
  6107 
       
  6108 		{
       
  6109 			identifier_c param_name("IN");
       
  6110 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6111 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6112 			
       
  6113 			/* Get the value from a foo(<param_value>) style call */
       
  6114 			if (IN_param_value == NULL)
       
  6115 			  IN_param_value = function_call_param_iterator.next();
       
  6116 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6117 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6118 			
       
  6119 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6120 			{
       
  6121 		
       
  6122 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6123 				s4o.print("(");
       
  6124 				return_type_symbol->accept(*this);
       
  6125 				s4o.print(")");
       
  6126 				IN_param_value->accept(*this);
       
  6127 				return NULL;
       
  6128 				
       
  6129 			}
       
  6130 			
       
  6131 			ERROR;
       
  6132 		}
       
  6133 		
       
  6134 	}/*function_udint_to_real*/
       
  6135 	break;
       
  6136 
       
  6137 /****
       
  6138  *UDINT_TO_SINT
       
  6139  */
       
  6140 	case function_udint_to_sint :
       
  6141 	{
       
  6142 		symbol_c *last_type_symbol = NULL;
       
  6143 
       
  6144 		{
       
  6145 			identifier_c param_name("IN");
       
  6146 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6147 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6148 			
       
  6149 			/* Get the value from a foo(<param_value>) style call */
       
  6150 			if (IN_param_value == NULL)
       
  6151 			  IN_param_value = function_call_param_iterator.next();
       
  6152 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6153 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6154 			
       
  6155 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6156 			{
       
  6157 		
       
  6158 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6159 				s4o.print("(");
       
  6160 				return_type_symbol->accept(*this);
       
  6161 				s4o.print(")");
       
  6162 				IN_param_value->accept(*this);
       
  6163 				return NULL;
       
  6164 				
       
  6165 			}
       
  6166 			
       
  6167 			ERROR;
       
  6168 		}
       
  6169 		
       
  6170 	}/*function_udint_to_sint*/
       
  6171 	break;
       
  6172 
       
  6173 /****
       
  6174  *UDINT_TO_LINT
       
  6175  */
       
  6176 	case function_udint_to_lint :
       
  6177 	{
       
  6178 		symbol_c *last_type_symbol = NULL;
       
  6179 
       
  6180 		{
       
  6181 			identifier_c param_name("IN");
       
  6182 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6183 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6184 			
       
  6185 			/* Get the value from a foo(<param_value>) style call */
       
  6186 			if (IN_param_value == NULL)
       
  6187 			  IN_param_value = function_call_param_iterator.next();
       
  6188 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6189 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6190 			
       
  6191 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6192 			{
       
  6193 		
       
  6194 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6195 				s4o.print("(");
       
  6196 				return_type_symbol->accept(*this);
       
  6197 				s4o.print(")");
       
  6198 				IN_param_value->accept(*this);
       
  6199 				return NULL;
       
  6200 				
       
  6201 			}
       
  6202 			
       
  6203 			ERROR;
       
  6204 		}
       
  6205 		
       
  6206 	}/*function_udint_to_lint*/
       
  6207 	break;
       
  6208 
       
  6209 /****
       
  6210  *UDINT_TO_DINT
       
  6211  */
       
  6212 	case function_udint_to_dint :
       
  6213 	{
       
  6214 		symbol_c *last_type_symbol = NULL;
       
  6215 
       
  6216 		{
       
  6217 			identifier_c param_name("IN");
       
  6218 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6219 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6220 			
       
  6221 			/* Get the value from a foo(<param_value>) style call */
       
  6222 			if (IN_param_value == NULL)
       
  6223 			  IN_param_value = function_call_param_iterator.next();
       
  6224 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6225 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6226 			
       
  6227 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6228 			{
       
  6229 		
       
  6230 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6231 				s4o.print("(");
       
  6232 				return_type_symbol->accept(*this);
       
  6233 				s4o.print(")");
       
  6234 				IN_param_value->accept(*this);
       
  6235 				return NULL;
       
  6236 				
       
  6237 			}
       
  6238 			
       
  6239 			ERROR;
       
  6240 		}
       
  6241 		
       
  6242 	}/*function_udint_to_dint*/
       
  6243 	break;
       
  6244 
       
  6245 /****
       
  6246  *UDINT_TO_DATE
       
  6247  */
       
  6248 	case function_udint_to_date :
       
  6249 	{
       
  6250 		symbol_c *last_type_symbol = NULL;
       
  6251 
       
  6252 		{
       
  6253 			identifier_c param_name("IN");
       
  6254 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6255 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6256 			
       
  6257 			/* Get the value from a foo(<param_value>) style call */
       
  6258 			if (IN_param_value == NULL)
       
  6259 			  IN_param_value = function_call_param_iterator.next();
       
  6260 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6261 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6262 			
       
  6263 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6264 			{
       
  6265 		
       
  6266 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6267 				s4o.print("(");
       
  6268 				return_type_symbol->accept(*this);
       
  6269 				s4o.print(")time_to_real(");
       
  6270 				IN_param_value->accept(*this);
       
  6271 				s4o.print(")");
       
  6272 				return NULL;
       
  6273 				
       
  6274 			}
       
  6275 			
       
  6276 			ERROR;
       
  6277 		}
       
  6278 		
       
  6279 	}/*function_udint_to_date*/
       
  6280 	break;
       
  6281 
       
  6282 /****
       
  6283  *UDINT_TO_DWORD
       
  6284  */
       
  6285 	case function_udint_to_dword :
       
  6286 	{
       
  6287 		symbol_c *last_type_symbol = NULL;
       
  6288 
       
  6289 		{
       
  6290 			identifier_c param_name("IN");
       
  6291 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6292 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6293 			
       
  6294 			/* Get the value from a foo(<param_value>) style call */
       
  6295 			if (IN_param_value == NULL)
       
  6296 			  IN_param_value = function_call_param_iterator.next();
       
  6297 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6298 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6299 			
       
  6300 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6301 			{
       
  6302 		
       
  6303 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6304 				s4o.print("(");
       
  6305 				return_type_symbol->accept(*this);
       
  6306 				s4o.print(")");
       
  6307 				IN_param_value->accept(*this);
       
  6308 				return NULL;
       
  6309 				
       
  6310 			}
       
  6311 			
       
  6312 			ERROR;
       
  6313 		}
       
  6314 		
       
  6315 	}/*function_udint_to_dword*/
       
  6316 	break;
       
  6317 
       
  6318 /****
       
  6319  *UDINT_TO_DT
       
  6320  */
       
  6321 	case function_udint_to_dt :
       
  6322 	{
       
  6323 		symbol_c *last_type_symbol = NULL;
       
  6324 
       
  6325 		{
       
  6326 			identifier_c param_name("IN");
       
  6327 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6328 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6329 			
       
  6330 			/* Get the value from a foo(<param_value>) style call */
       
  6331 			if (IN_param_value == NULL)
       
  6332 			  IN_param_value = function_call_param_iterator.next();
       
  6333 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6334 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6335 			
       
  6336 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6337 			{
       
  6338 		
       
  6339 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6340 				s4o.print("(");
       
  6341 				return_type_symbol->accept(*this);
       
  6342 				s4o.print(")time_to_real(");
       
  6343 				IN_param_value->accept(*this);
       
  6344 				s4o.print(")");
       
  6345 				return NULL;
       
  6346 				
       
  6347 			}
       
  6348 			
       
  6349 			ERROR;
       
  6350 		}
       
  6351 		
       
  6352 	}/*function_udint_to_dt*/
       
  6353 	break;
       
  6354 
       
  6355 /****
       
  6356  *UDINT_TO_TOD
       
  6357  */
       
  6358 	case function_udint_to_tod :
       
  6359 	{
       
  6360 		symbol_c *last_type_symbol = NULL;
       
  6361 
       
  6362 		{
       
  6363 			identifier_c param_name("IN");
       
  6364 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6365 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6366 			
       
  6367 			/* Get the value from a foo(<param_value>) style call */
       
  6368 			if (IN_param_value == NULL)
       
  6369 			  IN_param_value = function_call_param_iterator.next();
       
  6370 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6371 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6372 			
       
  6373 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6374 			{
       
  6375 		
       
  6376 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6377 				s4o.print("(");
       
  6378 				return_type_symbol->accept(*this);
       
  6379 				s4o.print(")time_to_real(");
       
  6380 				IN_param_value->accept(*this);
       
  6381 				s4o.print(")");
       
  6382 				return NULL;
       
  6383 				
       
  6384 			}
       
  6385 			
       
  6386 			ERROR;
       
  6387 		}
       
  6388 		
       
  6389 	}/*function_udint_to_tod*/
       
  6390 	break;
       
  6391 
       
  6392 /****
       
  6393  *UDINT_TO_UDINT
       
  6394  */
       
  6395 	case function_udint_to_udint :
       
  6396 	{
       
  6397 		symbol_c *last_type_symbol = NULL;
       
  6398 
       
  6399 		{
       
  6400 			identifier_c param_name("IN");
       
  6401 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6402 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6403 			
       
  6404 			/* Get the value from a foo(<param_value>) style call */
       
  6405 			if (IN_param_value == NULL)
       
  6406 			  IN_param_value = function_call_param_iterator.next();
       
  6407 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6408 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6409 			
       
  6410 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6411 			{
       
  6412 		
       
  6413 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6414 				s4o.print("(");
       
  6415 				return_type_symbol->accept(*this);
       
  6416 				s4o.print(")");
       
  6417 				IN_param_value->accept(*this);
       
  6418 				return NULL;
       
  6419 				
       
  6420 			}
       
  6421 			
       
  6422 			ERROR;
       
  6423 		}
       
  6424 		
       
  6425 	}/*function_udint_to_udint*/
       
  6426 	break;
       
  6427 
       
  6428 /****
       
  6429  *UDINT_TO_WORD
       
  6430  */
       
  6431 	case function_udint_to_word :
       
  6432 	{
       
  6433 		symbol_c *last_type_symbol = NULL;
       
  6434 
       
  6435 		{
       
  6436 			identifier_c param_name("IN");
       
  6437 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6438 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6439 			
       
  6440 			/* Get the value from a foo(<param_value>) style call */
       
  6441 			if (IN_param_value == NULL)
       
  6442 			  IN_param_value = function_call_param_iterator.next();
       
  6443 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6444 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6445 			
       
  6446 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6447 			{
       
  6448 		
       
  6449 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6450 				s4o.print("(");
       
  6451 				return_type_symbol->accept(*this);
       
  6452 				s4o.print(")");
       
  6453 				IN_param_value->accept(*this);
       
  6454 				return NULL;
       
  6455 				
       
  6456 			}
       
  6457 			
       
  6458 			ERROR;
       
  6459 		}
       
  6460 		
       
  6461 	}/*function_udint_to_word*/
       
  6462 	break;
       
  6463 
       
  6464 /****
       
  6465  *UDINT_TO_WSTRING
       
  6466  */
       
  6467 	case function_udint_to_wstring :
       
  6468 	{
       
  6469 		symbol_c *last_type_symbol = NULL;
       
  6470 
       
  6471 		{
       
  6472 			identifier_c param_name("IN");
       
  6473 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6474 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6475 			
       
  6476 			/* Get the value from a foo(<param_value>) style call */
       
  6477 			if (IN_param_value == NULL)
       
  6478 			  IN_param_value = function_call_param_iterator.next();
       
  6479 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6480 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6481 			
       
  6482 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6483 			{
       
  6484 		
       
  6485 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6486 				s4o.print("(");
       
  6487 				return_type_symbol->accept(*this);
       
  6488 				s4o.print(")string_to_int(");
       
  6489 				IN_param_value->accept(*this);
       
  6490 				s4o.print(", 10)");
       
  6491 				return NULL;
       
  6492 				
       
  6493 			}
       
  6494 			
       
  6495 			ERROR;
       
  6496 		}
       
  6497 		
       
  6498 	}/*function_udint_to_wstring*/
       
  6499 	break;
       
  6500 
       
  6501 /****
       
  6502  *UDINT_TO_STRING
       
  6503  */
       
  6504 	case function_udint_to_string :
       
  6505 	{
       
  6506 		symbol_c *last_type_symbol = NULL;
       
  6507 
       
  6508 		{
       
  6509 			identifier_c param_name("IN");
       
  6510 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6511 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6512 			
       
  6513 			/* Get the value from a foo(<param_value>) style call */
       
  6514 			if (IN_param_value == NULL)
       
  6515 			  IN_param_value = function_call_param_iterator.next();
       
  6516 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6517 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6518 			
       
  6519 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6520 			{
       
  6521 		
       
  6522 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6523 				s4o.print("(");
       
  6524 				return_type_symbol->accept(*this);
       
  6525 				s4o.print(")string_to_int(");
       
  6526 				IN_param_value->accept(*this);
       
  6527 				s4o.print(", 10)");
       
  6528 				return NULL;
       
  6529 				
       
  6530 			}
       
  6531 			
       
  6532 			ERROR;
       
  6533 		}
       
  6534 		
       
  6535 	}/*function_udint_to_string*/
       
  6536 	break;
       
  6537 
       
  6538 /****
       
  6539  *UDINT_TO_LWORD
       
  6540  */
       
  6541 	case function_udint_to_lword :
       
  6542 	{
       
  6543 		symbol_c *last_type_symbol = NULL;
       
  6544 
       
  6545 		{
       
  6546 			identifier_c param_name("IN");
       
  6547 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6548 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6549 			
       
  6550 			/* Get the value from a foo(<param_value>) style call */
       
  6551 			if (IN_param_value == NULL)
       
  6552 			  IN_param_value = function_call_param_iterator.next();
       
  6553 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6554 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6555 			
       
  6556 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6557 			{
       
  6558 		
       
  6559 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6560 				s4o.print("(");
       
  6561 				return_type_symbol->accept(*this);
       
  6562 				s4o.print(")");
       
  6563 				IN_param_value->accept(*this);
       
  6564 				return NULL;
       
  6565 				
       
  6566 			}
       
  6567 			
       
  6568 			ERROR;
       
  6569 		}
       
  6570 		
       
  6571 	}/*function_udint_to_lword*/
       
  6572 	break;
       
  6573 
       
  6574 /****
       
  6575  *UDINT_TO_UINT
       
  6576  */
       
  6577 	case function_udint_to_uint :
       
  6578 	{
       
  6579 		symbol_c *last_type_symbol = NULL;
       
  6580 
       
  6581 		{
       
  6582 			identifier_c param_name("IN");
       
  6583 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6584 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6585 			
       
  6586 			/* Get the value from a foo(<param_value>) style call */
       
  6587 			if (IN_param_value == NULL)
       
  6588 			  IN_param_value = function_call_param_iterator.next();
       
  6589 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6590 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6591 			
       
  6592 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6593 			{
       
  6594 		
       
  6595 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6596 				s4o.print("(");
       
  6597 				return_type_symbol->accept(*this);
       
  6598 				s4o.print(")");
       
  6599 				IN_param_value->accept(*this);
       
  6600 				return NULL;
       
  6601 				
       
  6602 			}
       
  6603 			
       
  6604 			ERROR;
       
  6605 		}
       
  6606 		
       
  6607 	}/*function_udint_to_uint*/
       
  6608 	break;
       
  6609 
       
  6610 /****
       
  6611  *UDINT_TO_LREAL
       
  6612  */
       
  6613 	case function_udint_to_lreal :
       
  6614 	{
       
  6615 		symbol_c *last_type_symbol = NULL;
       
  6616 
       
  6617 		{
       
  6618 			identifier_c param_name("IN");
       
  6619 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6620 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6621 			
       
  6622 			/* Get the value from a foo(<param_value>) style call */
       
  6623 			if (IN_param_value == NULL)
       
  6624 			  IN_param_value = function_call_param_iterator.next();
       
  6625 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6626 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6627 			
       
  6628 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6629 			{
       
  6630 		
       
  6631 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6632 				s4o.print("(");
       
  6633 				return_type_symbol->accept(*this);
       
  6634 				s4o.print(")");
       
  6635 				IN_param_value->accept(*this);
       
  6636 				return NULL;
       
  6637 				
       
  6638 			}
       
  6639 			
       
  6640 			ERROR;
       
  6641 		}
       
  6642 		
       
  6643 	}/*function_udint_to_lreal*/
       
  6644 	break;
       
  6645 
       
  6646 /****
       
  6647  *UDINT_TO_BYTE
       
  6648  */
       
  6649 	case function_udint_to_byte :
       
  6650 	{
       
  6651 		symbol_c *last_type_symbol = NULL;
       
  6652 
       
  6653 		{
       
  6654 			identifier_c param_name("IN");
       
  6655 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6656 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6657 			
       
  6658 			/* Get the value from a foo(<param_value>) style call */
       
  6659 			if (IN_param_value == NULL)
       
  6660 			  IN_param_value = function_call_param_iterator.next();
       
  6661 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6662 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6663 			
       
  6664 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6665 			{
       
  6666 		
       
  6667 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6668 				s4o.print("(");
       
  6669 				return_type_symbol->accept(*this);
       
  6670 				s4o.print(")");
       
  6671 				IN_param_value->accept(*this);
       
  6672 				return NULL;
       
  6673 				
       
  6674 			}
       
  6675 			
       
  6676 			ERROR;
       
  6677 		}
       
  6678 		
       
  6679 	}/*function_udint_to_byte*/
       
  6680 	break;
       
  6681 
       
  6682 /****
       
  6683  *UDINT_TO_USINT
       
  6684  */
       
  6685 	case function_udint_to_usint :
       
  6686 	{
       
  6687 		symbol_c *last_type_symbol = NULL;
       
  6688 
       
  6689 		{
       
  6690 			identifier_c param_name("IN");
       
  6691 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6692 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6693 			
       
  6694 			/* Get the value from a foo(<param_value>) style call */
       
  6695 			if (IN_param_value == NULL)
       
  6696 			  IN_param_value = function_call_param_iterator.next();
       
  6697 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6698 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6699 			
       
  6700 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6701 			{
       
  6702 		
       
  6703 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6704 				s4o.print("(");
       
  6705 				return_type_symbol->accept(*this);
       
  6706 				s4o.print(")");
       
  6707 				IN_param_value->accept(*this);
       
  6708 				return NULL;
       
  6709 				
       
  6710 			}
       
  6711 			
       
  6712 			ERROR;
       
  6713 		}
       
  6714 		
       
  6715 	}/*function_udint_to_usint*/
       
  6716 	break;
       
  6717 
       
  6718 /****
       
  6719  *UDINT_TO_ULINT
       
  6720  */
       
  6721 	case function_udint_to_ulint :
       
  6722 	{
       
  6723 		symbol_c *last_type_symbol = NULL;
       
  6724 
       
  6725 		{
       
  6726 			identifier_c param_name("IN");
       
  6727 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6728 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6729 			
       
  6730 			/* Get the value from a foo(<param_value>) style call */
       
  6731 			if (IN_param_value == NULL)
       
  6732 			  IN_param_value = function_call_param_iterator.next();
       
  6733 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6734 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6735 			
       
  6736 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6737 			{
       
  6738 		
       
  6739 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6740 				s4o.print("(");
       
  6741 				return_type_symbol->accept(*this);
       
  6742 				s4o.print(")");
       
  6743 				IN_param_value->accept(*this);
       
  6744 				return NULL;
       
  6745 				
       
  6746 			}
       
  6747 			
       
  6748 			ERROR;
       
  6749 		}
       
  6750 		
       
  6751 	}/*function_udint_to_ulint*/
       
  6752 	break;
       
  6753 
       
  6754 /****
       
  6755  *UDINT_TO_BOOL
       
  6756  */
       
  6757 	case function_udint_to_bool :
       
  6758 	{
       
  6759 		symbol_c *last_type_symbol = NULL;
       
  6760 
       
  6761 		{
       
  6762 			identifier_c param_name("IN");
       
  6763 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6764 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6765 			
       
  6766 			/* Get the value from a foo(<param_value>) style call */
       
  6767 			if (IN_param_value == NULL)
       
  6768 			  IN_param_value = function_call_param_iterator.next();
       
  6769 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6770 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6771 			
       
  6772 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6773 			{
       
  6774 		
       
  6775 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6776 				s4o.print("(");
       
  6777 				return_type_symbol->accept(*this);
       
  6778 				s4o.print(")");
       
  6779 				IN_param_value->accept(*this);
       
  6780 				return NULL;
       
  6781 				
       
  6782 			}
       
  6783 			
       
  6784 			ERROR;
       
  6785 		}
       
  6786 		
       
  6787 	}/*function_udint_to_bool*/
       
  6788 	break;
       
  6789 
       
  6790 /****
       
  6791  *UDINT_TO_TIME
       
  6792  */
       
  6793 	case function_udint_to_time :
       
  6794 	{
       
  6795 		symbol_c *last_type_symbol = NULL;
       
  6796 
       
  6797 		{
       
  6798 			identifier_c param_name("IN");
       
  6799 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6800 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6801 			
       
  6802 			/* Get the value from a foo(<param_value>) style call */
       
  6803 			if (IN_param_value == NULL)
       
  6804 			  IN_param_value = function_call_param_iterator.next();
       
  6805 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6806 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6807 			
       
  6808 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6809 			{
       
  6810 		
       
  6811 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6812 				s4o.print("(");
       
  6813 				return_type_symbol->accept(*this);
       
  6814 				s4o.print(")time_to_real(");
       
  6815 				IN_param_value->accept(*this);
       
  6816 				s4o.print(")");
       
  6817 				return NULL;
       
  6818 				
       
  6819 			}
       
  6820 			
       
  6821 			ERROR;
       
  6822 		}
       
  6823 		
       
  6824 	}/*function_udint_to_time*/
       
  6825 	break;
       
  6826 
       
  6827 /****
       
  6828  *UDINT_TO_INT
       
  6829  */
       
  6830 	case function_udint_to_int :
       
  6831 	{
       
  6832 		symbol_c *last_type_symbol = NULL;
       
  6833 
       
  6834 		{
       
  6835 			identifier_c param_name("IN");
       
  6836 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6837 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6838 			
       
  6839 			/* Get the value from a foo(<param_value>) style call */
       
  6840 			if (IN_param_value == NULL)
       
  6841 			  IN_param_value = function_call_param_iterator.next();
       
  6842 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6843 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6844 			
       
  6845 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6846 			{
       
  6847 		
       
  6848 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6849 				s4o.print("(");
       
  6850 				return_type_symbol->accept(*this);
       
  6851 				s4o.print(")");
       
  6852 				IN_param_value->accept(*this);
       
  6853 				return NULL;
       
  6854 				
       
  6855 			}
       
  6856 			
       
  6857 			ERROR;
       
  6858 		}
       
  6859 		
       
  6860 	}/*function_udint_to_int*/
       
  6861 	break;
       
  6862 
       
  6863 /****
       
  6864  *WORD_TO_REAL
       
  6865  */
       
  6866 	case function_word_to_real :
       
  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(word_type_name_c))
       
  6882 			{
       
  6883 		
       
  6884 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6885 				s4o.print("(");
       
  6886 				return_type_symbol->accept(*this);
       
  6887 				s4o.print(")");
       
  6888 				IN_param_value->accept(*this);
       
  6889 				return NULL;
       
  6890 				
       
  6891 			}
       
  6892 			
       
  6893 			ERROR;
       
  6894 		}
       
  6895 		
       
  6896 	}/*function_word_to_real*/
       
  6897 	break;
       
  6898 
       
  6899 /****
       
  6900  *WORD_TO_SINT
       
  6901  */
       
  6902 	case function_word_to_sint :
       
  6903 	{
       
  6904 		symbol_c *last_type_symbol = NULL;
       
  6905 
       
  6906 		{
       
  6907 			identifier_c param_name("IN");
       
  6908 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6909 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6910 			
       
  6911 			/* Get the value from a foo(<param_value>) style call */
       
  6912 			if (IN_param_value == NULL)
       
  6913 			  IN_param_value = function_call_param_iterator.next();
       
  6914 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6915 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6916 			
       
  6917 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6918 			{
       
  6919 		
       
  6920 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6921 				s4o.print("(");
       
  6922 				return_type_symbol->accept(*this);
       
  6923 				s4o.print(")");
       
  6924 				IN_param_value->accept(*this);
       
  6925 				return NULL;
       
  6926 				
       
  6927 			}
       
  6928 			
       
  6929 			ERROR;
       
  6930 		}
       
  6931 		
       
  6932 	}/*function_word_to_sint*/
       
  6933 	break;
       
  6934 
       
  6935 /****
       
  6936  *WORD_TO_LINT
       
  6937  */
       
  6938 	case function_word_to_lint :
       
  6939 	{
       
  6940 		symbol_c *last_type_symbol = NULL;
       
  6941 
       
  6942 		{
       
  6943 			identifier_c param_name("IN");
       
  6944 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6945 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6946 			
       
  6947 			/* Get the value from a foo(<param_value>) style call */
       
  6948 			if (IN_param_value == NULL)
       
  6949 			  IN_param_value = function_call_param_iterator.next();
       
  6950 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6951 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6952 			
       
  6953 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6954 			{
       
  6955 		
       
  6956 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6957 				s4o.print("(");
       
  6958 				return_type_symbol->accept(*this);
       
  6959 				s4o.print(")");
       
  6960 				IN_param_value->accept(*this);
       
  6961 				return NULL;
       
  6962 				
       
  6963 			}
       
  6964 			
       
  6965 			ERROR;
       
  6966 		}
       
  6967 		
       
  6968 	}/*function_word_to_lint*/
       
  6969 	break;
       
  6970 
       
  6971 /****
       
  6972  *WORD_TO_DINT
       
  6973  */
       
  6974 	case function_word_to_dint :
       
  6975 	{
       
  6976 		symbol_c *last_type_symbol = NULL;
       
  6977 
       
  6978 		{
       
  6979 			identifier_c param_name("IN");
       
  6980 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6981 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6982 			
       
  6983 			/* Get the value from a foo(<param_value>) style call */
       
  6984 			if (IN_param_value == NULL)
       
  6985 			  IN_param_value = function_call_param_iterator.next();
       
  6986 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6987 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6988 			
       
  6989 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  6990 			{
       
  6991 		
       
  6992 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6993 				s4o.print("(");
       
  6994 				return_type_symbol->accept(*this);
       
  6995 				s4o.print(")");
       
  6996 				IN_param_value->accept(*this);
       
  6997 				return NULL;
       
  6998 				
       
  6999 			}
       
  7000 			
       
  7001 			ERROR;
       
  7002 		}
       
  7003 		
       
  7004 	}/*function_word_to_dint*/
       
  7005 	break;
       
  7006 
       
  7007 /****
       
  7008  *WORD_TO_DATE
       
  7009  */
       
  7010 	case function_word_to_date :
       
  7011 	{
       
  7012 		symbol_c *last_type_symbol = NULL;
       
  7013 
       
  7014 		{
       
  7015 			identifier_c param_name("IN");
       
  7016 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7017 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7018 			
       
  7019 			/* Get the value from a foo(<param_value>) style call */
       
  7020 			if (IN_param_value == NULL)
       
  7021 			  IN_param_value = function_call_param_iterator.next();
       
  7022 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7023 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7024 			
       
  7025 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7026 			{
       
  7027 		
       
  7028 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7029 				s4o.print("(");
       
  7030 				return_type_symbol->accept(*this);
       
  7031 				s4o.print(")time_to_real(");
       
  7032 				IN_param_value->accept(*this);
       
  7033 				s4o.print(")");
       
  7034 				return NULL;
       
  7035 				
       
  7036 			}
       
  7037 			
       
  7038 			ERROR;
       
  7039 		}
       
  7040 		
       
  7041 	}/*function_word_to_date*/
       
  7042 	break;
       
  7043 
       
  7044 /****
       
  7045  *WORD_TO_DWORD
       
  7046  */
       
  7047 	case function_word_to_dword :
       
  7048 	{
       
  7049 		symbol_c *last_type_symbol = NULL;
       
  7050 
       
  7051 		{
       
  7052 			identifier_c param_name("IN");
       
  7053 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7054 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7055 			
       
  7056 			/* Get the value from a foo(<param_value>) style call */
       
  7057 			if (IN_param_value == NULL)
       
  7058 			  IN_param_value = function_call_param_iterator.next();
       
  7059 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7060 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7061 			
       
  7062 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7063 			{
       
  7064 		
       
  7065 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7066 				s4o.print("(");
       
  7067 				return_type_symbol->accept(*this);
       
  7068 				s4o.print(")");
       
  7069 				IN_param_value->accept(*this);
       
  7070 				return NULL;
       
  7071 				
       
  7072 			}
       
  7073 			
       
  7074 			ERROR;
       
  7075 		}
       
  7076 		
       
  7077 	}/*function_word_to_dword*/
       
  7078 	break;
       
  7079 
       
  7080 /****
       
  7081  *WORD_TO_DT
       
  7082  */
       
  7083 	case function_word_to_dt :
       
  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(word_type_name_c))
       
  7099 			{
       
  7100 		
       
  7101 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7102 				s4o.print("(");
       
  7103 				return_type_symbol->accept(*this);
       
  7104 				s4o.print(")time_to_real(");
       
  7105 				IN_param_value->accept(*this);
       
  7106 				s4o.print(")");
       
  7107 				return NULL;
       
  7108 				
       
  7109 			}
       
  7110 			
       
  7111 			ERROR;
       
  7112 		}
       
  7113 		
       
  7114 	}/*function_word_to_dt*/
       
  7115 	break;
       
  7116 
       
  7117 /****
       
  7118  *WORD_TO_TOD
       
  7119  */
       
  7120 	case function_word_to_tod :
       
  7121 	{
       
  7122 		symbol_c *last_type_symbol = NULL;
       
  7123 
       
  7124 		{
       
  7125 			identifier_c param_name("IN");
       
  7126 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7127 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7128 			
       
  7129 			/* Get the value from a foo(<param_value>) style call */
       
  7130 			if (IN_param_value == NULL)
       
  7131 			  IN_param_value = function_call_param_iterator.next();
       
  7132 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7133 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7134 			
       
  7135 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7136 			{
       
  7137 		
       
  7138 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7139 				s4o.print("(");
       
  7140 				return_type_symbol->accept(*this);
       
  7141 				s4o.print(")time_to_real(");
       
  7142 				IN_param_value->accept(*this);
       
  7143 				s4o.print(")");
       
  7144 				return NULL;
       
  7145 				
       
  7146 			}
       
  7147 			
       
  7148 			ERROR;
       
  7149 		}
       
  7150 		
       
  7151 	}/*function_word_to_tod*/
       
  7152 	break;
       
  7153 
       
  7154 /****
       
  7155  *WORD_TO_UDINT
       
  7156  */
       
  7157 	case function_word_to_udint :
       
  7158 	{
       
  7159 		symbol_c *last_type_symbol = NULL;
       
  7160 
       
  7161 		{
       
  7162 			identifier_c param_name("IN");
       
  7163 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7164 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7165 			
       
  7166 			/* Get the value from a foo(<param_value>) style call */
       
  7167 			if (IN_param_value == NULL)
       
  7168 			  IN_param_value = function_call_param_iterator.next();
       
  7169 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7170 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7171 			
       
  7172 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7173 			{
       
  7174 		
       
  7175 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7176 				s4o.print("(");
       
  7177 				return_type_symbol->accept(*this);
       
  7178 				s4o.print(")");
       
  7179 				IN_param_value->accept(*this);
       
  7180 				return NULL;
       
  7181 				
       
  7182 			}
       
  7183 			
       
  7184 			ERROR;
       
  7185 		}
       
  7186 		
       
  7187 	}/*function_word_to_udint*/
       
  7188 	break;
       
  7189 
       
  7190 /****
       
  7191  *WORD_TO_WORD
       
  7192  */
       
  7193 	case function_word_to_word :
       
  7194 	{
       
  7195 		symbol_c *last_type_symbol = NULL;
       
  7196 
       
  7197 		{
       
  7198 			identifier_c param_name("IN");
       
  7199 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7200 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7201 			
       
  7202 			/* Get the value from a foo(<param_value>) style call */
       
  7203 			if (IN_param_value == NULL)
       
  7204 			  IN_param_value = function_call_param_iterator.next();
       
  7205 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7206 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7207 			
       
  7208 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7209 			{
       
  7210 		
       
  7211 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7212 				s4o.print("(");
       
  7213 				return_type_symbol->accept(*this);
       
  7214 				s4o.print(")");
       
  7215 				IN_param_value->accept(*this);
       
  7216 				return NULL;
       
  7217 				
       
  7218 			}
       
  7219 			
       
  7220 			ERROR;
       
  7221 		}
       
  7222 		
       
  7223 	}/*function_word_to_word*/
       
  7224 	break;
       
  7225 
       
  7226 /****
       
  7227  *WORD_TO_WSTRING
       
  7228  */
       
  7229 	case function_word_to_wstring :
       
  7230 	{
       
  7231 		symbol_c *last_type_symbol = NULL;
       
  7232 
       
  7233 		{
       
  7234 			identifier_c param_name("IN");
       
  7235 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7236 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7237 			
       
  7238 			/* Get the value from a foo(<param_value>) style call */
       
  7239 			if (IN_param_value == NULL)
       
  7240 			  IN_param_value = function_call_param_iterator.next();
       
  7241 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7242 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7243 			
       
  7244 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7245 			{
       
  7246 		
       
  7247 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7248 				s4o.print("(");
       
  7249 				return_type_symbol->accept(*this);
       
  7250 				s4o.print(")string_to_int(");
       
  7251 				IN_param_value->accept(*this);
       
  7252 				s4o.print(", 16)");
       
  7253 				return NULL;
       
  7254 				
       
  7255 			}
       
  7256 			
       
  7257 			ERROR;
       
  7258 		}
       
  7259 		
       
  7260 	}/*function_word_to_wstring*/
       
  7261 	break;
       
  7262 
       
  7263 /****
       
  7264  *WORD_TO_STRING
       
  7265  */
       
  7266 	case function_word_to_string :
       
  7267 	{
       
  7268 		symbol_c *last_type_symbol = NULL;
       
  7269 
       
  7270 		{
       
  7271 			identifier_c param_name("IN");
       
  7272 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7273 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7274 			
       
  7275 			/* Get the value from a foo(<param_value>) style call */
       
  7276 			if (IN_param_value == NULL)
       
  7277 			  IN_param_value = function_call_param_iterator.next();
       
  7278 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7279 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7280 			
       
  7281 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7282 			{
       
  7283 		
       
  7284 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7285 				s4o.print("(");
       
  7286 				return_type_symbol->accept(*this);
       
  7287 				s4o.print(")string_to_int(");
       
  7288 				IN_param_value->accept(*this);
       
  7289 				s4o.print(", 16)");
       
  7290 				return NULL;
       
  7291 				
       
  7292 			}
       
  7293 			
       
  7294 			ERROR;
       
  7295 		}
       
  7296 		
       
  7297 	}/*function_word_to_string*/
       
  7298 	break;
       
  7299 
       
  7300 /****
       
  7301  *WORD_TO_LWORD
       
  7302  */
       
  7303 	case function_word_to_lword :
       
  7304 	{
       
  7305 		symbol_c *last_type_symbol = NULL;
       
  7306 
       
  7307 		{
       
  7308 			identifier_c param_name("IN");
       
  7309 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7310 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7311 			
       
  7312 			/* Get the value from a foo(<param_value>) style call */
       
  7313 			if (IN_param_value == NULL)
       
  7314 			  IN_param_value = function_call_param_iterator.next();
       
  7315 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7316 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7317 			
       
  7318 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7319 			{
       
  7320 		
       
  7321 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7322 				s4o.print("(");
       
  7323 				return_type_symbol->accept(*this);
       
  7324 				s4o.print(")");
       
  7325 				IN_param_value->accept(*this);
       
  7326 				return NULL;
       
  7327 				
       
  7328 			}
       
  7329 			
       
  7330 			ERROR;
       
  7331 		}
       
  7332 		
       
  7333 	}/*function_word_to_lword*/
       
  7334 	break;
       
  7335 
       
  7336 /****
       
  7337  *WORD_TO_UINT
       
  7338  */
       
  7339 	case function_word_to_uint :
       
  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(word_type_name_c))
       
  7355 			{
       
  7356 		
       
  7357 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7358 				s4o.print("(");
       
  7359 				return_type_symbol->accept(*this);
       
  7360 				s4o.print(")");
       
  7361 				IN_param_value->accept(*this);
       
  7362 				return NULL;
       
  7363 				
       
  7364 			}
       
  7365 			
       
  7366 			ERROR;
       
  7367 		}
       
  7368 		
       
  7369 	}/*function_word_to_uint*/
       
  7370 	break;
       
  7371 
       
  7372 /****
       
  7373  *WORD_TO_LREAL
       
  7374  */
       
  7375 	case function_word_to_lreal :
       
  7376 	{
       
  7377 		symbol_c *last_type_symbol = NULL;
       
  7378 
       
  7379 		{
       
  7380 			identifier_c param_name("IN");
       
  7381 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7382 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7383 			
       
  7384 			/* Get the value from a foo(<param_value>) style call */
       
  7385 			if (IN_param_value == NULL)
       
  7386 			  IN_param_value = function_call_param_iterator.next();
       
  7387 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7388 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7389 			
       
  7390 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7391 			{
       
  7392 		
       
  7393 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7394 				s4o.print("(");
       
  7395 				return_type_symbol->accept(*this);
       
  7396 				s4o.print(")");
       
  7397 				IN_param_value->accept(*this);
       
  7398 				return NULL;
       
  7399 				
       
  7400 			}
       
  7401 			
       
  7402 			ERROR;
       
  7403 		}
       
  7404 		
       
  7405 	}/*function_word_to_lreal*/
       
  7406 	break;
       
  7407 
       
  7408 /****
       
  7409  *WORD_TO_BYTE
       
  7410  */
       
  7411 	case function_word_to_byte :
       
  7412 	{
       
  7413 		symbol_c *last_type_symbol = NULL;
       
  7414 
       
  7415 		{
       
  7416 			identifier_c param_name("IN");
       
  7417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7419 			
       
  7420 			/* Get the value from a foo(<param_value>) style call */
       
  7421 			if (IN_param_value == NULL)
       
  7422 			  IN_param_value = function_call_param_iterator.next();
       
  7423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7424 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7425 			
       
  7426 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7427 			{
       
  7428 		
       
  7429 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7430 				s4o.print("(");
       
  7431 				return_type_symbol->accept(*this);
       
  7432 				s4o.print(")");
       
  7433 				IN_param_value->accept(*this);
       
  7434 				return NULL;
       
  7435 				
       
  7436 			}
       
  7437 			
       
  7438 			ERROR;
       
  7439 		}
       
  7440 		
       
  7441 	}/*function_word_to_byte*/
       
  7442 	break;
       
  7443 
       
  7444 /****
       
  7445  *WORD_TO_USINT
       
  7446  */
       
  7447 	case function_word_to_usint :
       
  7448 	{
       
  7449 		symbol_c *last_type_symbol = NULL;
       
  7450 
       
  7451 		{
       
  7452 			identifier_c param_name("IN");
       
  7453 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7454 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7455 			
       
  7456 			/* Get the value from a foo(<param_value>) style call */
       
  7457 			if (IN_param_value == NULL)
       
  7458 			  IN_param_value = function_call_param_iterator.next();
       
  7459 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7460 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7461 			
       
  7462 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7463 			{
       
  7464 		
       
  7465 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7466 				s4o.print("(");
       
  7467 				return_type_symbol->accept(*this);
       
  7468 				s4o.print(")");
       
  7469 				IN_param_value->accept(*this);
       
  7470 				return NULL;
       
  7471 				
       
  7472 			}
       
  7473 			
       
  7474 			ERROR;
       
  7475 		}
       
  7476 		
       
  7477 	}/*function_word_to_usint*/
       
  7478 	break;
       
  7479 
       
  7480 /****
       
  7481  *WORD_TO_ULINT
       
  7482  */
       
  7483 	case function_word_to_ulint :
       
  7484 	{
       
  7485 		symbol_c *last_type_symbol = NULL;
       
  7486 
       
  7487 		{
       
  7488 			identifier_c param_name("IN");
       
  7489 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7490 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7491 			
       
  7492 			/* Get the value from a foo(<param_value>) style call */
       
  7493 			if (IN_param_value == NULL)
       
  7494 			  IN_param_value = function_call_param_iterator.next();
       
  7495 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7496 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7497 			
       
  7498 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7499 			{
       
  7500 		
       
  7501 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7502 				s4o.print("(");
       
  7503 				return_type_symbol->accept(*this);
       
  7504 				s4o.print(")");
       
  7505 				IN_param_value->accept(*this);
       
  7506 				return NULL;
       
  7507 				
       
  7508 			}
       
  7509 			
       
  7510 			ERROR;
       
  7511 		}
       
  7512 		
       
  7513 	}/*function_word_to_ulint*/
       
  7514 	break;
       
  7515 
       
  7516 /****
       
  7517  *WORD_TO_BOOL
       
  7518  */
       
  7519 	case function_word_to_bool :
       
  7520 	{
       
  7521 		symbol_c *last_type_symbol = NULL;
       
  7522 
       
  7523 		{
       
  7524 			identifier_c param_name("IN");
       
  7525 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7526 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7527 			
       
  7528 			/* Get the value from a foo(<param_value>) style call */
       
  7529 			if (IN_param_value == NULL)
       
  7530 			  IN_param_value = function_call_param_iterator.next();
       
  7531 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7532 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7533 			
       
  7534 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7535 			{
       
  7536 		
       
  7537 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7538 				s4o.print("(");
       
  7539 				return_type_symbol->accept(*this);
       
  7540 				s4o.print(")");
       
  7541 				IN_param_value->accept(*this);
       
  7542 				return NULL;
       
  7543 				
       
  7544 			}
       
  7545 			
       
  7546 			ERROR;
       
  7547 		}
       
  7548 		
       
  7549 	}/*function_word_to_bool*/
       
  7550 	break;
       
  7551 
       
  7552 /****
       
  7553  *WORD_TO_TIME
       
  7554  */
       
  7555 	case function_word_to_time :
       
  7556 	{
       
  7557 		symbol_c *last_type_symbol = NULL;
       
  7558 
       
  7559 		{
       
  7560 			identifier_c param_name("IN");
       
  7561 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7562 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7563 			
       
  7564 			/* Get the value from a foo(<param_value>) style call */
       
  7565 			if (IN_param_value == NULL)
       
  7566 			  IN_param_value = function_call_param_iterator.next();
       
  7567 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7568 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7569 			
       
  7570 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7571 			{
       
  7572 		
       
  7573 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7574 				s4o.print("(");
       
  7575 				return_type_symbol->accept(*this);
       
  7576 				s4o.print(")time_to_real(");
       
  7577 				IN_param_value->accept(*this);
       
  7578 				s4o.print(")");
       
  7579 				return NULL;
       
  7580 				
       
  7581 			}
       
  7582 			
       
  7583 			ERROR;
       
  7584 		}
       
  7585 		
       
  7586 	}/*function_word_to_time*/
       
  7587 	break;
       
  7588 
       
  7589 /****
       
  7590  *WORD_TO_INT
       
  7591  */
       
  7592 	case function_word_to_int :
       
  7593 	{
       
  7594 		symbol_c *last_type_symbol = NULL;
       
  7595 
       
  7596 		{
       
  7597 			identifier_c param_name("IN");
       
  7598 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7599 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7600 			
       
  7601 			/* Get the value from a foo(<param_value>) style call */
       
  7602 			if (IN_param_value == NULL)
       
  7603 			  IN_param_value = function_call_param_iterator.next();
       
  7604 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7605 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7606 			
       
  7607 			if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7608 			{
       
  7609 		
       
  7610 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7611 				s4o.print("(");
       
  7612 				return_type_symbol->accept(*this);
       
  7613 				s4o.print(")");
       
  7614 				IN_param_value->accept(*this);
       
  7615 				return NULL;
       
  7616 				
       
  7617 			}
       
  7618 			
       
  7619 			ERROR;
       
  7620 		}
       
  7621 		
       
  7622 	}/*function_word_to_int*/
       
  7623 	break;
       
  7624 
       
  7625 /****
       
  7626  *WSTRING_TO_REAL
       
  7627  */
       
  7628 	case function_wstring_to_real :
       
  7629 	{
       
  7630 		symbol_c *last_type_symbol = NULL;
       
  7631 
       
  7632 		{
       
  7633 			identifier_c param_name("IN");
       
  7634 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7635 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7636 			
       
  7637 			/* Get the value from a foo(<param_value>) style call */
       
  7638 			if (IN_param_value == NULL)
       
  7639 			  IN_param_value = function_call_param_iterator.next();
       
  7640 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7641 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7642 			
       
  7643 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7644 			{
       
  7645 		
       
  7646 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7647 				s4o.print("(");
       
  7648 				return_type_symbol->accept(*this);
       
  7649 				s4o.print(")int_to_string(");
       
  7650 				IN_param_value->accept(*this);
       
  7651 				s4o.print(", 10)");
       
  7652 				return NULL;
       
  7653 				
       
  7654 			}
       
  7655 			
       
  7656 			ERROR;
       
  7657 		}
       
  7658 		
       
  7659 	}/*function_wstring_to_real*/
       
  7660 	break;
       
  7661 
       
  7662 /****
       
  7663  *WSTRING_TO_SINT
       
  7664  */
       
  7665 	case function_wstring_to_sint :
       
  7666 	{
       
  7667 		symbol_c *last_type_symbol = NULL;
       
  7668 
       
  7669 		{
       
  7670 			identifier_c param_name("IN");
       
  7671 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7672 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7673 			
       
  7674 			/* Get the value from a foo(<param_value>) style call */
       
  7675 			if (IN_param_value == NULL)
       
  7676 			  IN_param_value = function_call_param_iterator.next();
       
  7677 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7678 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7679 			
       
  7680 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7681 			{
       
  7682 		
       
  7683 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7684 				s4o.print("(");
       
  7685 				return_type_symbol->accept(*this);
       
  7686 				s4o.print(")int_to_string(");
       
  7687 				IN_param_value->accept(*this);
       
  7688 				s4o.print(", 10)");
       
  7689 				return NULL;
       
  7690 				
       
  7691 			}
       
  7692 			
       
  7693 			ERROR;
       
  7694 		}
       
  7695 		
       
  7696 	}/*function_wstring_to_sint*/
       
  7697 	break;
       
  7698 
       
  7699 /****
       
  7700  *WSTRING_TO_LINT
       
  7701  */
       
  7702 	case function_wstring_to_lint :
       
  7703 	{
       
  7704 		symbol_c *last_type_symbol = NULL;
       
  7705 
       
  7706 		{
       
  7707 			identifier_c param_name("IN");
       
  7708 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7709 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7710 			
       
  7711 			/* Get the value from a foo(<param_value>) style call */
       
  7712 			if (IN_param_value == NULL)
       
  7713 			  IN_param_value = function_call_param_iterator.next();
       
  7714 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7715 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7716 			
       
  7717 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7718 			{
       
  7719 		
       
  7720 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7721 				s4o.print("(");
       
  7722 				return_type_symbol->accept(*this);
       
  7723 				s4o.print(")int_to_string(");
       
  7724 				IN_param_value->accept(*this);
       
  7725 				s4o.print(", 10)");
       
  7726 				return NULL;
       
  7727 				
       
  7728 			}
       
  7729 			
       
  7730 			ERROR;
       
  7731 		}
       
  7732 		
       
  7733 	}/*function_wstring_to_lint*/
       
  7734 	break;
       
  7735 
       
  7736 /****
       
  7737  *WSTRING_TO_DINT
       
  7738  */
       
  7739 	case function_wstring_to_dint :
       
  7740 	{
       
  7741 		symbol_c *last_type_symbol = NULL;
       
  7742 
       
  7743 		{
       
  7744 			identifier_c param_name("IN");
       
  7745 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7746 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7747 			
       
  7748 			/* Get the value from a foo(<param_value>) style call */
       
  7749 			if (IN_param_value == NULL)
       
  7750 			  IN_param_value = function_call_param_iterator.next();
       
  7751 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7752 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7753 			
       
  7754 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7755 			{
       
  7756 		
       
  7757 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7758 				s4o.print("(");
       
  7759 				return_type_symbol->accept(*this);
       
  7760 				s4o.print(")int_to_string(");
       
  7761 				IN_param_value->accept(*this);
       
  7762 				s4o.print(", 10)");
       
  7763 				return NULL;
       
  7764 				
       
  7765 			}
       
  7766 			
       
  7767 			ERROR;
       
  7768 		}
       
  7769 		
       
  7770 	}/*function_wstring_to_dint*/
       
  7771 	break;
       
  7772 
       
  7773 /****
       
  7774  *WSTRING_TO_DATE
       
  7775  */
       
  7776 	case function_wstring_to_date :
       
  7777 	{
       
  7778 		symbol_c *last_type_symbol = NULL;
       
  7779 
       
  7780 		{
       
  7781 			identifier_c param_name("IN");
       
  7782 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7783 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7784 			
       
  7785 			/* Get the value from a foo(<param_value>) style call */
       
  7786 			if (IN_param_value == NULL)
       
  7787 			  IN_param_value = function_call_param_iterator.next();
       
  7788 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7789 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7790 			
       
  7791 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7792 			{
       
  7793 		
       
  7794 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7795 				s4o.print("(");
       
  7796 				return_type_symbol->accept(*this);
       
  7797 				s4o.print(")time_to_string(");
       
  7798 				IN_param_value->accept(*this);
       
  7799 				s4o.print(")");
       
  7800 				return NULL;
       
  7801 				
       
  7802 			}
       
  7803 			
       
  7804 			ERROR;
       
  7805 		}
       
  7806 		
       
  7807 	}/*function_wstring_to_date*/
       
  7808 	break;
       
  7809 
       
  7810 /****
       
  7811  *WSTRING_TO_DWORD
       
  7812  */
       
  7813 	case function_wstring_to_dword :
       
  7814 	{
       
  7815 		symbol_c *last_type_symbol = NULL;
       
  7816 
       
  7817 		{
       
  7818 			identifier_c param_name("IN");
       
  7819 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7820 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7821 			
       
  7822 			/* Get the value from a foo(<param_value>) style call */
       
  7823 			if (IN_param_value == NULL)
       
  7824 			  IN_param_value = function_call_param_iterator.next();
       
  7825 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7826 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7827 			
       
  7828 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7829 			{
       
  7830 		
       
  7831 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7832 				s4o.print("(");
       
  7833 				return_type_symbol->accept(*this);
       
  7834 				s4o.print(")int_to_string(");
       
  7835 				IN_param_value->accept(*this);
       
  7836 				s4o.print(", 16)");
       
  7837 				return NULL;
       
  7838 				
       
  7839 			}
       
  7840 			
       
  7841 			ERROR;
       
  7842 		}
       
  7843 		
       
  7844 	}/*function_wstring_to_dword*/
       
  7845 	break;
       
  7846 
       
  7847 /****
       
  7848  *WSTRING_TO_DT
       
  7849  */
       
  7850 	case function_wstring_to_dt :
       
  7851 	{
       
  7852 		symbol_c *last_type_symbol = NULL;
       
  7853 
       
  7854 		{
       
  7855 			identifier_c param_name("IN");
       
  7856 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7857 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7858 			
       
  7859 			/* Get the value from a foo(<param_value>) style call */
       
  7860 			if (IN_param_value == NULL)
       
  7861 			  IN_param_value = function_call_param_iterator.next();
       
  7862 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7863 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7864 			
       
  7865 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7866 			{
       
  7867 		
       
  7868 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7869 				s4o.print("(");
       
  7870 				return_type_symbol->accept(*this);
       
  7871 				s4o.print(")time_to_string(");
       
  7872 				IN_param_value->accept(*this);
       
  7873 				s4o.print(")");
       
  7874 				return NULL;
       
  7875 				
       
  7876 			}
       
  7877 			
       
  7878 			ERROR;
       
  7879 		}
       
  7880 		
       
  7881 	}/*function_wstring_to_dt*/
       
  7882 	break;
       
  7883 
       
  7884 /****
       
  7885  *WSTRING_TO_TOD
       
  7886  */
       
  7887 	case function_wstring_to_tod :
       
  7888 	{
       
  7889 		symbol_c *last_type_symbol = NULL;
       
  7890 
       
  7891 		{
       
  7892 			identifier_c param_name("IN");
       
  7893 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7894 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7895 			
       
  7896 			/* Get the value from a foo(<param_value>) style call */
       
  7897 			if (IN_param_value == NULL)
       
  7898 			  IN_param_value = function_call_param_iterator.next();
       
  7899 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7900 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7901 			
       
  7902 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7903 			{
       
  7904 		
       
  7905 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7906 				s4o.print("(");
       
  7907 				return_type_symbol->accept(*this);
       
  7908 				s4o.print(")time_to_string(");
       
  7909 				IN_param_value->accept(*this);
       
  7910 				s4o.print(")");
       
  7911 				return NULL;
       
  7912 				
       
  7913 			}
       
  7914 			
       
  7915 			ERROR;
       
  7916 		}
       
  7917 		
       
  7918 	}/*function_wstring_to_tod*/
       
  7919 	break;
       
  7920 
       
  7921 /****
       
  7922  *WSTRING_TO_UDINT
       
  7923  */
       
  7924 	case function_wstring_to_udint :
       
  7925 	{
       
  7926 		symbol_c *last_type_symbol = NULL;
       
  7927 
       
  7928 		{
       
  7929 			identifier_c param_name("IN");
       
  7930 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7931 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7932 			
       
  7933 			/* Get the value from a foo(<param_value>) style call */
       
  7934 			if (IN_param_value == NULL)
       
  7935 			  IN_param_value = function_call_param_iterator.next();
       
  7936 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7937 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7938 			
       
  7939 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7940 			{
       
  7941 		
       
  7942 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7943 				s4o.print("(");
       
  7944 				return_type_symbol->accept(*this);
       
  7945 				s4o.print(")int_to_string(");
       
  7946 				IN_param_value->accept(*this);
       
  7947 				s4o.print(", 10)");
       
  7948 				return NULL;
       
  7949 				
       
  7950 			}
       
  7951 			
       
  7952 			ERROR;
       
  7953 		}
       
  7954 		
       
  7955 	}/*function_wstring_to_udint*/
       
  7956 	break;
       
  7957 
       
  7958 /****
       
  7959  *WSTRING_TO_WORD
       
  7960  */
       
  7961 	case function_wstring_to_word :
       
  7962 	{
       
  7963 		symbol_c *last_type_symbol = NULL;
       
  7964 
       
  7965 		{
       
  7966 			identifier_c param_name("IN");
       
  7967 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7968 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7969 			
       
  7970 			/* Get the value from a foo(<param_value>) style call */
       
  7971 			if (IN_param_value == NULL)
       
  7972 			  IN_param_value = function_call_param_iterator.next();
       
  7973 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7974 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7975 			
       
  7976 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  7977 			{
       
  7978 		
       
  7979 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7980 				s4o.print("(");
       
  7981 				return_type_symbol->accept(*this);
       
  7982 				s4o.print(")int_to_string(");
       
  7983 				IN_param_value->accept(*this);
       
  7984 				s4o.print(", 16)");
       
  7985 				return NULL;
       
  7986 				
       
  7987 			}
       
  7988 			
       
  7989 			ERROR;
       
  7990 		}
       
  7991 		
       
  7992 	}/*function_wstring_to_word*/
       
  7993 	break;
       
  7994 
       
  7995 /****
       
  7996  *WSTRING_TO_WSTRING
       
  7997  */
       
  7998 	case function_wstring_to_wstring :
       
  7999 	{
       
  8000 		symbol_c *last_type_symbol = NULL;
       
  8001 
       
  8002 		{
       
  8003 			identifier_c param_name("IN");
       
  8004 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8005 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8006 			
       
  8007 			/* Get the value from a foo(<param_value>) style call */
       
  8008 			if (IN_param_value == NULL)
       
  8009 			  IN_param_value = function_call_param_iterator.next();
       
  8010 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8011 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8012 			
       
  8013 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8014 			{
       
  8015 		
       
  8016 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8017 				s4o.print("#error WSTRING_TO_WSTRING not implemented!");
       
  8018 				return NULL;
       
  8019 				
       
  8020 			}
       
  8021 			
       
  8022 			ERROR;
       
  8023 		}
       
  8024 		
       
  8025 	}/*function_wstring_to_wstring*/
       
  8026 	break;
       
  8027 
       
  8028 /****
       
  8029  *WSTRING_TO_STRING
       
  8030  */
       
  8031 	case function_wstring_to_string :
       
  8032 	{
       
  8033 		symbol_c *last_type_symbol = NULL;
       
  8034 
       
  8035 		{
       
  8036 			identifier_c param_name("IN");
       
  8037 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8038 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8039 			
       
  8040 			/* Get the value from a foo(<param_value>) style call */
       
  8041 			if (IN_param_value == NULL)
       
  8042 			  IN_param_value = function_call_param_iterator.next();
       
  8043 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8044 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8045 			
       
  8046 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8047 			{
       
  8048 		
       
  8049 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8050 				s4o.print("#error WSTRING_TO_STRING not implemented!");
       
  8051 				return NULL;
       
  8052 				
       
  8053 			}
       
  8054 			
       
  8055 			ERROR;
       
  8056 		}
       
  8057 		
       
  8058 	}/*function_wstring_to_string*/
       
  8059 	break;
       
  8060 
       
  8061 /****
       
  8062  *WSTRING_TO_LWORD
       
  8063  */
       
  8064 	case function_wstring_to_lword :
       
  8065 	{
       
  8066 		symbol_c *last_type_symbol = NULL;
       
  8067 
       
  8068 		{
       
  8069 			identifier_c param_name("IN");
       
  8070 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8071 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8072 			
       
  8073 			/* Get the value from a foo(<param_value>) style call */
       
  8074 			if (IN_param_value == NULL)
       
  8075 			  IN_param_value = function_call_param_iterator.next();
       
  8076 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8077 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8078 			
       
  8079 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8080 			{
       
  8081 		
       
  8082 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8083 				s4o.print("(");
       
  8084 				return_type_symbol->accept(*this);
       
  8085 				s4o.print(")int_to_string(");
       
  8086 				IN_param_value->accept(*this);
       
  8087 				s4o.print(", 16)");
       
  8088 				return NULL;
       
  8089 				
       
  8090 			}
       
  8091 			
       
  8092 			ERROR;
       
  8093 		}
       
  8094 		
       
  8095 	}/*function_wstring_to_lword*/
       
  8096 	break;
       
  8097 
       
  8098 /****
       
  8099  *WSTRING_TO_UINT
       
  8100  */
       
  8101 	case function_wstring_to_uint :
       
  8102 	{
       
  8103 		symbol_c *last_type_symbol = NULL;
       
  8104 
       
  8105 		{
       
  8106 			identifier_c param_name("IN");
       
  8107 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8108 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8109 			
       
  8110 			/* Get the value from a foo(<param_value>) style call */
       
  8111 			if (IN_param_value == NULL)
       
  8112 			  IN_param_value = function_call_param_iterator.next();
       
  8113 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8114 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8115 			
       
  8116 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8117 			{
       
  8118 		
       
  8119 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8120 				s4o.print("(");
       
  8121 				return_type_symbol->accept(*this);
       
  8122 				s4o.print(")int_to_string(");
       
  8123 				IN_param_value->accept(*this);
       
  8124 				s4o.print(", 10)");
       
  8125 				return NULL;
       
  8126 				
       
  8127 			}
       
  8128 			
       
  8129 			ERROR;
       
  8130 		}
       
  8131 		
       
  8132 	}/*function_wstring_to_uint*/
       
  8133 	break;
       
  8134 
       
  8135 /****
       
  8136  *WSTRING_TO_LREAL
       
  8137  */
       
  8138 	case function_wstring_to_lreal :
       
  8139 	{
       
  8140 		symbol_c *last_type_symbol = NULL;
       
  8141 
       
  8142 		{
       
  8143 			identifier_c param_name("IN");
       
  8144 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8145 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8146 			
       
  8147 			/* Get the value from a foo(<param_value>) style call */
       
  8148 			if (IN_param_value == NULL)
       
  8149 			  IN_param_value = function_call_param_iterator.next();
       
  8150 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8151 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8152 			
       
  8153 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8154 			{
       
  8155 		
       
  8156 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8157 				s4o.print("(");
       
  8158 				return_type_symbol->accept(*this);
       
  8159 				s4o.print(")int_to_string(");
       
  8160 				IN_param_value->accept(*this);
       
  8161 				s4o.print(", 10)");
       
  8162 				return NULL;
       
  8163 				
       
  8164 			}
       
  8165 			
       
  8166 			ERROR;
       
  8167 		}
       
  8168 		
       
  8169 	}/*function_wstring_to_lreal*/
       
  8170 	break;
       
  8171 
       
  8172 /****
       
  8173  *WSTRING_TO_BYTE
       
  8174  */
       
  8175 	case function_wstring_to_byte :
       
  8176 	{
       
  8177 		symbol_c *last_type_symbol = NULL;
       
  8178 
       
  8179 		{
       
  8180 			identifier_c param_name("IN");
       
  8181 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8182 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8183 			
       
  8184 			/* Get the value from a foo(<param_value>) style call */
       
  8185 			if (IN_param_value == NULL)
       
  8186 			  IN_param_value = function_call_param_iterator.next();
       
  8187 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8188 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8189 			
       
  8190 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8191 			{
       
  8192 		
       
  8193 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8194 				s4o.print("(");
       
  8195 				return_type_symbol->accept(*this);
       
  8196 				s4o.print(")int_to_string(");
       
  8197 				IN_param_value->accept(*this);
       
  8198 				s4o.print(", 16)");
       
  8199 				return NULL;
       
  8200 				
       
  8201 			}
       
  8202 			
       
  8203 			ERROR;
       
  8204 		}
       
  8205 		
       
  8206 	}/*function_wstring_to_byte*/
       
  8207 	break;
       
  8208 
       
  8209 /****
       
  8210  *WSTRING_TO_USINT
       
  8211  */
       
  8212 	case function_wstring_to_usint :
       
  8213 	{
       
  8214 		symbol_c *last_type_symbol = NULL;
       
  8215 
       
  8216 		{
       
  8217 			identifier_c param_name("IN");
       
  8218 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8219 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8220 			
       
  8221 			/* Get the value from a foo(<param_value>) style call */
       
  8222 			if (IN_param_value == NULL)
       
  8223 			  IN_param_value = function_call_param_iterator.next();
       
  8224 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8225 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8226 			
       
  8227 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8228 			{
       
  8229 		
       
  8230 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8231 				s4o.print("(");
       
  8232 				return_type_symbol->accept(*this);
       
  8233 				s4o.print(")int_to_string(");
       
  8234 				IN_param_value->accept(*this);
       
  8235 				s4o.print(", 10)");
       
  8236 				return NULL;
       
  8237 				
       
  8238 			}
       
  8239 			
       
  8240 			ERROR;
       
  8241 		}
       
  8242 		
       
  8243 	}/*function_wstring_to_usint*/
       
  8244 	break;
       
  8245 
       
  8246 /****
       
  8247  *WSTRING_TO_ULINT
       
  8248  */
       
  8249 	case function_wstring_to_ulint :
       
  8250 	{
       
  8251 		symbol_c *last_type_symbol = NULL;
       
  8252 
       
  8253 		{
       
  8254 			identifier_c param_name("IN");
       
  8255 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8256 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8257 			
       
  8258 			/* Get the value from a foo(<param_value>) style call */
       
  8259 			if (IN_param_value == NULL)
       
  8260 			  IN_param_value = function_call_param_iterator.next();
       
  8261 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8262 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8263 			
       
  8264 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8265 			{
       
  8266 		
       
  8267 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8268 				s4o.print("(");
       
  8269 				return_type_symbol->accept(*this);
       
  8270 				s4o.print(")int_to_string(");
       
  8271 				IN_param_value->accept(*this);
       
  8272 				s4o.print(", 10)");
       
  8273 				return NULL;
       
  8274 				
       
  8275 			}
       
  8276 			
       
  8277 			ERROR;
       
  8278 		}
       
  8279 		
       
  8280 	}/*function_wstring_to_ulint*/
       
  8281 	break;
       
  8282 
       
  8283 /****
       
  8284  *WSTRING_TO_BOOL
       
  8285  */
       
  8286 	case function_wstring_to_bool :
       
  8287 	{
       
  8288 		symbol_c *last_type_symbol = NULL;
       
  8289 
       
  8290 		{
       
  8291 			identifier_c param_name("IN");
       
  8292 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8293 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8294 			
       
  8295 			/* Get the value from a foo(<param_value>) style call */
       
  8296 			if (IN_param_value == NULL)
       
  8297 			  IN_param_value = function_call_param_iterator.next();
       
  8298 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8299 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8300 			
       
  8301 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8302 			{
       
  8303 		
       
  8304 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8305 				s4o.print("(");
       
  8306 				return_type_symbol->accept(*this);
       
  8307 				s4o.print(")int_to_string(");
       
  8308 				IN_param_value->accept(*this);
       
  8309 				s4o.print(", 16)");
       
  8310 				return NULL;
       
  8311 				
       
  8312 			}
       
  8313 			
       
  8314 			ERROR;
       
  8315 		}
       
  8316 		
       
  8317 	}/*function_wstring_to_bool*/
       
  8318 	break;
       
  8319 
       
  8320 /****
       
  8321  *WSTRING_TO_TIME
       
  8322  */
       
  8323 	case function_wstring_to_time :
       
  8324 	{
       
  8325 		symbol_c *last_type_symbol = NULL;
       
  8326 
       
  8327 		{
       
  8328 			identifier_c param_name("IN");
       
  8329 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8330 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8331 			
       
  8332 			/* Get the value from a foo(<param_value>) style call */
       
  8333 			if (IN_param_value == NULL)
       
  8334 			  IN_param_value = function_call_param_iterator.next();
       
  8335 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8336 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8337 			
       
  8338 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8339 			{
       
  8340 		
       
  8341 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8342 				s4o.print("(");
       
  8343 				return_type_symbol->accept(*this);
       
  8344 				s4o.print(")time_to_string(");
       
  8345 				IN_param_value->accept(*this);
       
  8346 				s4o.print(")");
       
  8347 				return NULL;
       
  8348 				
       
  8349 			}
       
  8350 			
       
  8351 			ERROR;
       
  8352 		}
       
  8353 		
       
  8354 	}/*function_wstring_to_time*/
       
  8355 	break;
       
  8356 
       
  8357 /****
       
  8358  *WSTRING_TO_INT
       
  8359  */
       
  8360 	case function_wstring_to_int :
       
  8361 	{
       
  8362 		symbol_c *last_type_symbol = NULL;
       
  8363 
       
  8364 		{
       
  8365 			identifier_c param_name("IN");
       
  8366 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8367 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8368 			
       
  8369 			/* Get the value from a foo(<param_value>) style call */
       
  8370 			if (IN_param_value == NULL)
       
  8371 			  IN_param_value = function_call_param_iterator.next();
       
  8372 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8373 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8374 			
       
  8375 			if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
  8376 			{
       
  8377 		
       
  8378 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8379 				s4o.print("(");
       
  8380 				return_type_symbol->accept(*this);
       
  8381 				s4o.print(")int_to_string(");
       
  8382 				IN_param_value->accept(*this);
       
  8383 				s4o.print(", 10)");
       
  8384 				return NULL;
       
  8385 				
       
  8386 			}
       
  8387 			
       
  8388 			ERROR;
       
  8389 		}
       
  8390 		
       
  8391 	}/*function_wstring_to_int*/
       
  8392 	break;
       
  8393 
       
  8394 /****
       
  8395  *STRING_TO_REAL
       
  8396  */
       
  8397 	case function_string_to_real :
       
  8398 	{
       
  8399 		symbol_c *last_type_symbol = NULL;
       
  8400 
       
  8401 		{
       
  8402 			identifier_c param_name("IN");
       
  8403 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8404 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8405 			
       
  8406 			/* Get the value from a foo(<param_value>) style call */
       
  8407 			if (IN_param_value == NULL)
       
  8408 			  IN_param_value = function_call_param_iterator.next();
       
  8409 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8410 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8411 			
       
  8412 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8413 			{
       
  8414 		
       
  8415 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8416 				s4o.print("(");
       
  8417 				return_type_symbol->accept(*this);
       
  8418 				s4o.print(")int_to_string(");
       
  8419 				IN_param_value->accept(*this);
       
  8420 				s4o.print(", 10)");
       
  8421 				return NULL;
       
  8422 				
       
  8423 			}
       
  8424 			
       
  8425 			ERROR;
       
  8426 		}
       
  8427 		
       
  8428 	}/*function_string_to_real*/
       
  8429 	break;
       
  8430 
       
  8431 /****
       
  8432  *STRING_TO_SINT
       
  8433  */
       
  8434 	case function_string_to_sint :
       
  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(string_type_name_c))
       
  8450 			{
       
  8451 		
       
  8452 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8453 				s4o.print("(");
       
  8454 				return_type_symbol->accept(*this);
       
  8455 				s4o.print(")int_to_string(");
       
  8456 				IN_param_value->accept(*this);
       
  8457 				s4o.print(", 10)");
       
  8458 				return NULL;
       
  8459 				
       
  8460 			}
       
  8461 			
       
  8462 			ERROR;
       
  8463 		}
       
  8464 		
       
  8465 	}/*function_string_to_sint*/
       
  8466 	break;
       
  8467 
       
  8468 /****
       
  8469  *STRING_TO_LINT
       
  8470  */
       
  8471 	case function_string_to_lint :
       
  8472 	{
       
  8473 		symbol_c *last_type_symbol = NULL;
       
  8474 
       
  8475 		{
       
  8476 			identifier_c param_name("IN");
       
  8477 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8478 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8479 			
       
  8480 			/* Get the value from a foo(<param_value>) style call */
       
  8481 			if (IN_param_value == NULL)
       
  8482 			  IN_param_value = function_call_param_iterator.next();
       
  8483 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8484 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8485 			
       
  8486 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8487 			{
       
  8488 		
       
  8489 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8490 				s4o.print("(");
       
  8491 				return_type_symbol->accept(*this);
       
  8492 				s4o.print(")int_to_string(");
       
  8493 				IN_param_value->accept(*this);
       
  8494 				s4o.print(", 10)");
       
  8495 				return NULL;
       
  8496 				
       
  8497 			}
       
  8498 			
       
  8499 			ERROR;
       
  8500 		}
       
  8501 		
       
  8502 	}/*function_string_to_lint*/
       
  8503 	break;
       
  8504 
       
  8505 /****
       
  8506  *STRING_TO_DINT
       
  8507  */
       
  8508 	case function_string_to_dint :
       
  8509 	{
       
  8510 		symbol_c *last_type_symbol = NULL;
       
  8511 
       
  8512 		{
       
  8513 			identifier_c param_name("IN");
       
  8514 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8515 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8516 			
       
  8517 			/* Get the value from a foo(<param_value>) style call */
       
  8518 			if (IN_param_value == NULL)
       
  8519 			  IN_param_value = function_call_param_iterator.next();
       
  8520 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8521 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8522 			
       
  8523 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8524 			{
       
  8525 		
       
  8526 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8527 				s4o.print("(");
       
  8528 				return_type_symbol->accept(*this);
       
  8529 				s4o.print(")int_to_string(");
       
  8530 				IN_param_value->accept(*this);
       
  8531 				s4o.print(", 10)");
       
  8532 				return NULL;
       
  8533 				
       
  8534 			}
       
  8535 			
       
  8536 			ERROR;
       
  8537 		}
       
  8538 		
       
  8539 	}/*function_string_to_dint*/
       
  8540 	break;
       
  8541 
       
  8542 /****
       
  8543  *STRING_TO_DATE
       
  8544  */
       
  8545 	case function_string_to_date :
       
  8546 	{
       
  8547 		symbol_c *last_type_symbol = NULL;
       
  8548 
       
  8549 		{
       
  8550 			identifier_c param_name("IN");
       
  8551 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8552 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8553 			
       
  8554 			/* Get the value from a foo(<param_value>) style call */
       
  8555 			if (IN_param_value == NULL)
       
  8556 			  IN_param_value = function_call_param_iterator.next();
       
  8557 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8558 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8559 			
       
  8560 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8561 			{
       
  8562 		
       
  8563 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8564 				s4o.print("(");
       
  8565 				return_type_symbol->accept(*this);
       
  8566 				s4o.print(")time_to_string(");
       
  8567 				IN_param_value->accept(*this);
       
  8568 				s4o.print(")");
       
  8569 				return NULL;
       
  8570 				
       
  8571 			}
       
  8572 			
       
  8573 			ERROR;
       
  8574 		}
       
  8575 		
       
  8576 	}/*function_string_to_date*/
       
  8577 	break;
       
  8578 
       
  8579 /****
       
  8580  *STRING_TO_DWORD
       
  8581  */
       
  8582 	case function_string_to_dword :
       
  8583 	{
       
  8584 		symbol_c *last_type_symbol = NULL;
       
  8585 
       
  8586 		{
       
  8587 			identifier_c param_name("IN");
       
  8588 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8589 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8590 			
       
  8591 			/* Get the value from a foo(<param_value>) style call */
       
  8592 			if (IN_param_value == NULL)
       
  8593 			  IN_param_value = function_call_param_iterator.next();
       
  8594 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8595 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8596 			
       
  8597 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8598 			{
       
  8599 		
       
  8600 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8601 				s4o.print("(");
       
  8602 				return_type_symbol->accept(*this);
       
  8603 				s4o.print(")int_to_string(");
       
  8604 				IN_param_value->accept(*this);
       
  8605 				s4o.print(", 16)");
       
  8606 				return NULL;
       
  8607 				
       
  8608 			}
       
  8609 			
       
  8610 			ERROR;
       
  8611 		}
       
  8612 		
       
  8613 	}/*function_string_to_dword*/
       
  8614 	break;
       
  8615 
       
  8616 /****
       
  8617  *STRING_TO_DT
       
  8618  */
       
  8619 	case function_string_to_dt :
       
  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(string_type_name_c))
       
  8635 			{
       
  8636 		
       
  8637 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8638 				s4o.print("(");
       
  8639 				return_type_symbol->accept(*this);
       
  8640 				s4o.print(")time_to_string(");
       
  8641 				IN_param_value->accept(*this);
       
  8642 				s4o.print(")");
       
  8643 				return NULL;
       
  8644 				
       
  8645 			}
       
  8646 			
       
  8647 			ERROR;
       
  8648 		}
       
  8649 		
       
  8650 	}/*function_string_to_dt*/
       
  8651 	break;
       
  8652 
       
  8653 /****
       
  8654  *STRING_TO_TOD
       
  8655  */
       
  8656 	case function_string_to_tod :
       
  8657 	{
       
  8658 		symbol_c *last_type_symbol = NULL;
       
  8659 
       
  8660 		{
       
  8661 			identifier_c param_name("IN");
       
  8662 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8663 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8664 			
       
  8665 			/* Get the value from a foo(<param_value>) style call */
       
  8666 			if (IN_param_value == NULL)
       
  8667 			  IN_param_value = function_call_param_iterator.next();
       
  8668 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8669 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8670 			
       
  8671 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8672 			{
       
  8673 		
       
  8674 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8675 				s4o.print("(");
       
  8676 				return_type_symbol->accept(*this);
       
  8677 				s4o.print(")time_to_string(");
       
  8678 				IN_param_value->accept(*this);
       
  8679 				s4o.print(")");
       
  8680 				return NULL;
       
  8681 				
       
  8682 			}
       
  8683 			
       
  8684 			ERROR;
       
  8685 		}
       
  8686 		
       
  8687 	}/*function_string_to_tod*/
       
  8688 	break;
       
  8689 
       
  8690 /****
       
  8691  *STRING_TO_UDINT
       
  8692  */
       
  8693 	case function_string_to_udint :
       
  8694 	{
       
  8695 		symbol_c *last_type_symbol = NULL;
       
  8696 
       
  8697 		{
       
  8698 			identifier_c param_name("IN");
       
  8699 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8700 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8701 			
       
  8702 			/* Get the value from a foo(<param_value>) style call */
       
  8703 			if (IN_param_value == NULL)
       
  8704 			  IN_param_value = function_call_param_iterator.next();
       
  8705 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8706 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8707 			
       
  8708 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8709 			{
       
  8710 		
       
  8711 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8712 				s4o.print("(");
       
  8713 				return_type_symbol->accept(*this);
       
  8714 				s4o.print(")int_to_string(");
       
  8715 				IN_param_value->accept(*this);
       
  8716 				s4o.print(", 10)");
       
  8717 				return NULL;
       
  8718 				
       
  8719 			}
       
  8720 			
       
  8721 			ERROR;
       
  8722 		}
       
  8723 		
       
  8724 	}/*function_string_to_udint*/
       
  8725 	break;
       
  8726 
       
  8727 /****
       
  8728  *STRING_TO_WORD
       
  8729  */
       
  8730 	case function_string_to_word :
       
  8731 	{
       
  8732 		symbol_c *last_type_symbol = NULL;
       
  8733 
       
  8734 		{
       
  8735 			identifier_c param_name("IN");
       
  8736 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8737 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8738 			
       
  8739 			/* Get the value from a foo(<param_value>) style call */
       
  8740 			if (IN_param_value == NULL)
       
  8741 			  IN_param_value = function_call_param_iterator.next();
       
  8742 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8743 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8744 			
       
  8745 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8746 			{
       
  8747 		
       
  8748 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8749 				s4o.print("(");
       
  8750 				return_type_symbol->accept(*this);
       
  8751 				s4o.print(")int_to_string(");
       
  8752 				IN_param_value->accept(*this);
       
  8753 				s4o.print(", 16)");
       
  8754 				return NULL;
       
  8755 				
       
  8756 			}
       
  8757 			
       
  8758 			ERROR;
       
  8759 		}
       
  8760 		
       
  8761 	}/*function_string_to_word*/
       
  8762 	break;
       
  8763 
       
  8764 /****
       
  8765  *STRING_TO_WSTRING
       
  8766  */
       
  8767 	case function_string_to_wstring :
       
  8768 	{
       
  8769 		symbol_c *last_type_symbol = NULL;
       
  8770 
       
  8771 		{
       
  8772 			identifier_c param_name("IN");
       
  8773 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8774 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8775 			
       
  8776 			/* Get the value from a foo(<param_value>) style call */
       
  8777 			if (IN_param_value == NULL)
       
  8778 			  IN_param_value = function_call_param_iterator.next();
       
  8779 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8780 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8781 			
       
  8782 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8783 			{
       
  8784 		
       
  8785 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8786 				s4o.print("#error STRING_TO_WSTRING not implemented!");
       
  8787 				return NULL;
       
  8788 				
       
  8789 			}
       
  8790 			
       
  8791 			ERROR;
       
  8792 		}
       
  8793 		
       
  8794 	}/*function_string_to_wstring*/
       
  8795 	break;
       
  8796 
       
  8797 /****
       
  8798  *STRING_TO_STRING
       
  8799  */
       
  8800 	case function_string_to_string :
       
  8801 	{
       
  8802 		symbol_c *last_type_symbol = NULL;
       
  8803 
       
  8804 		{
       
  8805 			identifier_c param_name("IN");
       
  8806 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8807 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8808 			
       
  8809 			/* Get the value from a foo(<param_value>) style call */
       
  8810 			if (IN_param_value == NULL)
       
  8811 			  IN_param_value = function_call_param_iterator.next();
       
  8812 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8813 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8814 			
       
  8815 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8816 			{
       
  8817 		
       
  8818 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8819 				s4o.print("#error STRING_TO_STRING not implemented!");
       
  8820 				return NULL;
       
  8821 				
       
  8822 			}
       
  8823 			
       
  8824 			ERROR;
       
  8825 		}
       
  8826 		
       
  8827 	}/*function_string_to_string*/
       
  8828 	break;
       
  8829 
       
  8830 /****
       
  8831  *STRING_TO_LWORD
       
  8832  */
       
  8833 	case function_string_to_lword :
       
  8834 	{
       
  8835 		symbol_c *last_type_symbol = NULL;
       
  8836 
       
  8837 		{
       
  8838 			identifier_c param_name("IN");
       
  8839 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8840 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8841 			
       
  8842 			/* Get the value from a foo(<param_value>) style call */
       
  8843 			if (IN_param_value == NULL)
       
  8844 			  IN_param_value = function_call_param_iterator.next();
       
  8845 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8846 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8847 			
       
  8848 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8849 			{
       
  8850 		
       
  8851 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8852 				s4o.print("(");
       
  8853 				return_type_symbol->accept(*this);
       
  8854 				s4o.print(")int_to_string(");
       
  8855 				IN_param_value->accept(*this);
       
  8856 				s4o.print(", 16)");
       
  8857 				return NULL;
       
  8858 				
       
  8859 			}
       
  8860 			
       
  8861 			ERROR;
       
  8862 		}
       
  8863 		
       
  8864 	}/*function_string_to_lword*/
       
  8865 	break;
       
  8866 
       
  8867 /****
       
  8868  *STRING_TO_UINT
       
  8869  */
       
  8870 	case function_string_to_uint :
       
  8871 	{
       
  8872 		symbol_c *last_type_symbol = NULL;
       
  8873 
       
  8874 		{
       
  8875 			identifier_c param_name("IN");
       
  8876 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8877 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8878 			
       
  8879 			/* Get the value from a foo(<param_value>) style call */
       
  8880 			if (IN_param_value == NULL)
       
  8881 			  IN_param_value = function_call_param_iterator.next();
       
  8882 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8883 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8884 			
       
  8885 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8886 			{
       
  8887 		
       
  8888 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8889 				s4o.print("(");
       
  8890 				return_type_symbol->accept(*this);
       
  8891 				s4o.print(")int_to_string(");
       
  8892 				IN_param_value->accept(*this);
       
  8893 				s4o.print(", 10)");
       
  8894 				return NULL;
       
  8895 				
       
  8896 			}
       
  8897 			
       
  8898 			ERROR;
       
  8899 		}
       
  8900 		
       
  8901 	}/*function_string_to_uint*/
       
  8902 	break;
       
  8903 
       
  8904 /****
       
  8905  *STRING_TO_LREAL
       
  8906  */
       
  8907 	case function_string_to_lreal :
       
  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(string_type_name_c))
       
  8923 			{
       
  8924 		
       
  8925 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8926 				s4o.print("(");
       
  8927 				return_type_symbol->accept(*this);
       
  8928 				s4o.print(")int_to_string(");
       
  8929 				IN_param_value->accept(*this);
       
  8930 				s4o.print(", 10)");
       
  8931 				return NULL;
       
  8932 				
       
  8933 			}
       
  8934 			
       
  8935 			ERROR;
       
  8936 		}
       
  8937 		
       
  8938 	}/*function_string_to_lreal*/
       
  8939 	break;
       
  8940 
       
  8941 /****
       
  8942  *STRING_TO_BYTE
       
  8943  */
       
  8944 	case function_string_to_byte :
       
  8945 	{
       
  8946 		symbol_c *last_type_symbol = NULL;
       
  8947 
       
  8948 		{
       
  8949 			identifier_c param_name("IN");
       
  8950 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8951 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8952 			
       
  8953 			/* Get the value from a foo(<param_value>) style call */
       
  8954 			if (IN_param_value == NULL)
       
  8955 			  IN_param_value = function_call_param_iterator.next();
       
  8956 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8957 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8958 			
       
  8959 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8960 			{
       
  8961 		
       
  8962 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8963 				s4o.print("(");
       
  8964 				return_type_symbol->accept(*this);
       
  8965 				s4o.print(")int_to_string(");
       
  8966 				IN_param_value->accept(*this);
       
  8967 				s4o.print(", 16)");
       
  8968 				return NULL;
       
  8969 				
       
  8970 			}
       
  8971 			
       
  8972 			ERROR;
       
  8973 		}
       
  8974 		
       
  8975 	}/*function_string_to_byte*/
       
  8976 	break;
       
  8977 
       
  8978 /****
       
  8979  *STRING_TO_USINT
       
  8980  */
       
  8981 	case function_string_to_usint :
       
  8982 	{
       
  8983 		symbol_c *last_type_symbol = NULL;
       
  8984 
       
  8985 		{
       
  8986 			identifier_c param_name("IN");
       
  8987 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8988 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8989 			
       
  8990 			/* Get the value from a foo(<param_value>) style call */
       
  8991 			if (IN_param_value == NULL)
       
  8992 			  IN_param_value = function_call_param_iterator.next();
       
  8993 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8994 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8995 			
       
  8996 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8997 			{
       
  8998 		
       
  8999 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9000 				s4o.print("(");
       
  9001 				return_type_symbol->accept(*this);
       
  9002 				s4o.print(")int_to_string(");
       
  9003 				IN_param_value->accept(*this);
       
  9004 				s4o.print(", 10)");
       
  9005 				return NULL;
       
  9006 				
       
  9007 			}
       
  9008 			
       
  9009 			ERROR;
       
  9010 		}
       
  9011 		
       
  9012 	}/*function_string_to_usint*/
       
  9013 	break;
       
  9014 
       
  9015 /****
       
  9016  *STRING_TO_ULINT
       
  9017  */
       
  9018 	case function_string_to_ulint :
       
  9019 	{
       
  9020 		symbol_c *last_type_symbol = NULL;
       
  9021 
       
  9022 		{
       
  9023 			identifier_c param_name("IN");
       
  9024 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9025 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9026 			
       
  9027 			/* Get the value from a foo(<param_value>) style call */
       
  9028 			if (IN_param_value == NULL)
       
  9029 			  IN_param_value = function_call_param_iterator.next();
       
  9030 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9031 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9032 			
       
  9033 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9034 			{
       
  9035 		
       
  9036 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9037 				s4o.print("(");
       
  9038 				return_type_symbol->accept(*this);
       
  9039 				s4o.print(")int_to_string(");
       
  9040 				IN_param_value->accept(*this);
       
  9041 				s4o.print(", 10)");
       
  9042 				return NULL;
       
  9043 				
       
  9044 			}
       
  9045 			
       
  9046 			ERROR;
       
  9047 		}
       
  9048 		
       
  9049 	}/*function_string_to_ulint*/
       
  9050 	break;
       
  9051 
       
  9052 /****
       
  9053  *STRING_TO_BOOL
       
  9054  */
       
  9055 	case function_string_to_bool :
       
  9056 	{
       
  9057 		symbol_c *last_type_symbol = NULL;
       
  9058 
       
  9059 		{
       
  9060 			identifier_c param_name("IN");
       
  9061 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9062 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9063 			
       
  9064 			/* Get the value from a foo(<param_value>) style call */
       
  9065 			if (IN_param_value == NULL)
       
  9066 			  IN_param_value = function_call_param_iterator.next();
       
  9067 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9068 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9069 			
       
  9070 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9071 			{
       
  9072 		
       
  9073 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9074 				s4o.print("(");
       
  9075 				return_type_symbol->accept(*this);
       
  9076 				s4o.print(")int_to_string(");
       
  9077 				IN_param_value->accept(*this);
       
  9078 				s4o.print(", 16)");
       
  9079 				return NULL;
       
  9080 				
       
  9081 			}
       
  9082 			
       
  9083 			ERROR;
       
  9084 		}
       
  9085 		
       
  9086 	}/*function_string_to_bool*/
       
  9087 	break;
       
  9088 
       
  9089 /****
       
  9090  *STRING_TO_TIME
       
  9091  */
       
  9092 	case function_string_to_time :
       
  9093 	{
       
  9094 		symbol_c *last_type_symbol = NULL;
       
  9095 
       
  9096 		{
       
  9097 			identifier_c param_name("IN");
       
  9098 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9099 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9100 			
       
  9101 			/* Get the value from a foo(<param_value>) style call */
       
  9102 			if (IN_param_value == NULL)
       
  9103 			  IN_param_value = function_call_param_iterator.next();
       
  9104 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9105 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9106 			
       
  9107 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9108 			{
       
  9109 		
       
  9110 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9111 				s4o.print("(");
       
  9112 				return_type_symbol->accept(*this);
       
  9113 				s4o.print(")time_to_string(");
       
  9114 				IN_param_value->accept(*this);
       
  9115 				s4o.print(")");
       
  9116 				return NULL;
       
  9117 				
       
  9118 			}
       
  9119 			
       
  9120 			ERROR;
       
  9121 		}
       
  9122 		
       
  9123 	}/*function_string_to_time*/
       
  9124 	break;
       
  9125 
       
  9126 /****
       
  9127  *STRING_TO_INT
       
  9128  */
       
  9129 	case function_string_to_int :
       
  9130 	{
       
  9131 		symbol_c *last_type_symbol = NULL;
       
  9132 
       
  9133 		{
       
  9134 			identifier_c param_name("IN");
       
  9135 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9136 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9137 			
       
  9138 			/* Get the value from a foo(<param_value>) style call */
       
  9139 			if (IN_param_value == NULL)
       
  9140 			  IN_param_value = function_call_param_iterator.next();
       
  9141 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9142 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9143 			
       
  9144 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9145 			{
       
  9146 		
       
  9147 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9148 				s4o.print("(");
       
  9149 				return_type_symbol->accept(*this);
       
  9150 				s4o.print(")int_to_string(");
       
  9151 				IN_param_value->accept(*this);
       
  9152 				s4o.print(", 10)");
       
  9153 				return NULL;
       
  9154 				
       
  9155 			}
       
  9156 			
       
  9157 			ERROR;
       
  9158 		}
       
  9159 		
       
  9160 	}/*function_string_to_int*/
       
  9161 	break;
       
  9162 
       
  9163 /****
       
  9164  *LWORD_TO_REAL
       
  9165  */
       
  9166 	case function_lword_to_real :
       
  9167 	{
       
  9168 		symbol_c *last_type_symbol = NULL;
       
  9169 
       
  9170 		{
       
  9171 			identifier_c param_name("IN");
       
  9172 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9173 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9174 			
       
  9175 			/* Get the value from a foo(<param_value>) style call */
       
  9176 			if (IN_param_value == NULL)
       
  9177 			  IN_param_value = function_call_param_iterator.next();
       
  9178 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9179 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9180 			
       
  9181 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9182 			{
       
  9183 		
       
  9184 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9185 				s4o.print("(");
       
  9186 				return_type_symbol->accept(*this);
       
  9187 				s4o.print(")");
       
  9188 				IN_param_value->accept(*this);
       
  9189 				return NULL;
       
  9190 				
       
  9191 			}
       
  9192 			
       
  9193 			ERROR;
       
  9194 		}
       
  9195 		
       
  9196 	}/*function_lword_to_real*/
       
  9197 	break;
       
  9198 
       
  9199 /****
       
  9200  *LWORD_TO_SINT
       
  9201  */
       
  9202 	case function_lword_to_sint :
       
  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(lword_type_name_c))
       
  9218 			{
       
  9219 		
       
  9220 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9221 				s4o.print("(");
       
  9222 				return_type_symbol->accept(*this);
       
  9223 				s4o.print(")");
       
  9224 				IN_param_value->accept(*this);
       
  9225 				return NULL;
       
  9226 				
       
  9227 			}
       
  9228 			
       
  9229 			ERROR;
       
  9230 		}
       
  9231 		
       
  9232 	}/*function_lword_to_sint*/
       
  9233 	break;
       
  9234 
       
  9235 /****
       
  9236  *LWORD_TO_LINT
       
  9237  */
       
  9238 	case function_lword_to_lint :
       
  9239 	{
       
  9240 		symbol_c *last_type_symbol = NULL;
       
  9241 
       
  9242 		{
       
  9243 			identifier_c param_name("IN");
       
  9244 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9245 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9246 			
       
  9247 			/* Get the value from a foo(<param_value>) style call */
       
  9248 			if (IN_param_value == NULL)
       
  9249 			  IN_param_value = function_call_param_iterator.next();
       
  9250 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9251 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9252 			
       
  9253 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9254 			{
       
  9255 		
       
  9256 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9257 				s4o.print("(");
       
  9258 				return_type_symbol->accept(*this);
       
  9259 				s4o.print(")");
       
  9260 				IN_param_value->accept(*this);
       
  9261 				return NULL;
       
  9262 				
       
  9263 			}
       
  9264 			
       
  9265 			ERROR;
       
  9266 		}
       
  9267 		
       
  9268 	}/*function_lword_to_lint*/
       
  9269 	break;
       
  9270 
       
  9271 /****
       
  9272  *LWORD_TO_DINT
       
  9273  */
       
  9274 	case function_lword_to_dint :
       
  9275 	{
       
  9276 		symbol_c *last_type_symbol = NULL;
       
  9277 
       
  9278 		{
       
  9279 			identifier_c param_name("IN");
       
  9280 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9281 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9282 			
       
  9283 			/* Get the value from a foo(<param_value>) style call */
       
  9284 			if (IN_param_value == NULL)
       
  9285 			  IN_param_value = function_call_param_iterator.next();
       
  9286 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9287 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9288 			
       
  9289 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9290 			{
       
  9291 		
       
  9292 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9293 				s4o.print("(");
       
  9294 				return_type_symbol->accept(*this);
       
  9295 				s4o.print(")");
       
  9296 				IN_param_value->accept(*this);
       
  9297 				return NULL;
       
  9298 				
       
  9299 			}
       
  9300 			
       
  9301 			ERROR;
       
  9302 		}
       
  9303 		
       
  9304 	}/*function_lword_to_dint*/
       
  9305 	break;
       
  9306 
       
  9307 /****
       
  9308  *LWORD_TO_DATE
       
  9309  */
       
  9310 	case function_lword_to_date :
       
  9311 	{
       
  9312 		symbol_c *last_type_symbol = NULL;
       
  9313 
       
  9314 		{
       
  9315 			identifier_c param_name("IN");
       
  9316 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9317 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9318 			
       
  9319 			/* Get the value from a foo(<param_value>) style call */
       
  9320 			if (IN_param_value == NULL)
       
  9321 			  IN_param_value = function_call_param_iterator.next();
       
  9322 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9323 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9324 			
       
  9325 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9326 			{
       
  9327 		
       
  9328 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9329 				s4o.print("(");
       
  9330 				return_type_symbol->accept(*this);
       
  9331 				s4o.print(")time_to_real(");
       
  9332 				IN_param_value->accept(*this);
       
  9333 				s4o.print(")");
       
  9334 				return NULL;
       
  9335 				
       
  9336 			}
       
  9337 			
       
  9338 			ERROR;
       
  9339 		}
       
  9340 		
       
  9341 	}/*function_lword_to_date*/
       
  9342 	break;
       
  9343 
       
  9344 /****
       
  9345  *LWORD_TO_DWORD
       
  9346  */
       
  9347 	case function_lword_to_dword :
       
  9348 	{
       
  9349 		symbol_c *last_type_symbol = NULL;
       
  9350 
       
  9351 		{
       
  9352 			identifier_c param_name("IN");
       
  9353 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9354 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9355 			
       
  9356 			/* Get the value from a foo(<param_value>) style call */
       
  9357 			if (IN_param_value == NULL)
       
  9358 			  IN_param_value = function_call_param_iterator.next();
       
  9359 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9360 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9361 			
       
  9362 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9363 			{
       
  9364 		
       
  9365 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9366 				s4o.print("(");
       
  9367 				return_type_symbol->accept(*this);
       
  9368 				s4o.print(")");
       
  9369 				IN_param_value->accept(*this);
       
  9370 				return NULL;
       
  9371 				
       
  9372 			}
       
  9373 			
       
  9374 			ERROR;
       
  9375 		}
       
  9376 		
       
  9377 	}/*function_lword_to_dword*/
       
  9378 	break;
       
  9379 
       
  9380 /****
       
  9381  *LWORD_TO_DT
       
  9382  */
       
  9383 	case function_lword_to_dt :
       
  9384 	{
       
  9385 		symbol_c *last_type_symbol = NULL;
       
  9386 
       
  9387 		{
       
  9388 			identifier_c param_name("IN");
       
  9389 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9390 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9391 			
       
  9392 			/* Get the value from a foo(<param_value>) style call */
       
  9393 			if (IN_param_value == NULL)
       
  9394 			  IN_param_value = function_call_param_iterator.next();
       
  9395 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9396 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9397 			
       
  9398 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9399 			{
       
  9400 		
       
  9401 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9402 				s4o.print("(");
       
  9403 				return_type_symbol->accept(*this);
       
  9404 				s4o.print(")time_to_real(");
       
  9405 				IN_param_value->accept(*this);
       
  9406 				s4o.print(")");
       
  9407 				return NULL;
       
  9408 				
       
  9409 			}
       
  9410 			
       
  9411 			ERROR;
       
  9412 		}
       
  9413 		
       
  9414 	}/*function_lword_to_dt*/
       
  9415 	break;
       
  9416 
       
  9417 /****
       
  9418  *LWORD_TO_TOD
       
  9419  */
       
  9420 	case function_lword_to_tod :
       
  9421 	{
       
  9422 		symbol_c *last_type_symbol = NULL;
       
  9423 
       
  9424 		{
       
  9425 			identifier_c param_name("IN");
       
  9426 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9427 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9428 			
       
  9429 			/* Get the value from a foo(<param_value>) style call */
       
  9430 			if (IN_param_value == NULL)
       
  9431 			  IN_param_value = function_call_param_iterator.next();
       
  9432 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9433 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9434 			
       
  9435 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9436 			{
       
  9437 		
       
  9438 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9439 				s4o.print("(");
       
  9440 				return_type_symbol->accept(*this);
       
  9441 				s4o.print(")time_to_real(");
       
  9442 				IN_param_value->accept(*this);
       
  9443 				s4o.print(")");
       
  9444 				return NULL;
       
  9445 				
       
  9446 			}
       
  9447 			
       
  9448 			ERROR;
       
  9449 		}
       
  9450 		
       
  9451 	}/*function_lword_to_tod*/
       
  9452 	break;
       
  9453 
       
  9454 /****
       
  9455  *LWORD_TO_UDINT
       
  9456  */
       
  9457 	case function_lword_to_udint :
       
  9458 	{
       
  9459 		symbol_c *last_type_symbol = NULL;
       
  9460 
       
  9461 		{
       
  9462 			identifier_c param_name("IN");
       
  9463 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9464 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9465 			
       
  9466 			/* Get the value from a foo(<param_value>) style call */
       
  9467 			if (IN_param_value == NULL)
       
  9468 			  IN_param_value = function_call_param_iterator.next();
       
  9469 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9470 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9471 			
       
  9472 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9473 			{
       
  9474 		
       
  9475 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9476 				s4o.print("(");
       
  9477 				return_type_symbol->accept(*this);
       
  9478 				s4o.print(")");
       
  9479 				IN_param_value->accept(*this);
       
  9480 				return NULL;
       
  9481 				
       
  9482 			}
       
  9483 			
       
  9484 			ERROR;
       
  9485 		}
       
  9486 		
       
  9487 	}/*function_lword_to_udint*/
       
  9488 	break;
       
  9489 
       
  9490 /****
       
  9491  *LWORD_TO_WORD
       
  9492  */
       
  9493 	case function_lword_to_word :
       
  9494 	{
       
  9495 		symbol_c *last_type_symbol = NULL;
       
  9496 
       
  9497 		{
       
  9498 			identifier_c param_name("IN");
       
  9499 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9500 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9501 			
       
  9502 			/* Get the value from a foo(<param_value>) style call */
       
  9503 			if (IN_param_value == NULL)
       
  9504 			  IN_param_value = function_call_param_iterator.next();
       
  9505 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9506 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9507 			
       
  9508 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9509 			{
       
  9510 		
       
  9511 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9512 				s4o.print("(");
       
  9513 				return_type_symbol->accept(*this);
       
  9514 				s4o.print(")");
       
  9515 				IN_param_value->accept(*this);
       
  9516 				return NULL;
       
  9517 				
       
  9518 			}
       
  9519 			
       
  9520 			ERROR;
       
  9521 		}
       
  9522 		
       
  9523 	}/*function_lword_to_word*/
       
  9524 	break;
       
  9525 
       
  9526 /****
       
  9527  *LWORD_TO_WSTRING
       
  9528  */
       
  9529 	case function_lword_to_wstring :
       
  9530 	{
       
  9531 		symbol_c *last_type_symbol = NULL;
       
  9532 
       
  9533 		{
       
  9534 			identifier_c param_name("IN");
       
  9535 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9536 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9537 			
       
  9538 			/* Get the value from a foo(<param_value>) style call */
       
  9539 			if (IN_param_value == NULL)
       
  9540 			  IN_param_value = function_call_param_iterator.next();
       
  9541 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9542 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9543 			
       
  9544 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9545 			{
       
  9546 		
       
  9547 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9548 				s4o.print("(");
       
  9549 				return_type_symbol->accept(*this);
       
  9550 				s4o.print(")string_to_int(");
       
  9551 				IN_param_value->accept(*this);
       
  9552 				s4o.print(", 16)");
       
  9553 				return NULL;
       
  9554 				
       
  9555 			}
       
  9556 			
       
  9557 			ERROR;
       
  9558 		}
       
  9559 		
       
  9560 	}/*function_lword_to_wstring*/
       
  9561 	break;
       
  9562 
       
  9563 /****
       
  9564  *LWORD_TO_STRING
       
  9565  */
       
  9566 	case function_lword_to_string :
       
  9567 	{
       
  9568 		symbol_c *last_type_symbol = NULL;
       
  9569 
       
  9570 		{
       
  9571 			identifier_c param_name("IN");
       
  9572 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9573 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9574 			
       
  9575 			/* Get the value from a foo(<param_value>) style call */
       
  9576 			if (IN_param_value == NULL)
       
  9577 			  IN_param_value = function_call_param_iterator.next();
       
  9578 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9579 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9580 			
       
  9581 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9582 			{
       
  9583 		
       
  9584 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9585 				s4o.print("(");
       
  9586 				return_type_symbol->accept(*this);
       
  9587 				s4o.print(")string_to_int(");
       
  9588 				IN_param_value->accept(*this);
       
  9589 				s4o.print(", 16)");
       
  9590 				return NULL;
       
  9591 				
       
  9592 			}
       
  9593 			
       
  9594 			ERROR;
       
  9595 		}
       
  9596 		
       
  9597 	}/*function_lword_to_string*/
       
  9598 	break;
       
  9599 
       
  9600 /****
       
  9601  *LWORD_TO_LWORD
       
  9602  */
       
  9603 	case function_lword_to_lword :
       
  9604 	{
       
  9605 		symbol_c *last_type_symbol = NULL;
       
  9606 
       
  9607 		{
       
  9608 			identifier_c param_name("IN");
       
  9609 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9610 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9611 			
       
  9612 			/* Get the value from a foo(<param_value>) style call */
       
  9613 			if (IN_param_value == NULL)
       
  9614 			  IN_param_value = function_call_param_iterator.next();
       
  9615 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9616 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9617 			
       
  9618 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9619 			{
       
  9620 		
       
  9621 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9622 				s4o.print("(");
       
  9623 				return_type_symbol->accept(*this);
       
  9624 				s4o.print(")");
       
  9625 				IN_param_value->accept(*this);
       
  9626 				return NULL;
       
  9627 				
       
  9628 			}
       
  9629 			
       
  9630 			ERROR;
       
  9631 		}
       
  9632 		
       
  9633 	}/*function_lword_to_lword*/
       
  9634 	break;
       
  9635 
       
  9636 /****
       
  9637  *LWORD_TO_UINT
       
  9638  */
       
  9639 	case function_lword_to_uint :
       
  9640 	{
       
  9641 		symbol_c *last_type_symbol = NULL;
       
  9642 
       
  9643 		{
       
  9644 			identifier_c param_name("IN");
       
  9645 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9646 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9647 			
       
  9648 			/* Get the value from a foo(<param_value>) style call */
       
  9649 			if (IN_param_value == NULL)
       
  9650 			  IN_param_value = function_call_param_iterator.next();
       
  9651 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9652 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9653 			
       
  9654 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9655 			{
       
  9656 		
       
  9657 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9658 				s4o.print("(");
       
  9659 				return_type_symbol->accept(*this);
       
  9660 				s4o.print(")");
       
  9661 				IN_param_value->accept(*this);
       
  9662 				return NULL;
       
  9663 				
       
  9664 			}
       
  9665 			
       
  9666 			ERROR;
       
  9667 		}
       
  9668 		
       
  9669 	}/*function_lword_to_uint*/
       
  9670 	break;
       
  9671 
       
  9672 /****
       
  9673  *LWORD_TO_LREAL
       
  9674  */
       
  9675 	case function_lword_to_lreal :
       
  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(lword_type_name_c))
       
  9691 			{
       
  9692 		
       
  9693 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9694 				s4o.print("(");
       
  9695 				return_type_symbol->accept(*this);
       
  9696 				s4o.print(")");
       
  9697 				IN_param_value->accept(*this);
       
  9698 				return NULL;
       
  9699 				
       
  9700 			}
       
  9701 			
       
  9702 			ERROR;
       
  9703 		}
       
  9704 		
       
  9705 	}/*function_lword_to_lreal*/
       
  9706 	break;
       
  9707 
       
  9708 /****
       
  9709  *LWORD_TO_BYTE
       
  9710  */
       
  9711 	case function_lword_to_byte :
       
  9712 	{
       
  9713 		symbol_c *last_type_symbol = NULL;
       
  9714 
       
  9715 		{
       
  9716 			identifier_c param_name("IN");
       
  9717 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9718 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9719 			
       
  9720 			/* Get the value from a foo(<param_value>) style call */
       
  9721 			if (IN_param_value == NULL)
       
  9722 			  IN_param_value = function_call_param_iterator.next();
       
  9723 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9724 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9725 			
       
  9726 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9727 			{
       
  9728 		
       
  9729 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9730 				s4o.print("(");
       
  9731 				return_type_symbol->accept(*this);
       
  9732 				s4o.print(")");
       
  9733 				IN_param_value->accept(*this);
       
  9734 				return NULL;
       
  9735 				
       
  9736 			}
       
  9737 			
       
  9738 			ERROR;
       
  9739 		}
       
  9740 		
       
  9741 	}/*function_lword_to_byte*/
       
  9742 	break;
       
  9743 
       
  9744 /****
       
  9745  *LWORD_TO_USINT
       
  9746  */
       
  9747 	case function_lword_to_usint :
       
  9748 	{
       
  9749 		symbol_c *last_type_symbol = NULL;
       
  9750 
       
  9751 		{
       
  9752 			identifier_c param_name("IN");
       
  9753 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9754 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9755 			
       
  9756 			/* Get the value from a foo(<param_value>) style call */
       
  9757 			if (IN_param_value == NULL)
       
  9758 			  IN_param_value = function_call_param_iterator.next();
       
  9759 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9760 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9761 			
       
  9762 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9763 			{
       
  9764 		
       
  9765 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9766 				s4o.print("(");
       
  9767 				return_type_symbol->accept(*this);
       
  9768 				s4o.print(")");
       
  9769 				IN_param_value->accept(*this);
       
  9770 				return NULL;
       
  9771 				
       
  9772 			}
       
  9773 			
       
  9774 			ERROR;
       
  9775 		}
       
  9776 		
       
  9777 	}/*function_lword_to_usint*/
       
  9778 	break;
       
  9779 
       
  9780 /****
       
  9781  *LWORD_TO_ULINT
       
  9782  */
       
  9783 	case function_lword_to_ulint :
       
  9784 	{
       
  9785 		symbol_c *last_type_symbol = NULL;
       
  9786 
       
  9787 		{
       
  9788 			identifier_c param_name("IN");
       
  9789 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9790 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9791 			
       
  9792 			/* Get the value from a foo(<param_value>) style call */
       
  9793 			if (IN_param_value == NULL)
       
  9794 			  IN_param_value = function_call_param_iterator.next();
       
  9795 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9796 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9797 			
       
  9798 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9799 			{
       
  9800 		
       
  9801 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9802 				s4o.print("(");
       
  9803 				return_type_symbol->accept(*this);
       
  9804 				s4o.print(")");
       
  9805 				IN_param_value->accept(*this);
       
  9806 				return NULL;
       
  9807 				
       
  9808 			}
       
  9809 			
       
  9810 			ERROR;
       
  9811 		}
       
  9812 		
       
  9813 	}/*function_lword_to_ulint*/
       
  9814 	break;
       
  9815 
       
  9816 /****
       
  9817  *LWORD_TO_BOOL
       
  9818  */
       
  9819 	case function_lword_to_bool :
       
  9820 	{
       
  9821 		symbol_c *last_type_symbol = NULL;
       
  9822 
       
  9823 		{
       
  9824 			identifier_c param_name("IN");
       
  9825 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9826 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9827 			
       
  9828 			/* Get the value from a foo(<param_value>) style call */
       
  9829 			if (IN_param_value == NULL)
       
  9830 			  IN_param_value = function_call_param_iterator.next();
       
  9831 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9832 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9833 			
       
  9834 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9835 			{
       
  9836 		
       
  9837 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9838 				s4o.print("(");
       
  9839 				return_type_symbol->accept(*this);
       
  9840 				s4o.print(")");
       
  9841 				IN_param_value->accept(*this);
       
  9842 				return NULL;
       
  9843 				
       
  9844 			}
       
  9845 			
       
  9846 			ERROR;
       
  9847 		}
       
  9848 		
       
  9849 	}/*function_lword_to_bool*/
       
  9850 	break;
       
  9851 
       
  9852 /****
       
  9853  *LWORD_TO_TIME
       
  9854  */
       
  9855 	case function_lword_to_time :
       
  9856 	{
       
  9857 		symbol_c *last_type_symbol = NULL;
       
  9858 
       
  9859 		{
       
  9860 			identifier_c param_name("IN");
       
  9861 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9862 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9863 			
       
  9864 			/* Get the value from a foo(<param_value>) style call */
       
  9865 			if (IN_param_value == NULL)
       
  9866 			  IN_param_value = function_call_param_iterator.next();
       
  9867 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9868 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9869 			
       
  9870 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9871 			{
       
  9872 		
       
  9873 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9874 				s4o.print("(");
       
  9875 				return_type_symbol->accept(*this);
       
  9876 				s4o.print(")time_to_real(");
       
  9877 				IN_param_value->accept(*this);
       
  9878 				s4o.print(")");
       
  9879 				return NULL;
       
  9880 				
       
  9881 			}
       
  9882 			
       
  9883 			ERROR;
       
  9884 		}
       
  9885 		
       
  9886 	}/*function_lword_to_time*/
       
  9887 	break;
       
  9888 
       
  9889 /****
       
  9890  *LWORD_TO_INT
       
  9891  */
       
  9892 	case function_lword_to_int :
       
  9893 	{
       
  9894 		symbol_c *last_type_symbol = NULL;
       
  9895 
       
  9896 		{
       
  9897 			identifier_c param_name("IN");
       
  9898 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9899 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9900 			
       
  9901 			/* Get the value from a foo(<param_value>) style call */
       
  9902 			if (IN_param_value == NULL)
       
  9903 			  IN_param_value = function_call_param_iterator.next();
       
  9904 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9905 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9906 			
       
  9907 			if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9908 			{
       
  9909 		
       
  9910 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9911 				s4o.print("(");
       
  9912 				return_type_symbol->accept(*this);
       
  9913 				s4o.print(")");
       
  9914 				IN_param_value->accept(*this);
       
  9915 				return NULL;
       
  9916 				
       
  9917 			}
       
  9918 			
       
  9919 			ERROR;
       
  9920 		}
       
  9921 		
       
  9922 	}/*function_lword_to_int*/
       
  9923 	break;
       
  9924 
       
  9925 /****
       
  9926  *UINT_TO_REAL
       
  9927  */
       
  9928 	case function_uint_to_real :
       
  9929 	{
       
  9930 		symbol_c *last_type_symbol = NULL;
       
  9931 
       
  9932 		{
       
  9933 			identifier_c param_name("IN");
       
  9934 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9935 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9936 			
       
  9937 			/* Get the value from a foo(<param_value>) style call */
       
  9938 			if (IN_param_value == NULL)
       
  9939 			  IN_param_value = function_call_param_iterator.next();
       
  9940 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9941 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9942 			
       
  9943 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9944 			{
       
  9945 		
       
  9946 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9947 				s4o.print("(");
       
  9948 				return_type_symbol->accept(*this);
       
  9949 				s4o.print(")");
       
  9950 				IN_param_value->accept(*this);
       
  9951 				return NULL;
       
  9952 				
       
  9953 			}
       
  9954 			
       
  9955 			ERROR;
       
  9956 		}
       
  9957 		
       
  9958 	}/*function_uint_to_real*/
       
  9959 	break;
       
  9960 
       
  9961 /****
       
  9962  *UINT_TO_SINT
       
  9963  */
       
  9964 	case function_uint_to_sint :
       
  9965 	{
       
  9966 		symbol_c *last_type_symbol = NULL;
       
  9967 
       
  9968 		{
       
  9969 			identifier_c param_name("IN");
       
  9970 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9971 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9972 			
       
  9973 			/* Get the value from a foo(<param_value>) style call */
       
  9974 			if (IN_param_value == NULL)
       
  9975 			  IN_param_value = function_call_param_iterator.next();
       
  9976 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9977 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9978 			
       
  9979 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  9980 			{
       
  9981 		
       
  9982 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9983 				s4o.print("(");
       
  9984 				return_type_symbol->accept(*this);
       
  9985 				s4o.print(")");
       
  9986 				IN_param_value->accept(*this);
       
  9987 				return NULL;
       
  9988 				
       
  9989 			}
       
  9990 			
       
  9991 			ERROR;
       
  9992 		}
       
  9993 		
       
  9994 	}/*function_uint_to_sint*/
       
  9995 	break;
       
  9996 
       
  9997 /****
       
  9998  *UINT_TO_LINT
       
  9999  */
       
 10000 	case function_uint_to_lint :
       
 10001 	{
       
 10002 		symbol_c *last_type_symbol = NULL;
       
 10003 
       
 10004 		{
       
 10005 			identifier_c param_name("IN");
       
 10006 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10007 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10008 			
       
 10009 			/* Get the value from a foo(<param_value>) style call */
       
 10010 			if (IN_param_value == NULL)
       
 10011 			  IN_param_value = function_call_param_iterator.next();
       
 10012 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10013 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10014 			
       
 10015 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10016 			{
       
 10017 		
       
 10018 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10019 				s4o.print("(");
       
 10020 				return_type_symbol->accept(*this);
       
 10021 				s4o.print(")");
       
 10022 				IN_param_value->accept(*this);
       
 10023 				return NULL;
       
 10024 				
       
 10025 			}
       
 10026 			
       
 10027 			ERROR;
       
 10028 		}
       
 10029 		
       
 10030 	}/*function_uint_to_lint*/
       
 10031 	break;
       
 10032 
       
 10033 /****
       
 10034  *UINT_TO_DINT
       
 10035  */
       
 10036 	case function_uint_to_dint :
       
 10037 	{
       
 10038 		symbol_c *last_type_symbol = NULL;
       
 10039 
       
 10040 		{
       
 10041 			identifier_c param_name("IN");
       
 10042 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10043 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10044 			
       
 10045 			/* Get the value from a foo(<param_value>) style call */
       
 10046 			if (IN_param_value == NULL)
       
 10047 			  IN_param_value = function_call_param_iterator.next();
       
 10048 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10049 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10050 			
       
 10051 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10052 			{
       
 10053 		
       
 10054 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10055 				s4o.print("(");
       
 10056 				return_type_symbol->accept(*this);
       
 10057 				s4o.print(")");
       
 10058 				IN_param_value->accept(*this);
       
 10059 				return NULL;
       
 10060 				
       
 10061 			}
       
 10062 			
       
 10063 			ERROR;
       
 10064 		}
       
 10065 		
       
 10066 	}/*function_uint_to_dint*/
       
 10067 	break;
       
 10068 
       
 10069 /****
       
 10070  *UINT_TO_DATE
       
 10071  */
       
 10072 	case function_uint_to_date :
       
 10073 	{
       
 10074 		symbol_c *last_type_symbol = NULL;
       
 10075 
       
 10076 		{
       
 10077 			identifier_c param_name("IN");
       
 10078 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10079 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10080 			
       
 10081 			/* Get the value from a foo(<param_value>) style call */
       
 10082 			if (IN_param_value == NULL)
       
 10083 			  IN_param_value = function_call_param_iterator.next();
       
 10084 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10085 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10086 			
       
 10087 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10088 			{
       
 10089 		
       
 10090 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10091 				s4o.print("(");
       
 10092 				return_type_symbol->accept(*this);
       
 10093 				s4o.print(")time_to_real(");
       
 10094 				IN_param_value->accept(*this);
       
 10095 				s4o.print(")");
       
 10096 				return NULL;
       
 10097 				
       
 10098 			}
       
 10099 			
       
 10100 			ERROR;
       
 10101 		}
       
 10102 		
       
 10103 	}/*function_uint_to_date*/
       
 10104 	break;
       
 10105 
       
 10106 /****
       
 10107  *UINT_TO_DWORD
       
 10108  */
       
 10109 	case function_uint_to_dword :
       
 10110 	{
       
 10111 		symbol_c *last_type_symbol = NULL;
       
 10112 
       
 10113 		{
       
 10114 			identifier_c param_name("IN");
       
 10115 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10116 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10117 			
       
 10118 			/* Get the value from a foo(<param_value>) style call */
       
 10119 			if (IN_param_value == NULL)
       
 10120 			  IN_param_value = function_call_param_iterator.next();
       
 10121 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10122 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10123 			
       
 10124 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10125 			{
       
 10126 		
       
 10127 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10128 				s4o.print("(");
       
 10129 				return_type_symbol->accept(*this);
       
 10130 				s4o.print(")");
       
 10131 				IN_param_value->accept(*this);
       
 10132 				return NULL;
       
 10133 				
       
 10134 			}
       
 10135 			
       
 10136 			ERROR;
       
 10137 		}
       
 10138 		
       
 10139 	}/*function_uint_to_dword*/
       
 10140 	break;
       
 10141 
       
 10142 /****
       
 10143  *UINT_TO_DT
       
 10144  */
       
 10145 	case function_uint_to_dt :
       
 10146 	{
       
 10147 		symbol_c *last_type_symbol = NULL;
       
 10148 
       
 10149 		{
       
 10150 			identifier_c param_name("IN");
       
 10151 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10152 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10153 			
       
 10154 			/* Get the value from a foo(<param_value>) style call */
       
 10155 			if (IN_param_value == NULL)
       
 10156 			  IN_param_value = function_call_param_iterator.next();
       
 10157 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10158 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10159 			
       
 10160 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10161 			{
       
 10162 		
       
 10163 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10164 				s4o.print("(");
       
 10165 				return_type_symbol->accept(*this);
       
 10166 				s4o.print(")time_to_real(");
       
 10167 				IN_param_value->accept(*this);
       
 10168 				s4o.print(")");
       
 10169 				return NULL;
       
 10170 				
       
 10171 			}
       
 10172 			
       
 10173 			ERROR;
       
 10174 		}
       
 10175 		
       
 10176 	}/*function_uint_to_dt*/
       
 10177 	break;
       
 10178 
       
 10179 /****
       
 10180  *UINT_TO_TOD
       
 10181  */
       
 10182 	case function_uint_to_tod :
       
 10183 	{
       
 10184 		symbol_c *last_type_symbol = NULL;
       
 10185 
       
 10186 		{
       
 10187 			identifier_c param_name("IN");
       
 10188 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10189 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10190 			
       
 10191 			/* Get the value from a foo(<param_value>) style call */
       
 10192 			if (IN_param_value == NULL)
       
 10193 			  IN_param_value = function_call_param_iterator.next();
       
 10194 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10195 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10196 			
       
 10197 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10198 			{
       
 10199 		
       
 10200 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10201 				s4o.print("(");
       
 10202 				return_type_symbol->accept(*this);
       
 10203 				s4o.print(")time_to_real(");
       
 10204 				IN_param_value->accept(*this);
       
 10205 				s4o.print(")");
       
 10206 				return NULL;
       
 10207 				
       
 10208 			}
       
 10209 			
       
 10210 			ERROR;
       
 10211 		}
       
 10212 		
       
 10213 	}/*function_uint_to_tod*/
       
 10214 	break;
       
 10215 
       
 10216 /****
       
 10217  *UINT_TO_UDINT
       
 10218  */
       
 10219 	case function_uint_to_udint :
       
 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(uint_type_name_c))
       
 10235 			{
       
 10236 		
       
 10237 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10238 				s4o.print("(");
       
 10239 				return_type_symbol->accept(*this);
       
 10240 				s4o.print(")");
       
 10241 				IN_param_value->accept(*this);
       
 10242 				return NULL;
       
 10243 				
       
 10244 			}
       
 10245 			
       
 10246 			ERROR;
       
 10247 		}
       
 10248 		
       
 10249 	}/*function_uint_to_udint*/
       
 10250 	break;
       
 10251 
       
 10252 /****
       
 10253  *UINT_TO_WORD
       
 10254  */
       
 10255 	case function_uint_to_word :
       
 10256 	{
       
 10257 		symbol_c *last_type_symbol = NULL;
       
 10258 
       
 10259 		{
       
 10260 			identifier_c param_name("IN");
       
 10261 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10262 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10263 			
       
 10264 			/* Get the value from a foo(<param_value>) style call */
       
 10265 			if (IN_param_value == NULL)
       
 10266 			  IN_param_value = function_call_param_iterator.next();
       
 10267 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10268 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10269 			
       
 10270 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10271 			{
       
 10272 		
       
 10273 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10274 				s4o.print("(");
       
 10275 				return_type_symbol->accept(*this);
       
 10276 				s4o.print(")");
       
 10277 				IN_param_value->accept(*this);
       
 10278 				return NULL;
       
 10279 				
       
 10280 			}
       
 10281 			
       
 10282 			ERROR;
       
 10283 		}
       
 10284 		
       
 10285 	}/*function_uint_to_word*/
       
 10286 	break;
       
 10287 
       
 10288 /****
       
 10289  *UINT_TO_WSTRING
       
 10290  */
       
 10291 	case function_uint_to_wstring :
       
 10292 	{
       
 10293 		symbol_c *last_type_symbol = NULL;
       
 10294 
       
 10295 		{
       
 10296 			identifier_c param_name("IN");
       
 10297 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10298 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10299 			
       
 10300 			/* Get the value from a foo(<param_value>) style call */
       
 10301 			if (IN_param_value == NULL)
       
 10302 			  IN_param_value = function_call_param_iterator.next();
       
 10303 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10304 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10305 			
       
 10306 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10307 			{
       
 10308 		
       
 10309 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 10310 				s4o.print("(");
       
 10311 				return_type_symbol->accept(*this);
       
 10312 				s4o.print(")string_to_int(");
       
 10313 				IN_param_value->accept(*this);
       
 10314 				s4o.print(", 10)");
       
 10315 				return NULL;
       
 10316 				
       
 10317 			}
       
 10318 			
       
 10319 			ERROR;
       
 10320 		}
       
 10321 		
       
 10322 	}/*function_uint_to_wstring*/
       
 10323 	break;
       
 10324 
       
 10325 /****
       
 10326  *UINT_TO_STRING
       
 10327  */
       
 10328 	case function_uint_to_string :
       
 10329 	{
       
 10330 		symbol_c *last_type_symbol = NULL;
       
 10331 
       
 10332 		{
       
 10333 			identifier_c param_name("IN");
       
 10334 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10335 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10336 			
       
 10337 			/* Get the value from a foo(<param_value>) style call */
       
 10338 			if (IN_param_value == NULL)
       
 10339 			  IN_param_value = function_call_param_iterator.next();
       
 10340 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10341 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10342 			
       
 10343 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10344 			{
       
 10345 		
       
 10346 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10347 				s4o.print("(");
       
 10348 				return_type_symbol->accept(*this);
       
 10349 				s4o.print(")string_to_int(");
       
 10350 				IN_param_value->accept(*this);
       
 10351 				s4o.print(", 10)");
       
 10352 				return NULL;
       
 10353 				
       
 10354 			}
       
 10355 			
       
 10356 			ERROR;
       
 10357 		}
       
 10358 		
       
 10359 	}/*function_uint_to_string*/
       
 10360 	break;
       
 10361 
       
 10362 /****
       
 10363  *UINT_TO_LWORD
       
 10364  */
       
 10365 	case function_uint_to_lword :
       
 10366 	{
       
 10367 		symbol_c *last_type_symbol = NULL;
       
 10368 
       
 10369 		{
       
 10370 			identifier_c param_name("IN");
       
 10371 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10372 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10373 			
       
 10374 			/* Get the value from a foo(<param_value>) style call */
       
 10375 			if (IN_param_value == NULL)
       
 10376 			  IN_param_value = function_call_param_iterator.next();
       
 10377 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10378 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10379 			
       
 10380 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10381 			{
       
 10382 		
       
 10383 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10384 				s4o.print("(");
       
 10385 				return_type_symbol->accept(*this);
       
 10386 				s4o.print(")");
       
 10387 				IN_param_value->accept(*this);
       
 10388 				return NULL;
       
 10389 				
       
 10390 			}
       
 10391 			
       
 10392 			ERROR;
       
 10393 		}
       
 10394 		
       
 10395 	}/*function_uint_to_lword*/
       
 10396 	break;
       
 10397 
       
 10398 /****
       
 10399  *UINT_TO_UINT
       
 10400  */
       
 10401 	case function_uint_to_uint :
       
 10402 	{
       
 10403 		symbol_c *last_type_symbol = NULL;
       
 10404 
       
 10405 		{
       
 10406 			identifier_c param_name("IN");
       
 10407 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10408 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10409 			
       
 10410 			/* Get the value from a foo(<param_value>) style call */
       
 10411 			if (IN_param_value == NULL)
       
 10412 			  IN_param_value = function_call_param_iterator.next();
       
 10413 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10414 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10415 			
       
 10416 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10417 			{
       
 10418 		
       
 10419 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10420 				s4o.print("(");
       
 10421 				return_type_symbol->accept(*this);
       
 10422 				s4o.print(")");
       
 10423 				IN_param_value->accept(*this);
       
 10424 				return NULL;
       
 10425 				
       
 10426 			}
       
 10427 			
       
 10428 			ERROR;
       
 10429 		}
       
 10430 		
       
 10431 	}/*function_uint_to_uint*/
       
 10432 	break;
       
 10433 
       
 10434 /****
       
 10435  *UINT_TO_LREAL
       
 10436  */
       
 10437 	case function_uint_to_lreal :
       
 10438 	{
       
 10439 		symbol_c *last_type_symbol = NULL;
       
 10440 
       
 10441 		{
       
 10442 			identifier_c param_name("IN");
       
 10443 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10444 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10445 			
       
 10446 			/* Get the value from a foo(<param_value>) style call */
       
 10447 			if (IN_param_value == NULL)
       
 10448 			  IN_param_value = function_call_param_iterator.next();
       
 10449 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10450 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10451 			
       
 10452 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10453 			{
       
 10454 		
       
 10455 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10456 				s4o.print("(");
       
 10457 				return_type_symbol->accept(*this);
       
 10458 				s4o.print(")");
       
 10459 				IN_param_value->accept(*this);
       
 10460 				return NULL;
       
 10461 				
       
 10462 			}
       
 10463 			
       
 10464 			ERROR;
       
 10465 		}
       
 10466 		
       
 10467 	}/*function_uint_to_lreal*/
       
 10468 	break;
       
 10469 
       
 10470 /****
       
 10471  *UINT_TO_BYTE
       
 10472  */
       
 10473 	case function_uint_to_byte :
       
 10474 	{
       
 10475 		symbol_c *last_type_symbol = NULL;
       
 10476 
       
 10477 		{
       
 10478 			identifier_c param_name("IN");
       
 10479 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10480 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10481 			
       
 10482 			/* Get the value from a foo(<param_value>) style call */
       
 10483 			if (IN_param_value == NULL)
       
 10484 			  IN_param_value = function_call_param_iterator.next();
       
 10485 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10486 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10487 			
       
 10488 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10489 			{
       
 10490 		
       
 10491 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10492 				s4o.print("(");
       
 10493 				return_type_symbol->accept(*this);
       
 10494 				s4o.print(")");
       
 10495 				IN_param_value->accept(*this);
       
 10496 				return NULL;
       
 10497 				
       
 10498 			}
       
 10499 			
       
 10500 			ERROR;
       
 10501 		}
       
 10502 		
       
 10503 	}/*function_uint_to_byte*/
       
 10504 	break;
       
 10505 
       
 10506 /****
       
 10507  *UINT_TO_USINT
       
 10508  */
       
 10509 	case function_uint_to_usint :
       
 10510 	{
       
 10511 		symbol_c *last_type_symbol = NULL;
       
 10512 
       
 10513 		{
       
 10514 			identifier_c param_name("IN");
       
 10515 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10516 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10517 			
       
 10518 			/* Get the value from a foo(<param_value>) style call */
       
 10519 			if (IN_param_value == NULL)
       
 10520 			  IN_param_value = function_call_param_iterator.next();
       
 10521 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10522 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10523 			
       
 10524 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10525 			{
       
 10526 		
       
 10527 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10528 				s4o.print("(");
       
 10529 				return_type_symbol->accept(*this);
       
 10530 				s4o.print(")");
       
 10531 				IN_param_value->accept(*this);
       
 10532 				return NULL;
       
 10533 				
       
 10534 			}
       
 10535 			
       
 10536 			ERROR;
       
 10537 		}
       
 10538 		
       
 10539 	}/*function_uint_to_usint*/
       
 10540 	break;
       
 10541 
       
 10542 /****
       
 10543  *UINT_TO_ULINT
       
 10544  */
       
 10545 	case function_uint_to_ulint :
       
 10546 	{
       
 10547 		symbol_c *last_type_symbol = NULL;
       
 10548 
       
 10549 		{
       
 10550 			identifier_c param_name("IN");
       
 10551 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10552 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10553 			
       
 10554 			/* Get the value from a foo(<param_value>) style call */
       
 10555 			if (IN_param_value == NULL)
       
 10556 			  IN_param_value = function_call_param_iterator.next();
       
 10557 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10558 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10559 			
       
 10560 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10561 			{
       
 10562 		
       
 10563 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10564 				s4o.print("(");
       
 10565 				return_type_symbol->accept(*this);
       
 10566 				s4o.print(")");
       
 10567 				IN_param_value->accept(*this);
       
 10568 				return NULL;
       
 10569 				
       
 10570 			}
       
 10571 			
       
 10572 			ERROR;
       
 10573 		}
       
 10574 		
       
 10575 	}/*function_uint_to_ulint*/
       
 10576 	break;
       
 10577 
       
 10578 /****
       
 10579  *UINT_TO_BOOL
       
 10580  */
       
 10581 	case function_uint_to_bool :
       
 10582 	{
       
 10583 		symbol_c *last_type_symbol = NULL;
       
 10584 
       
 10585 		{
       
 10586 			identifier_c param_name("IN");
       
 10587 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10588 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10589 			
       
 10590 			/* Get the value from a foo(<param_value>) style call */
       
 10591 			if (IN_param_value == NULL)
       
 10592 			  IN_param_value = function_call_param_iterator.next();
       
 10593 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10594 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10595 			
       
 10596 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10597 			{
       
 10598 		
       
 10599 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10600 				s4o.print("(");
       
 10601 				return_type_symbol->accept(*this);
       
 10602 				s4o.print(")");
       
 10603 				IN_param_value->accept(*this);
       
 10604 				return NULL;
       
 10605 				
       
 10606 			}
       
 10607 			
       
 10608 			ERROR;
       
 10609 		}
       
 10610 		
       
 10611 	}/*function_uint_to_bool*/
       
 10612 	break;
       
 10613 
       
 10614 /****
       
 10615  *UINT_TO_TIME
       
 10616  */
       
 10617 	case function_uint_to_time :
       
 10618 	{
       
 10619 		symbol_c *last_type_symbol = NULL;
       
 10620 
       
 10621 		{
       
 10622 			identifier_c param_name("IN");
       
 10623 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10624 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10625 			
       
 10626 			/* Get the value from a foo(<param_value>) style call */
       
 10627 			if (IN_param_value == NULL)
       
 10628 			  IN_param_value = function_call_param_iterator.next();
       
 10629 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10630 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10631 			
       
 10632 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10633 			{
       
 10634 		
       
 10635 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10636 				s4o.print("(");
       
 10637 				return_type_symbol->accept(*this);
       
 10638 				s4o.print(")time_to_real(");
       
 10639 				IN_param_value->accept(*this);
       
 10640 				s4o.print(")");
       
 10641 				return NULL;
       
 10642 				
       
 10643 			}
       
 10644 			
       
 10645 			ERROR;
       
 10646 		}
       
 10647 		
       
 10648 	}/*function_uint_to_time*/
       
 10649 	break;
       
 10650 
       
 10651 /****
       
 10652  *UINT_TO_INT
       
 10653  */
       
 10654 	case function_uint_to_int :
       
 10655 	{
       
 10656 		symbol_c *last_type_symbol = NULL;
       
 10657 
       
 10658 		{
       
 10659 			identifier_c param_name("IN");
       
 10660 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10661 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10662 			
       
 10663 			/* Get the value from a foo(<param_value>) style call */
       
 10664 			if (IN_param_value == NULL)
       
 10665 			  IN_param_value = function_call_param_iterator.next();
       
 10666 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10667 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10668 			
       
 10669 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 10670 			{
       
 10671 		
       
 10672 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10673 				s4o.print("(");
       
 10674 				return_type_symbol->accept(*this);
       
 10675 				s4o.print(")");
       
 10676 				IN_param_value->accept(*this);
       
 10677 				return NULL;
       
 10678 				
       
 10679 			}
       
 10680 			
       
 10681 			ERROR;
       
 10682 		}
       
 10683 		
       
 10684 	}/*function_uint_to_int*/
       
 10685 	break;
       
 10686 
       
 10687 /****
       
 10688  *LREAL_TO_REAL
       
 10689  */
       
 10690 	case function_lreal_to_real :
       
 10691 	{
       
 10692 		symbol_c *last_type_symbol = NULL;
       
 10693 
       
 10694 		{
       
 10695 			identifier_c param_name("IN");
       
 10696 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10697 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10698 			
       
 10699 			/* Get the value from a foo(<param_value>) style call */
       
 10700 			if (IN_param_value == NULL)
       
 10701 			  IN_param_value = function_call_param_iterator.next();
       
 10702 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10703 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10704 			
       
 10705 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10706 			{
       
 10707 		
       
 10708 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10709 				s4o.print("(");
       
 10710 				return_type_symbol->accept(*this);
       
 10711 				s4o.print(")");
       
 10712 				IN_param_value->accept(*this);
       
 10713 				return NULL;
       
 10714 				
       
 10715 			}
       
 10716 			
       
 10717 			ERROR;
       
 10718 		}
       
 10719 		
       
 10720 	}/*function_lreal_to_real*/
       
 10721 	break;
       
 10722 
       
 10723 /****
       
 10724  *LREAL_TO_SINT
       
 10725  */
       
 10726 	case function_lreal_to_sint :
       
 10727 	{
       
 10728 		symbol_c *last_type_symbol = NULL;
       
 10729 
       
 10730 		{
       
 10731 			identifier_c param_name("IN");
       
 10732 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10733 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10734 			
       
 10735 			/* Get the value from a foo(<param_value>) style call */
       
 10736 			if (IN_param_value == NULL)
       
 10737 			  IN_param_value = function_call_param_iterator.next();
       
 10738 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10739 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10740 			
       
 10741 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10742 			{
       
 10743 		
       
 10744 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10745 				s4o.print("(");
       
 10746 				return_type_symbol->accept(*this);
       
 10747 				s4o.print(")");
       
 10748 				IN_param_value->accept(*this);
       
 10749 				return NULL;
       
 10750 				
       
 10751 			}
       
 10752 			
       
 10753 			ERROR;
       
 10754 		}
       
 10755 		
       
 10756 	}/*function_lreal_to_sint*/
       
 10757 	break;
       
 10758 
       
 10759 /****
       
 10760  *LREAL_TO_LINT
       
 10761  */
       
 10762 	case function_lreal_to_lint :
       
 10763 	{
       
 10764 		symbol_c *last_type_symbol = NULL;
       
 10765 
       
 10766 		{
       
 10767 			identifier_c param_name("IN");
       
 10768 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10769 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10770 			
       
 10771 			/* Get the value from a foo(<param_value>) style call */
       
 10772 			if (IN_param_value == NULL)
       
 10773 			  IN_param_value = function_call_param_iterator.next();
       
 10774 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10775 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10776 			
       
 10777 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10778 			{
       
 10779 		
       
 10780 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10781 				s4o.print("(");
       
 10782 				return_type_symbol->accept(*this);
       
 10783 				s4o.print(")");
       
 10784 				IN_param_value->accept(*this);
       
 10785 				return NULL;
       
 10786 				
       
 10787 			}
       
 10788 			
       
 10789 			ERROR;
       
 10790 		}
       
 10791 		
       
 10792 	}/*function_lreal_to_lint*/
       
 10793 	break;
       
 10794 
       
 10795 /****
       
 10796  *LREAL_TO_DINT
       
 10797  */
       
 10798 	case function_lreal_to_dint :
       
 10799 	{
       
 10800 		symbol_c *last_type_symbol = NULL;
       
 10801 
       
 10802 		{
       
 10803 			identifier_c param_name("IN");
       
 10804 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10805 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10806 			
       
 10807 			/* Get the value from a foo(<param_value>) style call */
       
 10808 			if (IN_param_value == NULL)
       
 10809 			  IN_param_value = function_call_param_iterator.next();
       
 10810 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10811 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10812 			
       
 10813 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10814 			{
       
 10815 		
       
 10816 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10817 				s4o.print("(");
       
 10818 				return_type_symbol->accept(*this);
       
 10819 				s4o.print(")");
       
 10820 				IN_param_value->accept(*this);
       
 10821 				return NULL;
       
 10822 				
       
 10823 			}
       
 10824 			
       
 10825 			ERROR;
       
 10826 		}
       
 10827 		
       
 10828 	}/*function_lreal_to_dint*/
       
 10829 	break;
       
 10830 
       
 10831 /****
       
 10832  *LREAL_TO_DATE
       
 10833  */
       
 10834 	case function_lreal_to_date :
       
 10835 	{
       
 10836 		symbol_c *last_type_symbol = NULL;
       
 10837 
       
 10838 		{
       
 10839 			identifier_c param_name("IN");
       
 10840 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10841 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10842 			
       
 10843 			/* Get the value from a foo(<param_value>) style call */
       
 10844 			if (IN_param_value == NULL)
       
 10845 			  IN_param_value = function_call_param_iterator.next();
       
 10846 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10847 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10848 			
       
 10849 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10850 			{
       
 10851 		
       
 10852 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10853 				s4o.print("(");
       
 10854 				return_type_symbol->accept(*this);
       
 10855 				s4o.print(")time_to_real(");
       
 10856 				IN_param_value->accept(*this);
       
 10857 				s4o.print(")");
       
 10858 				return NULL;
       
 10859 				
       
 10860 			}
       
 10861 			
       
 10862 			ERROR;
       
 10863 		}
       
 10864 		
       
 10865 	}/*function_lreal_to_date*/
       
 10866 	break;
       
 10867 
       
 10868 /****
       
 10869  *LREAL_TO_DWORD
       
 10870  */
       
 10871 	case function_lreal_to_dword :
       
 10872 	{
       
 10873 		symbol_c *last_type_symbol = NULL;
       
 10874 
       
 10875 		{
       
 10876 			identifier_c param_name("IN");
       
 10877 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10878 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10879 			
       
 10880 			/* Get the value from a foo(<param_value>) style call */
       
 10881 			if (IN_param_value == NULL)
       
 10882 			  IN_param_value = function_call_param_iterator.next();
       
 10883 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10884 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10885 			
       
 10886 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10887 			{
       
 10888 		
       
 10889 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10890 				s4o.print("(");
       
 10891 				return_type_symbol->accept(*this);
       
 10892 				s4o.print(")");
       
 10893 				IN_param_value->accept(*this);
       
 10894 				return NULL;
       
 10895 				
       
 10896 			}
       
 10897 			
       
 10898 			ERROR;
       
 10899 		}
       
 10900 		
       
 10901 	}/*function_lreal_to_dword*/
       
 10902 	break;
       
 10903 
       
 10904 /****
       
 10905  *LREAL_TO_DT
       
 10906  */
       
 10907 	case function_lreal_to_dt :
       
 10908 	{
       
 10909 		symbol_c *last_type_symbol = NULL;
       
 10910 
       
 10911 		{
       
 10912 			identifier_c param_name("IN");
       
 10913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10914 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10915 			
       
 10916 			/* Get the value from a foo(<param_value>) style call */
       
 10917 			if (IN_param_value == NULL)
       
 10918 			  IN_param_value = function_call_param_iterator.next();
       
 10919 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10920 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10921 			
       
 10922 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10923 			{
       
 10924 		
       
 10925 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10926 				s4o.print("(");
       
 10927 				return_type_symbol->accept(*this);
       
 10928 				s4o.print(")time_to_real(");
       
 10929 				IN_param_value->accept(*this);
       
 10930 				s4o.print(")");
       
 10931 				return NULL;
       
 10932 				
       
 10933 			}
       
 10934 			
       
 10935 			ERROR;
       
 10936 		}
       
 10937 		
       
 10938 	}/*function_lreal_to_dt*/
       
 10939 	break;
       
 10940 
       
 10941 /****
       
 10942  *LREAL_TO_TOD
       
 10943  */
       
 10944 	case function_lreal_to_tod :
       
 10945 	{
       
 10946 		symbol_c *last_type_symbol = NULL;
       
 10947 
       
 10948 		{
       
 10949 			identifier_c param_name("IN");
       
 10950 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10951 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10952 			
       
 10953 			/* Get the value from a foo(<param_value>) style call */
       
 10954 			if (IN_param_value == NULL)
       
 10955 			  IN_param_value = function_call_param_iterator.next();
       
 10956 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10957 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10958 			
       
 10959 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10960 			{
       
 10961 		
       
 10962 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10963 				s4o.print("(");
       
 10964 				return_type_symbol->accept(*this);
       
 10965 				s4o.print(")time_to_real(");
       
 10966 				IN_param_value->accept(*this);
       
 10967 				s4o.print(")");
       
 10968 				return NULL;
       
 10969 				
       
 10970 			}
       
 10971 			
       
 10972 			ERROR;
       
 10973 		}
       
 10974 		
       
 10975 	}/*function_lreal_to_tod*/
       
 10976 	break;
       
 10977 
       
 10978 /****
       
 10979  *LREAL_TO_UDINT
       
 10980  */
       
 10981 	case function_lreal_to_udint :
       
 10982 	{
       
 10983 		symbol_c *last_type_symbol = NULL;
       
 10984 
       
 10985 		{
       
 10986 			identifier_c param_name("IN");
       
 10987 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10988 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10989 			
       
 10990 			/* Get the value from a foo(<param_value>) style call */
       
 10991 			if (IN_param_value == NULL)
       
 10992 			  IN_param_value = function_call_param_iterator.next();
       
 10993 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10994 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10995 			
       
 10996 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 10997 			{
       
 10998 		
       
 10999 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11000 				s4o.print("(");
       
 11001 				return_type_symbol->accept(*this);
       
 11002 				s4o.print(")");
       
 11003 				IN_param_value->accept(*this);
       
 11004 				return NULL;
       
 11005 				
       
 11006 			}
       
 11007 			
       
 11008 			ERROR;
       
 11009 		}
       
 11010 		
       
 11011 	}/*function_lreal_to_udint*/
       
 11012 	break;
       
 11013 
       
 11014 /****
       
 11015  *LREAL_TO_WORD
       
 11016  */
       
 11017 	case function_lreal_to_word :
       
 11018 	{
       
 11019 		symbol_c *last_type_symbol = NULL;
       
 11020 
       
 11021 		{
       
 11022 			identifier_c param_name("IN");
       
 11023 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11024 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11025 			
       
 11026 			/* Get the value from a foo(<param_value>) style call */
       
 11027 			if (IN_param_value == NULL)
       
 11028 			  IN_param_value = function_call_param_iterator.next();
       
 11029 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11030 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11031 			
       
 11032 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11033 			{
       
 11034 		
       
 11035 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11036 				s4o.print("(");
       
 11037 				return_type_symbol->accept(*this);
       
 11038 				s4o.print(")");
       
 11039 				IN_param_value->accept(*this);
       
 11040 				return NULL;
       
 11041 				
       
 11042 			}
       
 11043 			
       
 11044 			ERROR;
       
 11045 		}
       
 11046 		
       
 11047 	}/*function_lreal_to_word*/
       
 11048 	break;
       
 11049 
       
 11050 /****
       
 11051  *LREAL_TO_WSTRING
       
 11052  */
       
 11053 	case function_lreal_to_wstring :
       
 11054 	{
       
 11055 		symbol_c *last_type_symbol = NULL;
       
 11056 
       
 11057 		{
       
 11058 			identifier_c param_name("IN");
       
 11059 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11060 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11061 			
       
 11062 			/* Get the value from a foo(<param_value>) style call */
       
 11063 			if (IN_param_value == NULL)
       
 11064 			  IN_param_value = function_call_param_iterator.next();
       
 11065 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11066 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11067 			
       
 11068 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11069 			{
       
 11070 		
       
 11071 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11072 				s4o.print("(");
       
 11073 				return_type_symbol->accept(*this);
       
 11074 				s4o.print(")string_to_int(");
       
 11075 				IN_param_value->accept(*this);
       
 11076 				s4o.print(", 10)");
       
 11077 				return NULL;
       
 11078 				
       
 11079 			}
       
 11080 			
       
 11081 			ERROR;
       
 11082 		}
       
 11083 		
       
 11084 	}/*function_lreal_to_wstring*/
       
 11085 	break;
       
 11086 
       
 11087 /****
       
 11088  *LREAL_TO_STRING
       
 11089  */
       
 11090 	case function_lreal_to_string :
       
 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(lreal_type_name_c))
       
 11106 			{
       
 11107 		
       
 11108 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11109 				s4o.print("(");
       
 11110 				return_type_symbol->accept(*this);
       
 11111 				s4o.print(")string_to_int(");
       
 11112 				IN_param_value->accept(*this);
       
 11113 				s4o.print(", 10)");
       
 11114 				return NULL;
       
 11115 				
       
 11116 			}
       
 11117 			
       
 11118 			ERROR;
       
 11119 		}
       
 11120 		
       
 11121 	}/*function_lreal_to_string*/
       
 11122 	break;
       
 11123 
       
 11124 /****
       
 11125  *LREAL_TO_LWORD
       
 11126  */
       
 11127 	case function_lreal_to_lword :
       
 11128 	{
       
 11129 		symbol_c *last_type_symbol = NULL;
       
 11130 
       
 11131 		{
       
 11132 			identifier_c param_name("IN");
       
 11133 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11134 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11135 			
       
 11136 			/* Get the value from a foo(<param_value>) style call */
       
 11137 			if (IN_param_value == NULL)
       
 11138 			  IN_param_value = function_call_param_iterator.next();
       
 11139 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11140 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11141 			
       
 11142 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11143 			{
       
 11144 		
       
 11145 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11146 				s4o.print("(");
       
 11147 				return_type_symbol->accept(*this);
       
 11148 				s4o.print(")");
       
 11149 				IN_param_value->accept(*this);
       
 11150 				return NULL;
       
 11151 				
       
 11152 			}
       
 11153 			
       
 11154 			ERROR;
       
 11155 		}
       
 11156 		
       
 11157 	}/*function_lreal_to_lword*/
       
 11158 	break;
       
 11159 
       
 11160 /****
       
 11161  *LREAL_TO_UINT
       
 11162  */
       
 11163 	case function_lreal_to_uint :
       
 11164 	{
       
 11165 		symbol_c *last_type_symbol = NULL;
       
 11166 
       
 11167 		{
       
 11168 			identifier_c param_name("IN");
       
 11169 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11170 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11171 			
       
 11172 			/* Get the value from a foo(<param_value>) style call */
       
 11173 			if (IN_param_value == NULL)
       
 11174 			  IN_param_value = function_call_param_iterator.next();
       
 11175 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11176 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11177 			
       
 11178 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11179 			{
       
 11180 		
       
 11181 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11182 				s4o.print("(");
       
 11183 				return_type_symbol->accept(*this);
       
 11184 				s4o.print(")");
       
 11185 				IN_param_value->accept(*this);
       
 11186 				return NULL;
       
 11187 				
       
 11188 			}
       
 11189 			
       
 11190 			ERROR;
       
 11191 		}
       
 11192 		
       
 11193 	}/*function_lreal_to_uint*/
       
 11194 	break;
       
 11195 
       
 11196 /****
       
 11197  *LREAL_TO_LREAL
       
 11198  */
       
 11199 	case function_lreal_to_lreal :
       
 11200 	{
       
 11201 		symbol_c *last_type_symbol = NULL;
       
 11202 
       
 11203 		{
       
 11204 			identifier_c param_name("IN");
       
 11205 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11206 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11207 			
       
 11208 			/* Get the value from a foo(<param_value>) style call */
       
 11209 			if (IN_param_value == NULL)
       
 11210 			  IN_param_value = function_call_param_iterator.next();
       
 11211 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11212 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11213 			
       
 11214 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11215 			{
       
 11216 		
       
 11217 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11218 				s4o.print("(");
       
 11219 				return_type_symbol->accept(*this);
       
 11220 				s4o.print(")");
       
 11221 				IN_param_value->accept(*this);
       
 11222 				return NULL;
       
 11223 				
       
 11224 			}
       
 11225 			
       
 11226 			ERROR;
       
 11227 		}
       
 11228 		
       
 11229 	}/*function_lreal_to_lreal*/
       
 11230 	break;
       
 11231 
       
 11232 /****
       
 11233  *LREAL_TO_BYTE
       
 11234  */
       
 11235 	case function_lreal_to_byte :
       
 11236 	{
       
 11237 		symbol_c *last_type_symbol = NULL;
       
 11238 
       
 11239 		{
       
 11240 			identifier_c param_name("IN");
       
 11241 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11242 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11243 			
       
 11244 			/* Get the value from a foo(<param_value>) style call */
       
 11245 			if (IN_param_value == NULL)
       
 11246 			  IN_param_value = function_call_param_iterator.next();
       
 11247 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11248 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11249 			
       
 11250 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11251 			{
       
 11252 		
       
 11253 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11254 				s4o.print("(");
       
 11255 				return_type_symbol->accept(*this);
       
 11256 				s4o.print(")");
       
 11257 				IN_param_value->accept(*this);
       
 11258 				return NULL;
       
 11259 				
       
 11260 			}
       
 11261 			
       
 11262 			ERROR;
       
 11263 		}
       
 11264 		
       
 11265 	}/*function_lreal_to_byte*/
       
 11266 	break;
       
 11267 
       
 11268 /****
       
 11269  *LREAL_TO_USINT
       
 11270  */
       
 11271 	case function_lreal_to_usint :
       
 11272 	{
       
 11273 		symbol_c *last_type_symbol = NULL;
       
 11274 
       
 11275 		{
       
 11276 			identifier_c param_name("IN");
       
 11277 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11278 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11279 			
       
 11280 			/* Get the value from a foo(<param_value>) style call */
       
 11281 			if (IN_param_value == NULL)
       
 11282 			  IN_param_value = function_call_param_iterator.next();
       
 11283 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11284 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11285 			
       
 11286 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11287 			{
       
 11288 		
       
 11289 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11290 				s4o.print("(");
       
 11291 				return_type_symbol->accept(*this);
       
 11292 				s4o.print(")");
       
 11293 				IN_param_value->accept(*this);
       
 11294 				return NULL;
       
 11295 				
       
 11296 			}
       
 11297 			
       
 11298 			ERROR;
       
 11299 		}
       
 11300 		
       
 11301 	}/*function_lreal_to_usint*/
       
 11302 	break;
       
 11303 
       
 11304 /****
       
 11305  *LREAL_TO_ULINT
       
 11306  */
       
 11307 	case function_lreal_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(lreal_type_name_c))
       
 11323 			{
       
 11324 		
       
 11325 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11326 				s4o.print("(");
       
 11327 				return_type_symbol->accept(*this);
       
 11328 				s4o.print(")");
       
 11329 				IN_param_value->accept(*this);
       
 11330 				return NULL;
       
 11331 				
       
 11332 			}
       
 11333 			
       
 11334 			ERROR;
       
 11335 		}
       
 11336 		
       
 11337 	}/*function_lreal_to_ulint*/
       
 11338 	break;
       
 11339 
       
 11340 /****
       
 11341  *LREAL_TO_BOOL
       
 11342  */
       
 11343 	case function_lreal_to_bool :
       
 11344 	{
       
 11345 		symbol_c *last_type_symbol = NULL;
       
 11346 
       
 11347 		{
       
 11348 			identifier_c param_name("IN");
       
 11349 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11350 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11351 			
       
 11352 			/* Get the value from a foo(<param_value>) style call */
       
 11353 			if (IN_param_value == NULL)
       
 11354 			  IN_param_value = function_call_param_iterator.next();
       
 11355 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11356 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11357 			
       
 11358 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11359 			{
       
 11360 		
       
 11361 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11362 				s4o.print("(");
       
 11363 				return_type_symbol->accept(*this);
       
 11364 				s4o.print(")");
       
 11365 				IN_param_value->accept(*this);
       
 11366 				return NULL;
       
 11367 				
       
 11368 			}
       
 11369 			
       
 11370 			ERROR;
       
 11371 		}
       
 11372 		
       
 11373 	}/*function_lreal_to_bool*/
       
 11374 	break;
       
 11375 
       
 11376 /****
       
 11377  *LREAL_TO_TIME
       
 11378  */
       
 11379 	case function_lreal_to_time :
       
 11380 	{
       
 11381 		symbol_c *last_type_symbol = NULL;
       
 11382 
       
 11383 		{
       
 11384 			identifier_c param_name("IN");
       
 11385 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11386 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11387 			
       
 11388 			/* Get the value from a foo(<param_value>) style call */
       
 11389 			if (IN_param_value == NULL)
       
 11390 			  IN_param_value = function_call_param_iterator.next();
       
 11391 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11392 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11393 			
       
 11394 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11395 			{
       
 11396 		
       
 11397 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11398 				s4o.print("(");
       
 11399 				return_type_symbol->accept(*this);
       
 11400 				s4o.print(")time_to_real(");
       
 11401 				IN_param_value->accept(*this);
       
 11402 				s4o.print(")");
       
 11403 				return NULL;
       
 11404 				
       
 11405 			}
       
 11406 			
       
 11407 			ERROR;
       
 11408 		}
       
 11409 		
       
 11410 	}/*function_lreal_to_time*/
       
 11411 	break;
       
 11412 
       
 11413 /****
       
 11414  *LREAL_TO_INT
       
 11415  */
       
 11416 	case function_lreal_to_int :
       
 11417 	{
       
 11418 		symbol_c *last_type_symbol = NULL;
       
 11419 
       
 11420 		{
       
 11421 			identifier_c param_name("IN");
       
 11422 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11423 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11424 			
       
 11425 			/* Get the value from a foo(<param_value>) style call */
       
 11426 			if (IN_param_value == NULL)
       
 11427 			  IN_param_value = function_call_param_iterator.next();
       
 11428 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11429 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11430 			
       
 11431 			if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 11432 			{
       
 11433 		
       
 11434 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11435 				s4o.print("(");
       
 11436 				return_type_symbol->accept(*this);
       
 11437 				s4o.print(")");
       
 11438 				IN_param_value->accept(*this);
       
 11439 				return NULL;
       
 11440 				
       
 11441 			}
       
 11442 			
       
 11443 			ERROR;
       
 11444 		}
       
 11445 		
       
 11446 	}/*function_lreal_to_int*/
       
 11447 	break;
       
 11448 
       
 11449 /****
       
 11450  *BYTE_TO_REAL
       
 11451  */
       
 11452 	case function_byte_to_real :
       
 11453 	{
       
 11454 		symbol_c *last_type_symbol = NULL;
       
 11455 
       
 11456 		{
       
 11457 			identifier_c param_name("IN");
       
 11458 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11459 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11460 			
       
 11461 			/* Get the value from a foo(<param_value>) style call */
       
 11462 			if (IN_param_value == NULL)
       
 11463 			  IN_param_value = function_call_param_iterator.next();
       
 11464 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11465 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11466 			
       
 11467 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11468 			{
       
 11469 		
       
 11470 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11471 				s4o.print("(");
       
 11472 				return_type_symbol->accept(*this);
       
 11473 				s4o.print(")");
       
 11474 				IN_param_value->accept(*this);
       
 11475 				return NULL;
       
 11476 				
       
 11477 			}
       
 11478 			
       
 11479 			ERROR;
       
 11480 		}
       
 11481 		
       
 11482 	}/*function_byte_to_real*/
       
 11483 	break;
       
 11484 
       
 11485 /****
       
 11486  *BYTE_TO_SINT
       
 11487  */
       
 11488 	case function_byte_to_sint :
       
 11489 	{
       
 11490 		symbol_c *last_type_symbol = NULL;
       
 11491 
       
 11492 		{
       
 11493 			identifier_c param_name("IN");
       
 11494 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11495 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11496 			
       
 11497 			/* Get the value from a foo(<param_value>) style call */
       
 11498 			if (IN_param_value == NULL)
       
 11499 			  IN_param_value = function_call_param_iterator.next();
       
 11500 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11501 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11502 			
       
 11503 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11504 			{
       
 11505 		
       
 11506 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11507 				s4o.print("(");
       
 11508 				return_type_symbol->accept(*this);
       
 11509 				s4o.print(")");
       
 11510 				IN_param_value->accept(*this);
       
 11511 				return NULL;
       
 11512 				
       
 11513 			}
       
 11514 			
       
 11515 			ERROR;
       
 11516 		}
       
 11517 		
       
 11518 	}/*function_byte_to_sint*/
       
 11519 	break;
       
 11520 
       
 11521 /****
       
 11522  *BYTE_TO_LINT
       
 11523  */
       
 11524 	case function_byte_to_lint :
       
 11525 	{
       
 11526 		symbol_c *last_type_symbol = NULL;
       
 11527 
       
 11528 		{
       
 11529 			identifier_c param_name("IN");
       
 11530 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11531 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11532 			
       
 11533 			/* Get the value from a foo(<param_value>) style call */
       
 11534 			if (IN_param_value == NULL)
       
 11535 			  IN_param_value = function_call_param_iterator.next();
       
 11536 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11537 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11538 			
       
 11539 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11540 			{
       
 11541 		
       
 11542 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11543 				s4o.print("(");
       
 11544 				return_type_symbol->accept(*this);
       
 11545 				s4o.print(")");
       
 11546 				IN_param_value->accept(*this);
       
 11547 				return NULL;
       
 11548 				
       
 11549 			}
       
 11550 			
       
 11551 			ERROR;
       
 11552 		}
       
 11553 		
       
 11554 	}/*function_byte_to_lint*/
       
 11555 	break;
       
 11556 
       
 11557 /****
       
 11558  *BYTE_TO_DINT
       
 11559  */
       
 11560 	case function_byte_to_dint :
       
 11561 	{
       
 11562 		symbol_c *last_type_symbol = NULL;
       
 11563 
       
 11564 		{
       
 11565 			identifier_c param_name("IN");
       
 11566 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11567 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11568 			
       
 11569 			/* Get the value from a foo(<param_value>) style call */
       
 11570 			if (IN_param_value == NULL)
       
 11571 			  IN_param_value = function_call_param_iterator.next();
       
 11572 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11573 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11574 			
       
 11575 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11576 			{
       
 11577 		
       
 11578 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11579 				s4o.print("(");
       
 11580 				return_type_symbol->accept(*this);
       
 11581 				s4o.print(")");
       
 11582 				IN_param_value->accept(*this);
       
 11583 				return NULL;
       
 11584 				
       
 11585 			}
       
 11586 			
       
 11587 			ERROR;
       
 11588 		}
       
 11589 		
       
 11590 	}/*function_byte_to_dint*/
       
 11591 	break;
       
 11592 
       
 11593 /****
       
 11594  *BYTE_TO_DATE
       
 11595  */
       
 11596 	case function_byte_to_date :
       
 11597 	{
       
 11598 		symbol_c *last_type_symbol = NULL;
       
 11599 
       
 11600 		{
       
 11601 			identifier_c param_name("IN");
       
 11602 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11603 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11604 			
       
 11605 			/* Get the value from a foo(<param_value>) style call */
       
 11606 			if (IN_param_value == NULL)
       
 11607 			  IN_param_value = function_call_param_iterator.next();
       
 11608 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11609 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11610 			
       
 11611 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11612 			{
       
 11613 		
       
 11614 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11615 				s4o.print("(");
       
 11616 				return_type_symbol->accept(*this);
       
 11617 				s4o.print(")time_to_real(");
       
 11618 				IN_param_value->accept(*this);
       
 11619 				s4o.print(")");
       
 11620 				return NULL;
       
 11621 				
       
 11622 			}
       
 11623 			
       
 11624 			ERROR;
       
 11625 		}
       
 11626 		
       
 11627 	}/*function_byte_to_date*/
       
 11628 	break;
       
 11629 
       
 11630 /****
       
 11631  *BYTE_TO_DWORD
       
 11632  */
       
 11633 	case function_byte_to_dword :
       
 11634 	{
       
 11635 		symbol_c *last_type_symbol = NULL;
       
 11636 
       
 11637 		{
       
 11638 			identifier_c param_name("IN");
       
 11639 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11640 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11641 			
       
 11642 			/* Get the value from a foo(<param_value>) style call */
       
 11643 			if (IN_param_value == NULL)
       
 11644 			  IN_param_value = function_call_param_iterator.next();
       
 11645 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11646 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11647 			
       
 11648 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11649 			{
       
 11650 		
       
 11651 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11652 				s4o.print("(");
       
 11653 				return_type_symbol->accept(*this);
       
 11654 				s4o.print(")");
       
 11655 				IN_param_value->accept(*this);
       
 11656 				return NULL;
       
 11657 				
       
 11658 			}
       
 11659 			
       
 11660 			ERROR;
       
 11661 		}
       
 11662 		
       
 11663 	}/*function_byte_to_dword*/
       
 11664 	break;
       
 11665 
       
 11666 /****
       
 11667  *BYTE_TO_DT
       
 11668  */
       
 11669 	case function_byte_to_dt :
       
 11670 	{
       
 11671 		symbol_c *last_type_symbol = NULL;
       
 11672 
       
 11673 		{
       
 11674 			identifier_c param_name("IN");
       
 11675 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11676 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11677 			
       
 11678 			/* Get the value from a foo(<param_value>) style call */
       
 11679 			if (IN_param_value == NULL)
       
 11680 			  IN_param_value = function_call_param_iterator.next();
       
 11681 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11682 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11683 			
       
 11684 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11685 			{
       
 11686 		
       
 11687 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11688 				s4o.print("(");
       
 11689 				return_type_symbol->accept(*this);
       
 11690 				s4o.print(")time_to_real(");
       
 11691 				IN_param_value->accept(*this);
       
 11692 				s4o.print(")");
       
 11693 				return NULL;
       
 11694 				
       
 11695 			}
       
 11696 			
       
 11697 			ERROR;
       
 11698 		}
       
 11699 		
       
 11700 	}/*function_byte_to_dt*/
       
 11701 	break;
       
 11702 
       
 11703 /****
       
 11704  *BYTE_TO_TOD
       
 11705  */
       
 11706 	case function_byte_to_tod :
       
 11707 	{
       
 11708 		symbol_c *last_type_symbol = NULL;
       
 11709 
       
 11710 		{
       
 11711 			identifier_c param_name("IN");
       
 11712 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11713 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11714 			
       
 11715 			/* Get the value from a foo(<param_value>) style call */
       
 11716 			if (IN_param_value == NULL)
       
 11717 			  IN_param_value = function_call_param_iterator.next();
       
 11718 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11719 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11720 			
       
 11721 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11722 			{
       
 11723 		
       
 11724 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11725 				s4o.print("(");
       
 11726 				return_type_symbol->accept(*this);
       
 11727 				s4o.print(")time_to_real(");
       
 11728 				IN_param_value->accept(*this);
       
 11729 				s4o.print(")");
       
 11730 				return NULL;
       
 11731 				
       
 11732 			}
       
 11733 			
       
 11734 			ERROR;
       
 11735 		}
       
 11736 		
       
 11737 	}/*function_byte_to_tod*/
       
 11738 	break;
       
 11739 
       
 11740 /****
       
 11741  *BYTE_TO_UDINT
       
 11742  */
       
 11743 	case function_byte_to_udint :
       
 11744 	{
       
 11745 		symbol_c *last_type_symbol = NULL;
       
 11746 
       
 11747 		{
       
 11748 			identifier_c param_name("IN");
       
 11749 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11750 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11751 			
       
 11752 			/* Get the value from a foo(<param_value>) style call */
       
 11753 			if (IN_param_value == NULL)
       
 11754 			  IN_param_value = function_call_param_iterator.next();
       
 11755 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11756 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11757 			
       
 11758 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11759 			{
       
 11760 		
       
 11761 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11762 				s4o.print("(");
       
 11763 				return_type_symbol->accept(*this);
       
 11764 				s4o.print(")");
       
 11765 				IN_param_value->accept(*this);
       
 11766 				return NULL;
       
 11767 				
       
 11768 			}
       
 11769 			
       
 11770 			ERROR;
       
 11771 		}
       
 11772 		
       
 11773 	}/*function_byte_to_udint*/
       
 11774 	break;
       
 11775 
       
 11776 /****
       
 11777  *BYTE_TO_WORD
       
 11778  */
       
 11779 	case function_byte_to_word :
       
 11780 	{
       
 11781 		symbol_c *last_type_symbol = NULL;
       
 11782 
       
 11783 		{
       
 11784 			identifier_c param_name("IN");
       
 11785 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11786 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11787 			
       
 11788 			/* Get the value from a foo(<param_value>) style call */
       
 11789 			if (IN_param_value == NULL)
       
 11790 			  IN_param_value = function_call_param_iterator.next();
       
 11791 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11792 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11793 			
       
 11794 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11795 			{
       
 11796 		
       
 11797 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11798 				s4o.print("(");
       
 11799 				return_type_symbol->accept(*this);
       
 11800 				s4o.print(")");
       
 11801 				IN_param_value->accept(*this);
       
 11802 				return NULL;
       
 11803 				
       
 11804 			}
       
 11805 			
       
 11806 			ERROR;
       
 11807 		}
       
 11808 		
       
 11809 	}/*function_byte_to_word*/
       
 11810 	break;
       
 11811 
       
 11812 /****
       
 11813  *BYTE_TO_WSTRING
       
 11814  */
       
 11815 	case function_byte_to_wstring :
       
 11816 	{
       
 11817 		symbol_c *last_type_symbol = NULL;
       
 11818 
       
 11819 		{
       
 11820 			identifier_c param_name("IN");
       
 11821 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11822 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11823 			
       
 11824 			/* Get the value from a foo(<param_value>) style call */
       
 11825 			if (IN_param_value == NULL)
       
 11826 			  IN_param_value = function_call_param_iterator.next();
       
 11827 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11828 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11829 			
       
 11830 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11831 			{
       
 11832 		
       
 11833 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11834 				s4o.print("(");
       
 11835 				return_type_symbol->accept(*this);
       
 11836 				s4o.print(")string_to_int(");
       
 11837 				IN_param_value->accept(*this);
       
 11838 				s4o.print(", 16)");
       
 11839 				return NULL;
       
 11840 				
       
 11841 			}
       
 11842 			
       
 11843 			ERROR;
       
 11844 		}
       
 11845 		
       
 11846 	}/*function_byte_to_wstring*/
       
 11847 	break;
       
 11848 
       
 11849 /****
       
 11850  *BYTE_TO_STRING
       
 11851  */
       
 11852 	case function_byte_to_string :
       
 11853 	{
       
 11854 		symbol_c *last_type_symbol = NULL;
       
 11855 
       
 11856 		{
       
 11857 			identifier_c param_name("IN");
       
 11858 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11859 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11860 			
       
 11861 			/* Get the value from a foo(<param_value>) style call */
       
 11862 			if (IN_param_value == NULL)
       
 11863 			  IN_param_value = function_call_param_iterator.next();
       
 11864 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11865 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11866 			
       
 11867 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11868 			{
       
 11869 		
       
 11870 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11871 				s4o.print("(");
       
 11872 				return_type_symbol->accept(*this);
       
 11873 				s4o.print(")string_to_int(");
       
 11874 				IN_param_value->accept(*this);
       
 11875 				s4o.print(", 16)");
       
 11876 				return NULL;
       
 11877 				
       
 11878 			}
       
 11879 			
       
 11880 			ERROR;
       
 11881 		}
       
 11882 		
       
 11883 	}/*function_byte_to_string*/
       
 11884 	break;
       
 11885 
       
 11886 /****
       
 11887  *BYTE_TO_LWORD
       
 11888  */
       
 11889 	case function_byte_to_lword :
       
 11890 	{
       
 11891 		symbol_c *last_type_symbol = NULL;
       
 11892 
       
 11893 		{
       
 11894 			identifier_c param_name("IN");
       
 11895 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11896 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11897 			
       
 11898 			/* Get the value from a foo(<param_value>) style call */
       
 11899 			if (IN_param_value == NULL)
       
 11900 			  IN_param_value = function_call_param_iterator.next();
       
 11901 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11902 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11903 			
       
 11904 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11905 			{
       
 11906 		
       
 11907 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11908 				s4o.print("(");
       
 11909 				return_type_symbol->accept(*this);
       
 11910 				s4o.print(")");
       
 11911 				IN_param_value->accept(*this);
       
 11912 				return NULL;
       
 11913 				
       
 11914 			}
       
 11915 			
       
 11916 			ERROR;
       
 11917 		}
       
 11918 		
       
 11919 	}/*function_byte_to_lword*/
       
 11920 	break;
       
 11921 
       
 11922 /****
       
 11923  *BYTE_TO_UINT
       
 11924  */
       
 11925 	case function_byte_to_uint :
       
 11926 	{
       
 11927 		symbol_c *last_type_symbol = NULL;
       
 11928 
       
 11929 		{
       
 11930 			identifier_c param_name("IN");
       
 11931 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11932 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11933 			
       
 11934 			/* Get the value from a foo(<param_value>) style call */
       
 11935 			if (IN_param_value == NULL)
       
 11936 			  IN_param_value = function_call_param_iterator.next();
       
 11937 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11938 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11939 			
       
 11940 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11941 			{
       
 11942 		
       
 11943 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11944 				s4o.print("(");
       
 11945 				return_type_symbol->accept(*this);
       
 11946 				s4o.print(")");
       
 11947 				IN_param_value->accept(*this);
       
 11948 				return NULL;
       
 11949 				
       
 11950 			}
       
 11951 			
       
 11952 			ERROR;
       
 11953 		}
       
 11954 		
       
 11955 	}/*function_byte_to_uint*/
       
 11956 	break;
       
 11957 
       
 11958 /****
       
 11959  *BYTE_TO_LREAL
       
 11960  */
       
 11961 	case function_byte_to_lreal :
       
 11962 	{
       
 11963 		symbol_c *last_type_symbol = NULL;
       
 11964 
       
 11965 		{
       
 11966 			identifier_c param_name("IN");
       
 11967 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11968 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11969 			
       
 11970 			/* Get the value from a foo(<param_value>) style call */
       
 11971 			if (IN_param_value == NULL)
       
 11972 			  IN_param_value = function_call_param_iterator.next();
       
 11973 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11974 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11975 			
       
 11976 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11977 			{
       
 11978 		
       
 11979 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11980 				s4o.print("(");
       
 11981 				return_type_symbol->accept(*this);
       
 11982 				s4o.print(")");
       
 11983 				IN_param_value->accept(*this);
       
 11984 				return NULL;
       
 11985 				
       
 11986 			}
       
 11987 			
       
 11988 			ERROR;
       
 11989 		}
       
 11990 		
       
 11991 	}/*function_byte_to_lreal*/
       
 11992 	break;
       
 11993 
       
 11994 /****
       
 11995  *BYTE_TO_BYTE
       
 11996  */
       
 11997 	case function_byte_to_byte :
       
 11998 	{
       
 11999 		symbol_c *last_type_symbol = NULL;
       
 12000 
       
 12001 		{
       
 12002 			identifier_c param_name("IN");
       
 12003 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12004 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12005 			
       
 12006 			/* Get the value from a foo(<param_value>) style call */
       
 12007 			if (IN_param_value == NULL)
       
 12008 			  IN_param_value = function_call_param_iterator.next();
       
 12009 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12010 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12011 			
       
 12012 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 12013 			{
       
 12014 		
       
 12015 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12016 				s4o.print("(");
       
 12017 				return_type_symbol->accept(*this);
       
 12018 				s4o.print(")");
       
 12019 				IN_param_value->accept(*this);
       
 12020 				return NULL;
       
 12021 				
       
 12022 			}
       
 12023 			
       
 12024 			ERROR;
       
 12025 		}
       
 12026 		
       
 12027 	}/*function_byte_to_byte*/
       
 12028 	break;
       
 12029 
       
 12030 /****
       
 12031  *BYTE_TO_USINT
       
 12032  */
       
 12033 	case function_byte_to_usint :
       
 12034 	{
       
 12035 		symbol_c *last_type_symbol = NULL;
       
 12036 
       
 12037 		{
       
 12038 			identifier_c param_name("IN");
       
 12039 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12040 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12041 			
       
 12042 			/* Get the value from a foo(<param_value>) style call */
       
 12043 			if (IN_param_value == NULL)
       
 12044 			  IN_param_value = function_call_param_iterator.next();
       
 12045 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12046 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12047 			
       
 12048 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 12049 			{
       
 12050 		
       
 12051 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12052 				s4o.print("(");
       
 12053 				return_type_symbol->accept(*this);
       
 12054 				s4o.print(")");
       
 12055 				IN_param_value->accept(*this);
       
 12056 				return NULL;
       
 12057 				
       
 12058 			}
       
 12059 			
       
 12060 			ERROR;
       
 12061 		}
       
 12062 		
       
 12063 	}/*function_byte_to_usint*/
       
 12064 	break;
       
 12065 
       
 12066 /****
       
 12067  *BYTE_TO_ULINT
       
 12068  */
       
 12069 	case function_byte_to_ulint :
       
 12070 	{
       
 12071 		symbol_c *last_type_symbol = NULL;
       
 12072 
       
 12073 		{
       
 12074 			identifier_c param_name("IN");
       
 12075 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12076 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12077 			
       
 12078 			/* Get the value from a foo(<param_value>) style call */
       
 12079 			if (IN_param_value == NULL)
       
 12080 			  IN_param_value = function_call_param_iterator.next();
       
 12081 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12082 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12083 			
       
 12084 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 12085 			{
       
 12086 		
       
 12087 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12088 				s4o.print("(");
       
 12089 				return_type_symbol->accept(*this);
       
 12090 				s4o.print(")");
       
 12091 				IN_param_value->accept(*this);
       
 12092 				return NULL;
       
 12093 				
       
 12094 			}
       
 12095 			
       
 12096 			ERROR;
       
 12097 		}
       
 12098 		
       
 12099 	}/*function_byte_to_ulint*/
       
 12100 	break;
       
 12101 
       
 12102 /****
       
 12103  *BYTE_TO_BOOL
       
 12104  */
       
 12105 	case function_byte_to_bool :
       
 12106 	{
       
 12107 		symbol_c *last_type_symbol = NULL;
       
 12108 
       
 12109 		{
       
 12110 			identifier_c param_name("IN");
       
 12111 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12112 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12113 			
       
 12114 			/* Get the value from a foo(<param_value>) style call */
       
 12115 			if (IN_param_value == NULL)
       
 12116 			  IN_param_value = function_call_param_iterator.next();
       
 12117 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12118 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12119 			
       
 12120 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 12121 			{
       
 12122 		
       
 12123 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12124 				s4o.print("(");
       
 12125 				return_type_symbol->accept(*this);
       
 12126 				s4o.print(")");
       
 12127 				IN_param_value->accept(*this);
       
 12128 				return NULL;
       
 12129 				
       
 12130 			}
       
 12131 			
       
 12132 			ERROR;
       
 12133 		}
       
 12134 		
       
 12135 	}/*function_byte_to_bool*/
       
 12136 	break;
       
 12137 
       
 12138 /****
       
 12139  *BYTE_TO_TIME
       
 12140  */
       
 12141 	case function_byte_to_time :
       
 12142 	{
       
 12143 		symbol_c *last_type_symbol = NULL;
       
 12144 
       
 12145 		{
       
 12146 			identifier_c param_name("IN");
       
 12147 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12148 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12149 			
       
 12150 			/* Get the value from a foo(<param_value>) style call */
       
 12151 			if (IN_param_value == NULL)
       
 12152 			  IN_param_value = function_call_param_iterator.next();
       
 12153 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12154 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12155 			
       
 12156 			if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 12157 			{
       
 12158 		
       
 12159 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12160 				s4o.print("(");
       
 12161 				return_type_symbol->accept(*this);
       
 12162 				s4o.print(")time_to_real(");
       
 12163 				IN_param_value->accept(*this);
       
 12164 				s4o.print(")");
       
 12165 				return NULL;
       
 12166 				
       
 12167 			}
       
 12168 			
       
 12169 			ERROR;
       
 12170 		}
       
 12171 		
       
 12172 	}/*function_byte_to_time*/
       
 12173 	break;
       
 12174 
       
 12175 /****
       
 12176  *BYTE_TO_INT
       
 12177  */
       
 12178 	case function_byte_to_int :
       
 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(byte_type_name_c))
       
 12194 			{
       
 12195 		
       
 12196 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12197 				s4o.print("(");
       
 12198 				return_type_symbol->accept(*this);
       
 12199 				s4o.print(")");
       
 12200 				IN_param_value->accept(*this);
       
 12201 				return NULL;
       
 12202 				
       
 12203 			}
       
 12204 			
       
 12205 			ERROR;
       
 12206 		}
       
 12207 		
       
 12208 	}/*function_byte_to_int*/
       
 12209 	break;
       
 12210 
       
 12211 /****
       
 12212  *USINT_TO_REAL
       
 12213  */
       
 12214 	case function_usint_to_real :
       
 12215 	{
       
 12216 		symbol_c *last_type_symbol = NULL;
       
 12217 
       
 12218 		{
       
 12219 			identifier_c param_name("IN");
       
 12220 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12221 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12222 			
       
 12223 			/* Get the value from a foo(<param_value>) style call */
       
 12224 			if (IN_param_value == NULL)
       
 12225 			  IN_param_value = function_call_param_iterator.next();
       
 12226 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12227 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12228 			
       
 12229 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12230 			{
       
 12231 		
       
 12232 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12233 				s4o.print("(");
       
 12234 				return_type_symbol->accept(*this);
       
 12235 				s4o.print(")");
       
 12236 				IN_param_value->accept(*this);
       
 12237 				return NULL;
       
 12238 				
       
 12239 			}
       
 12240 			
       
 12241 			ERROR;
       
 12242 		}
       
 12243 		
       
 12244 	}/*function_usint_to_real*/
       
 12245 	break;
       
 12246 
       
 12247 /****
       
 12248  *USINT_TO_SINT
       
 12249  */
       
 12250 	case function_usint_to_sint :
       
 12251 	{
       
 12252 		symbol_c *last_type_symbol = NULL;
       
 12253 
       
 12254 		{
       
 12255 			identifier_c param_name("IN");
       
 12256 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12257 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12258 			
       
 12259 			/* Get the value from a foo(<param_value>) style call */
       
 12260 			if (IN_param_value == NULL)
       
 12261 			  IN_param_value = function_call_param_iterator.next();
       
 12262 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12263 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12264 			
       
 12265 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12266 			{
       
 12267 		
       
 12268 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12269 				s4o.print("(");
       
 12270 				return_type_symbol->accept(*this);
       
 12271 				s4o.print(")");
       
 12272 				IN_param_value->accept(*this);
       
 12273 				return NULL;
       
 12274 				
       
 12275 			}
       
 12276 			
       
 12277 			ERROR;
       
 12278 		}
       
 12279 		
       
 12280 	}/*function_usint_to_sint*/
       
 12281 	break;
       
 12282 
       
 12283 /****
       
 12284  *USINT_TO_LINT
       
 12285  */
       
 12286 	case function_usint_to_lint :
       
 12287 	{
       
 12288 		symbol_c *last_type_symbol = NULL;
       
 12289 
       
 12290 		{
       
 12291 			identifier_c param_name("IN");
       
 12292 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12293 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12294 			
       
 12295 			/* Get the value from a foo(<param_value>) style call */
       
 12296 			if (IN_param_value == NULL)
       
 12297 			  IN_param_value = function_call_param_iterator.next();
       
 12298 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12299 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12300 			
       
 12301 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12302 			{
       
 12303 		
       
 12304 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12305 				s4o.print("(");
       
 12306 				return_type_symbol->accept(*this);
       
 12307 				s4o.print(")");
       
 12308 				IN_param_value->accept(*this);
       
 12309 				return NULL;
       
 12310 				
       
 12311 			}
       
 12312 			
       
 12313 			ERROR;
       
 12314 		}
       
 12315 		
       
 12316 	}/*function_usint_to_lint*/
       
 12317 	break;
       
 12318 
       
 12319 /****
       
 12320  *USINT_TO_DINT
       
 12321  */
       
 12322 	case function_usint_to_dint :
       
 12323 	{
       
 12324 		symbol_c *last_type_symbol = NULL;
       
 12325 
       
 12326 		{
       
 12327 			identifier_c param_name("IN");
       
 12328 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12329 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12330 			
       
 12331 			/* Get the value from a foo(<param_value>) style call */
       
 12332 			if (IN_param_value == NULL)
       
 12333 			  IN_param_value = function_call_param_iterator.next();
       
 12334 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12335 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12336 			
       
 12337 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12338 			{
       
 12339 		
       
 12340 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12341 				s4o.print("(");
       
 12342 				return_type_symbol->accept(*this);
       
 12343 				s4o.print(")");
       
 12344 				IN_param_value->accept(*this);
       
 12345 				return NULL;
       
 12346 				
       
 12347 			}
       
 12348 			
       
 12349 			ERROR;
       
 12350 		}
       
 12351 		
       
 12352 	}/*function_usint_to_dint*/
       
 12353 	break;
       
 12354 
       
 12355 /****
       
 12356  *USINT_TO_DATE
       
 12357  */
       
 12358 	case function_usint_to_date :
       
 12359 	{
       
 12360 		symbol_c *last_type_symbol = NULL;
       
 12361 
       
 12362 		{
       
 12363 			identifier_c param_name("IN");
       
 12364 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12365 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12366 			
       
 12367 			/* Get the value from a foo(<param_value>) style call */
       
 12368 			if (IN_param_value == NULL)
       
 12369 			  IN_param_value = function_call_param_iterator.next();
       
 12370 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12371 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12372 			
       
 12373 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12374 			{
       
 12375 		
       
 12376 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12377 				s4o.print("(");
       
 12378 				return_type_symbol->accept(*this);
       
 12379 				s4o.print(")time_to_real(");
       
 12380 				IN_param_value->accept(*this);
       
 12381 				s4o.print(")");
       
 12382 				return NULL;
       
 12383 				
       
 12384 			}
       
 12385 			
       
 12386 			ERROR;
       
 12387 		}
       
 12388 		
       
 12389 	}/*function_usint_to_date*/
       
 12390 	break;
       
 12391 
       
 12392 /****
       
 12393  *USINT_TO_DWORD
       
 12394  */
       
 12395 	case function_usint_to_dword :
       
 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(usint_type_name_c))
       
 12411 			{
       
 12412 		
       
 12413 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12414 				s4o.print("(");
       
 12415 				return_type_symbol->accept(*this);
       
 12416 				s4o.print(")");
       
 12417 				IN_param_value->accept(*this);
       
 12418 				return NULL;
       
 12419 				
       
 12420 			}
       
 12421 			
       
 12422 			ERROR;
       
 12423 		}
       
 12424 		
       
 12425 	}/*function_usint_to_dword*/
       
 12426 	break;
       
 12427 
       
 12428 /****
       
 12429  *USINT_TO_DT
       
 12430  */
       
 12431 	case function_usint_to_dt :
       
 12432 	{
       
 12433 		symbol_c *last_type_symbol = NULL;
       
 12434 
       
 12435 		{
       
 12436 			identifier_c param_name("IN");
       
 12437 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12438 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12439 			
       
 12440 			/* Get the value from a foo(<param_value>) style call */
       
 12441 			if (IN_param_value == NULL)
       
 12442 			  IN_param_value = function_call_param_iterator.next();
       
 12443 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12444 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12445 			
       
 12446 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12447 			{
       
 12448 		
       
 12449 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12450 				s4o.print("(");
       
 12451 				return_type_symbol->accept(*this);
       
 12452 				s4o.print(")time_to_real(");
       
 12453 				IN_param_value->accept(*this);
       
 12454 				s4o.print(")");
       
 12455 				return NULL;
       
 12456 				
       
 12457 			}
       
 12458 			
       
 12459 			ERROR;
       
 12460 		}
       
 12461 		
       
 12462 	}/*function_usint_to_dt*/
       
 12463 	break;
       
 12464 
       
 12465 /****
       
 12466  *USINT_TO_TOD
       
 12467  */
       
 12468 	case function_usint_to_tod :
       
 12469 	{
       
 12470 		symbol_c *last_type_symbol = NULL;
       
 12471 
       
 12472 		{
       
 12473 			identifier_c param_name("IN");
       
 12474 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12475 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12476 			
       
 12477 			/* Get the value from a foo(<param_value>) style call */
       
 12478 			if (IN_param_value == NULL)
       
 12479 			  IN_param_value = function_call_param_iterator.next();
       
 12480 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12481 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12482 			
       
 12483 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12484 			{
       
 12485 		
       
 12486 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12487 				s4o.print("(");
       
 12488 				return_type_symbol->accept(*this);
       
 12489 				s4o.print(")time_to_real(");
       
 12490 				IN_param_value->accept(*this);
       
 12491 				s4o.print(")");
       
 12492 				return NULL;
       
 12493 				
       
 12494 			}
       
 12495 			
       
 12496 			ERROR;
       
 12497 		}
       
 12498 		
       
 12499 	}/*function_usint_to_tod*/
       
 12500 	break;
       
 12501 
       
 12502 /****
       
 12503  *USINT_TO_UDINT
       
 12504  */
       
 12505 	case function_usint_to_udint :
       
 12506 	{
       
 12507 		symbol_c *last_type_symbol = NULL;
       
 12508 
       
 12509 		{
       
 12510 			identifier_c param_name("IN");
       
 12511 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12512 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12513 			
       
 12514 			/* Get the value from a foo(<param_value>) style call */
       
 12515 			if (IN_param_value == NULL)
       
 12516 			  IN_param_value = function_call_param_iterator.next();
       
 12517 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12518 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12519 			
       
 12520 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12521 			{
       
 12522 		
       
 12523 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12524 				s4o.print("(");
       
 12525 				return_type_symbol->accept(*this);
       
 12526 				s4o.print(")");
       
 12527 				IN_param_value->accept(*this);
       
 12528 				return NULL;
       
 12529 				
       
 12530 			}
       
 12531 			
       
 12532 			ERROR;
       
 12533 		}
       
 12534 		
       
 12535 	}/*function_usint_to_udint*/
       
 12536 	break;
       
 12537 
       
 12538 /****
       
 12539  *USINT_TO_WORD
       
 12540  */
       
 12541 	case function_usint_to_word :
       
 12542 	{
       
 12543 		symbol_c *last_type_symbol = NULL;
       
 12544 
       
 12545 		{
       
 12546 			identifier_c param_name("IN");
       
 12547 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12548 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12549 			
       
 12550 			/* Get the value from a foo(<param_value>) style call */
       
 12551 			if (IN_param_value == NULL)
       
 12552 			  IN_param_value = function_call_param_iterator.next();
       
 12553 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12554 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12555 			
       
 12556 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12557 			{
       
 12558 		
       
 12559 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12560 				s4o.print("(");
       
 12561 				return_type_symbol->accept(*this);
       
 12562 				s4o.print(")");
       
 12563 				IN_param_value->accept(*this);
       
 12564 				return NULL;
       
 12565 				
       
 12566 			}
       
 12567 			
       
 12568 			ERROR;
       
 12569 		}
       
 12570 		
       
 12571 	}/*function_usint_to_word*/
       
 12572 	break;
       
 12573 
       
 12574 /****
       
 12575  *USINT_TO_WSTRING
       
 12576  */
       
 12577 	case function_usint_to_wstring :
       
 12578 	{
       
 12579 		symbol_c *last_type_symbol = NULL;
       
 12580 
       
 12581 		{
       
 12582 			identifier_c param_name("IN");
       
 12583 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12584 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12585 			
       
 12586 			/* Get the value from a foo(<param_value>) style call */
       
 12587 			if (IN_param_value == NULL)
       
 12588 			  IN_param_value = function_call_param_iterator.next();
       
 12589 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12590 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12591 			
       
 12592 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12593 			{
       
 12594 		
       
 12595 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12596 				s4o.print("(");
       
 12597 				return_type_symbol->accept(*this);
       
 12598 				s4o.print(")string_to_int(");
       
 12599 				IN_param_value->accept(*this);
       
 12600 				s4o.print(", 10)");
       
 12601 				return NULL;
       
 12602 				
       
 12603 			}
       
 12604 			
       
 12605 			ERROR;
       
 12606 		}
       
 12607 		
       
 12608 	}/*function_usint_to_wstring*/
       
 12609 	break;
       
 12610 
       
 12611 /****
       
 12612  *USINT_TO_STRING
       
 12613  */
       
 12614 	case function_usint_to_string :
       
 12615 	{
       
 12616 		symbol_c *last_type_symbol = NULL;
       
 12617 
       
 12618 		{
       
 12619 			identifier_c param_name("IN");
       
 12620 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12621 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12622 			
       
 12623 			/* Get the value from a foo(<param_value>) style call */
       
 12624 			if (IN_param_value == NULL)
       
 12625 			  IN_param_value = function_call_param_iterator.next();
       
 12626 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12627 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12628 			
       
 12629 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12630 			{
       
 12631 		
       
 12632 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12633 				s4o.print("(");
       
 12634 				return_type_symbol->accept(*this);
       
 12635 				s4o.print(")string_to_int(");
       
 12636 				IN_param_value->accept(*this);
       
 12637 				s4o.print(", 10)");
       
 12638 				return NULL;
       
 12639 				
       
 12640 			}
       
 12641 			
       
 12642 			ERROR;
       
 12643 		}
       
 12644 		
       
 12645 	}/*function_usint_to_string*/
       
 12646 	break;
       
 12647 
       
 12648 /****
       
 12649  *USINT_TO_LWORD
       
 12650  */
       
 12651 	case function_usint_to_lword :
       
 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(usint_type_name_c))
       
 12667 			{
       
 12668 		
       
 12669 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12670 				s4o.print("(");
       
 12671 				return_type_symbol->accept(*this);
       
 12672 				s4o.print(")");
       
 12673 				IN_param_value->accept(*this);
       
 12674 				return NULL;
       
 12675 				
       
 12676 			}
       
 12677 			
       
 12678 			ERROR;
       
 12679 		}
       
 12680 		
       
 12681 	}/*function_usint_to_lword*/
       
 12682 	break;
       
 12683 
       
 12684 /****
       
 12685  *USINT_TO_UINT
       
 12686  */
       
 12687 	case function_usint_to_uint :
       
 12688 	{
       
 12689 		symbol_c *last_type_symbol = NULL;
       
 12690 
       
 12691 		{
       
 12692 			identifier_c param_name("IN");
       
 12693 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12694 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12695 			
       
 12696 			/* Get the value from a foo(<param_value>) style call */
       
 12697 			if (IN_param_value == NULL)
       
 12698 			  IN_param_value = function_call_param_iterator.next();
       
 12699 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12700 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12701 			
       
 12702 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12703 			{
       
 12704 		
       
 12705 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12706 				s4o.print("(");
       
 12707 				return_type_symbol->accept(*this);
       
 12708 				s4o.print(")");
       
 12709 				IN_param_value->accept(*this);
       
 12710 				return NULL;
       
 12711 				
       
 12712 			}
       
 12713 			
       
 12714 			ERROR;
       
 12715 		}
       
 12716 		
       
 12717 	}/*function_usint_to_uint*/
       
 12718 	break;
       
 12719 
       
 12720 /****
       
 12721  *USINT_TO_LREAL
       
 12722  */
       
 12723 	case function_usint_to_lreal :
       
 12724 	{
       
 12725 		symbol_c *last_type_symbol = NULL;
       
 12726 
       
 12727 		{
       
 12728 			identifier_c param_name("IN");
       
 12729 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12730 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12731 			
       
 12732 			/* Get the value from a foo(<param_value>) style call */
       
 12733 			if (IN_param_value == NULL)
       
 12734 			  IN_param_value = function_call_param_iterator.next();
       
 12735 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12736 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12737 			
       
 12738 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12739 			{
       
 12740 		
       
 12741 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12742 				s4o.print("(");
       
 12743 				return_type_symbol->accept(*this);
       
 12744 				s4o.print(")");
       
 12745 				IN_param_value->accept(*this);
       
 12746 				return NULL;
       
 12747 				
       
 12748 			}
       
 12749 			
       
 12750 			ERROR;
       
 12751 		}
       
 12752 		
       
 12753 	}/*function_usint_to_lreal*/
       
 12754 	break;
       
 12755 
       
 12756 /****
       
 12757  *USINT_TO_BYTE
       
 12758  */
       
 12759 	case function_usint_to_byte :
       
 12760 	{
       
 12761 		symbol_c *last_type_symbol = NULL;
       
 12762 
       
 12763 		{
       
 12764 			identifier_c param_name("IN");
       
 12765 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12766 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12767 			
       
 12768 			/* Get the value from a foo(<param_value>) style call */
       
 12769 			if (IN_param_value == NULL)
       
 12770 			  IN_param_value = function_call_param_iterator.next();
       
 12771 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12772 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12773 			
       
 12774 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12775 			{
       
 12776 		
       
 12777 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12778 				s4o.print("(");
       
 12779 				return_type_symbol->accept(*this);
       
 12780 				s4o.print(")");
       
 12781 				IN_param_value->accept(*this);
       
 12782 				return NULL;
       
 12783 				
       
 12784 			}
       
 12785 			
       
 12786 			ERROR;
       
 12787 		}
       
 12788 		
       
 12789 	}/*function_usint_to_byte*/
       
 12790 	break;
       
 12791 
       
 12792 /****
       
 12793  *USINT_TO_USINT
       
 12794  */
       
 12795 	case function_usint_to_usint :
       
 12796 	{
       
 12797 		symbol_c *last_type_symbol = NULL;
       
 12798 
       
 12799 		{
       
 12800 			identifier_c param_name("IN");
       
 12801 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12802 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12803 			
       
 12804 			/* Get the value from a foo(<param_value>) style call */
       
 12805 			if (IN_param_value == NULL)
       
 12806 			  IN_param_value = function_call_param_iterator.next();
       
 12807 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12808 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12809 			
       
 12810 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12811 			{
       
 12812 		
       
 12813 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12814 				s4o.print("(");
       
 12815 				return_type_symbol->accept(*this);
       
 12816 				s4o.print(")");
       
 12817 				IN_param_value->accept(*this);
       
 12818 				return NULL;
       
 12819 				
       
 12820 			}
       
 12821 			
       
 12822 			ERROR;
       
 12823 		}
       
 12824 		
       
 12825 	}/*function_usint_to_usint*/
       
 12826 	break;
       
 12827 
       
 12828 /****
       
 12829  *USINT_TO_ULINT
       
 12830  */
       
 12831 	case function_usint_to_ulint :
       
 12832 	{
       
 12833 		symbol_c *last_type_symbol = NULL;
       
 12834 
       
 12835 		{
       
 12836 			identifier_c param_name("IN");
       
 12837 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12838 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12839 			
       
 12840 			/* Get the value from a foo(<param_value>) style call */
       
 12841 			if (IN_param_value == NULL)
       
 12842 			  IN_param_value = function_call_param_iterator.next();
       
 12843 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12844 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12845 			
       
 12846 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12847 			{
       
 12848 		
       
 12849 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12850 				s4o.print("(");
       
 12851 				return_type_symbol->accept(*this);
       
 12852 				s4o.print(")");
       
 12853 				IN_param_value->accept(*this);
       
 12854 				return NULL;
       
 12855 				
       
 12856 			}
       
 12857 			
       
 12858 			ERROR;
       
 12859 		}
       
 12860 		
       
 12861 	}/*function_usint_to_ulint*/
       
 12862 	break;
       
 12863 
       
 12864 /****
       
 12865  *USINT_TO_BOOL
       
 12866  */
       
 12867 	case function_usint_to_bool :
       
 12868 	{
       
 12869 		symbol_c *last_type_symbol = NULL;
       
 12870 
       
 12871 		{
       
 12872 			identifier_c param_name("IN");
       
 12873 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12874 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12875 			
       
 12876 			/* Get the value from a foo(<param_value>) style call */
       
 12877 			if (IN_param_value == NULL)
       
 12878 			  IN_param_value = function_call_param_iterator.next();
       
 12879 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12880 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12881 			
       
 12882 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12883 			{
       
 12884 		
       
 12885 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12886 				s4o.print("(");
       
 12887 				return_type_symbol->accept(*this);
       
 12888 				s4o.print(")");
       
 12889 				IN_param_value->accept(*this);
       
 12890 				return NULL;
       
 12891 				
       
 12892 			}
       
 12893 			
       
 12894 			ERROR;
       
 12895 		}
       
 12896 		
       
 12897 	}/*function_usint_to_bool*/
       
 12898 	break;
       
 12899 
       
 12900 /****
       
 12901  *USINT_TO_TIME
       
 12902  */
       
 12903 	case function_usint_to_time :
       
 12904 	{
       
 12905 		symbol_c *last_type_symbol = NULL;
       
 12906 
       
 12907 		{
       
 12908 			identifier_c param_name("IN");
       
 12909 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12910 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12911 			
       
 12912 			/* Get the value from a foo(<param_value>) style call */
       
 12913 			if (IN_param_value == NULL)
       
 12914 			  IN_param_value = function_call_param_iterator.next();
       
 12915 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12916 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12917 			
       
 12918 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12919 			{
       
 12920 		
       
 12921 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12922 				s4o.print("(");
       
 12923 				return_type_symbol->accept(*this);
       
 12924 				s4o.print(")time_to_real(");
       
 12925 				IN_param_value->accept(*this);
       
 12926 				s4o.print(")");
       
 12927 				return NULL;
       
 12928 				
       
 12929 			}
       
 12930 			
       
 12931 			ERROR;
       
 12932 		}
       
 12933 		
       
 12934 	}/*function_usint_to_time*/
       
 12935 	break;
       
 12936 
       
 12937 /****
       
 12938  *USINT_TO_INT
       
 12939  */
       
 12940 	case function_usint_to_int :
       
 12941 	{
       
 12942 		symbol_c *last_type_symbol = NULL;
       
 12943 
       
 12944 		{
       
 12945 			identifier_c param_name("IN");
       
 12946 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12947 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12948 			
       
 12949 			/* Get the value from a foo(<param_value>) style call */
       
 12950 			if (IN_param_value == NULL)
       
 12951 			  IN_param_value = function_call_param_iterator.next();
       
 12952 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12953 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12954 			
       
 12955 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 12956 			{
       
 12957 		
       
 12958 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12959 				s4o.print("(");
       
 12960 				return_type_symbol->accept(*this);
       
 12961 				s4o.print(")");
       
 12962 				IN_param_value->accept(*this);
       
 12963 				return NULL;
       
 12964 				
       
 12965 			}
       
 12966 			
       
 12967 			ERROR;
       
 12968 		}
       
 12969 		
       
 12970 	}/*function_usint_to_int*/
       
 12971 	break;
       
 12972 
       
 12973 /****
       
 12974  *ULINT_TO_REAL
       
 12975  */
       
 12976 	case function_ulint_to_real :
       
 12977 	{
       
 12978 		symbol_c *last_type_symbol = NULL;
       
 12979 
       
 12980 		{
       
 12981 			identifier_c param_name("IN");
       
 12982 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12983 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12984 			
       
 12985 			/* Get the value from a foo(<param_value>) style call */
       
 12986 			if (IN_param_value == NULL)
       
 12987 			  IN_param_value = function_call_param_iterator.next();
       
 12988 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12989 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12990 			
       
 12991 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 12992 			{
       
 12993 		
       
 12994 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12995 				s4o.print("(");
       
 12996 				return_type_symbol->accept(*this);
       
 12997 				s4o.print(")");
       
 12998 				IN_param_value->accept(*this);
       
 12999 				return NULL;
       
 13000 				
       
 13001 			}
       
 13002 			
       
 13003 			ERROR;
       
 13004 		}
       
 13005 		
       
 13006 	}/*function_ulint_to_real*/
       
 13007 	break;
       
 13008 
       
 13009 /****
       
 13010  *ULINT_TO_SINT
       
 13011  */
       
 13012 	case function_ulint_to_sint :
       
 13013 	{
       
 13014 		symbol_c *last_type_symbol = NULL;
       
 13015 
       
 13016 		{
       
 13017 			identifier_c param_name("IN");
       
 13018 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13019 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13020 			
       
 13021 			/* Get the value from a foo(<param_value>) style call */
       
 13022 			if (IN_param_value == NULL)
       
 13023 			  IN_param_value = function_call_param_iterator.next();
       
 13024 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13025 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13026 			
       
 13027 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13028 			{
       
 13029 		
       
 13030 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13031 				s4o.print("(");
       
 13032 				return_type_symbol->accept(*this);
       
 13033 				s4o.print(")");
       
 13034 				IN_param_value->accept(*this);
       
 13035 				return NULL;
       
 13036 				
       
 13037 			}
       
 13038 			
       
 13039 			ERROR;
       
 13040 		}
       
 13041 		
       
 13042 	}/*function_ulint_to_sint*/
       
 13043 	break;
       
 13044 
       
 13045 /****
       
 13046  *ULINT_TO_LINT
       
 13047  */
       
 13048 	case function_ulint_to_lint :
       
 13049 	{
       
 13050 		symbol_c *last_type_symbol = NULL;
       
 13051 
       
 13052 		{
       
 13053 			identifier_c param_name("IN");
       
 13054 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13055 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13056 			
       
 13057 			/* Get the value from a foo(<param_value>) style call */
       
 13058 			if (IN_param_value == NULL)
       
 13059 			  IN_param_value = function_call_param_iterator.next();
       
 13060 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13061 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13062 			
       
 13063 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13064 			{
       
 13065 		
       
 13066 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13067 				s4o.print("(");
       
 13068 				return_type_symbol->accept(*this);
       
 13069 				s4o.print(")");
       
 13070 				IN_param_value->accept(*this);
       
 13071 				return NULL;
       
 13072 				
       
 13073 			}
       
 13074 			
       
 13075 			ERROR;
       
 13076 		}
       
 13077 		
       
 13078 	}/*function_ulint_to_lint*/
       
 13079 	break;
       
 13080 
       
 13081 /****
       
 13082  *ULINT_TO_DINT
       
 13083  */
       
 13084 	case function_ulint_to_dint :
       
 13085 	{
       
 13086 		symbol_c *last_type_symbol = NULL;
       
 13087 
       
 13088 		{
       
 13089 			identifier_c param_name("IN");
       
 13090 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13091 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13092 			
       
 13093 			/* Get the value from a foo(<param_value>) style call */
       
 13094 			if (IN_param_value == NULL)
       
 13095 			  IN_param_value = function_call_param_iterator.next();
       
 13096 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13097 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13098 			
       
 13099 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13100 			{
       
 13101 		
       
 13102 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13103 				s4o.print("(");
       
 13104 				return_type_symbol->accept(*this);
       
 13105 				s4o.print(")");
       
 13106 				IN_param_value->accept(*this);
       
 13107 				return NULL;
       
 13108 				
       
 13109 			}
       
 13110 			
       
 13111 			ERROR;
       
 13112 		}
       
 13113 		
       
 13114 	}/*function_ulint_to_dint*/
       
 13115 	break;
       
 13116 
       
 13117 /****
       
 13118  *ULINT_TO_DATE
       
 13119  */
       
 13120 	case function_ulint_to_date :
       
 13121 	{
       
 13122 		symbol_c *last_type_symbol = NULL;
       
 13123 
       
 13124 		{
       
 13125 			identifier_c param_name("IN");
       
 13126 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13127 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13128 			
       
 13129 			/* Get the value from a foo(<param_value>) style call */
       
 13130 			if (IN_param_value == NULL)
       
 13131 			  IN_param_value = function_call_param_iterator.next();
       
 13132 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13133 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13134 			
       
 13135 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13136 			{
       
 13137 		
       
 13138 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13139 				s4o.print("(");
       
 13140 				return_type_symbol->accept(*this);
       
 13141 				s4o.print(")time_to_real(");
       
 13142 				IN_param_value->accept(*this);
       
 13143 				s4o.print(")");
       
 13144 				return NULL;
       
 13145 				
       
 13146 			}
       
 13147 			
       
 13148 			ERROR;
       
 13149 		}
       
 13150 		
       
 13151 	}/*function_ulint_to_date*/
       
 13152 	break;
       
 13153 
       
 13154 /****
       
 13155  *ULINT_TO_DWORD
       
 13156  */
       
 13157 	case function_ulint_to_dword :
       
 13158 	{
       
 13159 		symbol_c *last_type_symbol = NULL;
       
 13160 
       
 13161 		{
       
 13162 			identifier_c param_name("IN");
       
 13163 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13164 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13165 			
       
 13166 			/* Get the value from a foo(<param_value>) style call */
       
 13167 			if (IN_param_value == NULL)
       
 13168 			  IN_param_value = function_call_param_iterator.next();
       
 13169 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13170 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13171 			
       
 13172 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13173 			{
       
 13174 		
       
 13175 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13176 				s4o.print("(");
       
 13177 				return_type_symbol->accept(*this);
       
 13178 				s4o.print(")");
       
 13179 				IN_param_value->accept(*this);
       
 13180 				return NULL;
       
 13181 				
       
 13182 			}
       
 13183 			
       
 13184 			ERROR;
       
 13185 		}
       
 13186 		
       
 13187 	}/*function_ulint_to_dword*/
       
 13188 	break;
       
 13189 
       
 13190 /****
       
 13191  *ULINT_TO_DT
       
 13192  */
       
 13193 	case function_ulint_to_dt :
       
 13194 	{
       
 13195 		symbol_c *last_type_symbol = NULL;
       
 13196 
       
 13197 		{
       
 13198 			identifier_c param_name("IN");
       
 13199 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13200 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13201 			
       
 13202 			/* Get the value from a foo(<param_value>) style call */
       
 13203 			if (IN_param_value == NULL)
       
 13204 			  IN_param_value = function_call_param_iterator.next();
       
 13205 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13206 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13207 			
       
 13208 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13209 			{
       
 13210 		
       
 13211 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13212 				s4o.print("(");
       
 13213 				return_type_symbol->accept(*this);
       
 13214 				s4o.print(")time_to_real(");
       
 13215 				IN_param_value->accept(*this);
       
 13216 				s4o.print(")");
       
 13217 				return NULL;
       
 13218 				
       
 13219 			}
       
 13220 			
       
 13221 			ERROR;
       
 13222 		}
       
 13223 		
       
 13224 	}/*function_ulint_to_dt*/
       
 13225 	break;
       
 13226 
       
 13227 /****
       
 13228  *ULINT_TO_TOD
       
 13229  */
       
 13230 	case function_ulint_to_tod :
       
 13231 	{
       
 13232 		symbol_c *last_type_symbol = NULL;
       
 13233 
       
 13234 		{
       
 13235 			identifier_c param_name("IN");
       
 13236 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13237 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13238 			
       
 13239 			/* Get the value from a foo(<param_value>) style call */
       
 13240 			if (IN_param_value == NULL)
       
 13241 			  IN_param_value = function_call_param_iterator.next();
       
 13242 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13243 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13244 			
       
 13245 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13246 			{
       
 13247 		
       
 13248 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13249 				s4o.print("(");
       
 13250 				return_type_symbol->accept(*this);
       
 13251 				s4o.print(")time_to_real(");
       
 13252 				IN_param_value->accept(*this);
       
 13253 				s4o.print(")");
       
 13254 				return NULL;
       
 13255 				
       
 13256 			}
       
 13257 			
       
 13258 			ERROR;
       
 13259 		}
       
 13260 		
       
 13261 	}/*function_ulint_to_tod*/
       
 13262 	break;
       
 13263 
       
 13264 /****
       
 13265  *ULINT_TO_UDINT
       
 13266  */
       
 13267 	case function_ulint_to_udint :
       
 13268 	{
       
 13269 		symbol_c *last_type_symbol = NULL;
       
 13270 
       
 13271 		{
       
 13272 			identifier_c param_name("IN");
       
 13273 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13274 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13275 			
       
 13276 			/* Get the value from a foo(<param_value>) style call */
       
 13277 			if (IN_param_value == NULL)
       
 13278 			  IN_param_value = function_call_param_iterator.next();
       
 13279 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13280 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13281 			
       
 13282 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13283 			{
       
 13284 		
       
 13285 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13286 				s4o.print("(");
       
 13287 				return_type_symbol->accept(*this);
       
 13288 				s4o.print(")");
       
 13289 				IN_param_value->accept(*this);
       
 13290 				return NULL;
       
 13291 				
       
 13292 			}
       
 13293 			
       
 13294 			ERROR;
       
 13295 		}
       
 13296 		
       
 13297 	}/*function_ulint_to_udint*/
       
 13298 	break;
       
 13299 
       
 13300 /****
       
 13301  *ULINT_TO_WORD
       
 13302  */
       
 13303 	case function_ulint_to_word :
       
 13304 	{
       
 13305 		symbol_c *last_type_symbol = NULL;
       
 13306 
       
 13307 		{
       
 13308 			identifier_c param_name("IN");
       
 13309 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13310 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13311 			
       
 13312 			/* Get the value from a foo(<param_value>) style call */
       
 13313 			if (IN_param_value == NULL)
       
 13314 			  IN_param_value = function_call_param_iterator.next();
       
 13315 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13316 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13317 			
       
 13318 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13319 			{
       
 13320 		
       
 13321 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13322 				s4o.print("(");
       
 13323 				return_type_symbol->accept(*this);
       
 13324 				s4o.print(")");
       
 13325 				IN_param_value->accept(*this);
       
 13326 				return NULL;
       
 13327 				
       
 13328 			}
       
 13329 			
       
 13330 			ERROR;
       
 13331 		}
       
 13332 		
       
 13333 	}/*function_ulint_to_word*/
       
 13334 	break;
       
 13335 
       
 13336 /****
       
 13337  *ULINT_TO_WSTRING
       
 13338  */
       
 13339 	case function_ulint_to_wstring :
       
 13340 	{
       
 13341 		symbol_c *last_type_symbol = NULL;
       
 13342 
       
 13343 		{
       
 13344 			identifier_c param_name("IN");
       
 13345 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13346 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13347 			
       
 13348 			/* Get the value from a foo(<param_value>) style call */
       
 13349 			if (IN_param_value == NULL)
       
 13350 			  IN_param_value = function_call_param_iterator.next();
       
 13351 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13352 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13353 			
       
 13354 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13355 			{
       
 13356 		
       
 13357 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 13358 				s4o.print("(");
       
 13359 				return_type_symbol->accept(*this);
       
 13360 				s4o.print(")string_to_int(");
       
 13361 				IN_param_value->accept(*this);
       
 13362 				s4o.print(", 10)");
       
 13363 				return NULL;
       
 13364 				
       
 13365 			}
       
 13366 			
       
 13367 			ERROR;
       
 13368 		}
       
 13369 		
       
 13370 	}/*function_ulint_to_wstring*/
       
 13371 	break;
       
 13372 
       
 13373 /****
       
 13374  *ULINT_TO_STRING
       
 13375  */
       
 13376 	case function_ulint_to_string :
       
 13377 	{
       
 13378 		symbol_c *last_type_symbol = NULL;
       
 13379 
       
 13380 		{
       
 13381 			identifier_c param_name("IN");
       
 13382 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13383 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13384 			
       
 13385 			/* Get the value from a foo(<param_value>) style call */
       
 13386 			if (IN_param_value == NULL)
       
 13387 			  IN_param_value = function_call_param_iterator.next();
       
 13388 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13389 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13390 			
       
 13391 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13392 			{
       
 13393 		
       
 13394 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13395 				s4o.print("(");
       
 13396 				return_type_symbol->accept(*this);
       
 13397 				s4o.print(")string_to_int(");
       
 13398 				IN_param_value->accept(*this);
       
 13399 				s4o.print(", 10)");
       
 13400 				return NULL;
       
 13401 				
       
 13402 			}
       
 13403 			
       
 13404 			ERROR;
       
 13405 		}
       
 13406 		
       
 13407 	}/*function_ulint_to_string*/
       
 13408 	break;
       
 13409 
       
 13410 /****
       
 13411  *ULINT_TO_LWORD
       
 13412  */
       
 13413 	case function_ulint_to_lword :
       
 13414 	{
       
 13415 		symbol_c *last_type_symbol = NULL;
       
 13416 
       
 13417 		{
       
 13418 			identifier_c param_name("IN");
       
 13419 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13420 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13421 			
       
 13422 			/* Get the value from a foo(<param_value>) style call */
       
 13423 			if (IN_param_value == NULL)
       
 13424 			  IN_param_value = function_call_param_iterator.next();
       
 13425 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13426 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13427 			
       
 13428 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13429 			{
       
 13430 		
       
 13431 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13432 				s4o.print("(");
       
 13433 				return_type_symbol->accept(*this);
       
 13434 				s4o.print(")");
       
 13435 				IN_param_value->accept(*this);
       
 13436 				return NULL;
       
 13437 				
       
 13438 			}
       
 13439 			
       
 13440 			ERROR;
       
 13441 		}
       
 13442 		
       
 13443 	}/*function_ulint_to_lword*/
       
 13444 	break;
       
 13445 
       
 13446 /****
       
 13447  *ULINT_TO_UINT
       
 13448  */
       
 13449 	case function_ulint_to_uint :
       
 13450 	{
       
 13451 		symbol_c *last_type_symbol = NULL;
       
 13452 
       
 13453 		{
       
 13454 			identifier_c param_name("IN");
       
 13455 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13456 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13457 			
       
 13458 			/* Get the value from a foo(<param_value>) style call */
       
 13459 			if (IN_param_value == NULL)
       
 13460 			  IN_param_value = function_call_param_iterator.next();
       
 13461 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13462 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13463 			
       
 13464 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13465 			{
       
 13466 		
       
 13467 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13468 				s4o.print("(");
       
 13469 				return_type_symbol->accept(*this);
       
 13470 				s4o.print(")");
       
 13471 				IN_param_value->accept(*this);
       
 13472 				return NULL;
       
 13473 				
       
 13474 			}
       
 13475 			
       
 13476 			ERROR;
       
 13477 		}
       
 13478 		
       
 13479 	}/*function_ulint_to_uint*/
       
 13480 	break;
       
 13481 
       
 13482 /****
       
 13483  *ULINT_TO_LREAL
       
 13484  */
       
 13485 	case function_ulint_to_lreal :
       
 13486 	{
       
 13487 		symbol_c *last_type_symbol = NULL;
       
 13488 
       
 13489 		{
       
 13490 			identifier_c param_name("IN");
       
 13491 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13492 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13493 			
       
 13494 			/* Get the value from a foo(<param_value>) style call */
       
 13495 			if (IN_param_value == NULL)
       
 13496 			  IN_param_value = function_call_param_iterator.next();
       
 13497 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13498 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13499 			
       
 13500 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13501 			{
       
 13502 		
       
 13503 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13504 				s4o.print("(");
       
 13505 				return_type_symbol->accept(*this);
       
 13506 				s4o.print(")");
       
 13507 				IN_param_value->accept(*this);
       
 13508 				return NULL;
       
 13509 				
       
 13510 			}
       
 13511 			
       
 13512 			ERROR;
       
 13513 		}
       
 13514 		
       
 13515 	}/*function_ulint_to_lreal*/
       
 13516 	break;
       
 13517 
       
 13518 /****
       
 13519  *ULINT_TO_BYTE
       
 13520  */
       
 13521 	case function_ulint_to_byte :
       
 13522 	{
       
 13523 		symbol_c *last_type_symbol = NULL;
       
 13524 
       
 13525 		{
       
 13526 			identifier_c param_name("IN");
       
 13527 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13528 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13529 			
       
 13530 			/* Get the value from a foo(<param_value>) style call */
       
 13531 			if (IN_param_value == NULL)
       
 13532 			  IN_param_value = function_call_param_iterator.next();
       
 13533 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13534 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13535 			
       
 13536 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13537 			{
       
 13538 		
       
 13539 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13540 				s4o.print("(");
       
 13541 				return_type_symbol->accept(*this);
       
 13542 				s4o.print(")");
       
 13543 				IN_param_value->accept(*this);
       
 13544 				return NULL;
       
 13545 				
       
 13546 			}
       
 13547 			
       
 13548 			ERROR;
       
 13549 		}
       
 13550 		
       
 13551 	}/*function_ulint_to_byte*/
       
 13552 	break;
       
 13553 
       
 13554 /****
       
 13555  *ULINT_TO_USINT
       
 13556  */
       
 13557 	case function_ulint_to_usint :
       
 13558 	{
       
 13559 		symbol_c *last_type_symbol = NULL;
       
 13560 
       
 13561 		{
       
 13562 			identifier_c param_name("IN");
       
 13563 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13564 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13565 			
       
 13566 			/* Get the value from a foo(<param_value>) style call */
       
 13567 			if (IN_param_value == NULL)
       
 13568 			  IN_param_value = function_call_param_iterator.next();
       
 13569 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13570 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13571 			
       
 13572 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13573 			{
       
 13574 		
       
 13575 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13576 				s4o.print("(");
       
 13577 				return_type_symbol->accept(*this);
       
 13578 				s4o.print(")");
       
 13579 				IN_param_value->accept(*this);
       
 13580 				return NULL;
       
 13581 				
       
 13582 			}
       
 13583 			
       
 13584 			ERROR;
       
 13585 		}
       
 13586 		
       
 13587 	}/*function_ulint_to_usint*/
       
 13588 	break;
       
 13589 
       
 13590 /****
       
 13591  *ULINT_TO_ULINT
       
 13592  */
       
 13593 	case function_ulint_to_ulint :
       
 13594 	{
       
 13595 		symbol_c *last_type_symbol = NULL;
       
 13596 
       
 13597 		{
       
 13598 			identifier_c param_name("IN");
       
 13599 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13600 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13601 			
       
 13602 			/* Get the value from a foo(<param_value>) style call */
       
 13603 			if (IN_param_value == NULL)
       
 13604 			  IN_param_value = function_call_param_iterator.next();
       
 13605 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13606 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13607 			
       
 13608 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13609 			{
       
 13610 		
       
 13611 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13612 				s4o.print("(");
       
 13613 				return_type_symbol->accept(*this);
       
 13614 				s4o.print(")");
       
 13615 				IN_param_value->accept(*this);
       
 13616 				return NULL;
       
 13617 				
       
 13618 			}
       
 13619 			
       
 13620 			ERROR;
       
 13621 		}
       
 13622 		
       
 13623 	}/*function_ulint_to_ulint*/
       
 13624 	break;
       
 13625 
       
 13626 /****
       
 13627  *ULINT_TO_BOOL
       
 13628  */
       
 13629 	case function_ulint_to_bool :
       
 13630 	{
       
 13631 		symbol_c *last_type_symbol = NULL;
       
 13632 
       
 13633 		{
       
 13634 			identifier_c param_name("IN");
       
 13635 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13636 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13637 			
       
 13638 			/* Get the value from a foo(<param_value>) style call */
       
 13639 			if (IN_param_value == NULL)
       
 13640 			  IN_param_value = function_call_param_iterator.next();
       
 13641 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13642 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13643 			
       
 13644 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13645 			{
       
 13646 		
       
 13647 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13648 				s4o.print("(");
       
 13649 				return_type_symbol->accept(*this);
       
 13650 				s4o.print(")");
       
 13651 				IN_param_value->accept(*this);
       
 13652 				return NULL;
       
 13653 				
       
 13654 			}
       
 13655 			
       
 13656 			ERROR;
       
 13657 		}
       
 13658 		
       
 13659 	}/*function_ulint_to_bool*/
       
 13660 	break;
       
 13661 
       
 13662 /****
       
 13663  *ULINT_TO_TIME
       
 13664  */
       
 13665 	case function_ulint_to_time :
       
 13666 	{
       
 13667 		symbol_c *last_type_symbol = NULL;
       
 13668 
       
 13669 		{
       
 13670 			identifier_c param_name("IN");
       
 13671 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13672 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13673 			
       
 13674 			/* Get the value from a foo(<param_value>) style call */
       
 13675 			if (IN_param_value == NULL)
       
 13676 			  IN_param_value = function_call_param_iterator.next();
       
 13677 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13678 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13679 			
       
 13680 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13681 			{
       
 13682 		
       
 13683 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13684 				s4o.print("(");
       
 13685 				return_type_symbol->accept(*this);
       
 13686 				s4o.print(")time_to_real(");
       
 13687 				IN_param_value->accept(*this);
       
 13688 				s4o.print(")");
       
 13689 				return NULL;
       
 13690 				
       
 13691 			}
       
 13692 			
       
 13693 			ERROR;
       
 13694 		}
       
 13695 		
       
 13696 	}/*function_ulint_to_time*/
       
 13697 	break;
       
 13698 
       
 13699 /****
       
 13700  *ULINT_TO_INT
       
 13701  */
       
 13702 	case function_ulint_to_int :
       
 13703 	{
       
 13704 		symbol_c *last_type_symbol = NULL;
       
 13705 
       
 13706 		{
       
 13707 			identifier_c param_name("IN");
       
 13708 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13709 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13710 			
       
 13711 			/* Get the value from a foo(<param_value>) style call */
       
 13712 			if (IN_param_value == NULL)
       
 13713 			  IN_param_value = function_call_param_iterator.next();
       
 13714 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13715 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13716 			
       
 13717 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 13718 			{
       
 13719 		
       
 13720 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13721 				s4o.print("(");
       
 13722 				return_type_symbol->accept(*this);
       
 13723 				s4o.print(")");
       
 13724 				IN_param_value->accept(*this);
       
 13725 				return NULL;
       
 13726 				
       
 13727 			}
       
 13728 			
       
 13729 			ERROR;
       
 13730 		}
       
 13731 		
       
 13732 	}/*function_ulint_to_int*/
       
 13733 	break;
       
 13734 
       
 13735 /****
       
 13736  *BOOL_TO_REAL
       
 13737  */
       
 13738 	case function_bool_to_real :
       
 13739 	{
       
 13740 		symbol_c *last_type_symbol = NULL;
       
 13741 
       
 13742 		{
       
 13743 			identifier_c param_name("IN");
       
 13744 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13745 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13746 			
       
 13747 			/* Get the value from a foo(<param_value>) style call */
       
 13748 			if (IN_param_value == NULL)
       
 13749 			  IN_param_value = function_call_param_iterator.next();
       
 13750 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13751 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13752 			
       
 13753 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13754 			{
       
 13755 		
       
 13756 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 13757 				s4o.print("(");
       
 13758 				return_type_symbol->accept(*this);
       
 13759 				s4o.print(")");
       
 13760 				IN_param_value->accept(*this);
       
 13761 				return NULL;
       
 13762 				
       
 13763 			}
       
 13764 			
       
 13765 			ERROR;
       
 13766 		}
       
 13767 		
       
 13768 	}/*function_bool_to_real*/
       
 13769 	break;
       
 13770 
       
 13771 /****
       
 13772  *BOOL_TO_SINT
       
 13773  */
       
 13774 	case function_bool_to_sint :
       
 13775 	{
       
 13776 		symbol_c *last_type_symbol = NULL;
       
 13777 
       
 13778 		{
       
 13779 			identifier_c param_name("IN");
       
 13780 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13781 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13782 			
       
 13783 			/* Get the value from a foo(<param_value>) style call */
       
 13784 			if (IN_param_value == NULL)
       
 13785 			  IN_param_value = function_call_param_iterator.next();
       
 13786 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13787 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13788 			
       
 13789 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13790 			{
       
 13791 		
       
 13792 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13793 				s4o.print("(");
       
 13794 				return_type_symbol->accept(*this);
       
 13795 				s4o.print(")");
       
 13796 				IN_param_value->accept(*this);
       
 13797 				return NULL;
       
 13798 				
       
 13799 			}
       
 13800 			
       
 13801 			ERROR;
       
 13802 		}
       
 13803 		
       
 13804 	}/*function_bool_to_sint*/
       
 13805 	break;
       
 13806 
       
 13807 /****
       
 13808  *BOOL_TO_LINT
       
 13809  */
       
 13810 	case function_bool_to_lint :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13826 			{
       
 13827 		
       
 13828 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13829 				s4o.print("(");
       
 13830 				return_type_symbol->accept(*this);
       
 13831 				s4o.print(")");
       
 13832 				IN_param_value->accept(*this);
       
 13833 				return NULL;
       
 13834 				
       
 13835 			}
       
 13836 			
       
 13837 			ERROR;
       
 13838 		}
       
 13839 		
       
 13840 	}/*function_bool_to_lint*/
       
 13841 	break;
       
 13842 
       
 13843 /****
       
 13844  *BOOL_TO_DINT
       
 13845  */
       
 13846 	case function_bool_to_dint :
       
 13847 	{
       
 13848 		symbol_c *last_type_symbol = NULL;
       
 13849 
       
 13850 		{
       
 13851 			identifier_c param_name("IN");
       
 13852 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13853 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13854 			
       
 13855 			/* Get the value from a foo(<param_value>) style call */
       
 13856 			if (IN_param_value == NULL)
       
 13857 			  IN_param_value = function_call_param_iterator.next();
       
 13858 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13859 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13860 			
       
 13861 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13862 			{
       
 13863 		
       
 13864 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13865 				s4o.print("(");
       
 13866 				return_type_symbol->accept(*this);
       
 13867 				s4o.print(")");
       
 13868 				IN_param_value->accept(*this);
       
 13869 				return NULL;
       
 13870 				
       
 13871 			}
       
 13872 			
       
 13873 			ERROR;
       
 13874 		}
       
 13875 		
       
 13876 	}/*function_bool_to_dint*/
       
 13877 	break;
       
 13878 
       
 13879 /****
       
 13880  *BOOL_TO_DATE
       
 13881  */
       
 13882 	case function_bool_to_date :
       
 13883 	{
       
 13884 		symbol_c *last_type_symbol = NULL;
       
 13885 
       
 13886 		{
       
 13887 			identifier_c param_name("IN");
       
 13888 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13889 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13890 			
       
 13891 			/* Get the value from a foo(<param_value>) style call */
       
 13892 			if (IN_param_value == NULL)
       
 13893 			  IN_param_value = function_call_param_iterator.next();
       
 13894 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13895 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13896 			
       
 13897 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13898 			{
       
 13899 		
       
 13900 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13901 				s4o.print("(");
       
 13902 				return_type_symbol->accept(*this);
       
 13903 				s4o.print(")time_to_real(");
       
 13904 				IN_param_value->accept(*this);
       
 13905 				s4o.print(")");
       
 13906 				return NULL;
       
 13907 				
       
 13908 			}
       
 13909 			
       
 13910 			ERROR;
       
 13911 		}
       
 13912 		
       
 13913 	}/*function_bool_to_date*/
       
 13914 	break;
       
 13915 
       
 13916 /****
       
 13917  *BOOL_TO_DWORD
       
 13918  */
       
 13919 	case function_bool_to_dword :
       
 13920 	{
       
 13921 		symbol_c *last_type_symbol = NULL;
       
 13922 
       
 13923 		{
       
 13924 			identifier_c param_name("IN");
       
 13925 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13926 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13927 			
       
 13928 			/* Get the value from a foo(<param_value>) style call */
       
 13929 			if (IN_param_value == NULL)
       
 13930 			  IN_param_value = function_call_param_iterator.next();
       
 13931 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13932 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13933 			
       
 13934 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13935 			{
       
 13936 		
       
 13937 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13938 				s4o.print("(");
       
 13939 				return_type_symbol->accept(*this);
       
 13940 				s4o.print(")");
       
 13941 				IN_param_value->accept(*this);
       
 13942 				return NULL;
       
 13943 				
       
 13944 			}
       
 13945 			
       
 13946 			ERROR;
       
 13947 		}
       
 13948 		
       
 13949 	}/*function_bool_to_dword*/
       
 13950 	break;
       
 13951 
       
 13952 /****
       
 13953  *BOOL_TO_DT
       
 13954  */
       
 13955 	case function_bool_to_dt :
       
 13956 	{
       
 13957 		symbol_c *last_type_symbol = NULL;
       
 13958 
       
 13959 		{
       
 13960 			identifier_c param_name("IN");
       
 13961 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13962 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13963 			
       
 13964 			/* Get the value from a foo(<param_value>) style call */
       
 13965 			if (IN_param_value == NULL)
       
 13966 			  IN_param_value = function_call_param_iterator.next();
       
 13967 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13968 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13969 			
       
 13970 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 13971 			{
       
 13972 		
       
 13973 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13974 				s4o.print("(");
       
 13975 				return_type_symbol->accept(*this);
       
 13976 				s4o.print(")time_to_real(");
       
 13977 				IN_param_value->accept(*this);
       
 13978 				s4o.print(")");
       
 13979 				return NULL;
       
 13980 				
       
 13981 			}
       
 13982 			
       
 13983 			ERROR;
       
 13984 		}
       
 13985 		
       
 13986 	}/*function_bool_to_dt*/
       
 13987 	break;
       
 13988 
       
 13989 /****
       
 13990  *BOOL_TO_TOD
       
 13991  */
       
 13992 	case function_bool_to_tod :
       
 13993 	{
       
 13994 		symbol_c *last_type_symbol = NULL;
       
 13995 
       
 13996 		{
       
 13997 			identifier_c param_name("IN");
       
 13998 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13999 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14000 			
       
 14001 			/* Get the value from a foo(<param_value>) style call */
       
 14002 			if (IN_param_value == NULL)
       
 14003 			  IN_param_value = function_call_param_iterator.next();
       
 14004 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14005 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14006 			
       
 14007 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14008 			{
       
 14009 		
       
 14010 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14011 				s4o.print("(");
       
 14012 				return_type_symbol->accept(*this);
       
 14013 				s4o.print(")time_to_real(");
       
 14014 				IN_param_value->accept(*this);
       
 14015 				s4o.print(")");
       
 14016 				return NULL;
       
 14017 				
       
 14018 			}
       
 14019 			
       
 14020 			ERROR;
       
 14021 		}
       
 14022 		
       
 14023 	}/*function_bool_to_tod*/
       
 14024 	break;
       
 14025 
       
 14026 /****
       
 14027  *BOOL_TO_UDINT
       
 14028  */
       
 14029 	case function_bool_to_udint :
       
 14030 	{
       
 14031 		symbol_c *last_type_symbol = NULL;
       
 14032 
       
 14033 		{
       
 14034 			identifier_c param_name("IN");
       
 14035 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14036 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14037 			
       
 14038 			/* Get the value from a foo(<param_value>) style call */
       
 14039 			if (IN_param_value == NULL)
       
 14040 			  IN_param_value = function_call_param_iterator.next();
       
 14041 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14042 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14043 			
       
 14044 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14045 			{
       
 14046 		
       
 14047 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14048 				s4o.print("(");
       
 14049 				return_type_symbol->accept(*this);
       
 14050 				s4o.print(")");
       
 14051 				IN_param_value->accept(*this);
       
 14052 				return NULL;
       
 14053 				
       
 14054 			}
       
 14055 			
       
 14056 			ERROR;
       
 14057 		}
       
 14058 		
       
 14059 	}/*function_bool_to_udint*/
       
 14060 	break;
       
 14061 
       
 14062 /****
       
 14063  *BOOL_TO_WORD
       
 14064  */
       
 14065 	case function_bool_to_word :
       
 14066 	{
       
 14067 		symbol_c *last_type_symbol = NULL;
       
 14068 
       
 14069 		{
       
 14070 			identifier_c param_name("IN");
       
 14071 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14072 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14073 			
       
 14074 			/* Get the value from a foo(<param_value>) style call */
       
 14075 			if (IN_param_value == NULL)
       
 14076 			  IN_param_value = function_call_param_iterator.next();
       
 14077 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14078 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14079 			
       
 14080 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14081 			{
       
 14082 		
       
 14083 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14084 				s4o.print("(");
       
 14085 				return_type_symbol->accept(*this);
       
 14086 				s4o.print(")");
       
 14087 				IN_param_value->accept(*this);
       
 14088 				return NULL;
       
 14089 				
       
 14090 			}
       
 14091 			
       
 14092 			ERROR;
       
 14093 		}
       
 14094 		
       
 14095 	}/*function_bool_to_word*/
       
 14096 	break;
       
 14097 
       
 14098 /****
       
 14099  *BOOL_TO_WSTRING
       
 14100  */
       
 14101 	case function_bool_to_wstring :
       
 14102 	{
       
 14103 		symbol_c *last_type_symbol = NULL;
       
 14104 
       
 14105 		{
       
 14106 			identifier_c param_name("IN");
       
 14107 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14108 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14109 			
       
 14110 			/* Get the value from a foo(<param_value>) style call */
       
 14111 			if (IN_param_value == NULL)
       
 14112 			  IN_param_value = function_call_param_iterator.next();
       
 14113 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14114 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14115 			
       
 14116 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14117 			{
       
 14118 		
       
 14119 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 14120 				s4o.print("(");
       
 14121 				return_type_symbol->accept(*this);
       
 14122 				s4o.print(")string_to_int(");
       
 14123 				IN_param_value->accept(*this);
       
 14124 				s4o.print(", 16)");
       
 14125 				return NULL;
       
 14126 				
       
 14127 			}
       
 14128 			
       
 14129 			ERROR;
       
 14130 		}
       
 14131 		
       
 14132 	}/*function_bool_to_wstring*/
       
 14133 	break;
       
 14134 
       
 14135 /****
       
 14136  *BOOL_TO_STRING
       
 14137  */
       
 14138 	case function_bool_to_string :
       
 14139 	{
       
 14140 		symbol_c *last_type_symbol = NULL;
       
 14141 
       
 14142 		{
       
 14143 			identifier_c param_name("IN");
       
 14144 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14145 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14146 			
       
 14147 			/* Get the value from a foo(<param_value>) style call */
       
 14148 			if (IN_param_value == NULL)
       
 14149 			  IN_param_value = function_call_param_iterator.next();
       
 14150 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14151 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14152 			
       
 14153 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14154 			{
       
 14155 		
       
 14156 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14157 				s4o.print("(");
       
 14158 				return_type_symbol->accept(*this);
       
 14159 				s4o.print(")string_to_int(");
       
 14160 				IN_param_value->accept(*this);
       
 14161 				s4o.print(", 16)");
       
 14162 				return NULL;
       
 14163 				
       
 14164 			}
       
 14165 			
       
 14166 			ERROR;
       
 14167 		}
       
 14168 		
       
 14169 	}/*function_bool_to_string*/
       
 14170 	break;
       
 14171 
       
 14172 /****
       
 14173  *BOOL_TO_LWORD
       
 14174  */
       
 14175 	case function_bool_to_lword :
       
 14176 	{
       
 14177 		symbol_c *last_type_symbol = NULL;
       
 14178 
       
 14179 		{
       
 14180 			identifier_c param_name("IN");
       
 14181 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14182 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14183 			
       
 14184 			/* Get the value from a foo(<param_value>) style call */
       
 14185 			if (IN_param_value == NULL)
       
 14186 			  IN_param_value = function_call_param_iterator.next();
       
 14187 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14188 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14189 			
       
 14190 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14191 			{
       
 14192 		
       
 14193 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 14194 				s4o.print("(");
       
 14195 				return_type_symbol->accept(*this);
       
 14196 				s4o.print(")");
       
 14197 				IN_param_value->accept(*this);
       
 14198 				return NULL;
       
 14199 				
       
 14200 			}
       
 14201 			
       
 14202 			ERROR;
       
 14203 		}
       
 14204 		
       
 14205 	}/*function_bool_to_lword*/
       
 14206 	break;
       
 14207 
       
 14208 /****
       
 14209  *BOOL_TO_UINT
       
 14210  */
       
 14211 	case function_bool_to_uint :
       
 14212 	{
       
 14213 		symbol_c *last_type_symbol = NULL;
       
 14214 
       
 14215 		{
       
 14216 			identifier_c param_name("IN");
       
 14217 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14218 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14219 			
       
 14220 			/* Get the value from a foo(<param_value>) style call */
       
 14221 			if (IN_param_value == NULL)
       
 14222 			  IN_param_value = function_call_param_iterator.next();
       
 14223 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14224 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14225 			
       
 14226 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14227 			{
       
 14228 		
       
 14229 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14230 				s4o.print("(");
       
 14231 				return_type_symbol->accept(*this);
       
 14232 				s4o.print(")");
       
 14233 				IN_param_value->accept(*this);
       
 14234 				return NULL;
       
 14235 				
       
 14236 			}
       
 14237 			
       
 14238 			ERROR;
       
 14239 		}
       
 14240 		
       
 14241 	}/*function_bool_to_uint*/
       
 14242 	break;
       
 14243 
       
 14244 /****
       
 14245  *BOOL_TO_LREAL
       
 14246  */
       
 14247 	case function_bool_to_lreal :
       
 14248 	{
       
 14249 		symbol_c *last_type_symbol = NULL;
       
 14250 
       
 14251 		{
       
 14252 			identifier_c param_name("IN");
       
 14253 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14254 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14255 			
       
 14256 			/* Get the value from a foo(<param_value>) style call */
       
 14257 			if (IN_param_value == NULL)
       
 14258 			  IN_param_value = function_call_param_iterator.next();
       
 14259 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14260 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14261 			
       
 14262 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14263 			{
       
 14264 		
       
 14265 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14266 				s4o.print("(");
       
 14267 				return_type_symbol->accept(*this);
       
 14268 				s4o.print(")");
       
 14269 				IN_param_value->accept(*this);
       
 14270 				return NULL;
       
 14271 				
       
 14272 			}
       
 14273 			
       
 14274 			ERROR;
       
 14275 		}
       
 14276 		
       
 14277 	}/*function_bool_to_lreal*/
       
 14278 	break;
       
 14279 
       
 14280 /****
       
 14281  *BOOL_TO_BYTE
       
 14282  */
       
 14283 	case function_bool_to_byte :
       
 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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14299 			{
       
 14300 		
       
 14301 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 14302 				s4o.print("(");
       
 14303 				return_type_symbol->accept(*this);
       
 14304 				s4o.print(")");
       
 14305 				IN_param_value->accept(*this);
       
 14306 				return NULL;
       
 14307 				
       
 14308 			}
       
 14309 			
       
 14310 			ERROR;
       
 14311 		}
       
 14312 		
       
 14313 	}/*function_bool_to_byte*/
       
 14314 	break;
       
 14315 
       
 14316 /****
       
 14317  *BOOL_TO_USINT
       
 14318  */
       
 14319 	case function_bool_to_usint :
       
 14320 	{
       
 14321 		symbol_c *last_type_symbol = NULL;
       
 14322 
       
 14323 		{
       
 14324 			identifier_c param_name("IN");
       
 14325 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14326 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14327 			
       
 14328 			/* Get the value from a foo(<param_value>) style call */
       
 14329 			if (IN_param_value == NULL)
       
 14330 			  IN_param_value = function_call_param_iterator.next();
       
 14331 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14332 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14333 			
       
 14334 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14335 			{
       
 14336 		
       
 14337 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 14338 				s4o.print("(");
       
 14339 				return_type_symbol->accept(*this);
       
 14340 				s4o.print(")");
       
 14341 				IN_param_value->accept(*this);
       
 14342 				return NULL;
       
 14343 				
       
 14344 			}
       
 14345 			
       
 14346 			ERROR;
       
 14347 		}
       
 14348 		
       
 14349 	}/*function_bool_to_usint*/
       
 14350 	break;
       
 14351 
       
 14352 /****
       
 14353  *BOOL_TO_ULINT
       
 14354  */
       
 14355 	case function_bool_to_ulint :
       
 14356 	{
       
 14357 		symbol_c *last_type_symbol = NULL;
       
 14358 
       
 14359 		{
       
 14360 			identifier_c param_name("IN");
       
 14361 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14362 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14363 			
       
 14364 			/* Get the value from a foo(<param_value>) style call */
       
 14365 			if (IN_param_value == NULL)
       
 14366 			  IN_param_value = function_call_param_iterator.next();
       
 14367 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14368 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14369 			
       
 14370 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14371 			{
       
 14372 		
       
 14373 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14374 				s4o.print("(");
       
 14375 				return_type_symbol->accept(*this);
       
 14376 				s4o.print(")");
       
 14377 				IN_param_value->accept(*this);
       
 14378 				return NULL;
       
 14379 				
       
 14380 			}
       
 14381 			
       
 14382 			ERROR;
       
 14383 		}
       
 14384 		
       
 14385 	}/*function_bool_to_ulint*/
       
 14386 	break;
       
 14387 
       
 14388 /****
       
 14389  *BOOL_TO_BOOL
       
 14390  */
       
 14391 	case function_bool_to_bool :
       
 14392 	{
       
 14393 		symbol_c *last_type_symbol = NULL;
       
 14394 
       
 14395 		{
       
 14396 			identifier_c param_name("IN");
       
 14397 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14398 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14399 			
       
 14400 			/* Get the value from a foo(<param_value>) style call */
       
 14401 			if (IN_param_value == NULL)
       
 14402 			  IN_param_value = function_call_param_iterator.next();
       
 14403 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14404 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14405 			
       
 14406 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14407 			{
       
 14408 		
       
 14409 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 14410 				s4o.print("(");
       
 14411 				return_type_symbol->accept(*this);
       
 14412 				s4o.print(")");
       
 14413 				IN_param_value->accept(*this);
       
 14414 				return NULL;
       
 14415 				
       
 14416 			}
       
 14417 			
       
 14418 			ERROR;
       
 14419 		}
       
 14420 		
       
 14421 	}/*function_bool_to_bool*/
       
 14422 	break;
       
 14423 
       
 14424 /****
       
 14425  *BOOL_TO_TIME
       
 14426  */
       
 14427 	case function_bool_to_time :
       
 14428 	{
       
 14429 		symbol_c *last_type_symbol = NULL;
       
 14430 
       
 14431 		{
       
 14432 			identifier_c param_name("IN");
       
 14433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14435 			
       
 14436 			/* Get the value from a foo(<param_value>) style call */
       
 14437 			if (IN_param_value == NULL)
       
 14438 			  IN_param_value = function_call_param_iterator.next();
       
 14439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14441 			
       
 14442 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14443 			{
       
 14444 		
       
 14445 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14446 				s4o.print("(");
       
 14447 				return_type_symbol->accept(*this);
       
 14448 				s4o.print(")time_to_real(");
       
 14449 				IN_param_value->accept(*this);
       
 14450 				s4o.print(")");
       
 14451 				return NULL;
       
 14452 				
       
 14453 			}
       
 14454 			
       
 14455 			ERROR;
       
 14456 		}
       
 14457 		
       
 14458 	}/*function_bool_to_time*/
       
 14459 	break;
       
 14460 
       
 14461 /****
       
 14462  *BOOL_TO_INT
       
 14463  */
       
 14464 	case function_bool_to_int :
       
 14465 	{
       
 14466 		symbol_c *last_type_symbol = NULL;
       
 14467 
       
 14468 		{
       
 14469 			identifier_c param_name("IN");
       
 14470 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14471 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14472 			
       
 14473 			/* Get the value from a foo(<param_value>) style call */
       
 14474 			if (IN_param_value == NULL)
       
 14475 			  IN_param_value = function_call_param_iterator.next();
       
 14476 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14477 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14478 			
       
 14479 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 14480 			{
       
 14481 		
       
 14482 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14483 				s4o.print("(");
       
 14484 				return_type_symbol->accept(*this);
       
 14485 				s4o.print(")");
       
 14486 				IN_param_value->accept(*this);
       
 14487 				return NULL;
       
 14488 				
       
 14489 			}
       
 14490 			
       
 14491 			ERROR;
       
 14492 		}
       
 14493 		
       
 14494 	}/*function_bool_to_int*/
       
 14495 	break;
       
 14496 
       
 14497 /****
       
 14498  *TIME_TO_REAL
       
 14499  */
       
 14500 	case function_time_to_real :
       
 14501 	{
       
 14502 		symbol_c *last_type_symbol = NULL;
       
 14503 
       
 14504 		{
       
 14505 			identifier_c param_name("IN");
       
 14506 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14507 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14508 			
       
 14509 			/* Get the value from a foo(<param_value>) style call */
       
 14510 			if (IN_param_value == NULL)
       
 14511 			  IN_param_value = function_call_param_iterator.next();
       
 14512 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14513 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14514 			
       
 14515 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14516 			{
       
 14517 		
       
 14518 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14519 				s4o.print("(");
       
 14520 				return_type_symbol->accept(*this);
       
 14521 				s4o.print(")real_to_time(");
       
 14522 				IN_param_value->accept(*this);
       
 14523 				s4o.print(")");
       
 14524 				return NULL;
       
 14525 				
       
 14526 			}
       
 14527 			
       
 14528 			ERROR;
       
 14529 		}
       
 14530 		
       
 14531 	}/*function_time_to_real*/
       
 14532 	break;
       
 14533 
       
 14534 /****
       
 14535  *TIME_TO_SINT
       
 14536  */
       
 14537 	case function_time_to_sint :
       
 14538 	{
       
 14539 		symbol_c *last_type_symbol = NULL;
       
 14540 
       
 14541 		{
       
 14542 			identifier_c param_name("IN");
       
 14543 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14544 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14545 			
       
 14546 			/* Get the value from a foo(<param_value>) style call */
       
 14547 			if (IN_param_value == NULL)
       
 14548 			  IN_param_value = function_call_param_iterator.next();
       
 14549 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14550 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14551 			
       
 14552 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14553 			{
       
 14554 		
       
 14555 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14556 				s4o.print("(");
       
 14557 				return_type_symbol->accept(*this);
       
 14558 				s4o.print(")real_to_time(");
       
 14559 				IN_param_value->accept(*this);
       
 14560 				s4o.print(")");
       
 14561 				return NULL;
       
 14562 				
       
 14563 			}
       
 14564 			
       
 14565 			ERROR;
       
 14566 		}
       
 14567 		
       
 14568 	}/*function_time_to_sint*/
       
 14569 	break;
       
 14570 
       
 14571 /****
       
 14572  *TIME_TO_LINT
       
 14573  */
       
 14574 	case function_time_to_lint :
       
 14575 	{
       
 14576 		symbol_c *last_type_symbol = NULL;
       
 14577 
       
 14578 		{
       
 14579 			identifier_c param_name("IN");
       
 14580 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14581 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14582 			
       
 14583 			/* Get the value from a foo(<param_value>) style call */
       
 14584 			if (IN_param_value == NULL)
       
 14585 			  IN_param_value = function_call_param_iterator.next();
       
 14586 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14587 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14588 			
       
 14589 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14590 			{
       
 14591 		
       
 14592 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14593 				s4o.print("(");
       
 14594 				return_type_symbol->accept(*this);
       
 14595 				s4o.print(")real_to_time(");
       
 14596 				IN_param_value->accept(*this);
       
 14597 				s4o.print(")");
       
 14598 				return NULL;
       
 14599 				
       
 14600 			}
       
 14601 			
       
 14602 			ERROR;
       
 14603 		}
       
 14604 		
       
 14605 	}/*function_time_to_lint*/
       
 14606 	break;
       
 14607 
       
 14608 /****
       
 14609  *TIME_TO_DINT
       
 14610  */
       
 14611 	case function_time_to_dint :
       
 14612 	{
       
 14613 		symbol_c *last_type_symbol = NULL;
       
 14614 
       
 14615 		{
       
 14616 			identifier_c param_name("IN");
       
 14617 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14618 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14619 			
       
 14620 			/* Get the value from a foo(<param_value>) style call */
       
 14621 			if (IN_param_value == NULL)
       
 14622 			  IN_param_value = function_call_param_iterator.next();
       
 14623 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14624 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14625 			
       
 14626 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14627 			{
       
 14628 		
       
 14629 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14630 				s4o.print("(");
       
 14631 				return_type_symbol->accept(*this);
       
 14632 				s4o.print(")real_to_time(");
       
 14633 				IN_param_value->accept(*this);
       
 14634 				s4o.print(")");
       
 14635 				return NULL;
       
 14636 				
       
 14637 			}
       
 14638 			
       
 14639 			ERROR;
       
 14640 		}
       
 14641 		
       
 14642 	}/*function_time_to_dint*/
       
 14643 	break;
       
 14644 
       
 14645 /****
       
 14646  *TIME_TO_DATE
       
 14647  */
       
 14648 	case function_time_to_date :
       
 14649 	{
       
 14650 		symbol_c *last_type_symbol = NULL;
       
 14651 
       
 14652 		{
       
 14653 			identifier_c param_name("IN");
       
 14654 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14655 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14656 			
       
 14657 			/* Get the value from a foo(<param_value>) style call */
       
 14658 			if (IN_param_value == NULL)
       
 14659 			  IN_param_value = function_call_param_iterator.next();
       
 14660 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14661 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14662 			
       
 14663 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14664 			{
       
 14665 		
       
 14666 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 14667 				s4o.print("#error TIME_TO_DATE not implemented!");
       
 14668 				return NULL;
       
 14669 				
       
 14670 			}
       
 14671 			
       
 14672 			ERROR;
       
 14673 		}
       
 14674 		
       
 14675 	}/*function_time_to_date*/
       
 14676 	break;
       
 14677 
       
 14678 /****
       
 14679  *TIME_TO_DWORD
       
 14680  */
       
 14681 	case function_time_to_dword :
       
 14682 	{
       
 14683 		symbol_c *last_type_symbol = NULL;
       
 14684 
       
 14685 		{
       
 14686 			identifier_c param_name("IN");
       
 14687 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14688 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14689 			
       
 14690 			/* Get the value from a foo(<param_value>) style call */
       
 14691 			if (IN_param_value == NULL)
       
 14692 			  IN_param_value = function_call_param_iterator.next();
       
 14693 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14694 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14695 			
       
 14696 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14697 			{
       
 14698 		
       
 14699 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 14700 				s4o.print("(");
       
 14701 				return_type_symbol->accept(*this);
       
 14702 				s4o.print(")real_to_time(");
       
 14703 				IN_param_value->accept(*this);
       
 14704 				s4o.print(")");
       
 14705 				return NULL;
       
 14706 				
       
 14707 			}
       
 14708 			
       
 14709 			ERROR;
       
 14710 		}
       
 14711 		
       
 14712 	}/*function_time_to_dword*/
       
 14713 	break;
       
 14714 
       
 14715 /****
       
 14716  *TIME_TO_DT
       
 14717  */
       
 14718 	case function_time_to_dt :
       
 14719 	{
       
 14720 		symbol_c *last_type_symbol = NULL;
       
 14721 
       
 14722 		{
       
 14723 			identifier_c param_name("IN");
       
 14724 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14725 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14726 			
       
 14727 			/* Get the value from a foo(<param_value>) style call */
       
 14728 			if (IN_param_value == NULL)
       
 14729 			  IN_param_value = function_call_param_iterator.next();
       
 14730 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14731 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14732 			
       
 14733 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14734 			{
       
 14735 		
       
 14736 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14737 				s4o.print("#error TIME_TO_DT not implemented!");
       
 14738 				return NULL;
       
 14739 				
       
 14740 			}
       
 14741 			
       
 14742 			ERROR;
       
 14743 		}
       
 14744 		
       
 14745 	}/*function_time_to_dt*/
       
 14746 	break;
       
 14747 
       
 14748 /****
       
 14749  *TIME_TO_TOD
       
 14750  */
       
 14751 	case function_time_to_tod :
       
 14752 	{
       
 14753 		symbol_c *last_type_symbol = NULL;
       
 14754 
       
 14755 		{
       
 14756 			identifier_c param_name("IN");
       
 14757 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14758 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14759 			
       
 14760 			/* Get the value from a foo(<param_value>) style call */
       
 14761 			if (IN_param_value == NULL)
       
 14762 			  IN_param_value = function_call_param_iterator.next();
       
 14763 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14764 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14765 			
       
 14766 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14767 			{
       
 14768 		
       
 14769 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14770 				s4o.print("#error TIME_TO_TOD not implemented!");
       
 14771 				return NULL;
       
 14772 				
       
 14773 			}
       
 14774 			
       
 14775 			ERROR;
       
 14776 		}
       
 14777 		
       
 14778 	}/*function_time_to_tod*/
       
 14779 	break;
       
 14780 
       
 14781 /****
       
 14782  *TIME_TO_UDINT
       
 14783  */
       
 14784 	case function_time_to_udint :
       
 14785 	{
       
 14786 		symbol_c *last_type_symbol = NULL;
       
 14787 
       
 14788 		{
       
 14789 			identifier_c param_name("IN");
       
 14790 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14791 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14792 			
       
 14793 			/* Get the value from a foo(<param_value>) style call */
       
 14794 			if (IN_param_value == NULL)
       
 14795 			  IN_param_value = function_call_param_iterator.next();
       
 14796 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14797 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14798 			
       
 14799 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14800 			{
       
 14801 		
       
 14802 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14803 				s4o.print("(");
       
 14804 				return_type_symbol->accept(*this);
       
 14805 				s4o.print(")real_to_time(");
       
 14806 				IN_param_value->accept(*this);
       
 14807 				s4o.print(")");
       
 14808 				return NULL;
       
 14809 				
       
 14810 			}
       
 14811 			
       
 14812 			ERROR;
       
 14813 		}
       
 14814 		
       
 14815 	}/*function_time_to_udint*/
       
 14816 	break;
       
 14817 
       
 14818 /****
       
 14819  *TIME_TO_WORD
       
 14820  */
       
 14821 	case function_time_to_word :
       
 14822 	{
       
 14823 		symbol_c *last_type_symbol = NULL;
       
 14824 
       
 14825 		{
       
 14826 			identifier_c param_name("IN");
       
 14827 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14828 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14829 			
       
 14830 			/* Get the value from a foo(<param_value>) style call */
       
 14831 			if (IN_param_value == NULL)
       
 14832 			  IN_param_value = function_call_param_iterator.next();
       
 14833 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14834 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14835 			
       
 14836 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14837 			{
       
 14838 		
       
 14839 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14840 				s4o.print("(");
       
 14841 				return_type_symbol->accept(*this);
       
 14842 				s4o.print(")real_to_time(");
       
 14843 				IN_param_value->accept(*this);
       
 14844 				s4o.print(")");
       
 14845 				return NULL;
       
 14846 				
       
 14847 			}
       
 14848 			
       
 14849 			ERROR;
       
 14850 		}
       
 14851 		
       
 14852 	}/*function_time_to_word*/
       
 14853 	break;
       
 14854 
       
 14855 /****
       
 14856  *TIME_TO_WSTRING
       
 14857  */
       
 14858 	case function_time_to_wstring :
       
 14859 	{
       
 14860 		symbol_c *last_type_symbol = NULL;
       
 14861 
       
 14862 		{
       
 14863 			identifier_c param_name("IN");
       
 14864 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14865 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14866 			
       
 14867 			/* Get the value from a foo(<param_value>) style call */
       
 14868 			if (IN_param_value == NULL)
       
 14869 			  IN_param_value = function_call_param_iterator.next();
       
 14870 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14871 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14872 			
       
 14873 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14874 			{
       
 14875 		
       
 14876 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 14877 				s4o.print("(");
       
 14878 				return_type_symbol->accept(*this);
       
 14879 				s4o.print(")string_to_time(");
       
 14880 				IN_param_value->accept(*this);
       
 14881 				s4o.print(")");
       
 14882 				return NULL;
       
 14883 				
       
 14884 			}
       
 14885 			
       
 14886 			ERROR;
       
 14887 		}
       
 14888 		
       
 14889 	}/*function_time_to_wstring*/
       
 14890 	break;
       
 14891 
       
 14892 /****
       
 14893  *TIME_TO_STRING
       
 14894  */
       
 14895 	case function_time_to_string :
       
 14896 	{
       
 14897 		symbol_c *last_type_symbol = NULL;
       
 14898 
       
 14899 		{
       
 14900 			identifier_c param_name("IN");
       
 14901 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14902 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14903 			
       
 14904 			/* Get the value from a foo(<param_value>) style call */
       
 14905 			if (IN_param_value == NULL)
       
 14906 			  IN_param_value = function_call_param_iterator.next();
       
 14907 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14908 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14909 			
       
 14910 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14911 			{
       
 14912 		
       
 14913 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14914 				s4o.print("(");
       
 14915 				return_type_symbol->accept(*this);
       
 14916 				s4o.print(")string_to_time(");
       
 14917 				IN_param_value->accept(*this);
       
 14918 				s4o.print(")");
       
 14919 				return NULL;
       
 14920 				
       
 14921 			}
       
 14922 			
       
 14923 			ERROR;
       
 14924 		}
       
 14925 		
       
 14926 	}/*function_time_to_string*/
       
 14927 	break;
       
 14928 
       
 14929 /****
       
 14930  *TIME_TO_LWORD
       
 14931  */
       
 14932 	case function_time_to_lword :
       
 14933 	{
       
 14934 		symbol_c *last_type_symbol = NULL;
       
 14935 
       
 14936 		{
       
 14937 			identifier_c param_name("IN");
       
 14938 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14939 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14940 			
       
 14941 			/* Get the value from a foo(<param_value>) style call */
       
 14942 			if (IN_param_value == NULL)
       
 14943 			  IN_param_value = function_call_param_iterator.next();
       
 14944 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14945 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14946 			
       
 14947 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14948 			{
       
 14949 		
       
 14950 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 14951 				s4o.print("(");
       
 14952 				return_type_symbol->accept(*this);
       
 14953 				s4o.print(")real_to_time(");
       
 14954 				IN_param_value->accept(*this);
       
 14955 				s4o.print(")");
       
 14956 				return NULL;
       
 14957 				
       
 14958 			}
       
 14959 			
       
 14960 			ERROR;
       
 14961 		}
       
 14962 		
       
 14963 	}/*function_time_to_lword*/
       
 14964 	break;
       
 14965 
       
 14966 /****
       
 14967  *TIME_TO_UINT
       
 14968  */
       
 14969 	case function_time_to_uint :
       
 14970 	{
       
 14971 		symbol_c *last_type_symbol = NULL;
       
 14972 
       
 14973 		{
       
 14974 			identifier_c param_name("IN");
       
 14975 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14976 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14977 			
       
 14978 			/* Get the value from a foo(<param_value>) style call */
       
 14979 			if (IN_param_value == NULL)
       
 14980 			  IN_param_value = function_call_param_iterator.next();
       
 14981 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14982 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14983 			
       
 14984 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 14985 			{
       
 14986 		
       
 14987 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14988 				s4o.print("(");
       
 14989 				return_type_symbol->accept(*this);
       
 14990 				s4o.print(")real_to_time(");
       
 14991 				IN_param_value->accept(*this);
       
 14992 				s4o.print(")");
       
 14993 				return NULL;
       
 14994 				
       
 14995 			}
       
 14996 			
       
 14997 			ERROR;
       
 14998 		}
       
 14999 		
       
 15000 	}/*function_time_to_uint*/
       
 15001 	break;
       
 15002 
       
 15003 /****
       
 15004  *TIME_TO_LREAL
       
 15005  */
       
 15006 	case function_time_to_lreal :
       
 15007 	{
       
 15008 		symbol_c *last_type_symbol = NULL;
       
 15009 
       
 15010 		{
       
 15011 			identifier_c param_name("IN");
       
 15012 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15013 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15014 			
       
 15015 			/* Get the value from a foo(<param_value>) style call */
       
 15016 			if (IN_param_value == NULL)
       
 15017 			  IN_param_value = function_call_param_iterator.next();
       
 15018 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15019 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15020 			
       
 15021 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15022 			{
       
 15023 		
       
 15024 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15025 				s4o.print("(");
       
 15026 				return_type_symbol->accept(*this);
       
 15027 				s4o.print(")real_to_time(");
       
 15028 				IN_param_value->accept(*this);
       
 15029 				s4o.print(")");
       
 15030 				return NULL;
       
 15031 				
       
 15032 			}
       
 15033 			
       
 15034 			ERROR;
       
 15035 		}
       
 15036 		
       
 15037 	}/*function_time_to_lreal*/
       
 15038 	break;
       
 15039 
       
 15040 /****
       
 15041  *TIME_TO_BYTE
       
 15042  */
       
 15043 	case function_time_to_byte :
       
 15044 	{
       
 15045 		symbol_c *last_type_symbol = NULL;
       
 15046 
       
 15047 		{
       
 15048 			identifier_c param_name("IN");
       
 15049 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15050 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15051 			
       
 15052 			/* Get the value from a foo(<param_value>) style call */
       
 15053 			if (IN_param_value == NULL)
       
 15054 			  IN_param_value = function_call_param_iterator.next();
       
 15055 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15056 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15057 			
       
 15058 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15059 			{
       
 15060 		
       
 15061 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15062 				s4o.print("(");
       
 15063 				return_type_symbol->accept(*this);
       
 15064 				s4o.print(")real_to_time(");
       
 15065 				IN_param_value->accept(*this);
       
 15066 				s4o.print(")");
       
 15067 				return NULL;
       
 15068 				
       
 15069 			}
       
 15070 			
       
 15071 			ERROR;
       
 15072 		}
       
 15073 		
       
 15074 	}/*function_time_to_byte*/
       
 15075 	break;
       
 15076 
       
 15077 /****
       
 15078  *TIME_TO_USINT
       
 15079  */
       
 15080 	case function_time_to_usint :
       
 15081 	{
       
 15082 		symbol_c *last_type_symbol = NULL;
       
 15083 
       
 15084 		{
       
 15085 			identifier_c param_name("IN");
       
 15086 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15087 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15088 			
       
 15089 			/* Get the value from a foo(<param_value>) style call */
       
 15090 			if (IN_param_value == NULL)
       
 15091 			  IN_param_value = function_call_param_iterator.next();
       
 15092 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15093 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15094 			
       
 15095 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15096 			{
       
 15097 		
       
 15098 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15099 				s4o.print("(");
       
 15100 				return_type_symbol->accept(*this);
       
 15101 				s4o.print(")real_to_time(");
       
 15102 				IN_param_value->accept(*this);
       
 15103 				s4o.print(")");
       
 15104 				return NULL;
       
 15105 				
       
 15106 			}
       
 15107 			
       
 15108 			ERROR;
       
 15109 		}
       
 15110 		
       
 15111 	}/*function_time_to_usint*/
       
 15112 	break;
       
 15113 
       
 15114 /****
       
 15115  *TIME_TO_ULINT
       
 15116  */
       
 15117 	case function_time_to_ulint :
       
 15118 	{
       
 15119 		symbol_c *last_type_symbol = NULL;
       
 15120 
       
 15121 		{
       
 15122 			identifier_c param_name("IN");
       
 15123 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15124 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15125 			
       
 15126 			/* Get the value from a foo(<param_value>) style call */
       
 15127 			if (IN_param_value == NULL)
       
 15128 			  IN_param_value = function_call_param_iterator.next();
       
 15129 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15130 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15131 			
       
 15132 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15133 			{
       
 15134 		
       
 15135 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15136 				s4o.print("(");
       
 15137 				return_type_symbol->accept(*this);
       
 15138 				s4o.print(")real_to_time(");
       
 15139 				IN_param_value->accept(*this);
       
 15140 				s4o.print(")");
       
 15141 				return NULL;
       
 15142 				
       
 15143 			}
       
 15144 			
       
 15145 			ERROR;
       
 15146 		}
       
 15147 		
       
 15148 	}/*function_time_to_ulint*/
       
 15149 	break;
       
 15150 
       
 15151 /****
       
 15152  *TIME_TO_BOOL
       
 15153  */
       
 15154 	case function_time_to_bool :
       
 15155 	{
       
 15156 		symbol_c *last_type_symbol = NULL;
       
 15157 
       
 15158 		{
       
 15159 			identifier_c param_name("IN");
       
 15160 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15161 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15162 			
       
 15163 			/* Get the value from a foo(<param_value>) style call */
       
 15164 			if (IN_param_value == NULL)
       
 15165 			  IN_param_value = function_call_param_iterator.next();
       
 15166 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15167 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15168 			
       
 15169 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15170 			{
       
 15171 		
       
 15172 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15173 				s4o.print("(");
       
 15174 				return_type_symbol->accept(*this);
       
 15175 				s4o.print(")real_to_time(");
       
 15176 				IN_param_value->accept(*this);
       
 15177 				s4o.print(")");
       
 15178 				return NULL;
       
 15179 				
       
 15180 			}
       
 15181 			
       
 15182 			ERROR;
       
 15183 		}
       
 15184 		
       
 15185 	}/*function_time_to_bool*/
       
 15186 	break;
       
 15187 
       
 15188 /****
       
 15189  *TIME_TO_TIME
       
 15190  */
       
 15191 	case function_time_to_time :
       
 15192 	{
       
 15193 		symbol_c *last_type_symbol = NULL;
       
 15194 
       
 15195 		{
       
 15196 			identifier_c param_name("IN");
       
 15197 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15198 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15199 			
       
 15200 			/* Get the value from a foo(<param_value>) style call */
       
 15201 			if (IN_param_value == NULL)
       
 15202 			  IN_param_value = function_call_param_iterator.next();
       
 15203 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15204 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15205 			
       
 15206 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15207 			{
       
 15208 		
       
 15209 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15210 				s4o.print("#error TIME_TO_TIME not implemented!");
       
 15211 				return NULL;
       
 15212 				
       
 15213 			}
       
 15214 			
       
 15215 			ERROR;
       
 15216 		}
       
 15217 		
       
 15218 	}/*function_time_to_time*/
       
 15219 	break;
       
 15220 
       
 15221 /****
       
 15222  *TIME_TO_INT
       
 15223  */
       
 15224 	case function_time_to_int :
       
 15225 	{
       
 15226 		symbol_c *last_type_symbol = NULL;
       
 15227 
       
 15228 		{
       
 15229 			identifier_c param_name("IN");
       
 15230 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15231 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15232 			
       
 15233 			/* Get the value from a foo(<param_value>) style call */
       
 15234 			if (IN_param_value == NULL)
       
 15235 			  IN_param_value = function_call_param_iterator.next();
       
 15236 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15237 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15238 			
       
 15239 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 15240 			{
       
 15241 		
       
 15242 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15243 				s4o.print("(");
       
 15244 				return_type_symbol->accept(*this);
       
 15245 				s4o.print(")real_to_time(");
       
 15246 				IN_param_value->accept(*this);
       
 15247 				s4o.print(")");
       
 15248 				return NULL;
       
 15249 				
       
 15250 			}
       
 15251 			
       
 15252 			ERROR;
       
 15253 		}
       
 15254 		
       
 15255 	}/*function_time_to_int*/
       
 15256 	break;
       
 15257 
       
 15258 /****
       
 15259  *INT_TO_REAL
       
 15260  */
       
 15261 	case function_int_to_real :
       
 15262 	{
       
 15263 		symbol_c *last_type_symbol = NULL;
       
 15264 
       
 15265 		{
       
 15266 			identifier_c param_name("IN");
       
 15267 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15268 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15269 			
       
 15270 			/* Get the value from a foo(<param_value>) style call */
       
 15271 			if (IN_param_value == NULL)
       
 15272 			  IN_param_value = function_call_param_iterator.next();
       
 15273 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15274 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15275 			
       
 15276 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15277 			{
       
 15278 		
       
 15279 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 15280 				s4o.print("(");
       
 15281 				return_type_symbol->accept(*this);
       
 15282 				s4o.print(")");
       
 15283 				IN_param_value->accept(*this);
       
 15284 				return NULL;
       
 15285 				
       
 15286 			}
       
 15287 			
       
 15288 			ERROR;
       
 15289 		}
       
 15290 		
       
 15291 	}/*function_int_to_real*/
       
 15292 	break;
       
 15293 
       
 15294 /****
       
 15295  *INT_TO_SINT
       
 15296  */
       
 15297 	case function_int_to_sint :
       
 15298 	{
       
 15299 		symbol_c *last_type_symbol = NULL;
       
 15300 
       
 15301 		{
       
 15302 			identifier_c param_name("IN");
       
 15303 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15304 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15305 			
       
 15306 			/* Get the value from a foo(<param_value>) style call */
       
 15307 			if (IN_param_value == NULL)
       
 15308 			  IN_param_value = function_call_param_iterator.next();
       
 15309 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15310 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15311 			
       
 15312 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15313 			{
       
 15314 		
       
 15315 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 15316 				s4o.print("(");
       
 15317 				return_type_symbol->accept(*this);
       
 15318 				s4o.print(")");
       
 15319 				IN_param_value->accept(*this);
       
 15320 				return NULL;
       
 15321 				
       
 15322 			}
       
 15323 			
       
 15324 			ERROR;
       
 15325 		}
       
 15326 		
       
 15327 	}/*function_int_to_sint*/
       
 15328 	break;
       
 15329 
       
 15330 /****
       
 15331  *INT_TO_LINT
       
 15332  */
       
 15333 	case function_int_to_lint :
       
 15334 	{
       
 15335 		symbol_c *last_type_symbol = NULL;
       
 15336 
       
 15337 		{
       
 15338 			identifier_c param_name("IN");
       
 15339 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15340 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15341 			
       
 15342 			/* Get the value from a foo(<param_value>) style call */
       
 15343 			if (IN_param_value == NULL)
       
 15344 			  IN_param_value = function_call_param_iterator.next();
       
 15345 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15346 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15347 			
       
 15348 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15349 			{
       
 15350 		
       
 15351 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15352 				s4o.print("(");
       
 15353 				return_type_symbol->accept(*this);
       
 15354 				s4o.print(")");
       
 15355 				IN_param_value->accept(*this);
       
 15356 				return NULL;
       
 15357 				
       
 15358 			}
       
 15359 			
       
 15360 			ERROR;
       
 15361 		}
       
 15362 		
       
 15363 	}/*function_int_to_lint*/
       
 15364 	break;
       
 15365 
       
 15366 /****
       
 15367  *INT_TO_DINT
       
 15368  */
       
 15369 	case function_int_to_dint :
       
 15370 	{
       
 15371 		symbol_c *last_type_symbol = NULL;
       
 15372 
       
 15373 		{
       
 15374 			identifier_c param_name("IN");
       
 15375 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15376 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15377 			
       
 15378 			/* Get the value from a foo(<param_value>) style call */
       
 15379 			if (IN_param_value == NULL)
       
 15380 			  IN_param_value = function_call_param_iterator.next();
       
 15381 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15382 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15383 			
       
 15384 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15385 			{
       
 15386 		
       
 15387 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15388 				s4o.print("(");
       
 15389 				return_type_symbol->accept(*this);
       
 15390 				s4o.print(")");
       
 15391 				IN_param_value->accept(*this);
       
 15392 				return NULL;
       
 15393 				
       
 15394 			}
       
 15395 			
       
 15396 			ERROR;
       
 15397 		}
       
 15398 		
       
 15399 	}/*function_int_to_dint*/
       
 15400 	break;
       
 15401 
       
 15402 /****
       
 15403  *INT_TO_DATE
       
 15404  */
       
 15405 	case function_int_to_date :
       
 15406 	{
       
 15407 		symbol_c *last_type_symbol = NULL;
       
 15408 
       
 15409 		{
       
 15410 			identifier_c param_name("IN");
       
 15411 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15412 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15413 			
       
 15414 			/* Get the value from a foo(<param_value>) style call */
       
 15415 			if (IN_param_value == NULL)
       
 15416 			  IN_param_value = function_call_param_iterator.next();
       
 15417 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15418 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15419 			
       
 15420 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15421 			{
       
 15422 		
       
 15423 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 15424 				s4o.print("(");
       
 15425 				return_type_symbol->accept(*this);
       
 15426 				s4o.print(")time_to_real(");
       
 15427 				IN_param_value->accept(*this);
       
 15428 				s4o.print(")");
       
 15429 				return NULL;
       
 15430 				
       
 15431 			}
       
 15432 			
       
 15433 			ERROR;
       
 15434 		}
       
 15435 		
       
 15436 	}/*function_int_to_date*/
       
 15437 	break;
       
 15438 
       
 15439 /****
       
 15440  *INT_TO_DWORD
       
 15441  */
       
 15442 	case function_int_to_dword :
       
 15443 	{
       
 15444 		symbol_c *last_type_symbol = NULL;
       
 15445 
       
 15446 		{
       
 15447 			identifier_c param_name("IN");
       
 15448 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15449 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15450 			
       
 15451 			/* Get the value from a foo(<param_value>) style call */
       
 15452 			if (IN_param_value == NULL)
       
 15453 			  IN_param_value = function_call_param_iterator.next();
       
 15454 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15455 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15456 			
       
 15457 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15458 			{
       
 15459 		
       
 15460 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15461 				s4o.print("(");
       
 15462 				return_type_symbol->accept(*this);
       
 15463 				s4o.print(")");
       
 15464 				IN_param_value->accept(*this);
       
 15465 				return NULL;
       
 15466 				
       
 15467 			}
       
 15468 			
       
 15469 			ERROR;
       
 15470 		}
       
 15471 		
       
 15472 	}/*function_int_to_dword*/
       
 15473 	break;
       
 15474 
       
 15475 /****
       
 15476  *INT_TO_DT
       
 15477  */
       
 15478 	case function_int_to_dt :
       
 15479 	{
       
 15480 		symbol_c *last_type_symbol = NULL;
       
 15481 
       
 15482 		{
       
 15483 			identifier_c param_name("IN");
       
 15484 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15485 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15486 			
       
 15487 			/* Get the value from a foo(<param_value>) style call */
       
 15488 			if (IN_param_value == NULL)
       
 15489 			  IN_param_value = function_call_param_iterator.next();
       
 15490 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15491 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15492 			
       
 15493 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15494 			{
       
 15495 		
       
 15496 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15497 				s4o.print("(");
       
 15498 				return_type_symbol->accept(*this);
       
 15499 				s4o.print(")time_to_real(");
       
 15500 				IN_param_value->accept(*this);
       
 15501 				s4o.print(")");
       
 15502 				return NULL;
       
 15503 				
       
 15504 			}
       
 15505 			
       
 15506 			ERROR;
       
 15507 		}
       
 15508 		
       
 15509 	}/*function_int_to_dt*/
       
 15510 	break;
       
 15511 
       
 15512 /****
       
 15513  *INT_TO_TOD
       
 15514  */
       
 15515 	case function_int_to_tod :
       
 15516 	{
       
 15517 		symbol_c *last_type_symbol = NULL;
       
 15518 
       
 15519 		{
       
 15520 			identifier_c param_name("IN");
       
 15521 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15522 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15523 			
       
 15524 			/* Get the value from a foo(<param_value>) style call */
       
 15525 			if (IN_param_value == NULL)
       
 15526 			  IN_param_value = function_call_param_iterator.next();
       
 15527 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15528 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15529 			
       
 15530 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15531 			{
       
 15532 		
       
 15533 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15534 				s4o.print("(");
       
 15535 				return_type_symbol->accept(*this);
       
 15536 				s4o.print(")time_to_real(");
       
 15537 				IN_param_value->accept(*this);
       
 15538 				s4o.print(")");
       
 15539 				return NULL;
       
 15540 				
       
 15541 			}
       
 15542 			
       
 15543 			ERROR;
       
 15544 		}
       
 15545 		
       
 15546 	}/*function_int_to_tod*/
       
 15547 	break;
       
 15548 
       
 15549 /****
       
 15550  *INT_TO_UDINT
       
 15551  */
       
 15552 	case function_int_to_udint :
       
 15553 	{
       
 15554 		symbol_c *last_type_symbol = NULL;
       
 15555 
       
 15556 		{
       
 15557 			identifier_c param_name("IN");
       
 15558 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15559 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15560 			
       
 15561 			/* Get the value from a foo(<param_value>) style call */
       
 15562 			if (IN_param_value == NULL)
       
 15563 			  IN_param_value = function_call_param_iterator.next();
       
 15564 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15565 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15566 			
       
 15567 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15568 			{
       
 15569 		
       
 15570 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15571 				s4o.print("(");
       
 15572 				return_type_symbol->accept(*this);
       
 15573 				s4o.print(")");
       
 15574 				IN_param_value->accept(*this);
       
 15575 				return NULL;
       
 15576 				
       
 15577 			}
       
 15578 			
       
 15579 			ERROR;
       
 15580 		}
       
 15581 		
       
 15582 	}/*function_int_to_udint*/
       
 15583 	break;
       
 15584 
       
 15585 /****
       
 15586  *INT_TO_WORD
       
 15587  */
       
 15588 	case function_int_to_word :
       
 15589 	{
       
 15590 		symbol_c *last_type_symbol = NULL;
       
 15591 
       
 15592 		{
       
 15593 			identifier_c param_name("IN");
       
 15594 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15595 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15596 			
       
 15597 			/* Get the value from a foo(<param_value>) style call */
       
 15598 			if (IN_param_value == NULL)
       
 15599 			  IN_param_value = function_call_param_iterator.next();
       
 15600 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15601 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15602 			
       
 15603 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15604 			{
       
 15605 		
       
 15606 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15607 				s4o.print("(");
       
 15608 				return_type_symbol->accept(*this);
       
 15609 				s4o.print(")");
       
 15610 				IN_param_value->accept(*this);
       
 15611 				return NULL;
       
 15612 				
       
 15613 			}
       
 15614 			
       
 15615 			ERROR;
       
 15616 		}
       
 15617 		
       
 15618 	}/*function_int_to_word*/
       
 15619 	break;
       
 15620 
       
 15621 /****
       
 15622  *INT_TO_WSTRING
       
 15623  */
       
 15624 	case function_int_to_wstring :
       
 15625 	{
       
 15626 		symbol_c *last_type_symbol = NULL;
       
 15627 
       
 15628 		{
       
 15629 			identifier_c param_name("IN");
       
 15630 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15631 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15632 			
       
 15633 			/* Get the value from a foo(<param_value>) style call */
       
 15634 			if (IN_param_value == NULL)
       
 15635 			  IN_param_value = function_call_param_iterator.next();
       
 15636 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15637 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15638 			
       
 15639 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15640 			{
       
 15641 		
       
 15642 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 15643 				s4o.print("(");
       
 15644 				return_type_symbol->accept(*this);
       
 15645 				s4o.print(")string_to_int(");
       
 15646 				IN_param_value->accept(*this);
       
 15647 				s4o.print(", 10)");
       
 15648 				return NULL;
       
 15649 				
       
 15650 			}
       
 15651 			
       
 15652 			ERROR;
       
 15653 		}
       
 15654 		
       
 15655 	}/*function_int_to_wstring*/
       
 15656 	break;
       
 15657 
       
 15658 /****
       
 15659  *INT_TO_STRING
       
 15660  */
       
 15661 	case function_int_to_string :
       
 15662 	{
       
 15663 		symbol_c *last_type_symbol = NULL;
       
 15664 
       
 15665 		{
       
 15666 			identifier_c param_name("IN");
       
 15667 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15668 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15669 			
       
 15670 			/* Get the value from a foo(<param_value>) style call */
       
 15671 			if (IN_param_value == NULL)
       
 15672 			  IN_param_value = function_call_param_iterator.next();
       
 15673 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15674 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15675 			
       
 15676 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15677 			{
       
 15678 		
       
 15679 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15680 				s4o.print("(");
       
 15681 				return_type_symbol->accept(*this);
       
 15682 				s4o.print(")string_to_int(");
       
 15683 				IN_param_value->accept(*this);
       
 15684 				s4o.print(", 10)");
       
 15685 				return NULL;
       
 15686 				
       
 15687 			}
       
 15688 			
       
 15689 			ERROR;
       
 15690 		}
       
 15691 		
       
 15692 	}/*function_int_to_string*/
       
 15693 	break;
       
 15694 
       
 15695 /****
       
 15696  *INT_TO_LWORD
       
 15697  */
       
 15698 	case function_int_to_lword :
       
 15699 	{
       
 15700 		symbol_c *last_type_symbol = NULL;
       
 15701 
       
 15702 		{
       
 15703 			identifier_c param_name("IN");
       
 15704 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15705 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15706 			
       
 15707 			/* Get the value from a foo(<param_value>) style call */
       
 15708 			if (IN_param_value == NULL)
       
 15709 			  IN_param_value = function_call_param_iterator.next();
       
 15710 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15711 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15712 			
       
 15713 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15714 			{
       
 15715 		
       
 15716 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15717 				s4o.print("(");
       
 15718 				return_type_symbol->accept(*this);
       
 15719 				s4o.print(")");
       
 15720 				IN_param_value->accept(*this);
       
 15721 				return NULL;
       
 15722 				
       
 15723 			}
       
 15724 			
       
 15725 			ERROR;
       
 15726 		}
       
 15727 		
       
 15728 	}/*function_int_to_lword*/
       
 15729 	break;
       
 15730 
       
 15731 /****
       
 15732  *INT_TO_UINT
       
 15733  */
       
 15734 	case function_int_to_uint :
       
 15735 	{
       
 15736 		symbol_c *last_type_symbol = NULL;
       
 15737 
       
 15738 		{
       
 15739 			identifier_c param_name("IN");
       
 15740 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15741 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15742 			
       
 15743 			/* Get the value from a foo(<param_value>) style call */
       
 15744 			if (IN_param_value == NULL)
       
 15745 			  IN_param_value = function_call_param_iterator.next();
       
 15746 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15747 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15748 			
       
 15749 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15750 			{
       
 15751 		
       
 15752 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15753 				s4o.print("(");
       
 15754 				return_type_symbol->accept(*this);
       
 15755 				s4o.print(")");
       
 15756 				IN_param_value->accept(*this);
       
 15757 				return NULL;
       
 15758 				
       
 15759 			}
       
 15760 			
       
 15761 			ERROR;
       
 15762 		}
       
 15763 		
       
 15764 	}/*function_int_to_uint*/
       
 15765 	break;
       
 15766 
       
 15767 /****
       
 15768  *INT_TO_LREAL
       
 15769  */
       
 15770 	case function_int_to_lreal :
       
 15771 	{
       
 15772 		symbol_c *last_type_symbol = NULL;
       
 15773 
       
 15774 		{
       
 15775 			identifier_c param_name("IN");
       
 15776 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15777 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15778 			
       
 15779 			/* Get the value from a foo(<param_value>) style call */
       
 15780 			if (IN_param_value == NULL)
       
 15781 			  IN_param_value = function_call_param_iterator.next();
       
 15782 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15783 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15784 			
       
 15785 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15786 			{
       
 15787 		
       
 15788 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15789 				s4o.print("(");
       
 15790 				return_type_symbol->accept(*this);
       
 15791 				s4o.print(")");
       
 15792 				IN_param_value->accept(*this);
       
 15793 				return NULL;
       
 15794 				
       
 15795 			}
       
 15796 			
       
 15797 			ERROR;
       
 15798 		}
       
 15799 		
       
 15800 	}/*function_int_to_lreal*/
       
 15801 	break;
       
 15802 
       
 15803 /****
       
 15804  *INT_TO_BYTE
       
 15805  */
       
 15806 	case function_int_to_byte :
       
 15807 	{
       
 15808 		symbol_c *last_type_symbol = NULL;
       
 15809 
       
 15810 		{
       
 15811 			identifier_c param_name("IN");
       
 15812 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15813 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15814 			
       
 15815 			/* Get the value from a foo(<param_value>) style call */
       
 15816 			if (IN_param_value == NULL)
       
 15817 			  IN_param_value = function_call_param_iterator.next();
       
 15818 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15819 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15820 			
       
 15821 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15822 			{
       
 15823 		
       
 15824 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15825 				s4o.print("(");
       
 15826 				return_type_symbol->accept(*this);
       
 15827 				s4o.print(")");
       
 15828 				IN_param_value->accept(*this);
       
 15829 				return NULL;
       
 15830 				
       
 15831 			}
       
 15832 			
       
 15833 			ERROR;
       
 15834 		}
       
 15835 		
       
 15836 	}/*function_int_to_byte*/
       
 15837 	break;
       
 15838 
       
 15839 /****
       
 15840  *INT_TO_USINT
       
 15841  */
       
 15842 	case function_int_to_usint :
       
 15843 	{
       
 15844 		symbol_c *last_type_symbol = NULL;
       
 15845 
       
 15846 		{
       
 15847 			identifier_c param_name("IN");
       
 15848 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15849 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15850 			
       
 15851 			/* Get the value from a foo(<param_value>) style call */
       
 15852 			if (IN_param_value == NULL)
       
 15853 			  IN_param_value = function_call_param_iterator.next();
       
 15854 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15855 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15856 			
       
 15857 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15858 			{
       
 15859 		
       
 15860 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15861 				s4o.print("(");
       
 15862 				return_type_symbol->accept(*this);
       
 15863 				s4o.print(")");
       
 15864 				IN_param_value->accept(*this);
       
 15865 				return NULL;
       
 15866 				
       
 15867 			}
       
 15868 			
       
 15869 			ERROR;
       
 15870 		}
       
 15871 		
       
 15872 	}/*function_int_to_usint*/
       
 15873 	break;
       
 15874 
       
 15875 /****
       
 15876  *INT_TO_ULINT
       
 15877  */
       
 15878 	case function_int_to_ulint :
       
 15879 	{
       
 15880 		symbol_c *last_type_symbol = NULL;
       
 15881 
       
 15882 		{
       
 15883 			identifier_c param_name("IN");
       
 15884 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15885 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15886 			
       
 15887 			/* Get the value from a foo(<param_value>) style call */
       
 15888 			if (IN_param_value == NULL)
       
 15889 			  IN_param_value = function_call_param_iterator.next();
       
 15890 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15891 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15892 			
       
 15893 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15894 			{
       
 15895 		
       
 15896 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15897 				s4o.print("(");
       
 15898 				return_type_symbol->accept(*this);
       
 15899 				s4o.print(")");
       
 15900 				IN_param_value->accept(*this);
       
 15901 				return NULL;
       
 15902 				
       
 15903 			}
       
 15904 			
       
 15905 			ERROR;
       
 15906 		}
       
 15907 		
       
 15908 	}/*function_int_to_ulint*/
       
 15909 	break;
       
 15910 
       
 15911 /****
       
 15912  *INT_TO_BOOL
       
 15913  */
       
 15914 	case function_int_to_bool :
       
 15915 	{
       
 15916 		symbol_c *last_type_symbol = NULL;
       
 15917 
       
 15918 		{
       
 15919 			identifier_c param_name("IN");
       
 15920 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15921 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15922 			
       
 15923 			/* Get the value from a foo(<param_value>) style call */
       
 15924 			if (IN_param_value == NULL)
       
 15925 			  IN_param_value = function_call_param_iterator.next();
       
 15926 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15927 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15928 			
       
 15929 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15930 			{
       
 15931 		
       
 15932 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15933 				s4o.print("(");
       
 15934 				return_type_symbol->accept(*this);
       
 15935 				s4o.print(")");
       
 15936 				IN_param_value->accept(*this);
       
 15937 				return NULL;
       
 15938 				
       
 15939 			}
       
 15940 			
       
 15941 			ERROR;
       
 15942 		}
       
 15943 		
       
 15944 	}/*function_int_to_bool*/
       
 15945 	break;
       
 15946 
       
 15947 /****
       
 15948  *INT_TO_TIME
       
 15949  */
       
 15950 	case function_int_to_time :
       
 15951 	{
       
 15952 		symbol_c *last_type_symbol = NULL;
       
 15953 
       
 15954 		{
       
 15955 			identifier_c param_name("IN");
       
 15956 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15957 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15958 			
       
 15959 			/* Get the value from a foo(<param_value>) style call */
       
 15960 			if (IN_param_value == NULL)
       
 15961 			  IN_param_value = function_call_param_iterator.next();
       
 15962 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15963 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15964 			
       
 15965 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15966 			{
       
 15967 		
       
 15968 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15969 				s4o.print("(");
       
 15970 				return_type_symbol->accept(*this);
       
 15971 				s4o.print(")time_to_real(");
       
 15972 				IN_param_value->accept(*this);
       
 15973 				s4o.print(")");
       
 15974 				return NULL;
       
 15975 				
       
 15976 			}
       
 15977 			
       
 15978 			ERROR;
       
 15979 		}
       
 15980 		
       
 15981 	}/*function_int_to_time*/
       
 15982 	break;
       
 15983 
       
 15984 /****
       
 15985  *INT_TO_INT
       
 15986  */
       
 15987 	case function_int_to_int :
       
 15988 	{
       
 15989 		symbol_c *last_type_symbol = NULL;
       
 15990 
       
 15991 		{
       
 15992 			identifier_c param_name("IN");
       
 15993 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15994 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15995 			
       
 15996 			/* Get the value from a foo(<param_value>) style call */
       
 15997 			if (IN_param_value == NULL)
       
 15998 			  IN_param_value = function_call_param_iterator.next();
       
 15999 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16000 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16001 			
       
 16002 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16003 			{
       
 16004 		
       
 16005 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16006 				s4o.print("(");
       
 16007 				return_type_symbol->accept(*this);
       
 16008 				s4o.print(")");
       
 16009 				IN_param_value->accept(*this);
       
 16010 				return NULL;
       
 16011 				
       
 16012 			}
       
 16013 			
       
 16014 			ERROR;
       
 16015 		}
       
 16016 		
       
 16017 	}/*function_int_to_int*/
       
 16018 	break;
       
 16019 
 14819 
 16020 /****
 14820 /****
 16021  *TRUNC
 14821  *TRUNC
 16022  */
 14822  */
 16023 	case function_trunc :
 14823     case function_trunc :
 16024 	{
 14824     {
 16025 		symbol_c *last_type_symbol = NULL;
 14825         symbol_c *last_type_symbol = NULL;
 16026 
 14826 
 16027 		{
 14827         {
 16028 			identifier_c param_name("IN");
 14828             identifier_c param_name("IN");
 16029 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14829             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16030 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14830             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16031 			
 14831             
 16032 			/* Get the value from a foo(<param_value>) style call */
 14832             /* Get the value from a foo(<param_value>) style call */
 16033 			if (IN_param_value == NULL)
 14833             if (IN_param_value == NULL)
 16034 			  IN_param_value = function_call_param_iterator.next();
 14834               IN_param_value = function_call_param_iterator.next();
 16035 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14835             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16036 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14836             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16037 			
 14837             
 16038 			if(search_expression_type->is_real_type(IN_type_symbol))
 14838             if(search_expression_type->is_real_type(IN_type_symbol))
 16039 			{
 14839             {
 16040 		
 14840         
 16041 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14841                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16042 				s4o.print("(int)");
 14842                 s4o.print("(int)");
 16043 				IN_param_value->accept(*this);
 14843                 IN_param_value->accept(*this);
 16044 				return NULL;
 14844                 return NULL;
 16045 				
 14845                 
 16046 			}
 14846             }
 16047 			
 14847             
 16048 			ERROR;
 14848             ERROR;
 16049 		}
 14849         }
 16050 		
 14850         
 16051 	}/*function_trunc*/
 14851     }/*function_trunc*/
 16052 	break;
 14852     break;
 16053 
 14853 
 16054 /****
 14854 /****
 16055  *BCD_TO_SINT
 14855  *BCD_TO_SINT
 16056  */
 14856  */
 16057 	case function_bcd_to_sint :
 14857     case function_bcd_to_sint :
 16058 	{
 14858     {
 16059 		symbol_c *last_type_symbol = NULL;
 14859         symbol_c *last_type_symbol = NULL;
 16060 
 14860 
 16061 		{
 14861         {
 16062 			identifier_c param_name("IN");
 14862             identifier_c param_name("IN");
 16063 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14863             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16064 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14864             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16065 			
 14865             
 16066 			/* Get the value from a foo(<param_value>) style call */
 14866             /* Get the value from a foo(<param_value>) style call */
 16067 			if (IN_param_value == NULL)
 14867             if (IN_param_value == NULL)
 16068 			  IN_param_value = function_call_param_iterator.next();
 14868               IN_param_value = function_call_param_iterator.next();
 16069 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14869             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16070 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14870             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16071 			
 14871             
 16072 			if(search_expression_type->is_binary_type(IN_type_symbol))
 14872             if(search_expression_type->is_binary_type(IN_type_symbol))
 16073 			{
 14873             {
 16074 		
 14874         
 16075 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14875                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16076 				s4o.print("__bcd_to_something(sizeof(");
 14876                 s4o.print("__bcd_to_something(sizeof(");
 16077 				IN_type_symbol->accept(*this);
 14877                 IN_type_symbol->accept(*this);
 16078 				s4o.print("),&");
 14878                 s4o.print("),&");
 16079 				IN_param_value->accept(*this);
 14879                 IN_param_value->accept(*this);
 16080 				s4o.print(")");
 14880                 s4o.print(")");
 16081 				return NULL;
 14881                 return NULL;
 16082 				
 14882                 
 16083 			}
 14883             }
 16084 			
 14884             
 16085 			ERROR;
 14885             ERROR;
 16086 		}
 14886         }
 16087 		
 14887         
 16088 	}/*function_bcd_to_sint*/
 14888     }/*function_bcd_to_sint*/
 16089 	break;
 14889     break;
       
 14890 
       
 14891 /****
       
 14892  *BCD_TO_INT
       
 14893  */
       
 14894     case function_bcd_to_int :
       
 14895     {
       
 14896         symbol_c *last_type_symbol = NULL;
       
 14897 
       
 14898         {
       
 14899             identifier_c param_name("IN");
       
 14900             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14901             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14902             
       
 14903             /* Get the value from a foo(<param_value>) style call */
       
 14904             if (IN_param_value == NULL)
       
 14905               IN_param_value = function_call_param_iterator.next();
       
 14906             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14907             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14908             
       
 14909             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14910             {
       
 14911         
       
 14912                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14913                 s4o.print("__bcd_to_something(sizeof(");
       
 14914                 IN_type_symbol->accept(*this);
       
 14915                 s4o.print("),&");
       
 14916                 IN_param_value->accept(*this);
       
 14917                 s4o.print(")");
       
 14918                 return NULL;
       
 14919                 
       
 14920             }
       
 14921             
       
 14922             ERROR;
       
 14923         }
       
 14924         
       
 14925     }/*function_bcd_to_int*/
       
 14926     break;
       
 14927 
       
 14928 /****
       
 14929  *BCD_TO_DINT
       
 14930  */
       
 14931     case function_bcd_to_dint :
       
 14932     {
       
 14933         symbol_c *last_type_symbol = NULL;
       
 14934 
       
 14935         {
       
 14936             identifier_c param_name("IN");
       
 14937             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14938             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14939             
       
 14940             /* Get the value from a foo(<param_value>) style call */
       
 14941             if (IN_param_value == NULL)
       
 14942               IN_param_value = function_call_param_iterator.next();
       
 14943             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14944             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14945             
       
 14946             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 14947             {
       
 14948         
       
 14949                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14950                 s4o.print("__bcd_to_something(sizeof(");
       
 14951                 IN_type_symbol->accept(*this);
       
 14952                 s4o.print("),&");
       
 14953                 IN_param_value->accept(*this);
       
 14954                 s4o.print(")");
       
 14955                 return NULL;
       
 14956                 
       
 14957             }
       
 14958             
       
 14959             ERROR;
       
 14960         }
       
 14961         
       
 14962     }/*function_bcd_to_dint*/
       
 14963     break;
 16090 
 14964 
 16091 /****
 14965 /****
 16092  *BCD_TO_LINT
 14966  *BCD_TO_LINT
 16093  */
 14967  */
 16094 	case function_bcd_to_lint :
 14968     case function_bcd_to_lint :
 16095 	{
 14969     {
 16096 		symbol_c *last_type_symbol = NULL;
 14970         symbol_c *last_type_symbol = NULL;
 16097 
 14971 
 16098 		{
 14972         {
 16099 			identifier_c param_name("IN");
 14973             identifier_c param_name("IN");
 16100 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 14974             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16101 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 14975             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16102 			
 14976             
 16103 			/* Get the value from a foo(<param_value>) style call */
 14977             /* Get the value from a foo(<param_value>) style call */
 16104 			if (IN_param_value == NULL)
 14978             if (IN_param_value == NULL)
 16105 			  IN_param_value = function_call_param_iterator.next();
 14979               IN_param_value = function_call_param_iterator.next();
 16106 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14980             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16107 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14981             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16108 			
 14982             
 16109 			if(search_expression_type->is_binary_type(IN_type_symbol))
 14983             if(search_expression_type->is_binary_type(IN_type_symbol))
 16110 			{
 14984             {
 16111 		
 14985         
 16112 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14986                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 16113 				s4o.print("__bcd_to_something(sizeof(");
 14987                 s4o.print("__bcd_to_something(sizeof(");
 16114 				IN_type_symbol->accept(*this);
 14988                 IN_type_symbol->accept(*this);
 16115 				s4o.print("),&");
 14989                 s4o.print("),&");
 16116 				IN_param_value->accept(*this);
 14990                 IN_param_value->accept(*this);
 16117 				s4o.print(")");
 14991                 s4o.print(")");
 16118 				return NULL;
 14992                 return NULL;
 16119 				
 14993                 
 16120 			}
 14994             }
 16121 			
 14995             
 16122 			ERROR;
 14996             ERROR;
 16123 		}
 14997         }
 16124 		
 14998         
 16125 	}/*function_bcd_to_lint*/
 14999     }/*function_bcd_to_lint*/
 16126 	break;
 15000     break;
 16127 
 15001 
 16128 /****
 15002 /****
 16129  *BCD_TO_DINT
 15003  *BCD_TO_USINT
 16130  */
 15004  */
 16131 	case function_bcd_to_dint :
 15005     case function_bcd_to_usint :
 16132 	{
 15006     {
 16133 		symbol_c *last_type_symbol = NULL;
 15007         symbol_c *last_type_symbol = NULL;
 16134 
 15008 
 16135 		{
 15009         {
 16136 			identifier_c param_name("IN");
 15010             identifier_c param_name("IN");
 16137 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15011             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16138 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15012             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16139 			
 15013             
 16140 			/* Get the value from a foo(<param_value>) style call */
 15014             /* Get the value from a foo(<param_value>) style call */
 16141 			if (IN_param_value == NULL)
 15015             if (IN_param_value == NULL)
 16142 			  IN_param_value = function_call_param_iterator.next();
 15016               IN_param_value = function_call_param_iterator.next();
 16143 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15017             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16144 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15018             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16145 			
 15019             
 16146 			if(search_expression_type->is_binary_type(IN_type_symbol))
 15020             if(search_expression_type->is_binary_type(IN_type_symbol))
 16147 			{
 15021             {
 16148 		
 15022         
 16149 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 15023                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16150 				s4o.print("__bcd_to_something(sizeof(");
 15024                 s4o.print("__bcd_to_something(sizeof(");
 16151 				IN_type_symbol->accept(*this);
 15025                 IN_type_symbol->accept(*this);
 16152 				s4o.print("),&");
 15026                 s4o.print("),&");
 16153 				IN_param_value->accept(*this);
 15027                 IN_param_value->accept(*this);
 16154 				s4o.print(")");
 15028                 s4o.print(")");
 16155 				return NULL;
 15029                 return NULL;
 16156 				
 15030                 
 16157 			}
 15031             }
 16158 			
 15032             
 16159 			ERROR;
 15033             ERROR;
 16160 		}
 15034         }
 16161 		
 15035         
 16162 	}/*function_bcd_to_dint*/
 15036     }/*function_bcd_to_usint*/
 16163 	break;
 15037     break;
       
 15038 
       
 15039 /****
       
 15040  *BCD_TO_UINT
       
 15041  */
       
 15042     case function_bcd_to_uint :
       
 15043     {
       
 15044         symbol_c *last_type_symbol = NULL;
       
 15045 
       
 15046         {
       
 15047             identifier_c param_name("IN");
       
 15048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15050             
       
 15051             /* Get the value from a foo(<param_value>) style call */
       
 15052             if (IN_param_value == NULL)
       
 15053               IN_param_value = function_call_param_iterator.next();
       
 15054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15056             
       
 15057             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 15058             {
       
 15059         
       
 15060                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15061                 s4o.print("__bcd_to_something(sizeof(");
       
 15062                 IN_type_symbol->accept(*this);
       
 15063                 s4o.print("),&");
       
 15064                 IN_param_value->accept(*this);
       
 15065                 s4o.print(")");
       
 15066                 return NULL;
       
 15067                 
       
 15068             }
       
 15069             
       
 15070             ERROR;
       
 15071         }
       
 15072         
       
 15073     }/*function_bcd_to_uint*/
       
 15074     break;
 16164 
 15075 
 16165 /****
 15076 /****
 16166  *BCD_TO_UDINT
 15077  *BCD_TO_UDINT
 16167  */
 15078  */
 16168 	case function_bcd_to_udint :
 15079     case function_bcd_to_udint :
 16169 	{
 15080     {
 16170 		symbol_c *last_type_symbol = NULL;
 15081         symbol_c *last_type_symbol = NULL;
 16171 
 15082 
 16172 		{
 15083         {
 16173 			identifier_c param_name("IN");
 15084             identifier_c param_name("IN");
 16174 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15085             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16175 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15086             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16176 			
 15087             
 16177 			/* Get the value from a foo(<param_value>) style call */
 15088             /* Get the value from a foo(<param_value>) style call */
 16178 			if (IN_param_value == NULL)
 15089             if (IN_param_value == NULL)
 16179 			  IN_param_value = function_call_param_iterator.next();
 15090               IN_param_value = function_call_param_iterator.next();
 16180 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15091             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16181 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15092             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16182 			
 15093             
 16183 			if(search_expression_type->is_binary_type(IN_type_symbol))
 15094             if(search_expression_type->is_binary_type(IN_type_symbol))
 16184 			{
 15095             {
 16185 		
 15096         
 16186 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 15097                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16187 				s4o.print("__bcd_to_something(sizeof(");
 15098                 s4o.print("__bcd_to_something(sizeof(");
 16188 				IN_type_symbol->accept(*this);
 15099                 IN_type_symbol->accept(*this);
 16189 				s4o.print("),&");
 15100                 s4o.print("),&");
 16190 				IN_param_value->accept(*this);
 15101                 IN_param_value->accept(*this);
 16191 				s4o.print(")");
 15102                 s4o.print(")");
 16192 				return NULL;
 15103                 return NULL;
 16193 				
 15104                 
 16194 			}
 15105             }
 16195 			
 15106             
 16196 			ERROR;
 15107             ERROR;
 16197 		}
 15108         }
 16198 		
 15109         
 16199 	}/*function_bcd_to_udint*/
 15110     }/*function_bcd_to_udint*/
 16200 	break;
 15111     break;
 16201 
       
 16202 /****
       
 16203  *BCD_TO_UINT
       
 16204  */
       
 16205 	case function_bcd_to_uint :
       
 16206 	{
       
 16207 		symbol_c *last_type_symbol = NULL;
       
 16208 
       
 16209 		{
       
 16210 			identifier_c param_name("IN");
       
 16211 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16212 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16213 			
       
 16214 			/* Get the value from a foo(<param_value>) style call */
       
 16215 			if (IN_param_value == NULL)
       
 16216 			  IN_param_value = function_call_param_iterator.next();
       
 16217 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16218 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16219 			
       
 16220 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 16221 			{
       
 16222 		
       
 16223 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16224 				s4o.print("__bcd_to_something(sizeof(");
       
 16225 				IN_type_symbol->accept(*this);
       
 16226 				s4o.print("),&");
       
 16227 				IN_param_value->accept(*this);
       
 16228 				s4o.print(")");
       
 16229 				return NULL;
       
 16230 				
       
 16231 			}
       
 16232 			
       
 16233 			ERROR;
       
 16234 		}
       
 16235 		
       
 16236 	}/*function_bcd_to_uint*/
       
 16237 	break;
       
 16238 
       
 16239 /****
       
 16240  *BCD_TO_USINT
       
 16241  */
       
 16242 	case function_bcd_to_usint :
       
 16243 	{
       
 16244 		symbol_c *last_type_symbol = NULL;
       
 16245 
       
 16246 		{
       
 16247 			identifier_c param_name("IN");
       
 16248 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16249 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16250 			
       
 16251 			/* Get the value from a foo(<param_value>) style call */
       
 16252 			if (IN_param_value == NULL)
       
 16253 			  IN_param_value = function_call_param_iterator.next();
       
 16254 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16255 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16256 			
       
 16257 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 16258 			{
       
 16259 		
       
 16260 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16261 				s4o.print("__bcd_to_something(sizeof(");
       
 16262 				IN_type_symbol->accept(*this);
       
 16263 				s4o.print("),&");
       
 16264 				IN_param_value->accept(*this);
       
 16265 				s4o.print(")");
       
 16266 				return NULL;
       
 16267 				
       
 16268 			}
       
 16269 			
       
 16270 			ERROR;
       
 16271 		}
       
 16272 		
       
 16273 	}/*function_bcd_to_usint*/
       
 16274 	break;
       
 16275 
 15112 
 16276 /****
 15113 /****
 16277  *BCD_TO_ULINT
 15114  *BCD_TO_ULINT
 16278  */
 15115  */
 16279 	case function_bcd_to_ulint :
 15116     case function_bcd_to_ulint :
 16280 	{
 15117     {
 16281 		symbol_c *last_type_symbol = NULL;
 15118         symbol_c *last_type_symbol = NULL;
 16282 
 15119 
 16283 		{
 15120         {
 16284 			identifier_c param_name("IN");
 15121             identifier_c param_name("IN");
 16285 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15122             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16286 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15123             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16287 			
 15124             
 16288 			/* Get the value from a foo(<param_value>) style call */
 15125             /* Get the value from a foo(<param_value>) style call */
 16289 			if (IN_param_value == NULL)
 15126             if (IN_param_value == NULL)
 16290 			  IN_param_value = function_call_param_iterator.next();
 15127               IN_param_value = function_call_param_iterator.next();
 16291 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15128             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16292 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15129             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16293 			
 15130             
 16294 			if(search_expression_type->is_binary_type(IN_type_symbol))
 15131             if(search_expression_type->is_binary_type(IN_type_symbol))
 16295 			{
 15132             {
 16296 		
 15133         
 16297 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 15134                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16298 				s4o.print("__bcd_to_something(sizeof(");
 15135                 s4o.print("__bcd_to_something(sizeof(");
 16299 				IN_type_symbol->accept(*this);
 15136                 IN_type_symbol->accept(*this);
 16300 				s4o.print("),&");
 15137                 s4o.print("),&");
 16301 				IN_param_value->accept(*this);
 15138                 IN_param_value->accept(*this);
 16302 				s4o.print(")");
 15139                 s4o.print(")");
 16303 				return NULL;
 15140                 return NULL;
 16304 				
 15141                 
 16305 			}
 15142             }
 16306 			
 15143             
 16307 			ERROR;
 15144             ERROR;
 16308 		}
 15145         }
 16309 		
 15146         
 16310 	}/*function_bcd_to_ulint*/
 15147     }/*function_bcd_to_ulint*/
 16311 	break;
 15148     break;
 16312 
       
 16313 /****
       
 16314  *BCD_TO_INT
       
 16315  */
       
 16316 	case function_bcd_to_int :
       
 16317 	{
       
 16318 		symbol_c *last_type_symbol = NULL;
       
 16319 
       
 16320 		{
       
 16321 			identifier_c param_name("IN");
       
 16322 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16323 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16324 			
       
 16325 			/* Get the value from a foo(<param_value>) style call */
       
 16326 			if (IN_param_value == NULL)
       
 16327 			  IN_param_value = function_call_param_iterator.next();
       
 16328 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16329 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16330 			
       
 16331 			if(search_expression_type->is_binary_type(IN_type_symbol))
       
 16332 			{
       
 16333 		
       
 16334 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16335 				s4o.print("__bcd_to_something(sizeof(");
       
 16336 				IN_type_symbol->accept(*this);
       
 16337 				s4o.print("),&");
       
 16338 				IN_param_value->accept(*this);
       
 16339 				s4o.print(")");
       
 16340 				return NULL;
       
 16341 				
       
 16342 			}
       
 16343 			
       
 16344 			ERROR;
       
 16345 		}
       
 16346 		
       
 16347 	}/*function_bcd_to_int*/
       
 16348 	break;
       
 16349 
 15149 
 16350 /****
 15150 /****
 16351  *SINT_TO_BCD
 15151  *SINT_TO_BCD
 16352  */
 15152  */
 16353 	case function_sint_to_bcd :
 15153     case function_sint_to_bcd :
 16354 	{
 15154     {
 16355 		symbol_c *last_type_symbol = NULL;
 15155         symbol_c *last_type_symbol = NULL;
 16356 
 15156 
 16357 		{
 15157         {
 16358 			identifier_c param_name("IN");
 15158             identifier_c param_name("IN");
 16359 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15159             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16360 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15160             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16361 			
 15161             
 16362 			/* Get the value from a foo(<param_value>) style call */
 15162             /* Get the value from a foo(<param_value>) style call */
 16363 			if (IN_param_value == NULL)
 15163             if (IN_param_value == NULL)
 16364 			  IN_param_value = function_call_param_iterator.next();
 15164               IN_param_value = function_call_param_iterator.next();
 16365 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15165             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16366 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15166             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16367 			
 15167             
 16368 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15168             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 16369 			{
 15169             {
 16370 		
 15170         
 16371 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 15171                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16372 				s4o.print("__something_to_bcd(sizeof(");
 15172                 s4o.print("__something_to_bcd(sizeof(");
 16373 				IN_type_symbol->accept(*this);
 15173                 IN_type_symbol->accept(*this);
 16374 				s4o.print("),&");
 15174                 s4o.print("),&");
 16375 				IN_param_value->accept(*this);
 15175                 IN_param_value->accept(*this);
 16376 				s4o.print(")");
 15176                 s4o.print(")");
 16377 				return NULL;
 15177                 return NULL;
 16378 				
 15178                 
 16379 			}
 15179             }
 16380 			
 15180             
 16381 			ERROR;
 15181             ERROR;
 16382 		}
 15182         }
 16383 		
 15183         
 16384 	}/*function_sint_to_bcd*/
 15184     }/*function_sint_to_bcd*/
 16385 	break;
 15185     break;
       
 15186 
       
 15187 /****
       
 15188  *INT_TO_BCD
       
 15189  */
       
 15190     case function_int_to_bcd :
       
 15191     {
       
 15192         symbol_c *last_type_symbol = NULL;
       
 15193 
       
 15194         {
       
 15195             identifier_c param_name("IN");
       
 15196             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15197             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15198             
       
 15199             /* Get the value from a foo(<param_value>) style call */
       
 15200             if (IN_param_value == NULL)
       
 15201               IN_param_value = function_call_param_iterator.next();
       
 15202             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15203             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15204             
       
 15205             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 15206             {
       
 15207         
       
 15208                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 15209                 s4o.print("__something_to_bcd(sizeof(");
       
 15210                 IN_type_symbol->accept(*this);
       
 15211                 s4o.print("),&");
       
 15212                 IN_param_value->accept(*this);
       
 15213                 s4o.print(")");
       
 15214                 return NULL;
       
 15215                 
       
 15216             }
       
 15217             
       
 15218             ERROR;
       
 15219         }
       
 15220         
       
 15221     }/*function_int_to_bcd*/
       
 15222     break;
       
 15223 
       
 15224 /****
       
 15225  *DINT_TO_BCD
       
 15226  */
       
 15227     case function_dint_to_bcd :
       
 15228     {
       
 15229         symbol_c *last_type_symbol = NULL;
       
 15230 
       
 15231         {
       
 15232             identifier_c param_name("IN");
       
 15233             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15234             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15235             
       
 15236             /* Get the value from a foo(<param_value>) style call */
       
 15237             if (IN_param_value == NULL)
       
 15238               IN_param_value = function_call_param_iterator.next();
       
 15239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15241             
       
 15242             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 15243             {
       
 15244         
       
 15245                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 15246                 s4o.print("__something_to_bcd(sizeof(");
       
 15247                 IN_type_symbol->accept(*this);
       
 15248                 s4o.print("),&");
       
 15249                 IN_param_value->accept(*this);
       
 15250                 s4o.print(")");
       
 15251                 return NULL;
       
 15252                 
       
 15253             }
       
 15254             
       
 15255             ERROR;
       
 15256         }
       
 15257         
       
 15258     }/*function_dint_to_bcd*/
       
 15259     break;
 16386 
 15260 
 16387 /****
 15261 /****
 16388  *LINT_TO_BCD
 15262  *LINT_TO_BCD
 16389  */
 15263  */
 16390 	case function_lint_to_bcd :
 15264     case function_lint_to_bcd :
 16391 	{
 15265     {
 16392 		symbol_c *last_type_symbol = NULL;
 15266         symbol_c *last_type_symbol = NULL;
 16393 
 15267 
 16394 		{
 15268         {
 16395 			identifier_c param_name("IN");
 15269             identifier_c param_name("IN");
 16396 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15270             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16397 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15271             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16398 			
 15272             
 16399 			/* Get the value from a foo(<param_value>) style call */
 15273             /* Get the value from a foo(<param_value>) style call */
 16400 			if (IN_param_value == NULL)
 15274             if (IN_param_value == NULL)
 16401 			  IN_param_value = function_call_param_iterator.next();
 15275               IN_param_value = function_call_param_iterator.next();
 16402 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15276             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16403 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15277             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16404 			
 15278             
 16405 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 15279             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16406 			{
 15280             {
 16407 		
 15281         
 16408 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 15282                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16409 				s4o.print("__something_to_bcd(sizeof(");
 15283                 s4o.print("__something_to_bcd(sizeof(");
 16410 				IN_type_symbol->accept(*this);
 15284                 IN_type_symbol->accept(*this);
 16411 				s4o.print("),&");
 15285                 s4o.print("),&");
 16412 				IN_param_value->accept(*this);
 15286                 IN_param_value->accept(*this);
 16413 				s4o.print(")");
 15287                 s4o.print(")");
 16414 				return NULL;
 15288                 return NULL;
 16415 				
 15289                 
 16416 			}
 15290             }
 16417 			
 15291             
 16418 			ERROR;
 15292             ERROR;
 16419 		}
 15293         }
 16420 		
 15294         
 16421 	}/*function_lint_to_bcd*/
 15295     }/*function_lint_to_bcd*/
 16422 	break;
 15296     break;
 16423 
 15297 
 16424 /****
 15298 /****
 16425  *DINT_TO_BCD
 15299  *USINT_TO_BCD
 16426  */
 15300  */
 16427 	case function_dint_to_bcd :
 15301     case function_usint_to_bcd :
 16428 	{
 15302     {
 16429 		symbol_c *last_type_symbol = NULL;
 15303         symbol_c *last_type_symbol = NULL;
 16430 
 15304 
 16431 		{
 15305         {
 16432 			identifier_c param_name("IN");
 15306             identifier_c param_name("IN");
 16433 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15307             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16434 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15308             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16435 			
 15309             
 16436 			/* Get the value from a foo(<param_value>) style call */
 15310             /* Get the value from a foo(<param_value>) style call */
 16437 			if (IN_param_value == NULL)
 15311             if (IN_param_value == NULL)
 16438 			  IN_param_value = function_call_param_iterator.next();
 15312               IN_param_value = function_call_param_iterator.next();
 16439 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15313             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16440 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15314             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16441 			
 15315             
 16442 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 15316             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 16443 			{
 15317             {
 16444 		
 15318         
 16445 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 15319                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16446 				s4o.print("__something_to_bcd(sizeof(");
 15320                 s4o.print("__something_to_bcd(sizeof(");
 16447 				IN_type_symbol->accept(*this);
 15321                 IN_type_symbol->accept(*this);
 16448 				s4o.print("),&");
 15322                 s4o.print("),&");
 16449 				IN_param_value->accept(*this);
 15323                 IN_param_value->accept(*this);
 16450 				s4o.print(")");
 15324                 s4o.print(")");
 16451 				return NULL;
 15325                 return NULL;
 16452 				
 15326                 
 16453 			}
 15327             }
 16454 			
 15328             
 16455 			ERROR;
 15329             ERROR;
 16456 		}
 15330         }
 16457 		
 15331         
 16458 	}/*function_dint_to_bcd*/
 15332     }/*function_usint_to_bcd*/
 16459 	break;
 15333     break;
       
 15334 
       
 15335 /****
       
 15336  *UINT_TO_BCD
       
 15337  */
       
 15338     case function_uint_to_bcd :
       
 15339     {
       
 15340         symbol_c *last_type_symbol = NULL;
       
 15341 
       
 15342         {
       
 15343             identifier_c param_name("IN");
       
 15344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15346             
       
 15347             /* Get the value from a foo(<param_value>) style call */
       
 15348             if (IN_param_value == NULL)
       
 15349               IN_param_value = function_call_param_iterator.next();
       
 15350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15352             
       
 15353             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 15354             {
       
 15355         
       
 15356                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 15357                 s4o.print("__something_to_bcd(sizeof(");
       
 15358                 IN_type_symbol->accept(*this);
       
 15359                 s4o.print("),&");
       
 15360                 IN_param_value->accept(*this);
       
 15361                 s4o.print(")");
       
 15362                 return NULL;
       
 15363                 
       
 15364             }
       
 15365             
       
 15366             ERROR;
       
 15367         }
       
 15368         
       
 15369     }/*function_uint_to_bcd*/
       
 15370     break;
 16460 
 15371 
 16461 /****
 15372 /****
 16462  *UDINT_TO_BCD
 15373  *UDINT_TO_BCD
 16463  */
 15374  */
 16464 	case function_udint_to_bcd :
 15375     case function_udint_to_bcd :
 16465 	{
 15376     {
 16466 		symbol_c *last_type_symbol = NULL;
 15377         symbol_c *last_type_symbol = NULL;
 16467 
 15378 
 16468 		{
 15379         {
 16469 			identifier_c param_name("IN");
 15380             identifier_c param_name("IN");
 16470 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15381             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16471 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15382             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16472 			
 15383             
 16473 			/* Get the value from a foo(<param_value>) style call */
 15384             /* Get the value from a foo(<param_value>) style call */
 16474 			if (IN_param_value == NULL)
 15385             if (IN_param_value == NULL)
 16475 			  IN_param_value = function_call_param_iterator.next();
 15386               IN_param_value = function_call_param_iterator.next();
 16476 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15387             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16477 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15388             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16478 			
 15389             
 16479 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 15390             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 16480 			{
 15391             {
 16481 		
 15392         
 16482 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 15393                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16483 				s4o.print("__something_to_bcd(sizeof(");
 15394                 s4o.print("__something_to_bcd(sizeof(");
 16484 				IN_type_symbol->accept(*this);
 15395                 IN_type_symbol->accept(*this);
 16485 				s4o.print("),&");
 15396                 s4o.print("),&");
 16486 				IN_param_value->accept(*this);
 15397                 IN_param_value->accept(*this);
 16487 				s4o.print(")");
 15398                 s4o.print(")");
 16488 				return NULL;
 15399                 return NULL;
 16489 				
 15400                 
 16490 			}
 15401             }
 16491 			
 15402             
 16492 			ERROR;
 15403             ERROR;
 16493 		}
 15404         }
 16494 		
 15405         
 16495 	}/*function_udint_to_bcd*/
 15406     }/*function_udint_to_bcd*/
 16496 	break;
 15407     break;
 16497 
       
 16498 /****
       
 16499  *UINT_TO_BCD
       
 16500  */
       
 16501 	case function_uint_to_bcd :
       
 16502 	{
       
 16503 		symbol_c *last_type_symbol = NULL;
       
 16504 
       
 16505 		{
       
 16506 			identifier_c param_name("IN");
       
 16507 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16508 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16509 			
       
 16510 			/* Get the value from a foo(<param_value>) style call */
       
 16511 			if (IN_param_value == NULL)
       
 16512 			  IN_param_value = function_call_param_iterator.next();
       
 16513 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16514 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16515 			
       
 16516 			if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 16517 			{
       
 16518 		
       
 16519 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16520 				s4o.print("__something_to_bcd(sizeof(");
       
 16521 				IN_type_symbol->accept(*this);
       
 16522 				s4o.print("),&");
       
 16523 				IN_param_value->accept(*this);
       
 16524 				s4o.print(")");
       
 16525 				return NULL;
       
 16526 				
       
 16527 			}
       
 16528 			
       
 16529 			ERROR;
       
 16530 		}
       
 16531 		
       
 16532 	}/*function_uint_to_bcd*/
       
 16533 	break;
       
 16534 
       
 16535 /****
       
 16536  *USINT_TO_BCD
       
 16537  */
       
 16538 	case function_usint_to_bcd :
       
 16539 	{
       
 16540 		symbol_c *last_type_symbol = NULL;
       
 16541 
       
 16542 		{
       
 16543 			identifier_c param_name("IN");
       
 16544 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16545 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16546 			
       
 16547 			/* Get the value from a foo(<param_value>) style call */
       
 16548 			if (IN_param_value == NULL)
       
 16549 			  IN_param_value = function_call_param_iterator.next();
       
 16550 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16551 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16552 			
       
 16553 			if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 16554 			{
       
 16555 		
       
 16556 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16557 				s4o.print("__something_to_bcd(sizeof(");
       
 16558 				IN_type_symbol->accept(*this);
       
 16559 				s4o.print("),&");
       
 16560 				IN_param_value->accept(*this);
       
 16561 				s4o.print(")");
       
 16562 				return NULL;
       
 16563 				
       
 16564 			}
       
 16565 			
       
 16566 			ERROR;
       
 16567 		}
       
 16568 		
       
 16569 	}/*function_usint_to_bcd*/
       
 16570 	break;
       
 16571 
 15408 
 16572 /****
 15409 /****
 16573  *ULINT_TO_BCD
 15410  *ULINT_TO_BCD
 16574  */
 15411  */
 16575 	case function_ulint_to_bcd :
 15412     case function_ulint_to_bcd :
 16576 	{
 15413     {
 16577 		symbol_c *last_type_symbol = NULL;
 15414         symbol_c *last_type_symbol = NULL;
 16578 
 15415 
 16579 		{
 15416         {
 16580 			identifier_c param_name("IN");
 15417             identifier_c param_name("IN");
 16581 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15418             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16582 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15419             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16583 			
 15420             
 16584 			/* Get the value from a foo(<param_value>) style call */
 15421             /* Get the value from a foo(<param_value>) style call */
 16585 			if (IN_param_value == NULL)
 15422             if (IN_param_value == NULL)
 16586 			  IN_param_value = function_call_param_iterator.next();
 15423               IN_param_value = function_call_param_iterator.next();
 16587 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15424             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16588 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15425             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16589 			
 15426             
 16590 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 15427             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 16591 			{
 15428             {
 16592 		
 15429         
 16593 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 15430                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 16594 				s4o.print("__something_to_bcd(sizeof(");
 15431                 s4o.print("__something_to_bcd(sizeof(");
 16595 				IN_type_symbol->accept(*this);
 15432                 IN_type_symbol->accept(*this);
 16596 				s4o.print("),&");
 15433                 s4o.print("),&");
 16597 				IN_param_value->accept(*this);
 15434                 IN_param_value->accept(*this);
 16598 				s4o.print(")");
 15435                 s4o.print(")");
 16599 				return NULL;
 15436                 return NULL;
 16600 				
 15437                 
 16601 			}
 15438             }
 16602 			
 15439             
 16603 			ERROR;
 15440             ERROR;
 16604 		}
 15441         }
 16605 		
 15442         
 16606 	}/*function_ulint_to_bcd*/
 15443     }/*function_ulint_to_bcd*/
 16607 	break;
 15444     break;
 16608 
       
 16609 /****
       
 16610  *INT_TO_BCD
       
 16611  */
       
 16612 	case function_int_to_bcd :
       
 16613 	{
       
 16614 		symbol_c *last_type_symbol = NULL;
       
 16615 
       
 16616 		{
       
 16617 			identifier_c param_name("IN");
       
 16618 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16619 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16620 			
       
 16621 			/* Get the value from a foo(<param_value>) style call */
       
 16622 			if (IN_param_value == NULL)
       
 16623 			  IN_param_value = function_call_param_iterator.next();
       
 16624 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16625 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16626 			
       
 16627 			if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16628 			{
       
 16629 		
       
 16630 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16631 				s4o.print("__something_to_bcd(sizeof(");
       
 16632 				IN_type_symbol->accept(*this);
       
 16633 				s4o.print("),&");
       
 16634 				IN_param_value->accept(*this);
       
 16635 				s4o.print(")");
       
 16636 				return NULL;
       
 16637 				
       
 16638 			}
       
 16639 			
       
 16640 			ERROR;
       
 16641 		}
       
 16642 		
       
 16643 	}/*function_int_to_bcd*/
       
 16644 	break;
       
 16645 
 15445 
 16646 /****
 15446 /****
 16647  *DATE_AND_TIME_TO_TIME_OF_DAY
 15447  *DATE_AND_TIME_TO_TIME_OF_DAY
 16648  */
 15448  */
 16649 	case function_date_and_time_to_time_of_day :
 15449     case function_date_and_time_to_time_of_day :
 16650 	{
 15450     {
 16651 		symbol_c *last_type_symbol = NULL;
 15451         symbol_c *last_type_symbol = NULL;
 16652 
 15452 
 16653 		{
 15453         {
 16654 			identifier_c param_name("IN");
 15454             identifier_c param_name("IN");
 16655 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15455             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16656 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16657 			
 15457             
 16658 			/* Get the value from a foo(<param_value>) style call */
 15458             /* Get the value from a foo(<param_value>) style call */
 16659 			if (IN_param_value == NULL)
 15459             if (IN_param_value == NULL)
 16660 			  IN_param_value = function_call_param_iterator.next();
 15460               IN_param_value = function_call_param_iterator.next();
 16661 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15461             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16662 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15462             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16663 			
 15463             
 16664 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15464             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 16665 			{
 15465             {
 16666 		
 15466         
 16667 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15467                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16668 				s4o.print("__date_and_time_to_time_of_day(&");
 15468                 s4o.print("__date_and_time_to_time_of_day(&");
 16669 				IN_param_value->accept(*this);
 15469                 IN_param_value->accept(*this);
 16670 				s4o.print(")");
 15470                 s4o.print(")");
 16671 				return NULL;
 15471                 return NULL;
 16672 				
 15472                 
 16673 			}
 15473             }
 16674 			
 15474             
 16675 			ERROR;
 15475             ERROR;
 16676 		}
 15476         }
 16677 		
 15477         
 16678 	}/*function_date_and_time_to_time_of_day*/
 15478     }/*function_date_and_time_to_time_of_day*/
 16679 	break;
 15479     break;
 16680 
 15480 
 16681 /****
 15481 /****
 16682  *DATE_AND_TIME_TO_DATE
 15482  *DATE_AND_TIME_TO_DATE
 16683  */
 15483  */
 16684 	case function_date_and_time_to_date :
 15484     case function_date_and_time_to_date :
 16685 	{
 15485     {
 16686 		symbol_c *last_type_symbol = NULL;
 15486         symbol_c *last_type_symbol = NULL;
 16687 
 15487 
 16688 		{
 15488         {
 16689 			identifier_c param_name("IN");
 15489             identifier_c param_name("IN");
 16690 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15490             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16691 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15491             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16692 			
 15492             
 16693 			/* Get the value from a foo(<param_value>) style call */
 15493             /* Get the value from a foo(<param_value>) style call */
 16694 			if (IN_param_value == NULL)
 15494             if (IN_param_value == NULL)
 16695 			  IN_param_value = function_call_param_iterator.next();
 15495               IN_param_value = function_call_param_iterator.next();
 16696 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15496             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16697 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15497             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16698 			
 15498             
 16699 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15499             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 16700 			{
 15500             {
 16701 		
 15501         
 16702 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15502                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16703 				s4o.print("__date_and_time_to_time_of_day(&");
 15503                 s4o.print("__date_and_time_to_time_of_day(&");
 16704 				IN_param_value->accept(*this);
 15504                 IN_param_value->accept(*this);
 16705 				s4o.print(")");
 15505                 s4o.print(")");
 16706 				return NULL;
 15506                 return NULL;
 16707 				
 15507                 
 16708 			}
 15508             }
 16709 			
 15509             
 16710 			ERROR;
 15510             ERROR;
 16711 		}
 15511         }
 16712 		
 15512         
 16713 	}/*function_date_and_time_to_date*/
 15513     }/*function_date_and_time_to_date*/
 16714 	break;
 15514     break;
 16715 
 15515 
 16716 /****
 15516 /****
 16717  *ABS
 15517  *ABS
 16718  */
 15518  */
 16719 	case function_abs :
 15519     case function_abs :
 16720 	{
 15520     {
 16721 		symbol_c *last_type_symbol = NULL;
 15521         symbol_c *last_type_symbol = NULL;
 16722 
 15522 
 16723 		{
 15523         {
 16724 			identifier_c param_name("IN");
 15524             identifier_c param_name("IN");
 16725 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15525             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16726 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15526             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16727 			
 15527             
 16728 			/* Get the value from a foo(<param_value>) style call */
 15528             /* Get the value from a foo(<param_value>) style call */
 16729 			if (IN_param_value == NULL)
 15529             if (IN_param_value == NULL)
 16730 			  IN_param_value = function_call_param_iterator.next();
 15530               IN_param_value = function_call_param_iterator.next();
 16731 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15531             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 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 ;
 15532             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16733 			
 15533             
 16734 			if(search_expression_type->is_num_type(IN_type_symbol))
 15534             if(search_expression_type->is_num_type(IN_type_symbol))
 16735 			{
 15535             {
 16736 		
 15536         
 16737 				symbol_c * return_type_symbol = IN_type_symbol;
 15537                 symbol_c * return_type_symbol = IN_type_symbol;
 16738 				s4o.print("__abs_");
 15538                 s4o.print("__abs_");
 16739 				IN_type_symbol->accept(*this);
 15539                 IN_type_symbol->accept(*this);
 16740 				s4o.print("(");
 15540                 s4o.print("(");
 16741 				IN_param_value->accept(*this);
 15541                 IN_param_value->accept(*this);
 16742 				s4o.print(")");
 15542                 s4o.print(")");
 16743 				return NULL;
 15543                 return NULL;
 16744 				
 15544                 
 16745 			}
 15545             }
 16746 			
 15546             
 16747 			ERROR;
 15547             ERROR;
 16748 		}
 15548         }
 16749 		
 15549         
 16750 	}/*function_abs*/
 15550     }/*function_abs*/
 16751 	break;
 15551     break;
 16752 
 15552 
 16753 /****
 15553 /****
 16754  *SQRT
 15554  *SQRT
 16755  */
 15555  */
 16756 	case function_sqrt :
 15556     case function_sqrt :
 16757 	{
 15557     {
 16758 		symbol_c *last_type_symbol = NULL;
 15558         symbol_c *last_type_symbol = NULL;
 16759 
 15559 
 16760 		{
 15560         {
 16761 			identifier_c param_name("IN");
 15561             identifier_c param_name("IN");
 16762 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15562             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16763 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15563             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16764 			
 15564             
 16765 			/* Get the value from a foo(<param_value>) style call */
 15565             /* Get the value from a foo(<param_value>) style call */
 16766 			if (IN_param_value == NULL)
 15566             if (IN_param_value == NULL)
 16767 			  IN_param_value = function_call_param_iterator.next();
 15567               IN_param_value = function_call_param_iterator.next();
 16768 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15568             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16769 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15569             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16770 			
 15570             
 16771 			if(search_expression_type->is_real_type(IN_type_symbol))
 15571             if(search_expression_type->is_real_type(IN_type_symbol))
 16772 			{
 15572             {
 16773 		
 15573         
 16774 				symbol_c * return_type_symbol = IN_type_symbol;
 15574                 symbol_c * return_type_symbol = IN_type_symbol;
 16775 				s4o.print("sqrt(");
 15575                 s4o.print("sqrt(");
 16776 				IN_param_value->accept(*this);
 15576                 IN_param_value->accept(*this);
 16777 				s4o.print(")");
 15577                 s4o.print(")");
 16778 				return NULL;
 15578                 return NULL;
 16779 				
 15579                 
 16780 			}
 15580             }
 16781 			
 15581             
 16782 			ERROR;
 15582             ERROR;
 16783 		}
 15583         }
 16784 		
 15584         
 16785 	}/*function_sqrt*/
 15585     }/*function_sqrt*/
 16786 	break;
 15586     break;
 16787 
 15587 
 16788 /****
 15588 /****
 16789  *LN
 15589  *LN
 16790  */
 15590  */
 16791 	case function_ln :
 15591     case function_ln :
 16792 	{
 15592     {
 16793 		symbol_c *last_type_symbol = NULL;
 15593         symbol_c *last_type_symbol = NULL;
 16794 
 15594 
 16795 		{
 15595         {
 16796 			identifier_c param_name("IN");
 15596             identifier_c param_name("IN");
 16797 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15597             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16798 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15598             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16799 			
 15599             
 16800 			/* Get the value from a foo(<param_value>) style call */
 15600             /* Get the value from a foo(<param_value>) style call */
 16801 			if (IN_param_value == NULL)
 15601             if (IN_param_value == NULL)
 16802 			  IN_param_value = function_call_param_iterator.next();
 15602               IN_param_value = function_call_param_iterator.next();
 16803 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15603             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16804 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15604             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16805 			
 15605             
 16806 			if(search_expression_type->is_real_type(IN_type_symbol))
 15606             if(search_expression_type->is_real_type(IN_type_symbol))
 16807 			{
 15607             {
 16808 		
 15608         
 16809 				symbol_c * return_type_symbol = IN_type_symbol;
 15609                 symbol_c * return_type_symbol = IN_type_symbol;
 16810 				s4o.print("ln(");
 15610                 s4o.print("ln(");
 16811 				IN_param_value->accept(*this);
 15611                 IN_param_value->accept(*this);
 16812 				s4o.print(")");
 15612                 s4o.print(")");
 16813 				return NULL;
 15613                 return NULL;
 16814 				
 15614                 
 16815 			}
 15615             }
 16816 			
 15616             
 16817 			ERROR;
 15617             ERROR;
 16818 		}
 15618         }
 16819 		
 15619         
 16820 	}/*function_ln*/
 15620     }/*function_ln*/
 16821 	break;
 15621     break;
 16822 
 15622 
 16823 /****
 15623 /****
 16824  *LOG
 15624  *LOG
 16825  */
 15625  */
 16826 	case function_log :
 15626     case function_log :
 16827 	{
 15627     {
 16828 		symbol_c *last_type_symbol = NULL;
 15628         symbol_c *last_type_symbol = NULL;
 16829 
 15629 
 16830 		{
 15630         {
 16831 			identifier_c param_name("IN");
 15631             identifier_c param_name("IN");
 16832 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15632             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16833 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16834 			
 15634             
 16835 			/* Get the value from a foo(<param_value>) style call */
 15635             /* Get the value from a foo(<param_value>) style call */
 16836 			if (IN_param_value == NULL)
 15636             if (IN_param_value == NULL)
 16837 			  IN_param_value = function_call_param_iterator.next();
 15637               IN_param_value = function_call_param_iterator.next();
 16838 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16839 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16840 			
 15640             
 16841 			if(search_expression_type->is_real_type(IN_type_symbol))
 15641             if(search_expression_type->is_real_type(IN_type_symbol))
 16842 			{
 15642             {
 16843 		
 15643         
 16844 				symbol_c * return_type_symbol = IN_type_symbol;
 15644                 symbol_c * return_type_symbol = IN_type_symbol;
 16845 				s4o.print("log(");
 15645                 s4o.print("log(");
 16846 				IN_param_value->accept(*this);
 15646                 IN_param_value->accept(*this);
 16847 				s4o.print(")");
 15647                 s4o.print(")");
 16848 				return NULL;
 15648                 return NULL;
 16849 				
 15649                 
 16850 			}
 15650             }
 16851 			
 15651             
 16852 			ERROR;
 15652             ERROR;
 16853 		}
 15653         }
 16854 		
 15654         
 16855 	}/*function_log*/
 15655     }/*function_log*/
 16856 	break;
 15656     break;
 16857 
 15657 
 16858 /****
 15658 /****
 16859  *EXP
 15659  *EXP
 16860  */
 15660  */
 16861 	case function_exp :
 15661     case function_exp :
 16862 	{
 15662     {
 16863 		symbol_c *last_type_symbol = NULL;
 15663         symbol_c *last_type_symbol = NULL;
 16864 
 15664 
 16865 		{
 15665         {
 16866 			identifier_c param_name("IN");
 15666             identifier_c param_name("IN");
 16867 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15667             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16868 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15668             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16869 			
 15669             
 16870 			/* Get the value from a foo(<param_value>) style call */
 15670             /* Get the value from a foo(<param_value>) style call */
 16871 			if (IN_param_value == NULL)
 15671             if (IN_param_value == NULL)
 16872 			  IN_param_value = function_call_param_iterator.next();
 15672               IN_param_value = function_call_param_iterator.next();
 16873 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15673             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16874 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15674             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16875 			
 15675             
 16876 			if(search_expression_type->is_real_type(IN_type_symbol))
 15676             if(search_expression_type->is_real_type(IN_type_symbol))
 16877 			{
 15677             {
 16878 		
 15678         
 16879 				symbol_c * return_type_symbol = IN_type_symbol;
 15679                 symbol_c * return_type_symbol = IN_type_symbol;
 16880 				s4o.print("exp(");
 15680                 s4o.print("exp(");
 16881 				IN_param_value->accept(*this);
 15681                 IN_param_value->accept(*this);
 16882 				s4o.print(")");
 15682                 s4o.print(")");
 16883 				return NULL;
 15683                 return NULL;
 16884 				
 15684                 
 16885 			}
 15685             }
 16886 			
 15686             
 16887 			ERROR;
 15687             ERROR;
 16888 		}
 15688         }
 16889 		
 15689         
 16890 	}/*function_exp*/
 15690     }/*function_exp*/
 16891 	break;
 15691     break;
 16892 
 15692 
 16893 /****
 15693 /****
 16894  *SIN
 15694  *SIN
 16895  */
 15695  */
 16896 	case function_sin :
 15696     case function_sin :
 16897 	{
 15697     {
 16898 		symbol_c *last_type_symbol = NULL;
 15698         symbol_c *last_type_symbol = NULL;
 16899 
 15699 
 16900 		{
 15700         {
 16901 			identifier_c param_name("IN");
 15701             identifier_c param_name("IN");
 16902 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15702             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16903 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15703             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16904 			
 15704             
 16905 			/* Get the value from a foo(<param_value>) style call */
 15705             /* Get the value from a foo(<param_value>) style call */
 16906 			if (IN_param_value == NULL)
 15706             if (IN_param_value == NULL)
 16907 			  IN_param_value = function_call_param_iterator.next();
 15707               IN_param_value = function_call_param_iterator.next();
 16908 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15708             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16909 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15709             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16910 			
 15710             
 16911 			if(search_expression_type->is_real_type(IN_type_symbol))
 15711             if(search_expression_type->is_real_type(IN_type_symbol))
 16912 			{
 15712             {
 16913 		
 15713         
 16914 				symbol_c * return_type_symbol = IN_type_symbol;
 15714                 symbol_c * return_type_symbol = IN_type_symbol;
 16915 				s4o.print("sin(");
 15715                 s4o.print("sin(");
 16916 				IN_param_value->accept(*this);
 15716                 IN_param_value->accept(*this);
 16917 				s4o.print(")");
 15717                 s4o.print(")");
 16918 				return NULL;
 15718                 return NULL;
 16919 				
 15719                 
 16920 			}
 15720             }
 16921 			
 15721             
 16922 			ERROR;
 15722             ERROR;
 16923 		}
 15723         }
 16924 		
 15724         
 16925 	}/*function_sin*/
 15725     }/*function_sin*/
 16926 	break;
 15726     break;
 16927 
 15727 
 16928 /****
 15728 /****
 16929  *COS
 15729  *COS
 16930  */
 15730  */
 16931 	case function_cos :
 15731     case function_cos :
 16932 	{
 15732     {
 16933 		symbol_c *last_type_symbol = NULL;
 15733         symbol_c *last_type_symbol = NULL;
 16934 
 15734 
 16935 		{
 15735         {
 16936 			identifier_c param_name("IN");
 15736             identifier_c param_name("IN");
 16937 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15737             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16938 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15738             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16939 			
 15739             
 16940 			/* Get the value from a foo(<param_value>) style call */
 15740             /* Get the value from a foo(<param_value>) style call */
 16941 			if (IN_param_value == NULL)
 15741             if (IN_param_value == NULL)
 16942 			  IN_param_value = function_call_param_iterator.next();
 15742               IN_param_value = function_call_param_iterator.next();
 16943 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15743             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16944 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
 16945 			
 15745             
 16946 			if(search_expression_type->is_real_type(IN_type_symbol))
 15746             if(search_expression_type->is_real_type(IN_type_symbol))
 16947 			{
 15747             {
 16948 		
 15748         
 16949 				symbol_c * return_type_symbol = IN_type_symbol;
 15749                 symbol_c * return_type_symbol = IN_type_symbol;
 16950 				s4o.print("cos(");
 15750                 s4o.print("cos(");
 16951 				IN_param_value->accept(*this);
 15751                 IN_param_value->accept(*this);
 16952 				s4o.print(")");
 15752                 s4o.print(")");
 16953 				return NULL;
 15753                 return NULL;
 16954 				
 15754                 
 16955 			}
 15755             }
 16956 			
 15756             
 16957 			ERROR;
 15757             ERROR;
 16958 		}
 15758         }
 16959 		
 15759         
 16960 	}/*function_cos*/
 15760     }/*function_cos*/
 16961 	break;
 15761     break;
 16962 
 15762 
 16963 /****
 15763 /****
 16964  *TAN
 15764  *TAN
 16965  */
 15765  */
 16966 	case function_tan :
 15766     case function_tan :
 16967 	{
 15767     {
 16968 		symbol_c *last_type_symbol = NULL;
 15768         symbol_c *last_type_symbol = NULL;
 16969 
 15769 
 16970 		{
 15770         {
 16971 			identifier_c param_name("IN");
 15771             identifier_c param_name("IN");
 16972 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15772             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16973 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15773             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16974 			
 15774             
 16975 			/* Get the value from a foo(<param_value>) style call */
 15775             /* Get the value from a foo(<param_value>) style call */
 16976 			if (IN_param_value == NULL)
 15776             if (IN_param_value == NULL)
 16977 			  IN_param_value = function_call_param_iterator.next();
 15777               IN_param_value = function_call_param_iterator.next();
 16978 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15778             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16979 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15779             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16980 			
 15780             
 16981 			if(search_expression_type->is_real_type(IN_type_symbol))
 15781             if(search_expression_type->is_real_type(IN_type_symbol))
 16982 			{
 15782             {
 16983 		
 15783         
 16984 				symbol_c * return_type_symbol = IN_type_symbol;
 15784                 symbol_c * return_type_symbol = IN_type_symbol;
 16985 				s4o.print("tan(");
 15785                 s4o.print("tan(");
 16986 				IN_param_value->accept(*this);
 15786                 IN_param_value->accept(*this);
 16987 				s4o.print(")");
 15787                 s4o.print(")");
 16988 				return NULL;
 15788                 return NULL;
 16989 				
 15789                 
 16990 			}
 15790             }
 16991 			
 15791             
 16992 			ERROR;
 15792             ERROR;
 16993 		}
 15793         }
 16994 		
 15794         
 16995 	}/*function_tan*/
 15795     }/*function_tan*/
 16996 	break;
 15796     break;
 16997 
 15797 
 16998 /****
 15798 /****
 16999  *ASIN
 15799  *ASIN
 17000  */
 15800  */
 17001 	case function_asin :
 15801     case function_asin :
 17002 	{
 15802     {
 17003 		symbol_c *last_type_symbol = NULL;
 15803         symbol_c *last_type_symbol = NULL;
 17004 
 15804 
 17005 		{
 15805         {
 17006 			identifier_c param_name("IN");
 15806             identifier_c param_name("IN");
 17007 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15807             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17008 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15808             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17009 			
 15809             
 17010 			/* Get the value from a foo(<param_value>) style call */
 15810             /* Get the value from a foo(<param_value>) style call */
 17011 			if (IN_param_value == NULL)
 15811             if (IN_param_value == NULL)
 17012 			  IN_param_value = function_call_param_iterator.next();
 15812               IN_param_value = function_call_param_iterator.next();
 17013 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15813             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17014 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15814             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17015 			
 15815             
 17016 			if(search_expression_type->is_real_type(IN_type_symbol))
 15816             if(search_expression_type->is_real_type(IN_type_symbol))
 17017 			{
 15817             {
 17018 		
 15818         
 17019 				symbol_c * return_type_symbol = IN_type_symbol;
 15819                 symbol_c * return_type_symbol = IN_type_symbol;
 17020 				s4o.print("asin(");
 15820                 s4o.print("asin(");
 17021 				IN_param_value->accept(*this);
 15821                 IN_param_value->accept(*this);
 17022 				s4o.print(")");
 15822                 s4o.print(")");
 17023 				return NULL;
 15823                 return NULL;
 17024 				
 15824                 
 17025 			}
 15825             }
 17026 			
 15826             
 17027 			ERROR;
 15827             ERROR;
 17028 		}
 15828         }
 17029 		
 15829         
 17030 	}/*function_asin*/
 15830     }/*function_asin*/
 17031 	break;
 15831     break;
 17032 
 15832 
 17033 /****
 15833 /****
 17034  *ACOS
 15834  *ACOS
 17035  */
 15835  */
 17036 	case function_acos :
 15836     case function_acos :
 17037 	{
 15837     {
 17038 		symbol_c *last_type_symbol = NULL;
 15838         symbol_c *last_type_symbol = NULL;
 17039 
 15839 
 17040 		{
 15840         {
 17041 			identifier_c param_name("IN");
 15841             identifier_c param_name("IN");
 17042 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15842             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17043 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15843             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17044 			
 15844             
 17045 			/* Get the value from a foo(<param_value>) style call */
 15845             /* Get the value from a foo(<param_value>) style call */
 17046 			if (IN_param_value == NULL)
 15846             if (IN_param_value == NULL)
 17047 			  IN_param_value = function_call_param_iterator.next();
 15847               IN_param_value = function_call_param_iterator.next();
 17048 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15848             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17049 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15849             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17050 			
 15850             
 17051 			if(search_expression_type->is_real_type(IN_type_symbol))
 15851             if(search_expression_type->is_real_type(IN_type_symbol))
 17052 			{
 15852             {
 17053 		
 15853         
 17054 				symbol_c * return_type_symbol = IN_type_symbol;
 15854                 symbol_c * return_type_symbol = IN_type_symbol;
 17055 				s4o.print("acos(");
 15855                 s4o.print("acos(");
 17056 				IN_param_value->accept(*this);
 15856                 IN_param_value->accept(*this);
 17057 				s4o.print(")");
 15857                 s4o.print(")");
 17058 				return NULL;
 15858                 return NULL;
 17059 				
 15859                 
 17060 			}
 15860             }
 17061 			
 15861             
 17062 			ERROR;
 15862             ERROR;
 17063 		}
 15863         }
 17064 		
 15864         
 17065 	}/*function_acos*/
 15865     }/*function_acos*/
 17066 	break;
 15866     break;
 17067 
 15867 
 17068 /****
 15868 /****
 17069  *ATAN
 15869  *ATAN
 17070  */
 15870  */
 17071 	case function_atan :
 15871     case function_atan :
 17072 	{
 15872     {
 17073 		symbol_c *last_type_symbol = NULL;
 15873         symbol_c *last_type_symbol = NULL;
 17074 
 15874 
 17075 		{
 15875         {
 17076 			identifier_c param_name("IN");
 15876             identifier_c param_name("IN");
 17077 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15877             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17078 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 15878             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17079 			
 15879             
 17080 			/* Get the value from a foo(<param_value>) style call */
 15880             /* Get the value from a foo(<param_value>) style call */
 17081 			if (IN_param_value == NULL)
 15881             if (IN_param_value == NULL)
 17082 			  IN_param_value = function_call_param_iterator.next();
 15882               IN_param_value = function_call_param_iterator.next();
 17083 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 15883             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17084 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 15884             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17085 			
 15885             
 17086 			if(search_expression_type->is_real_type(IN_type_symbol))
 15886             if(search_expression_type->is_real_type(IN_type_symbol))
 17087 			{
 15887             {
 17088 		
 15888         
 17089 				symbol_c * return_type_symbol = IN_type_symbol;
 15889                 symbol_c * return_type_symbol = IN_type_symbol;
 17090 				s4o.print("atan(");
 15890                 s4o.print("atan(");
 17091 				IN_param_value->accept(*this);
 15891                 IN_param_value->accept(*this);
 17092 				s4o.print(")");
 15892                 s4o.print(")");
 17093 				return NULL;
 15893                 return NULL;
 17094 				
 15894                 
 17095 			}
 15895             }
 17096 			
 15896             
 17097 			ERROR;
 15897             ERROR;
 17098 		}
 15898         }
 17099 		
 15899         
 17100 	}/*function_atan*/
 15900     }/*function_atan*/
 17101 	break;
 15901     break;
 17102 
 15902 
 17103 /****
 15903 /****
 17104  *ADD
 15904  *ADD
 17105  */
 15905  */
 17106 	case function_add :
 15906     case function_add :
 17107 	{
 15907     {
 17108 		symbol_c *last_type_symbol = NULL;
 15908         symbol_c *last_type_symbol = NULL;
 17109 
 15909 
 17110 		{
 15910         {
 17111 			identifier_c param_name("IN1");
 15911             identifier_c param_name("IN1");
 17112 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 15912             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17113 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 15913             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17114 			
 15914             
 17115 			/* Get the value from a foo(<param_value>) style call */
 15915             /* Get the value from a foo(<param_value>) style call */
 17116 			if (IN1_param_value == NULL)
 15916             if (IN1_param_value == NULL)
 17117 			  IN1_param_value = function_call_param_iterator.next();
 15917               IN1_param_value = function_call_param_iterator.next();
 17118 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15918             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17119 			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 ;
 15919             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 ;
 17120 			
 15920             
 17121 			if(search_expression_type->is_num_type(IN1_type_symbol))
 15921             if(search_expression_type->is_num_type(IN1_type_symbol))
 17122 			{
 15922             {
 17123 		
 15923         
 17124 				{
 15924                 {
 17125 					identifier_c param_name("IN2");
 15925                     identifier_c param_name("IN2");
 17126 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 15926                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17127 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15927                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17128 					
 15928                     
 17129 					/* Get the value from a foo(<param_value>) style call */
 15929                     /* Get the value from a foo(<param_value>) style call */
 17130 					if (IN2_param_value == NULL)
 15930                     if (IN2_param_value == NULL)
 17131 					  IN2_param_value = function_call_param_iterator.next();
 15931                       IN2_param_value = function_call_param_iterator.next();
 17132 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15932                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17133 					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 ;
 15933                     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 ;
 17134 					
 15934                     
 17135 					if(search_expression_type->is_num_type(IN2_type_symbol))
 15935                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17136 					{
 15936                     {
 17137 				
 15937                 
 17138 						symbol_c * return_type_symbol = last_type_symbol;
 15938                         symbol_c * return_type_symbol = last_type_symbol;
 17139 						s4o.print("(");
 15939                         s4o.print("(");
 17140 						IN1_param_value->accept(*this);
 15940                         IN1_param_value->accept(*this);
 17141 						s4o.print("+");
 15941                         s4o.print("+");
 17142 						IN2_param_value->accept(*this);
 15942                         IN2_param_value->accept(*this);
 17143 						
 15943                         
 17144 						int base_num = 3;
 15944                         int base_num = 3;
 17145 						symbol_c *param_value = NULL;
 15945                         symbol_c *param_value = NULL;
 17146 						do{
 15946                         do{
 17147 							char my_name[10];
 15947                             char my_name[10];
 17148 							sprintf(my_name, "IN%d", base_num++);
 15948                             sprintf(my_name, "IN%d", base_num++);
 17149 							identifier_c param_name(my_name);
 15949                             identifier_c param_name(my_name);
 17150 							
 15950                             
 17151 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 15951                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17152 							param_value = function_call_param_iterator.search(&param_name);
 15952                             param_value = function_call_param_iterator.search(&param_name);
 17153 							
 15953                             
 17154 							/* Get the value from a foo(<param_value>) style call */
 15954                             /* Get the value from a foo(<param_value>) style call */
 17155 							if (param_value == NULL)
 15955                             if (param_value == NULL)
 17156 							  param_value = function_call_param_iterator.next();
 15956                               param_value = function_call_param_iterator.next();
 17157 							if (param_value != NULL){
 15957                             if (param_value != NULL){
 17158 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15958                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17159 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 15959                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17160 							
 15960                             
 17161 								/*Function specific CODE */
 15961                                 /*Function specific CODE */
 17162 								s4o.print("+");
 15962                                 s4o.print("+");
 17163 								param_value->accept(*this);
 15963                                 param_value->accept(*this);
 17164 								
 15964                                 
 17165 							}
 15965                             }
 17166 							
 15966                             
 17167 						}while(param_value != NULL);
 15967                         }while(param_value != NULL);
 17168 						s4o.print(")");
 15968                         s4o.print(")");
 17169 						return NULL;
 15969                         return NULL;
 17170 						
 15970                         
 17171 						
 15971                         
 17172 					}
 15972                     }
 17173 					
 15973                     
 17174 					ERROR;
 15974                     ERROR;
 17175 				}
 15975                 }
 17176 				
 15976                 
 17177 			}
 15977             }
 17178 			
 15978             
 17179 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 15979             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17180 			{
 15980             {
 17181 		
 15981         
 17182 				{
 15982                 {
 17183 					identifier_c param_name("IN2");
 15983                     identifier_c param_name("IN2");
 17184 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 15984                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17185 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 15985                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17186 					
 15986                     
 17187 					/* Get the value from a foo(<param_value>) style call */
 15987                     /* Get the value from a foo(<param_value>) style call */
 17188 					if (IN2_param_value == NULL)
 15988                     if (IN2_param_value == NULL)
 17189 					  IN2_param_value = function_call_param_iterator.next();
 15989                       IN2_param_value = function_call_param_iterator.next();
 17190 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15990                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17191 					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 ;
 15991                     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 ;
 17192 					
 15992                     
 17193 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 15993                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17194 					{
 15994                     {
 17195 				
 15995                 
 17196 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15996                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17197 						s4o.print("__time_add(&");
 15997                         s4o.print("__time_add(&");
 17198 						IN1_param_value->accept(*this);
 15998                         IN1_param_value->accept(*this);
 17199 						s4o.print(", &");
 15999                         s4o.print(", &");
 17200 						IN2_param_value->accept(*this);
 16000                         IN2_param_value->accept(*this);
 17201 						s4o.print(")");
 16001                         s4o.print(")");
 17202 						return NULL;
 16002                         return NULL;
 17203 						
 16003                         
 17204 					}
 16004                     }
 17205 					
 16005                     
 17206 					ERROR;
 16006                     ERROR;
 17207 				}
 16007                 }
 17208 				
 16008                 
 17209 			}
 16009             }
 17210 			
 16010             
 17211 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 16011             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17212 			{
 16012             {
 17213 		
 16013         
 17214 				{
 16014                 {
 17215 					identifier_c param_name("IN2");
 16015                     identifier_c param_name("IN2");
 17216 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16016                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17217 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16017                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17218 					
 16018                     
 17219 					/* Get the value from a foo(<param_value>) style call */
 16019                     /* Get the value from a foo(<param_value>) style call */
 17220 					if (IN2_param_value == NULL)
 16020                     if (IN2_param_value == NULL)
 17221 					  IN2_param_value = function_call_param_iterator.next();
 16021                       IN2_param_value = function_call_param_iterator.next();
 17222 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16022                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17223 					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 ;
 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 ;
 17224 					
 16024                     
 17225 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16025                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17226 					{
 16026                     {
 17227 				
 16027                 
 17228 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16028                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17229 						s4o.print("__time_add(&");
 16029                         s4o.print("__time_add(&");
 17230 						IN1_param_value->accept(*this);
 16030                         IN1_param_value->accept(*this);
 17231 						s4o.print(", &");
 16031                         s4o.print(", &");
 17232 						IN2_param_value->accept(*this);
 16032                         IN2_param_value->accept(*this);
 17233 						s4o.print(")");
 16033                         s4o.print(")");
 17234 						return NULL;
 16034                         return NULL;
 17235 						
 16035                         
 17236 					}
 16036                     }
 17237 					
 16037                     
 17238 					ERROR;
 16038                     ERROR;
 17239 				}
 16039                 }
 17240 				
 16040                 
 17241 			}
 16041             }
 17242 			
 16042             
 17243 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16043             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17244 			{
 16044             {
 17245 		
 16045         
 17246 				{
 16046                 {
 17247 					identifier_c param_name("IN2");
 16047                     identifier_c param_name("IN2");
 17248 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16048                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17249 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16049                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17250 					
 16050                     
 17251 					/* Get the value from a foo(<param_value>) style call */
 16051                     /* Get the value from a foo(<param_value>) style call */
 17252 					if (IN2_param_value == NULL)
 16052                     if (IN2_param_value == NULL)
 17253 					  IN2_param_value = function_call_param_iterator.next();
 16053                       IN2_param_value = function_call_param_iterator.next();
 17254 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16054                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17255 					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 ;
 16055                     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 ;
 17256 					
 16056                     
 17257 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16057                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17258 					{
 16058                     {
 17259 				
 16059                 
 17260 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16060                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17261 						s4o.print("__time_add(&");
 16061                         s4o.print("__time_add(&");
 17262 						IN1_param_value->accept(*this);
 16062                         IN1_param_value->accept(*this);
 17263 						s4o.print(", &");
 16063                         s4o.print(", &");
 17264 						IN2_param_value->accept(*this);
 16064                         IN2_param_value->accept(*this);
 17265 						s4o.print(")");
 16065                         s4o.print(")");
 17266 						return NULL;
 16066                         return NULL;
 17267 						
 16067                         
 17268 					}
 16068                     }
 17269 					
 16069                     
 17270 					ERROR;
 16070                     ERROR;
 17271 				}
 16071                 }
 17272 				
 16072                 
 17273 			}
 16073             }
 17274 			
 16074             
 17275 			ERROR;
 16075             ERROR;
 17276 		}
 16076         }
 17277 		
 16077         
 17278 	}/*function_add*/
 16078     }/*function_add*/
 17279 	break;
 16079     break;
 17280 
 16080 
 17281 /****
 16081 /****
 17282  *MUL
 16082  *MUL
 17283  */
 16083  */
 17284 	case function_mul :
 16084     case function_mul :
 17285 	{
 16085     {
 17286 		symbol_c *last_type_symbol = NULL;
 16086         symbol_c *last_type_symbol = NULL;
 17287 
 16087 
 17288 		{
 16088         {
 17289 			identifier_c param_name("IN1");
 16089             identifier_c param_name("IN1");
 17290 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16090             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17291 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16091             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17292 			
 16092             
 17293 			/* Get the value from a foo(<param_value>) style call */
 16093             /* Get the value from a foo(<param_value>) style call */
 17294 			if (IN1_param_value == NULL)
 16094             if (IN1_param_value == NULL)
 17295 			  IN1_param_value = function_call_param_iterator.next();
 16095               IN1_param_value = function_call_param_iterator.next();
 17296 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16096             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17297 			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 ;
 16097             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 ;
 17298 			
 16098             
 17299 			if(search_expression_type->is_num_type(IN1_type_symbol))
 16099             if(search_expression_type->is_num_type(IN1_type_symbol))
 17300 			{
 16100             {
 17301 		
 16101         
 17302 				{
 16102                 {
 17303 					identifier_c param_name("IN2");
 16103                     identifier_c param_name("IN2");
 17304 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16104                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17305 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16105                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17306 					
 16106                     
 17307 					/* Get the value from a foo(<param_value>) style call */
 16107                     /* Get the value from a foo(<param_value>) style call */
 17308 					if (IN2_param_value == NULL)
 16108                     if (IN2_param_value == NULL)
 17309 					  IN2_param_value = function_call_param_iterator.next();
 16109                       IN2_param_value = function_call_param_iterator.next();
 17310 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16110                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17311 					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 ;
 16111                     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 ;
 17312 					
 16112                     
 17313 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16113                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17314 					{
 16114                     {
 17315 				
 16115                 
 17316 						symbol_c * return_type_symbol = last_type_symbol;
 16116                         symbol_c * return_type_symbol = last_type_symbol;
 17317 						s4o.print("(");
 16117                         s4o.print("(");
 17318 						IN1_param_value->accept(*this);
 16118                         IN1_param_value->accept(*this);
 17319 						s4o.print("*");
 16119                         s4o.print("*");
 17320 						IN2_param_value->accept(*this);
 16120                         IN2_param_value->accept(*this);
 17321 						
 16121                         
 17322 						int base_num = 3;
 16122                         int base_num = 3;
 17323 						symbol_c *param_value = NULL;
 16123                         symbol_c *param_value = NULL;
 17324 						do{
 16124                         do{
 17325 							char my_name[10];
 16125                             char my_name[10];
 17326 							sprintf(my_name, "IN%d", base_num++);
 16126                             sprintf(my_name, "IN%d", base_num++);
 17327 							identifier_c param_name(my_name);
 16127                             identifier_c param_name(my_name);
 17328 							
 16128                             
 17329 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 16129                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17330 							param_value = function_call_param_iterator.search(&param_name);
 16130                             param_value = function_call_param_iterator.search(&param_name);
 17331 							
 16131                             
 17332 							/* Get the value from a foo(<param_value>) style call */
 16132                             /* Get the value from a foo(<param_value>) style call */
 17333 							if (param_value == NULL)
 16133                             if (param_value == NULL)
 17334 							  param_value = function_call_param_iterator.next();
 16134                               param_value = function_call_param_iterator.next();
 17335 							if (param_value != NULL){
 16135                             if (param_value != NULL){
 17336 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16136                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17337 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 16137                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17338 							
 16138                             
 17339 								/*Function specific CODE */
 16139                                 /*Function specific CODE */
 17340 								s4o.print("*");
 16140                                 s4o.print("*");
 17341 								param_value->accept(*this);
 16141                                 param_value->accept(*this);
 17342 								
 16142                                 
 17343 							}
 16143                             }
 17344 							
 16144                             
 17345 						}while(param_value != NULL);
 16145                         }while(param_value != NULL);
 17346 						s4o.print(")");
 16146                         s4o.print(")");
 17347 						return NULL;
 16147                         return NULL;
 17348 						
 16148                         
 17349 						
 16149                         
 17350 					}
 16150                     }
 17351 					
 16151                     
 17352 					ERROR;
 16152                     ERROR;
 17353 				}
 16153                 }
 17354 				
 16154                 
 17355 			}
 16155             }
 17356 			
 16156             
 17357 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16157             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17358 			{
 16158             {
 17359 		
 16159         
 17360 				{
 16160                 {
 17361 					identifier_c param_name("IN2");
 16161                     identifier_c param_name("IN2");
 17362 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16162                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17363 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16163                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17364 					
 16164                     
 17365 					/* Get the value from a foo(<param_value>) style call */
 16165                     /* Get the value from a foo(<param_value>) style call */
 17366 					if (IN2_param_value == NULL)
 16166                     if (IN2_param_value == NULL)
 17367 					  IN2_param_value = function_call_param_iterator.next();
 16167                       IN2_param_value = function_call_param_iterator.next();
 17368 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16168                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17369 					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 ;
 16169                     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 ;
 17370 					
 16170                     
 17371 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16171                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17372 					{
 16172                     {
 17373 				
 16173                 
 17374 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16174                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17375 						s4o.print("__time_mul(&");
 16175                         s4o.print("__time_mul(&");
 17376 						IN1_param_value->accept(*this);
 16176                         IN1_param_value->accept(*this);
 17377 						s4o.print(", &");
 16177                         s4o.print(", &");
 17378 						IN2_param_value->accept(*this);
 16178                         IN2_param_value->accept(*this);
 17379 						s4o.print(")");
 16179                         s4o.print(")");
 17380 						return NULL;
 16180                         return NULL;
 17381 						
 16181                         
 17382 					}
 16182                     }
 17383 					
 16183                     
 17384 					ERROR;
 16184                     ERROR;
 17385 				}
 16185                 }
 17386 				
 16186                 
 17387 			}
 16187             }
 17388 			
 16188             
 17389 			ERROR;
 16189             ERROR;
 17390 		}
 16190         }
 17391 		
 16191         
 17392 	}/*function_mul*/
 16192     }/*function_mul*/
 17393 	break;
 16193     break;
 17394 
 16194 
 17395 /****
 16195 /****
 17396  *SUB
 16196  *SUB
 17397  */
 16197  */
 17398 	case function_sub :
 16198     case function_sub :
 17399 	{
 16199     {
 17400 		symbol_c *last_type_symbol = NULL;
 16200         symbol_c *last_type_symbol = NULL;
 17401 
 16201 
 17402 		{
 16202         {
 17403 			identifier_c param_name("IN1");
 16203             identifier_c param_name("IN1");
 17404 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16204             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17405 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16205             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17406 			
 16206             
 17407 			/* Get the value from a foo(<param_value>) style call */
 16207             /* Get the value from a foo(<param_value>) style call */
 17408 			if (IN1_param_value == NULL)
 16208             if (IN1_param_value == NULL)
 17409 			  IN1_param_value = function_call_param_iterator.next();
 16209               IN1_param_value = function_call_param_iterator.next();
 17410 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16210             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17411 			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 ;
 16211             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 ;
 17412 			
 16212             
 17413 			if(search_expression_type->is_num_type(IN1_type_symbol))
 16213             if(search_expression_type->is_num_type(IN1_type_symbol))
 17414 			{
 16214             {
 17415 		
 16215         
 17416 				{
 16216                 {
 17417 					identifier_c param_name("IN2");
 16217                     identifier_c param_name("IN2");
 17418 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16218                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17419 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16219                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17420 					
 16220                     
 17421 					/* Get the value from a foo(<param_value>) style call */
 16221                     /* Get the value from a foo(<param_value>) style call */
 17422 					if (IN2_param_value == NULL)
 16222                     if (IN2_param_value == NULL)
 17423 					  IN2_param_value = function_call_param_iterator.next();
 16223                       IN2_param_value = function_call_param_iterator.next();
 17424 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16224                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17425 					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 ;
 16225                     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 ;
 17426 					
 16226                     
 17427 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16227                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17428 					{
 16228                     {
 17429 				
 16229                 
 17430 						symbol_c * return_type_symbol = last_type_symbol;
 16230                         symbol_c * return_type_symbol = last_type_symbol;
 17431 						s4o.print("(");
 16231                         s4o.print("(");
 17432 						IN1_param_value->accept(*this);
 16232                         IN1_param_value->accept(*this);
 17433 						s4o.print("-");
 16233                         s4o.print("-");
 17434 						IN2_param_value->accept(*this);
 16234                         IN2_param_value->accept(*this);
 17435 						s4o.print(")");
 16235                         s4o.print(")");
 17436 						return NULL;
 16236                         return NULL;
 17437 						
 16237                         
 17438 					}
 16238                     }
 17439 					
 16239                     
 17440 					ERROR;
 16240                     ERROR;
 17441 				}
 16241                 }
 17442 				
 16242                 
 17443 			}
 16243             }
 17444 			
 16244             
 17445 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 16245             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 17446 			{
 16246             {
 17447 		
 16247         
 17448 				{
 16248                 {
 17449 					identifier_c param_name("IN2");
 16249                     identifier_c param_name("IN2");
 17450 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16250                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17451 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16251                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17452 					
 16252                     
 17453 					/* Get the value from a foo(<param_value>) style call */
 16253                     /* Get the value from a foo(<param_value>) style call */
 17454 					if (IN2_param_value == NULL)
 16254                     if (IN2_param_value == NULL)
 17455 					  IN2_param_value = function_call_param_iterator.next();
 16255                       IN2_param_value = function_call_param_iterator.next();
 17456 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16256                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17457 					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 ;
 16257                     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 ;
 17458 					
 16258                     
 17459 					if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 16259                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 17460 					{
 16260                     {
 17461 				
 16261                 
 17462 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16262                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17463 						s4o.print("__time_sub(&");
 16263                         s4o.print("__time_sub(&");
 17464 						IN1_param_value->accept(*this);
 16264                         IN1_param_value->accept(*this);
 17465 						s4o.print(", &");
 16265                         s4o.print(", &");
 17466 						IN2_param_value->accept(*this);
 16266                         IN2_param_value->accept(*this);
 17467 						s4o.print(")");
 16267                         s4o.print(")");
 17468 						return NULL;
 16268                         return NULL;
 17469 						
 16269                         
 17470 					}
 16270                     }
 17471 					
 16271                     
 17472 					ERROR;
 16272                     ERROR;
 17473 				}
 16273                 }
 17474 				
 16274                 
 17475 			}
 16275             }
 17476 			
 16276             
 17477 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 16277             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17478 			{
 16278             {
 17479 		
 16279         
 17480 				{
 16280                 {
 17481 					identifier_c param_name("IN2");
 16281                     identifier_c param_name("IN2");
 17482 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16282                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17483 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16283                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17484 					
 16284                     
 17485 					/* Get the value from a foo(<param_value>) style call */
 16285                     /* Get the value from a foo(<param_value>) style call */
 17486 					if (IN2_param_value == NULL)
 16286                     if (IN2_param_value == NULL)
 17487 					  IN2_param_value = function_call_param_iterator.next();
 16287                       IN2_param_value = function_call_param_iterator.next();
 17488 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16288                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17489 					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 ;
 16289                     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 ;
 17490 					
 16290                     
 17491 					if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 16291                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17492 					{
 16292                     {
 17493 				
 16293                 
 17494 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16294                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17495 						s4o.print("__time_sub(&");
 16295                         s4o.print("__time_sub(&");
 17496 						IN1_param_value->accept(*this);
 16296                         IN1_param_value->accept(*this);
 17497 						s4o.print(", &");
 16297                         s4o.print(", &");
 17498 						IN2_param_value->accept(*this);
 16298                         IN2_param_value->accept(*this);
 17499 						s4o.print(")");
 16299                         s4o.print(")");
 17500 						return NULL;
 16300                         return NULL;
 17501 						
 16301                         
 17502 					}
 16302                     }
 17503 					
 16303                     
 17504 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16304                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17505 					{
 16305                     {
 17506 				
 16306                 
 17507 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16307                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17508 						s4o.print("__time_sub(&");
 16308                         s4o.print("__time_sub(&");
 17509 						IN1_param_value->accept(*this);
 16309                         IN1_param_value->accept(*this);
 17510 						s4o.print(", &");
 16310                         s4o.print(", &");
 17511 						IN2_param_value->accept(*this);
 16311                         IN2_param_value->accept(*this);
 17512 						s4o.print(")");
 16312                         s4o.print(")");
 17513 						return NULL;
 16313                         return NULL;
 17514 						
 16314                         
 17515 					}
 16315                     }
 17516 					
 16316                     
 17517 					ERROR;
 16317                     ERROR;
 17518 				}
 16318                 }
 17519 				
 16319                 
 17520 			}
 16320             }
 17521 			
 16321             
 17522 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 16322             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17523 			{
 16323             {
 17524 		
 16324         
 17525 				{
 16325                 {
 17526 					identifier_c param_name("IN2");
 16326                     identifier_c param_name("IN2");
 17527 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16327                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17528 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16328                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17529 					
 16329                     
 17530 					/* Get the value from a foo(<param_value>) style call */
 16330                     /* Get the value from a foo(<param_value>) style call */
 17531 					if (IN2_param_value == NULL)
 16331                     if (IN2_param_value == NULL)
 17532 					  IN2_param_value = function_call_param_iterator.next();
 16332                       IN2_param_value = function_call_param_iterator.next();
 17533 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16333                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17534 					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 ;
 16334                     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 ;
 17535 					
 16335                     
 17536 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 16336                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17537 					{
 16337                     {
 17538 				
 16338                 
 17539 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16339                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17540 						s4o.print("__time_sub(&");
 16340                         s4o.print("__time_sub(&");
 17541 						IN1_param_value->accept(*this);
 16341                         IN1_param_value->accept(*this);
 17542 						s4o.print(", &");
 16342                         s4o.print(", &");
 17543 						IN2_param_value->accept(*this);
 16343                         IN2_param_value->accept(*this);
 17544 						s4o.print(")");
 16344                         s4o.print(")");
 17545 						return NULL;
 16345                         return NULL;
 17546 						
 16346                         
 17547 					}
 16347                     }
 17548 					
 16348                     
 17549 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16349                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17550 					{
 16350                     {
 17551 				
 16351                 
 17552 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16352                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17553 						s4o.print("__time_sub(&");
 16353                         s4o.print("__time_sub(&");
 17554 						IN1_param_value->accept(*this);
 16354                         IN1_param_value->accept(*this);
 17555 						s4o.print(", &");
 16355                         s4o.print(", &");
 17556 						IN2_param_value->accept(*this);
 16356                         IN2_param_value->accept(*this);
 17557 						s4o.print(")");
 16357                         s4o.print(")");
 17558 						return NULL;
 16358                         return NULL;
 17559 						
 16359                         
 17560 					}
 16360                     }
 17561 					
 16361                     
 17562 					ERROR;
 16362                     ERROR;
 17563 				}
 16363                 }
 17564 				
 16364                 
 17565 			}
 16365             }
 17566 			
 16366             
 17567 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16367             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17568 			{
 16368             {
 17569 		
 16369         
 17570 				{
 16370                 {
 17571 					identifier_c param_name("IN2");
 16371                     identifier_c param_name("IN2");
 17572 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16372                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17573 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16373                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17574 					
 16374                     
 17575 					/* Get the value from a foo(<param_value>) style call */
 16375                     /* Get the value from a foo(<param_value>) style call */
 17576 					if (IN2_param_value == NULL)
 16376                     if (IN2_param_value == NULL)
 17577 					  IN2_param_value = function_call_param_iterator.next();
 16377                       IN2_param_value = function_call_param_iterator.next();
 17578 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16378                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17579 					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 ;
 16379                     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 ;
 17580 					
 16380                     
 17581 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16381                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17582 					{
 16382                     {
 17583 				
 16383                 
 17584 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16384                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17585 						s4o.print("__time_sub(&");
 16385                         s4o.print("__time_sub(&");
 17586 						IN1_param_value->accept(*this);
 16386                         IN1_param_value->accept(*this);
 17587 						s4o.print(", &");
 16387                         s4o.print(", &");
 17588 						IN2_param_value->accept(*this);
 16388                         IN2_param_value->accept(*this);
 17589 						s4o.print(")");
 16389                         s4o.print(")");
 17590 						return NULL;
 16390                         return NULL;
 17591 						
 16391                         
 17592 					}
 16392                     }
 17593 					
 16393                     
 17594 					ERROR;
 16394                     ERROR;
 17595 				}
 16395                 }
 17596 				
 16396                 
 17597 			}
 16397             }
 17598 			
 16398             
 17599 			ERROR;
 16399             ERROR;
 17600 		}
 16400         }
 17601 		
 16401         
 17602 	}/*function_sub*/
 16402     }/*function_sub*/
 17603 	break;
 16403     break;
 17604 
 16404 
 17605 /****
 16405 /****
 17606  *DIV
 16406  *DIV
 17607  */
 16407  */
 17608 	case function_div :
 16408     case function_div :
 17609 	{
 16409     {
 17610 		symbol_c *last_type_symbol = NULL;
 16410         symbol_c *last_type_symbol = NULL;
 17611 
 16411 
 17612 		{
 16412         {
 17613 			identifier_c param_name("IN1");
 16413             identifier_c param_name("IN1");
 17614 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16414             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17615 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16415             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17616 			
 16416             
 17617 			/* Get the value from a foo(<param_value>) style call */
 16417             /* Get the value from a foo(<param_value>) style call */
 17618 			if (IN1_param_value == NULL)
 16418             if (IN1_param_value == NULL)
 17619 			  IN1_param_value = function_call_param_iterator.next();
 16419               IN1_param_value = function_call_param_iterator.next();
 17620 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16420             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17621 			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 ;
 16421             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 ;
 17622 			
 16422             
 17623 			if(search_expression_type->is_num_type(IN1_type_symbol))
 16423             if(search_expression_type->is_num_type(IN1_type_symbol))
 17624 			{
 16424             {
 17625 		
 16425         
 17626 				{
 16426                 {
 17627 					identifier_c param_name("IN2");
 16427                     identifier_c param_name("IN2");
 17628 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16428                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17629 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16429                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17630 					
 16430                     
 17631 					/* Get the value from a foo(<param_value>) style call */
 16431                     /* Get the value from a foo(<param_value>) style call */
 17632 					if (IN2_param_value == NULL)
 16432                     if (IN2_param_value == NULL)
 17633 					  IN2_param_value = function_call_param_iterator.next();
 16433                       IN2_param_value = function_call_param_iterator.next();
 17634 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16434                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17635 					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 ;
 16435                     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 ;
 17636 					
 16436                     
 17637 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16437                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17638 					{
 16438                     {
 17639 				
 16439                 
 17640 						symbol_c * return_type_symbol = last_type_symbol;
 16440                         symbol_c * return_type_symbol = last_type_symbol;
 17641 						s4o.print("(");
 16441                         s4o.print("(");
 17642 						IN1_param_value->accept(*this);
 16442                         IN1_param_value->accept(*this);
 17643 						s4o.print("/");
 16443                         s4o.print("/");
 17644 						IN2_param_value->accept(*this);
 16444                         IN2_param_value->accept(*this);
 17645 						s4o.print(")");
 16445                         s4o.print(")");
 17646 						return NULL;
 16446                         return NULL;
 17647 						
 16447                         
 17648 					}
 16448                     }
 17649 					
 16449                     
 17650 					ERROR;
 16450                     ERROR;
 17651 				}
 16451                 }
 17652 				
 16452                 
 17653 			}
 16453             }
 17654 			
 16454             
 17655 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16455             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 17656 			{
 16456             {
 17657 		
 16457         
 17658 				{
 16458                 {
 17659 					identifier_c param_name("IN2");
 16459                     identifier_c param_name("IN2");
 17660 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17661 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16461                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17662 					
 16462                     
 17663 					/* Get the value from a foo(<param_value>) style call */
 16463                     /* Get the value from a foo(<param_value>) style call */
 17664 					if (IN2_param_value == NULL)
 16464                     if (IN2_param_value == NULL)
 17665 					  IN2_param_value = function_call_param_iterator.next();
 16465                       IN2_param_value = function_call_param_iterator.next();
 17666 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16466                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17667 					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 ;
 16467                     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 ;
 17668 					
 16468                     
 17669 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16469                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17670 					{
 16470                     {
 17671 				
 16471                 
 17672 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16472                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17673 						s4o.print("__time_div(&");
 16473                         s4o.print("__time_div(&");
 17674 						IN1_param_value->accept(*this);
 16474                         IN1_param_value->accept(*this);
 17675 						s4o.print(", &");
 16475                         s4o.print(", &");
 17676 						IN2_param_value->accept(*this);
 16476                         IN2_param_value->accept(*this);
 17677 						s4o.print(")");
 16477                         s4o.print(")");
 17678 						return NULL;
 16478                         return NULL;
 17679 						
 16479                         
 17680 					}
 16480                     }
 17681 					
 16481                     
 17682 					ERROR;
 16482                     ERROR;
 17683 				}
 16483                 }
 17684 				
 16484                 
 17685 			}
 16485             }
 17686 			
 16486             
 17687 			ERROR;
 16487             ERROR;
 17688 		}
 16488         }
 17689 		
 16489         
 17690 	}/*function_div*/
 16490     }/*function_div*/
 17691 	break;
 16491     break;
 17692 
 16492 
 17693 /****
 16493 /****
 17694  *MOD
 16494  *MOD
 17695  */
 16495  */
 17696 	case function_mod :
 16496     case function_mod :
 17697 	{
 16497     {
 17698 		symbol_c *last_type_symbol = NULL;
 16498         symbol_c *last_type_symbol = NULL;
 17699 
 16499 
 17700 		{
 16500         {
 17701 			identifier_c param_name("IN1");
 16501             identifier_c param_name("IN1");
 17702 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16502             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17703 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16503             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17704 			
 16504             
 17705 			/* Get the value from a foo(<param_value>) style call */
 16505             /* Get the value from a foo(<param_value>) style call */
 17706 			if (IN1_param_value == NULL)
 16506             if (IN1_param_value == NULL)
 17707 			  IN1_param_value = function_call_param_iterator.next();
 16507               IN1_param_value = function_call_param_iterator.next();
 17708 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16508             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17709 			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 ;
 16509             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 ;
 17710 			
 16510             
 17711 			if(search_expression_type->is_num_type(IN1_type_symbol))
 16511             if(search_expression_type->is_num_type(IN1_type_symbol))
 17712 			{
 16512             {
 17713 		
 16513         
 17714 				{
 16514                 {
 17715 					identifier_c param_name("IN2");
 16515                     identifier_c param_name("IN2");
 17716 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16516                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17717 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16517                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17718 					
 16518                     
 17719 					/* Get the value from a foo(<param_value>) style call */
 16519                     /* Get the value from a foo(<param_value>) style call */
 17720 					if (IN2_param_value == NULL)
 16520                     if (IN2_param_value == NULL)
 17721 					  IN2_param_value = function_call_param_iterator.next();
 16521                       IN2_param_value = function_call_param_iterator.next();
 17722 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16522                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17723 					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 ;
 16523                     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 ;
 17724 					
 16524                     
 17725 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16525                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17726 					{
 16526                     {
 17727 				
 16527                 
 17728 						symbol_c * return_type_symbol = last_type_symbol;
 16528                         symbol_c * return_type_symbol = last_type_symbol;
 17729 						s4o.print("(");
 16529                         s4o.print("(");
 17730 						IN1_param_value->accept(*this);
 16530                         IN1_param_value->accept(*this);
 17731 						s4o.print("%");
 16531                         s4o.print("%");
 17732 						IN2_param_value->accept(*this);
 16532                         IN2_param_value->accept(*this);
 17733 						s4o.print(")");
 16533                         s4o.print(")");
 17734 						return NULL;
 16534                         return NULL;
 17735 						
 16535                         
 17736 					}
 16536                     }
 17737 					
 16537                     
 17738 					ERROR;
 16538                     ERROR;
 17739 				}
 16539                 }
 17740 				
 16540                 
 17741 			}
 16541             }
 17742 			
 16542             
 17743 			ERROR;
 16543             ERROR;
 17744 		}
 16544         }
 17745 		
 16545         
 17746 	}/*function_mod*/
 16546     }/*function_mod*/
 17747 	break;
 16547     break;
 17748 
 16548 
 17749 /****
 16549 /****
 17750  *EXPT
 16550  *EXPT
 17751  */
 16551  */
 17752 	case function_expt :
 16552     case function_expt :
 17753 	{
 16553     {
 17754 		symbol_c *last_type_symbol = NULL;
 16554         symbol_c *last_type_symbol = NULL;
 17755 
 16555 
 17756 		{
 16556         {
 17757 			identifier_c param_name("IN1");
 16557             identifier_c param_name("IN1");
 17758 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16558             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17759 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16559             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17760 			
 16560             
 17761 			/* Get the value from a foo(<param_value>) style call */
 16561             /* Get the value from a foo(<param_value>) style call */
 17762 			if (IN1_param_value == NULL)
 16562             if (IN1_param_value == NULL)
 17763 			  IN1_param_value = function_call_param_iterator.next();
 16563               IN1_param_value = function_call_param_iterator.next();
 17764 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16564             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17765 			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 ;
 16565             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 ;
 17766 			
 16566             
 17767 			if(search_expression_type->is_num_type(IN1_type_symbol))
 16567             if(search_expression_type->is_num_type(IN1_type_symbol))
 17768 			{
 16568             {
 17769 		
 16569         
 17770 				{
 16570                 {
 17771 					identifier_c param_name("IN2");
 16571                     identifier_c param_name("IN2");
 17772 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16572                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17773 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16573                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17774 					
 16574                     
 17775 					/* Get the value from a foo(<param_value>) style call */
 16575                     /* Get the value from a foo(<param_value>) style call */
 17776 					if (IN2_param_value == NULL)
 16576                     if (IN2_param_value == NULL)
 17777 					  IN2_param_value = function_call_param_iterator.next();
 16577                       IN2_param_value = function_call_param_iterator.next();
 17778 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16578                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17779 					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 ;
 16579                     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 ;
 17780 					
 16580                     
 17781 					if(search_expression_type->is_num_type(IN2_type_symbol))
 16581                     if(search_expression_type->is_num_type(IN2_type_symbol))
 17782 					{
 16582                     {
 17783 				
 16583                 
 17784 						symbol_c * return_type_symbol = last_type_symbol;
 16584                         symbol_c * return_type_symbol = last_type_symbol;
 17785 						s4o.print("pow(&");
 16585                         s4o.print("pow(&");
 17786 						IN1_param_value->accept(*this);
 16586                         IN1_param_value->accept(*this);
 17787 						s4o.print(", &");
 16587                         s4o.print(", &");
 17788 						IN2_param_value->accept(*this);
 16588                         IN2_param_value->accept(*this);
 17789 						s4o.print(")");
 16589                         s4o.print(")");
 17790 						return NULL;
 16590                         return NULL;
 17791 						
 16591                         
 17792 					}
 16592                     }
 17793 					
 16593                     
 17794 					ERROR;
 16594                     ERROR;
 17795 				}
 16595                 }
 17796 				
 16596                 
 17797 			}
 16597             }
 17798 			
 16598             
 17799 			ERROR;
 16599             ERROR;
 17800 		}
 16600         }
 17801 		
 16601         
 17802 	}/*function_expt*/
 16602     }/*function_expt*/
 17803 	break;
 16603     break;
 17804 
 16604 
 17805 /****
 16605 /****
 17806  *MOVE
 16606  *MOVE
 17807  */
 16607  */
 17808 	case function_move :
 16608     case function_move :
 17809 	{
 16609     {
 17810 		symbol_c *last_type_symbol = NULL;
 16610         symbol_c *last_type_symbol = NULL;
 17811 
 16611 
 17812 		{
 16612         {
 17813 			identifier_c param_name("IN");
 16613             identifier_c param_name("IN");
 17814 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16614             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17815 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16615             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17816 			
 16616             
 17817 			/* Get the value from a foo(<param_value>) style call */
 16617             /* Get the value from a foo(<param_value>) style call */
 17818 			if (IN_param_value == NULL)
 16618             if (IN_param_value == NULL)
 17819 			  IN_param_value = function_call_param_iterator.next();
 16619               IN_param_value = function_call_param_iterator.next();
 17820 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16620             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17821 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16621             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17822 			
 16622             
 17823 			if(search_expression_type->is_num_type(IN_type_symbol))
 16623             if(search_expression_type->is_num_type(IN_type_symbol))
 17824 			{
 16624             {
 17825 		
 16625         
 17826 				symbol_c * return_type_symbol = last_type_symbol;
 16626                 symbol_c * return_type_symbol = last_type_symbol;
 17827 				IN_param_value->accept(*this);
 16627                 IN_param_value->accept(*this);
 17828 				return NULL;
 16628                 return NULL;
 17829 				
 16629                 
 17830 			}
 16630             }
 17831 			
 16631             
 17832 			ERROR;
 16632             ERROR;
 17833 		}
 16633         }
 17834 		
 16634         
 17835 	}/*function_move*/
 16635     }/*function_move*/
 17836 	break;
 16636     break;
 17837 
 16637 
 17838 /****
 16638 /****
 17839  *SHL
 16639  *SHL
 17840  */
 16640  */
 17841 	case function_shl :
 16641     case function_shl :
 17842 	{
 16642     {
 17843 		symbol_c *last_type_symbol = NULL;
 16643         symbol_c *last_type_symbol = NULL;
 17844 
 16644 
 17845 		{
 16645         {
 17846 			identifier_c param_name("IN");
 16646             identifier_c param_name("IN");
 17847 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16647             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17848 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17849 			
 16649             
 17850 			/* Get the value from a foo(<param_value>) style call */
 16650             /* Get the value from a foo(<param_value>) style call */
 17851 			if (IN_param_value == NULL)
 16651             if (IN_param_value == NULL)
 17852 			  IN_param_value = function_call_param_iterator.next();
 16652               IN_param_value = function_call_param_iterator.next();
 17853 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17854 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17855 			
 16655             
 17856 			if(search_expression_type->is_binary_type(IN_type_symbol))
 16656             if(search_expression_type->is_binary_type(IN_type_symbol))
 17857 			{
 16657             {
 17858 		
 16658         
 17859 				{
 16659                 {
 17860 					identifier_c param_name("N");
 16660                     identifier_c param_name("N");
 17861 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16661                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17862 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 16662                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 17863 					
 16663                     
 17864 					/* Get the value from a foo(<param_value>) style call */
 16664                     /* Get the value from a foo(<param_value>) style call */
 17865 					if (N_param_value == NULL)
 16665                     if (N_param_value == NULL)
 17866 					  N_param_value = function_call_param_iterator.next();
 16666                       N_param_value = function_call_param_iterator.next();
 17867 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 16667                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 17868 					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 ;
 16668                     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 ;
 17869 					
 16669                     
 17870 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16670                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17871 					{
 16671                     {
 17872 				
 16672                 
 17873 						symbol_c * return_type_symbol = IN_type_symbol;
 16673                         symbol_c * return_type_symbol = IN_type_symbol;
 17874 						IN_param_value->accept(*this);
 16674                         IN_param_value->accept(*this);
 17875 						s4o.print("<<");
 16675                         s4o.print("<<");
 17876 						N_param_value->accept(*this);
 16676                         N_param_value->accept(*this);
 17877 						return NULL;
 16677                         return NULL;
 17878 						
 16678                         
 17879 					}
 16679                     }
 17880 					
 16680                     
 17881 					ERROR;
 16681                     ERROR;
 17882 				}
 16682                 }
 17883 				
 16683                 
 17884 			}
 16684             }
 17885 			
 16685             
 17886 			ERROR;
 16686             ERROR;
 17887 		}
 16687         }
 17888 		
 16688         
 17889 	}/*function_shl*/
 16689     }/*function_shl*/
 17890 	break;
 16690     break;
 17891 
 16691 
 17892 /****
 16692 /****
 17893  *SHR
 16693  *SHR
 17894  */
 16694  */
 17895 	case function_shr :
 16695     case function_shr :
 17896 	{
 16696     {
 17897 		symbol_c *last_type_symbol = NULL;
 16697         symbol_c *last_type_symbol = NULL;
 17898 
 16698 
 17899 		{
 16699         {
 17900 			identifier_c param_name("IN");
 16700             identifier_c param_name("IN");
 17901 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16701             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17902 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16702             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17903 			
 16703             
 17904 			/* Get the value from a foo(<param_value>) style call */
 16704             /* Get the value from a foo(<param_value>) style call */
 17905 			if (IN_param_value == NULL)
 16705             if (IN_param_value == NULL)
 17906 			  IN_param_value = function_call_param_iterator.next();
 16706               IN_param_value = function_call_param_iterator.next();
 17907 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16707             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17908 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16708             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17909 			
 16709             
 17910 			if(search_expression_type->is_binary_type(IN_type_symbol))
 16710             if(search_expression_type->is_binary_type(IN_type_symbol))
 17911 			{
 16711             {
 17912 		
 16712         
 17913 				{
 16713                 {
 17914 					identifier_c param_name("N");
 16714                     identifier_c param_name("N");
 17915 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16715                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17916 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 16716                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 17917 					
 16717                     
 17918 					/* Get the value from a foo(<param_value>) style call */
 16718                     /* Get the value from a foo(<param_value>) style call */
 17919 					if (N_param_value == NULL)
 16719                     if (N_param_value == NULL)
 17920 					  N_param_value = function_call_param_iterator.next();
 16720                       N_param_value = function_call_param_iterator.next();
 17921 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 16721                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 17922 					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 ;
 16722                     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 ;
 17923 					
 16723                     
 17924 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16724                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17925 					{
 16725                     {
 17926 				
 16726                 
 17927 						symbol_c * return_type_symbol = IN_type_symbol;
 16727                         symbol_c * return_type_symbol = IN_type_symbol;
 17928 						IN_param_value->accept(*this);
 16728                         IN_param_value->accept(*this);
 17929 						s4o.print(">>");
 16729                         s4o.print(">>");
 17930 						N_param_value->accept(*this);
 16730                         N_param_value->accept(*this);
 17931 						return NULL;
 16731                         return NULL;
 17932 						
 16732                         
 17933 					}
 16733                     }
 17934 					
 16734                     
 17935 					ERROR;
 16735                     ERROR;
 17936 				}
 16736                 }
 17937 				
 16737                 
 17938 			}
 16738             }
 17939 			
 16739             
 17940 			ERROR;
 16740             ERROR;
 17941 		}
 16741         }
 17942 		
 16742         
 17943 	}/*function_shr*/
 16743     }/*function_shr*/
 17944 	break;
 16744     break;
 17945 
 16745 
 17946 /****
 16746 /****
 17947  *ROR
 16747  *ROR
 17948  */
 16748  */
 17949 	case function_ror :
 16749     case function_ror :
 17950 	{
 16750     {
 17951 		symbol_c *last_type_symbol = NULL;
 16751         symbol_c *last_type_symbol = NULL;
 17952 
 16752 
 17953 		{
 16753         {
 17954 			identifier_c param_name("IN");
 16754             identifier_c param_name("IN");
 17955 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16755             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17956 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17957 			
 16757             
 17958 			/* Get the value from a foo(<param_value>) style call */
 16758             /* Get the value from a foo(<param_value>) style call */
 17959 			if (IN_param_value == NULL)
 16759             if (IN_param_value == NULL)
 17960 			  IN_param_value = function_call_param_iterator.next();
 16760               IN_param_value = function_call_param_iterator.next();
 17961 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17962 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17963 			
 16763             
 17964 			if(search_expression_type->is_binary_type(IN_type_symbol))
 16764             if(search_expression_type->is_binary_type(IN_type_symbol))
 17965 			{
 16765             {
 17966 		
 16766         
 17967 				{
 16767                 {
 17968 					identifier_c param_name("N");
 16768                     identifier_c param_name("N");
 17969 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16769                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17970 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 16770                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 17971 					
 16771                     
 17972 					/* Get the value from a foo(<param_value>) style call */
 16772                     /* Get the value from a foo(<param_value>) style call */
 17973 					if (N_param_value == NULL)
 16773                     if (N_param_value == NULL)
 17974 					  N_param_value = function_call_param_iterator.next();
 16774                       N_param_value = function_call_param_iterator.next();
 17975 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 16775                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 17976 					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 ;
 16776                     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 ;
 17977 					
 16777                     
 17978 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16778                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17979 					{
 16779                     {
 17980 				
 16780                 
 17981 						symbol_c * return_type_symbol = IN_type_symbol;
 16781                         symbol_c * return_type_symbol = IN_type_symbol;
 17982 						s4o.print("__ror(sizeof(");
 16782                         s4o.print("__ror(sizeof(");
 17983 						IN_type_symbol->accept(*this);
 16783                         IN_type_symbol->accept(*this);
 17984 						s4o.print("), &");
 16784                         s4o.print("), &");
 17985 						IN_param_value->accept(*this);
 16785                         IN_param_value->accept(*this);
 17986 						s4o.print(", ");
 16786                         s4o.print(", ");
 17987 						N_param_value->accept(*this);
 16787                         N_param_value->accept(*this);
 17988 						s4o.print(")");
 16788                         s4o.print(")");
 17989 						return NULL;
 16789                         return NULL;
 17990 						
 16790                         
 17991 					}
 16791                     }
 17992 					
 16792                     
 17993 					ERROR;
 16793                     ERROR;
 17994 				}
 16794                 }
 17995 				
 16795                 
 17996 			}
 16796             }
 17997 			
 16797             
 17998 			ERROR;
 16798             ERROR;
 17999 		}
 16799         }
 18000 		
 16800         
 18001 	}/*function_ror*/
 16801     }/*function_ror*/
 18002 	break;
 16802     break;
 18003 
 16803 
 18004 /****
 16804 /****
 18005  *ROL
 16805  *ROL
 18006  */
 16806  */
 18007 	case function_rol :
 16807     case function_rol :
 18008 	{
 16808     {
 18009 		symbol_c *last_type_symbol = NULL;
 16809         symbol_c *last_type_symbol = NULL;
 18010 
 16810 
 18011 		{
 16811         {
 18012 			identifier_c param_name("IN");
 16812             identifier_c param_name("IN");
 18013 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16813             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18014 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 16814             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18015 			
 16815             
 18016 			/* Get the value from a foo(<param_value>) style call */
 16816             /* Get the value from a foo(<param_value>) style call */
 18017 			if (IN_param_value == NULL)
 16817             if (IN_param_value == NULL)
 18018 			  IN_param_value = function_call_param_iterator.next();
 16818               IN_param_value = function_call_param_iterator.next();
 18019 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16819             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18020 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16820             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18021 			
 16821             
 18022 			if(search_expression_type->is_binary_type(IN_type_symbol))
 16822             if(search_expression_type->is_binary_type(IN_type_symbol))
 18023 			{
 16823             {
 18024 		
 16824         
 18025 				{
 16825                 {
 18026 					identifier_c param_name("N");
 16826                     identifier_c param_name("N");
 18027 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16827                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18028 					symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 16828                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
 18029 					
 16829                     
 18030 					/* Get the value from a foo(<param_value>) style call */
 16830                     /* Get the value from a foo(<param_value>) style call */
 18031 					if (N_param_value == NULL)
 16831                     if (N_param_value == NULL)
 18032 					  N_param_value = function_call_param_iterator.next();
 16832                       N_param_value = function_call_param_iterator.next();
 18033 					symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 16833                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 18034 					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 ;
 16834                     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 ;
 18035 					
 16835                     
 18036 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16836                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18037 					{
 16837                     {
 18038 				
 16838                 
 18039 						symbol_c * return_type_symbol = IN_type_symbol;
 16839                         symbol_c * return_type_symbol = IN_type_symbol;
 18040 						s4o.print("__rol(sizeof(");
 16840                         s4o.print("__rol(sizeof(");
 18041 						IN_type_symbol->accept(*this);
 16841                         IN_type_symbol->accept(*this);
 18042 						s4o.print("), &");
 16842                         s4o.print("), &");
 18043 						IN_param_value->accept(*this);
 16843                         IN_param_value->accept(*this);
 18044 						s4o.print(", ");
 16844                         s4o.print(", ");
 18045 						N_param_value->accept(*this);
 16845                         N_param_value->accept(*this);
 18046 						s4o.print(")");
 16846                         s4o.print(")");
 18047 						return NULL;
 16847                         return NULL;
 18048 						
 16848                         
 18049 					}
 16849                     }
 18050 					
 16850                     
 18051 					ERROR;
 16851                     ERROR;
 18052 				}
 16852                 }
 18053 				
 16853                 
 18054 			}
 16854             }
 18055 			
 16855             
 18056 			ERROR;
 16856             ERROR;
 18057 		}
 16857         }
 18058 		
 16858         
 18059 	}/*function_rol*/
 16859     }/*function_rol*/
 18060 	break;
 16860     break;
 18061 
 16861 
 18062 /****
 16862 /****
 18063  *AND
 16863  *AND
 18064  */
 16864  */
 18065 	case function_and :
 16865     case function_and :
 18066 	{
 16866     {
 18067 		symbol_c *last_type_symbol = NULL;
 16867         symbol_c *last_type_symbol = NULL;
 18068 
 16868 
 18069 		{
 16869         {
 18070 			identifier_c param_name("IN1");
 16870             identifier_c param_name("IN1");
 18071 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16871             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18072 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16872             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18073 			
 16873             
 18074 			/* Get the value from a foo(<param_value>) style call */
 16874             /* Get the value from a foo(<param_value>) style call */
 18075 			if (IN1_param_value == NULL)
 16875             if (IN1_param_value == NULL)
 18076 			  IN1_param_value = function_call_param_iterator.next();
 16876               IN1_param_value = function_call_param_iterator.next();
 18077 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16877             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18078 			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 ;
 16878             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 ;
 18079 			
 16879             
 18080 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 16880             if(search_expression_type->is_binary_type(IN1_type_symbol))
 18081 			{
 16881             {
 18082 		
 16882         
 18083 				{
 16883                 {
 18084 					identifier_c param_name("IN2");
 16884                     identifier_c param_name("IN2");
 18085 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16885                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18086 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16886                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18087 					
 16887                     
 18088 					/* Get the value from a foo(<param_value>) style call */
 16888                     /* Get the value from a foo(<param_value>) style call */
 18089 					if (IN2_param_value == NULL)
 16889                     if (IN2_param_value == NULL)
 18090 					  IN2_param_value = function_call_param_iterator.next();
 16890                       IN2_param_value = function_call_param_iterator.next();
 18091 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16891                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18092 					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 ;
 16892                     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 ;
 18093 					
 16893                     
 18094 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 16894                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 18095 					{
 16895                     {
 18096 				
 16896                 
 18097 						symbol_c * return_type_symbol = last_type_symbol;
 16897                         symbol_c * return_type_symbol = last_type_symbol;
 18098 						s4o.print("(");
 16898                         s4o.print("(");
 18099 						if (search_expression_type->is_bool_type(last_type_symbol))
 16899                         if (search_expression_type->is_bool_type(last_type_symbol))
 18100 						  s4o.print("(");
 16900                           s4o.print("(");
 18101 						IN1_param_value->accept(*this);
 16901                         IN1_param_value->accept(*this);
 18102 						s4o.print("&");
 16902                         s4o.print("&");
 18103 						IN2_param_value->accept(*this);
 16903                         IN2_param_value->accept(*this);
 18104 						
 16904                         
 18105 						int base_num = 3;
 16905                         int base_num = 3;
 18106 						symbol_c *param_value = NULL;
 16906                         symbol_c *param_value = NULL;
 18107 						do{
 16907                         do{
 18108 							char my_name[10];
 16908                             char my_name[10];
 18109 							sprintf(my_name, "IN%d", base_num++);
 16909                             sprintf(my_name, "IN%d", base_num++);
 18110 							identifier_c param_name(my_name);
 16910                             identifier_c param_name(my_name);
 18111 							
 16911                             
 18112 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 16912                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18113 							param_value = function_call_param_iterator.search(&param_name);
 16913                             param_value = function_call_param_iterator.search(&param_name);
 18114 							
 16914                             
 18115 							/* Get the value from a foo(<param_value>) style call */
 16915                             /* Get the value from a foo(<param_value>) style call */
 18116 							if (param_value == NULL)
 16916                             if (param_value == NULL)
 18117 							  param_value = function_call_param_iterator.next();
 16917                               param_value = function_call_param_iterator.next();
 18118 							if (param_value != NULL){
 16918                             if (param_value != NULL){
 18119 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16919                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18120 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 16920                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18121 							
 16921                             
 18122 								/*Function specific CODE */
 16922                                 /*Function specific CODE */
 18123 								s4o.print("&");
 16923                                 s4o.print("&");
 18124 								param_value->accept(*this);
 16924                                 param_value->accept(*this);
 18125 								
 16925                                 
 18126 							}
 16926                             }
 18127 							
 16927                             
 18128 						}while(param_value != NULL);
 16928                         }while(param_value != NULL);
 18129 						s4o.print(")");
 16929                         s4o.print(")");
 18130 						if (search_expression_type->is_bool_type(last_type_symbol)) {
 16930                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 18131 						  s4o.print("&1");
 16931                           s4o.print("&1");
 18132 						  s4o.print(")");
 16932                           s4o.print(")");
 18133 						}
 16933                         }
 18134 						s4o.print("");
 16934                         s4o.print("");
 18135 						return NULL;
 16935                         return NULL;
 18136 						
 16936                         
 18137 						
 16937                         
 18138 					}
 16938                     }
 18139 					
 16939                     
 18140 					ERROR;
 16940                     ERROR;
 18141 				}
 16941                 }
 18142 				
 16942                 
 18143 			}
 16943             }
 18144 			
 16944             
 18145 			ERROR;
 16945             ERROR;
 18146 		}
 16946         }
 18147 		
 16947         
 18148 	}/*function_and*/
 16948     }/*function_and*/
 18149 	break;
 16949     break;
 18150 
 16950 
 18151 /****
 16951 /****
 18152  *OR
 16952  *OR
 18153  */
 16953  */
 18154 	case function_or :
 16954     case function_or :
 18155 	{
 16955     {
 18156 		symbol_c *last_type_symbol = NULL;
 16956         symbol_c *last_type_symbol = NULL;
 18157 
 16957 
 18158 		{
 16958         {
 18159 			identifier_c param_name("IN1");
 16959             identifier_c param_name("IN1");
 18160 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 16960             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18161 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 16961             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18162 			
 16962             
 18163 			/* Get the value from a foo(<param_value>) style call */
 16963             /* Get the value from a foo(<param_value>) style call */
 18164 			if (IN1_param_value == NULL)
 16964             if (IN1_param_value == NULL)
 18165 			  IN1_param_value = function_call_param_iterator.next();
 16965               IN1_param_value = function_call_param_iterator.next();
 18166 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16966             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18167 			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 ;
 16967             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 ;
 18168 			
 16968             
 18169 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 16969             if(search_expression_type->is_binary_type(IN1_type_symbol))
 18170 			{
 16970             {
 18171 		
 16971         
 18172 				{
 16972                 {
 18173 					identifier_c param_name("IN2");
 16973                     identifier_c param_name("IN2");
 18174 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 16974                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18175 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 16975                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18176 					
 16976                     
 18177 					/* Get the value from a foo(<param_value>) style call */
 16977                     /* Get the value from a foo(<param_value>) style call */
 18178 					if (IN2_param_value == NULL)
 16978                     if (IN2_param_value == NULL)
 18179 					  IN2_param_value = function_call_param_iterator.next();
 16979                       IN2_param_value = function_call_param_iterator.next();
 18180 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16980                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18181 					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 ;
 16981                     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 ;
 18182 					
 16982                     
 18183 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 16983                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 18184 					{
 16984                     {
 18185 				
 16985                 
 18186 						symbol_c * return_type_symbol = last_type_symbol;
 16986                         symbol_c * return_type_symbol = last_type_symbol;
 18187 						s4o.print("(");
 16987                         s4o.print("(");
 18188 						if (search_expression_type->is_bool_type(last_type_symbol))
 16988                         if (search_expression_type->is_bool_type(last_type_symbol))
 18189 						  s4o.print("(");
 16989                           s4o.print("(");
 18190 						IN1_param_value->accept(*this);
 16990                         IN1_param_value->accept(*this);
 18191 						s4o.print("|");
 16991                         s4o.print("|");
 18192 						IN2_param_value->accept(*this);
 16992                         IN2_param_value->accept(*this);
 18193 						
 16993                         
 18194 						int base_num = 3;
 16994                         int base_num = 3;
 18195 						symbol_c *param_value = NULL;
 16995                         symbol_c *param_value = NULL;
 18196 						do{
 16996                         do{
 18197 							char my_name[10];
 16997                             char my_name[10];
 18198 							sprintf(my_name, "IN%d", base_num++);
 16998                             sprintf(my_name, "IN%d", base_num++);
 18199 							identifier_c param_name(my_name);
 16999                             identifier_c param_name(my_name);
 18200 							
 17000                             
 18201 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17001                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18202 							param_value = function_call_param_iterator.search(&param_name);
 17002                             param_value = function_call_param_iterator.search(&param_name);
 18203 							
 17003                             
 18204 							/* Get the value from a foo(<param_value>) style call */
 17004                             /* Get the value from a foo(<param_value>) style call */
 18205 							if (param_value == NULL)
 17005                             if (param_value == NULL)
 18206 							  param_value = function_call_param_iterator.next();
 17006                               param_value = function_call_param_iterator.next();
 18207 							if (param_value != NULL){
 17007                             if (param_value != NULL){
 18208 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17008                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18209 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17009                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18210 							
 17010                             
 18211 								/*Function specific CODE */
 17011                                 /*Function specific CODE */
 18212 								s4o.print("|");
 17012                                 s4o.print("|");
 18213 								param_value->accept(*this);
 17013                                 param_value->accept(*this);
 18214 								
 17014                                 
 18215 							}
 17015                             }
 18216 							
 17016                             
 18217 						}while(param_value != NULL);
 17017                         }while(param_value != NULL);
 18218 						s4o.print(")");
 17018                         s4o.print(")");
 18219 						if (search_expression_type->is_bool_type(last_type_symbol)) {
 17019                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 18220 						  s4o.print("&1");
 17020                           s4o.print("&1");
 18221 						  s4o.print(")");
 17021                           s4o.print(")");
 18222 						}
 17022                         }
 18223 						s4o.print("");
 17023                         s4o.print("");
 18224 						return NULL;
 17024                         return NULL;
 18225 						
 17025                         
 18226 						
 17026                         
 18227 					}
 17027                     }
 18228 					
 17028                     
 18229 					ERROR;
 17029                     ERROR;
 18230 				}
 17030                 }
 18231 				
 17031                 
 18232 			}
 17032             }
 18233 			
 17033             
 18234 			ERROR;
 17034             ERROR;
 18235 		}
 17035         }
 18236 		
 17036         
 18237 	}/*function_or*/
 17037     }/*function_or*/
 18238 	break;
 17038     break;
 18239 
 17039 
 18240 /****
 17040 /****
 18241  *XOR
 17041  *XOR
 18242  */
 17042  */
 18243 	case function_xor :
 17043     case function_xor :
 18244 	{
 17044     {
 18245 		symbol_c *last_type_symbol = NULL;
 17045         symbol_c *last_type_symbol = NULL;
 18246 
 17046 
 18247 		{
 17047         {
 18248 			identifier_c param_name("IN1");
 17048             identifier_c param_name("IN1");
 18249 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17049             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18250 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17050             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18251 			
 17051             
 18252 			/* Get the value from a foo(<param_value>) style call */
 17052             /* Get the value from a foo(<param_value>) style call */
 18253 			if (IN1_param_value == NULL)
 17053             if (IN1_param_value == NULL)
 18254 			  IN1_param_value = function_call_param_iterator.next();
 17054               IN1_param_value = function_call_param_iterator.next();
 18255 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17055             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18256 			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 ;
 17056             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 ;
 18257 			
 17057             
 18258 			if(search_expression_type->is_binary_type(IN1_type_symbol))
 17058             if(search_expression_type->is_binary_type(IN1_type_symbol))
 18259 			{
 17059             {
 18260 		
 17060         
 18261 				{
 17061                 {
 18262 					identifier_c param_name("IN2");
 17062                     identifier_c param_name("IN2");
 18263 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17063                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18264 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17064                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18265 					
 17065                     
 18266 					/* Get the value from a foo(<param_value>) style call */
 17066                     /* Get the value from a foo(<param_value>) style call */
 18267 					if (IN2_param_value == NULL)
 17067                     if (IN2_param_value == NULL)
 18268 					  IN2_param_value = function_call_param_iterator.next();
 17068                       IN2_param_value = function_call_param_iterator.next();
 18269 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17069                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18270 					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 ;
 17070                     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 ;
 18271 					
 17071                     
 18272 					if(search_expression_type->is_binary_type(IN2_type_symbol))
 17072                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 18273 					{
 17073                     {
 18274 				
 17074                 
 18275 						symbol_c * return_type_symbol = last_type_symbol;
 17075                         symbol_c * return_type_symbol = last_type_symbol;
 18276 						s4o.print("(");
 17076                         s4o.print("(");
 18277 						if (search_expression_type->is_bool_type(last_type_symbol))
 17077                         if (search_expression_type->is_bool_type(last_type_symbol))
 18278 						  s4o.print("(");
 17078                           s4o.print("(");
 18279 						IN1_param_value->accept(*this);
 17079                         IN1_param_value->accept(*this);
 18280 						s4o.print("^");
 17080                         s4o.print("^");
 18281 						IN2_param_value->accept(*this);
 17081                         IN2_param_value->accept(*this);
 18282 						
 17082                         
 18283 						int base_num = 3;
 17083                         int base_num = 3;
 18284 						symbol_c *param_value = NULL;
 17084                         symbol_c *param_value = NULL;
 18285 						do{
 17085                         do{
 18286 							char my_name[10];
 17086                             char my_name[10];
 18287 							sprintf(my_name, "IN%d", base_num++);
 17087                             sprintf(my_name, "IN%d", base_num++);
 18288 							identifier_c param_name(my_name);
 17088                             identifier_c param_name(my_name);
 18289 							
 17089                             
 18290 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17090                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18291 							param_value = function_call_param_iterator.search(&param_name);
 17091                             param_value = function_call_param_iterator.search(&param_name);
 18292 							
 17092                             
 18293 							/* Get the value from a foo(<param_value>) style call */
 17093                             /* Get the value from a foo(<param_value>) style call */
 18294 							if (param_value == NULL)
 17094                             if (param_value == NULL)
 18295 							  param_value = function_call_param_iterator.next();
 17095                               param_value = function_call_param_iterator.next();
 18296 							if (param_value != NULL){
 17096                             if (param_value != NULL){
 18297 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17097                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18298 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17098                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18299 							
 17099                             
 18300 								/*Function specific CODE */
 17100                                 /*Function specific CODE */
 18301 								s4o.print("^");
 17101                                 s4o.print("^");
 18302 								param_value->accept(*this);
 17102                                 param_value->accept(*this);
 18303 								
 17103                                 
 18304 							}
 17104                             }
 18305 							
 17105                             
 18306 						}while(param_value != NULL);
 17106                         }while(param_value != NULL);
 18307 						s4o.print(")");
 17107                         s4o.print(")");
 18308 						if (search_expression_type->is_bool_type(last_type_symbol)) {
 17108                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 18309 						  s4o.print("&1");
 17109                           s4o.print("&1");
 18310 						  s4o.print(")");
 17110                           s4o.print(")");
 18311 						}
 17111                         }
 18312 						s4o.print("");
 17112                         s4o.print("");
 18313 						return NULL;
 17113                         return NULL;
 18314 						
 17114                         
 18315 						
 17115                         
 18316 					}
 17116                     }
 18317 					
 17117                     
 18318 					ERROR;
 17118                     ERROR;
 18319 				}
 17119                 }
 18320 				
 17120                 
 18321 			}
 17121             }
 18322 			
 17122             
 18323 			ERROR;
 17123             ERROR;
 18324 		}
 17124         }
 18325 		
 17125         
 18326 	}/*function_xor*/
 17126     }/*function_xor*/
 18327 	break;
 17127     break;
 18328 
 17128 
 18329 /****
 17129 /****
 18330  *NOT
 17130  *NOT
 18331  */
 17131  */
 18332 	case function_not :
 17132     case function_not :
 18333 	{
 17133     {
 18334 		symbol_c *last_type_symbol = NULL;
 17134         symbol_c *last_type_symbol = NULL;
 18335 
 17135 
 18336 		{
 17136         {
 18337 			identifier_c param_name("IN");
 17137             identifier_c param_name("IN");
 18338 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17138             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18339 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17139             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18340 			
 17140             
 18341 			/* Get the value from a foo(<param_value>) style call */
 17141             /* Get the value from a foo(<param_value>) style call */
 18342 			if (IN_param_value == NULL)
 17142             if (IN_param_value == NULL)
 18343 			  IN_param_value = function_call_param_iterator.next();
 17143               IN_param_value = function_call_param_iterator.next();
 18344 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17144             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18345 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17145             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18346 			
 17146             
 18347 			if(search_expression_type->is_binary_type(IN_type_symbol))
 17147             if(search_expression_type->is_binary_type(IN_type_symbol))
 18348 			{
 17148             {
 18349 		
 17149         
 18350 				symbol_c * return_type_symbol = IN_type_symbol;
 17150                 symbol_c * return_type_symbol = IN_type_symbol;
 18351 				s4o.print("~");
 17151                 s4o.print("~");
 18352 				IN_param_value->accept(*this);
 17152                 IN_param_value->accept(*this);
 18353 				return NULL;
 17153                 return NULL;
 18354 				
 17154                 
 18355 			}
 17155             }
 18356 			
 17156             
 18357 			ERROR;
 17157             ERROR;
 18358 		}
 17158         }
 18359 		
 17159         
 18360 	}/*function_not*/
 17160     }/*function_not*/
 18361 	break;
 17161     break;
 18362 
 17162 
 18363 /****
 17163 /****
 18364  *SEL
 17164  *SEL
 18365  */
 17165  */
 18366 	case function_sel :
 17166     case function_sel :
 18367 	{
 17167     {
 18368 		symbol_c *last_type_symbol = NULL;
 17168         symbol_c *last_type_symbol = NULL;
 18369 
 17169 
 18370 		{
 17170         {
 18371 			identifier_c param_name("G");
 17171             identifier_c param_name("G");
 18372 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17172             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18373 			symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
 17173             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
 18374 			
 17174             
 18375 			/* Get the value from a foo(<param_value>) style call */
 17175             /* Get the value from a foo(<param_value>) style call */
 18376 			if (G_param_value == NULL)
 17176             if (G_param_value == NULL)
 18377 			  G_param_value = function_call_param_iterator.next();
 17177               G_param_value = function_call_param_iterator.next();
 18378 			symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 17178             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 18379 			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 ;
 17179             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 ;
 18380 			
 17180             
 18381 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 17181             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 18382 			{
 17182             {
 18383 		
 17183         
 18384 				{
 17184                 {
 18385 					identifier_c param_name("IN0");
 17185                     identifier_c param_name("IN0");
 18386 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17186                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18387 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 17187                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 18388 					
 17188                     
 18389 					/* Get the value from a foo(<param_value>) style call */
 17189                     /* Get the value from a foo(<param_value>) style call */
 18390 					if (IN0_param_value == NULL)
 17190                     if (IN0_param_value == NULL)
 18391 					  IN0_param_value = function_call_param_iterator.next();
 17191                       IN0_param_value = function_call_param_iterator.next();
 18392 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 17192                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 18393 					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 ;
 17193                     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 ;
 18394 					
 17194                     
 18395 					
 17195                     
 18396 					{
 17196                     {
 18397 				
 17197                 
 18398 						{
 17198                         {
 18399 							identifier_c param_name("IN1");
 17199                             identifier_c param_name("IN1");
 18400 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17200                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18401 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17201                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18402 							
 17202                             
 18403 							/* Get the value from a foo(<param_value>) style call */
 17203                             /* Get the value from a foo(<param_value>) style call */
 18404 							if (IN1_param_value == NULL)
 17204                             if (IN1_param_value == NULL)
 18405 							  IN1_param_value = function_call_param_iterator.next();
 17205                               IN1_param_value = function_call_param_iterator.next();
 18406 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17206                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18407 							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 ;
 17207                             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 ;
 18408 							
 17208                             
 18409 							
 17209                             
 18410 							{
 17210                             {
 18411 						
 17211                         
 18412 								symbol_c * return_type_symbol = last_type_symbol;
 17212                                 symbol_c * return_type_symbol = last_type_symbol;
 18413 								G_param_value->accept(*this);
 17213                                 G_param_value->accept(*this);
 18414 								s4o.print(" ? ");
 17214                                 s4o.print(" ? ");
 18415 								IN1_param_value->accept(*this);
 17215                                 IN1_param_value->accept(*this);
 18416 								s4o.print(" :  ");
 17216                                 s4o.print(" :  ");
 18417 								IN0_param_value->accept(*this);
 17217                                 IN0_param_value->accept(*this);
 18418 								return NULL;
 17218                                 return NULL;
 18419 								
 17219                                 
 18420 							}
 17220                             }
 18421 							
 17221                             
 18422 							ERROR;
 17222                             ERROR;
 18423 						}
 17223                         }
 18424 						
 17224                         
 18425 					}
 17225                     }
 18426 					
 17226                     
 18427 					ERROR;
 17227                     ERROR;
 18428 				}
 17228                 }
 18429 				
 17229                 
 18430 			}
 17230             }
 18431 			
 17231             
 18432 			ERROR;
 17232             ERROR;
 18433 		}
 17233         }
 18434 		
 17234         
 18435 	}/*function_sel*/
 17235     }/*function_sel*/
 18436 	break;
 17236     break;
 18437 
 17237 
 18438 /****
 17238 /****
 18439  *MAX
 17239  *MAX
 18440  */
 17240  */
 18441 	case function_max :
 17241     case function_max :
 18442 	{
 17242     {
 18443 		symbol_c *last_type_symbol = NULL;
 17243         symbol_c *last_type_symbol = NULL;
 18444 
 17244 
 18445 		{
 17245         {
 18446 			identifier_c param_name("IN1");
 17246             identifier_c param_name("IN1");
 18447 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17247             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18448 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17248             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18449 			
 17249             
 18450 			/* Get the value from a foo(<param_value>) style call */
 17250             /* Get the value from a foo(<param_value>) style call */
 18451 			if (IN1_param_value == NULL)
 17251             if (IN1_param_value == NULL)
 18452 			  IN1_param_value = function_call_param_iterator.next();
 17252               IN1_param_value = function_call_param_iterator.next();
 18453 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17253             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18454 			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 ;
 17254             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 ;
 18455 			
 17255             
 18456 			
 17256             
 18457 			{
 17257             {
 18458 		
 17258         
 18459 				{
 17259                 {
 18460 					identifier_c param_name("IN2");
 17260                     identifier_c param_name("IN2");
 18461 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17261                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18462 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17262                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18463 					
 17263                     
 18464 					/* Get the value from a foo(<param_value>) style call */
 17264                     /* Get the value from a foo(<param_value>) style call */
 18465 					if (IN2_param_value == NULL)
 17265                     if (IN2_param_value == NULL)
 18466 					  IN2_param_value = function_call_param_iterator.next();
 17266                       IN2_param_value = function_call_param_iterator.next();
 18467 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17267                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18468 					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 ;
 17268                     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 ;
 18469 					
 17269                     
 18470 					
 17270                     
 18471 					{
 17271                     {
 18472 				
 17272                 
 18473 						symbol_c * return_type_symbol = last_type_symbol;
 17273                         symbol_c * return_type_symbol = last_type_symbol;
 18474 						s4o.print("__max_");
 17274                         s4o.print("__max_");
 18475 						return_type_symbol->accept(*this);
 17275                         return_type_symbol->accept(*this);
 18476 						s4o.print("(");
 17276                         s4o.print("(");
 18477 						s4o.print_integer(nb_param);
 17277                         s4o.print_integer(nb_param);
 18478 						s4o.print(",");
 17278                         s4o.print(",");
 18479 						IN1_param_value->accept(*this);
 17279                         IN1_param_value->accept(*this);
 18480 						s4o.print(",");
 17280                         s4o.print(",");
 18481 						IN2_param_value->accept(*this);
 17281                         IN2_param_value->accept(*this);
 18482 						
 17282                         
 18483 						int base_num = 3;
 17283                         int base_num = 3;
 18484 						symbol_c *param_value = NULL;
 17284                         symbol_c *param_value = NULL;
 18485 						do{
 17285                         do{
 18486 							char my_name[10];
 17286                             char my_name[10];
 18487 							sprintf(my_name, "IN%d", base_num++);
 17287                             sprintf(my_name, "IN%d", base_num++);
 18488 							identifier_c param_name(my_name);
 17288                             identifier_c param_name(my_name);
 18489 							
 17289                             
 18490 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17290                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18491 							param_value = function_call_param_iterator.search(&param_name);
 17291                             param_value = function_call_param_iterator.search(&param_name);
 18492 							
 17292                             
 18493 							/* Get the value from a foo(<param_value>) style call */
 17293                             /* Get the value from a foo(<param_value>) style call */
 18494 							if (param_value == NULL)
 17294                             if (param_value == NULL)
 18495 							  param_value = function_call_param_iterator.next();
 17295                               param_value = function_call_param_iterator.next();
 18496 							if (param_value != NULL){
 17296                             if (param_value != NULL){
 18497 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17297                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18498 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17298                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18499 							
 17299                             
 18500 								/*Function specific CODE */
 17300                                 /*Function specific CODE */
 18501 								s4o.print(",");
 17301                                 s4o.print(",");
 18502 								param_value->accept(*this);
 17302                                 param_value->accept(*this);
 18503 								
 17303                                 
 18504 							}
 17304                             }
 18505 							
 17305                             
 18506 						}while(param_value != NULL);
 17306                         }while(param_value != NULL);
 18507 						s4o.print(")");
 17307                         s4o.print(")");
 18508 						return NULL;
 17308                         return NULL;
 18509 						
 17309                         
 18510 						
 17310                         
 18511 					}
 17311                     }
 18512 					
 17312                     
 18513 					ERROR;
 17313                     ERROR;
 18514 				}
 17314                 }
 18515 				
 17315                 
 18516 			}
 17316             }
 18517 			
 17317             
 18518 			ERROR;
 17318             ERROR;
 18519 		}
 17319         }
 18520 		
 17320         
 18521 	}/*function_max*/
 17321     }/*function_max*/
 18522 	break;
 17322     break;
 18523 
 17323 
 18524 /****
 17324 /****
 18525  *MIN
 17325  *MIN
 18526  */
 17326  */
 18527 	case function_min :
 17327     case function_min :
 18528 	{
 17328     {
 18529 		symbol_c *last_type_symbol = NULL;
 17329         symbol_c *last_type_symbol = NULL;
 18530 
 17330 
 18531 		{
 17331         {
 18532 			identifier_c param_name("IN1");
 17332             identifier_c param_name("IN1");
 18533 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17333             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18534 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17334             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18535 			
 17335             
 18536 			/* Get the value from a foo(<param_value>) style call */
 17336             /* Get the value from a foo(<param_value>) style call */
 18537 			if (IN1_param_value == NULL)
 17337             if (IN1_param_value == NULL)
 18538 			  IN1_param_value = function_call_param_iterator.next();
 17338               IN1_param_value = function_call_param_iterator.next();
 18539 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17339             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18540 			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 ;
 17340             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 ;
 18541 			
 17341             
 18542 			
 17342             
 18543 			{
 17343             {
 18544 		
 17344         
 18545 				{
 17345                 {
 18546 					identifier_c param_name("IN2");
 17346                     identifier_c param_name("IN2");
 18547 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17347                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18548 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17348                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18549 					
 17349                     
 18550 					/* Get the value from a foo(<param_value>) style call */
 17350                     /* Get the value from a foo(<param_value>) style call */
 18551 					if (IN2_param_value == NULL)
 17351                     if (IN2_param_value == NULL)
 18552 					  IN2_param_value = function_call_param_iterator.next();
 17352                       IN2_param_value = function_call_param_iterator.next();
 18553 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17353                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18554 					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 ;
 17354                     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 ;
 18555 					
 17355                     
 18556 					
 17356                     
 18557 					{
 17357                     {
 18558 				
 17358                 
 18559 						symbol_c * return_type_symbol = last_type_symbol;
 17359                         symbol_c * return_type_symbol = last_type_symbol;
 18560 						s4o.print("__min_");
 17360                         s4o.print("__min_");
 18561 						return_type_symbol->accept(*this);
 17361                         return_type_symbol->accept(*this);
 18562 						s4o.print("(");
 17362                         s4o.print("(");
 18563 						s4o.print_integer(nb_param);
 17363                         s4o.print_integer(nb_param);
 18564 						s4o.print(",");
 17364                         s4o.print(",");
 18565 						IN1_param_value->accept(*this);
 17365                         IN1_param_value->accept(*this);
 18566 						s4o.print(",");
 17366                         s4o.print(",");
 18567 						IN2_param_value->accept(*this);
 17367                         IN2_param_value->accept(*this);
 18568 						
 17368                         
 18569 						int base_num = 3;
 17369                         int base_num = 3;
 18570 						symbol_c *param_value = NULL;
 17370                         symbol_c *param_value = NULL;
 18571 						do{
 17371                         do{
 18572 							char my_name[10];
 17372                             char my_name[10];
 18573 							sprintf(my_name, "IN%d", base_num++);
 17373                             sprintf(my_name, "IN%d", base_num++);
 18574 							identifier_c param_name(my_name);
 17374                             identifier_c param_name(my_name);
 18575 							
 17375                             
 18576 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17376                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18577 							param_value = function_call_param_iterator.search(&param_name);
 17377                             param_value = function_call_param_iterator.search(&param_name);
 18578 							
 17378                             
 18579 							/* Get the value from a foo(<param_value>) style call */
 17379                             /* Get the value from a foo(<param_value>) style call */
 18580 							if (param_value == NULL)
 17380                             if (param_value == NULL)
 18581 							  param_value = function_call_param_iterator.next();
 17381                               param_value = function_call_param_iterator.next();
 18582 							if (param_value != NULL){
 17382                             if (param_value != NULL){
 18583 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17383                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18584 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17384                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18585 							
 17385                             
 18586 								/*Function specific CODE */
 17386                                 /*Function specific CODE */
 18587 								s4o.print(",");
 17387                                 s4o.print(",");
 18588 								param_value->accept(*this);
 17388                                 param_value->accept(*this);
 18589 								
 17389                                 
 18590 							}
 17390                             }
 18591 							
 17391                             
 18592 						}while(param_value != NULL);
 17392                         }while(param_value != NULL);
 18593 						s4o.print(")");
 17393                         s4o.print(")");
 18594 						return NULL;
 17394                         return NULL;
 18595 						
 17395                         
 18596 						
 17396                         
 18597 					}
 17397                     }
 18598 					
 17398                     
 18599 					ERROR;
 17399                     ERROR;
 18600 				}
 17400                 }
 18601 				
 17401                 
 18602 			}
 17402             }
 18603 			
 17403             
 18604 			ERROR;
 17404             ERROR;
 18605 		}
 17405         }
 18606 		
 17406         
 18607 	}/*function_min*/
 17407     }/*function_min*/
 18608 	break;
 17408     break;
 18609 
 17409 
 18610 /****
 17410 /****
 18611  *LIMIT
 17411  *LIMIT
 18612  */
 17412  */
 18613 	case function_limit :
 17413     case function_limit :
 18614 	{
 17414     {
 18615 		symbol_c *last_type_symbol = NULL;
 17415         symbol_c *last_type_symbol = NULL;
 18616 
 17416 
 18617 		{
 17417         {
 18618 			identifier_c param_name("MN");
 17418             identifier_c param_name("MN");
 18619 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17419             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18620 			symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
 17420             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
 18621 			
 17421             
 18622 			/* Get the value from a foo(<param_value>) style call */
 17422             /* Get the value from a foo(<param_value>) style call */
 18623 			if (MN_param_value == NULL)
 17423             if (MN_param_value == NULL)
 18624 			  MN_param_value = function_call_param_iterator.next();
 17424               MN_param_value = function_call_param_iterator.next();
 18625 			symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
 17425             symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
 18626 			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 ;
 17426             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 ;
 18627 			
 17427             
 18628 			
 17428             
 18629 			{
 17429             {
 18630 		
 17430         
 18631 				{
 17431                 {
 18632 					identifier_c param_name("IN");
 17432                     identifier_c param_name("IN");
 18633 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17433                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18634 					symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 17434                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18635 					
 17435                     
 18636 					/* Get the value from a foo(<param_value>) style call */
 17436                     /* Get the value from a foo(<param_value>) style call */
 18637 					if (IN_param_value == NULL)
 17437                     if (IN_param_value == NULL)
 18638 					  IN_param_value = function_call_param_iterator.next();
 17438                       IN_param_value = function_call_param_iterator.next();
 18639 					symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 17439                     symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18640 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 17440                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18641 					
 17441                     
 18642 					
 17442                     
 18643 					{
 17443                     {
 18644 				
 17444                 
 18645 						{
 17445                         {
 18646 							identifier_c param_name("MX");
 17446                             identifier_c param_name("MX");
 18647 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17447                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18648 							symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
 17448                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
 18649 							
 17449                             
 18650 							/* Get the value from a foo(<param_value>) style call */
 17450                             /* Get the value from a foo(<param_value>) style call */
 18651 							if (MX_param_value == NULL)
 17451                             if (MX_param_value == NULL)
 18652 							  MX_param_value = function_call_param_iterator.next();
 17452                               MX_param_value = function_call_param_iterator.next();
 18653 							symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
 17453                             symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
 18654 							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 ;
 17454                             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 ;
 18655 							
 17455                             
 18656 							
 17456                             
 18657 							{
 17457                             {
 18658 						
 17458                         
 18659 								symbol_c * return_type_symbol = IN_type_symbol;
 17459                                 symbol_c * return_type_symbol = IN_type_symbol;
 18660 								s4o.print("__limit_");
 17460                                 s4o.print("__limit_");
 18661 								IN_type_symbol->accept(*this);
 17461                                 IN_type_symbol->accept(*this);
 18662 								s4o.print("(");
 17462                                 s4o.print("(");
 18663 								MN_param_value->accept(*this);
 17463                                 MN_param_value->accept(*this);
 18664 								s4o.print(", ");
 17464                                 s4o.print(", ");
 18665 								IN_param_value->accept(*this);
 17465                                 IN_param_value->accept(*this);
 18666 								s4o.print(", ");
 17466                                 s4o.print(", ");
 18667 								MX_param_value->accept(*this);
 17467                                 MX_param_value->accept(*this);
 18668 								s4o.print(")");
 17468                                 s4o.print(")");
 18669 								return NULL;
 17469                                 return NULL;
 18670 								
 17470                                 
 18671 							}
 17471                             }
 18672 							
 17472                             
 18673 							ERROR;
 17473                             ERROR;
 18674 						}
 17474                         }
 18675 						
 17475                         
 18676 					}
 17476                     }
 18677 					
 17477                     
 18678 					ERROR;
 17478                     ERROR;
 18679 				}
 17479                 }
 18680 				
 17480                 
 18681 			}
 17481             }
 18682 			
 17482             
 18683 			ERROR;
 17483             ERROR;
 18684 		}
 17484         }
 18685 		
 17485         
 18686 	}/*function_limit*/
 17486     }/*function_limit*/
 18687 	break;
 17487     break;
 18688 
 17488 
 18689 /****
 17489 /****
 18690  *MUX
 17490  *MUX
 18691  */
 17491  */
 18692 	case function_mux :
 17492     case function_mux :
 18693 	{
 17493     {
 18694 		symbol_c *last_type_symbol = NULL;
 17494         symbol_c *last_type_symbol = NULL;
 18695 
 17495 
 18696 		{
 17496         {
 18697 			identifier_c param_name("K");
 17497             identifier_c param_name("K");
 18698 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17498             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18699 			symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
 17499             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
 18700 			
 17500             
 18701 			/* Get the value from a foo(<param_value>) style call */
 17501             /* Get the value from a foo(<param_value>) style call */
 18702 			if (K_param_value == NULL)
 17502             if (K_param_value == NULL)
 18703 			  K_param_value = function_call_param_iterator.next();
 17503               K_param_value = function_call_param_iterator.next();
 18704 			symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
 17504             symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
 18705 			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 ;
 17505             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 ;
 18706 			
 17506             
 18707 			if(search_expression_type->is_integer_type(K_type_symbol))
 17507             if(search_expression_type->is_integer_type(K_type_symbol))
 18708 			{
 17508             {
 18709 		
 17509         
 18710 				{
 17510                 {
 18711 					identifier_c param_name("IN0");
 17511                     identifier_c param_name("IN0");
 18712 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17512                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18713 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 17513                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
 18714 					
 17514                     
 18715 					/* Get the value from a foo(<param_value>) style call */
 17515                     /* Get the value from a foo(<param_value>) style call */
 18716 					if (IN0_param_value == NULL)
 17516                     if (IN0_param_value == NULL)
 18717 					  IN0_param_value = function_call_param_iterator.next();
 17517                       IN0_param_value = function_call_param_iterator.next();
 18718 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 17518                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
 18719 					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 ;
 17519                     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 ;
 18720 					
 17520                     
 18721 					
 17521                     
 18722 					{
 17522                     {
 18723 				
 17523                 
 18724 						{
 17524                         {
 18725 							identifier_c param_name("IN1");
 17525                             identifier_c param_name("IN1");
 18726 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17526                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18727 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17527                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18728 							
 17528                             
 18729 							/* Get the value from a foo(<param_value>) style call */
 17529                             /* Get the value from a foo(<param_value>) style call */
 18730 							if (IN1_param_value == NULL)
 17530                             if (IN1_param_value == NULL)
 18731 							  IN1_param_value = function_call_param_iterator.next();
 17531                               IN1_param_value = function_call_param_iterator.next();
 18732 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17532                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18733 							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 ;
 17533                             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 ;
 18734 							
 17534                             
 18735 							
 17535                             
 18736 							{
 17536                             {
 18737 						
 17537                         
 18738 								symbol_c * return_type_symbol = last_type_symbol;
 17538                                 symbol_c * return_type_symbol = last_type_symbol;
 18739 								s4o.print("__mux_");
 17539                                 s4o.print("__mux_");
 18740 								return_type_symbol->accept(*this);
 17540                                 return_type_symbol->accept(*this);
 18741 								s4o.print("(");
 17541                                 s4o.print("(");
 18742 								s4o.print_integer(nb_param);
 17542                                 s4o.print_integer(nb_param);
 18743 								s4o.print(",");
 17543                                 s4o.print(",");
 18744 								K_param_value->accept(*this);
 17544                                 K_param_value->accept(*this);
 18745 								s4o.print(",");
 17545                                 s4o.print(",");
 18746 								IN0_param_value->accept(*this);
 17546                                 IN0_param_value->accept(*this);
 18747 								s4o.print(",");
 17547                                 s4o.print(",");
 18748 								IN1_param_value->accept(*this);
 17548                                 IN1_param_value->accept(*this);
 18749 								
 17549                                 
 18750 								int base_num = 2;
 17550                                 int base_num = 2;
 18751 								symbol_c *param_value = NULL;
 17551                                 symbol_c *param_value = NULL;
 18752 								do{
 17552                                 do{
 18753 									char my_name[10];
 17553                                     char my_name[10];
 18754 									sprintf(my_name, "IN%d", base_num++);
 17554                                     sprintf(my_name, "IN%d", base_num++);
 18755 									identifier_c param_name(my_name);
 17555                                     identifier_c param_name(my_name);
 18756 									
 17556                                     
 18757 									/* Get the value from a foo(<param_name> = <param_value>) style call */
 17557                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18758 									param_value = function_call_param_iterator.search(&param_name);
 17558                                     param_value = function_call_param_iterator.search(&param_name);
 18759 									
 17559                                     
 18760 									/* Get the value from a foo(<param_value>) style call */
 17560                                     /* Get the value from a foo(<param_value>) style call */
 18761 									if (param_value == NULL)
 17561                                     if (param_value == NULL)
 18762 									  param_value = function_call_param_iterator.next();
 17562                                       param_value = function_call_param_iterator.next();
 18763 									if (param_value != NULL){
 17563                                     if (param_value != NULL){
 18764 										symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17564                                         symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18765 										last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17565                                         last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18766 									
 17566                                     
 18767 										/*Function specific CODE */
 17567                                         /*Function specific CODE */
 18768 										s4o.print(",");
 17568                                         s4o.print(",");
 18769 										param_value->accept(*this);
 17569                                         param_value->accept(*this);
 18770 										
 17570                                         
 18771 									}
 17571                                     }
 18772 									
 17572                                     
 18773 								}while(param_value != NULL);
 17573                                 }while(param_value != NULL);
 18774 								s4o.print(")");
 17574                                 s4o.print(")");
 18775 								return NULL;
 17575                                 return NULL;
 18776 								
 17576                                 
 18777 								
 17577                                 
 18778 							}
 17578                             }
 18779 							
 17579                             
 18780 							ERROR;
 17580                             ERROR;
 18781 						}
 17581                         }
 18782 						
 17582                         
 18783 					}
 17583                     }
 18784 					
 17584                     
 18785 					ERROR;
 17585                     ERROR;
 18786 				}
 17586                 }
 18787 				
 17587                 
 18788 			}
 17588             }
 18789 			
 17589             
 18790 			ERROR;
 17590             ERROR;
 18791 		}
 17591         }
 18792 		
 17592         
 18793 	}/*function_mux*/
 17593     }/*function_mux*/
 18794 	break;
 17594     break;
 18795 
 17595 
 18796 /****
 17596 /****
 18797  *GT
 17597  *GT
 18798  */
 17598  */
 18799 	case function_gt :
 17599     case function_gt :
 18800 	{
 17600     {
 18801 		symbol_c *last_type_symbol = NULL;
 17601         symbol_c *last_type_symbol = NULL;
 18802 
 17602 
 18803 		{
 17603         {
 18804 			identifier_c param_name("IN1");
 17604             identifier_c param_name("IN1");
 18805 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17605             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18806 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17606             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18807 			
 17607             
 18808 			/* Get the value from a foo(<param_value>) style call */
 17608             /* Get the value from a foo(<param_value>) style call */
 18809 			if (IN1_param_value == NULL)
 17609             if (IN1_param_value == NULL)
 18810 			  IN1_param_value = function_call_param_iterator.next();
 17610               IN1_param_value = function_call_param_iterator.next();
 18811 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17611             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18812 			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 ;
 17612             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 ;
 18813 			
 17613             
 18814 			
 17614             
 18815 			{
 17615             {
 18816 		
 17616         
 18817 				{
 17617                 {
 18818 					identifier_c param_name("IN2");
 17618                     identifier_c param_name("IN2");
 18819 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17619                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18820 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17620                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18821 					
 17621                     
 18822 					/* Get the value from a foo(<param_value>) style call */
 17622                     /* Get the value from a foo(<param_value>) style call */
 18823 					if (IN2_param_value == NULL)
 17623                     if (IN2_param_value == NULL)
 18824 					  IN2_param_value = function_call_param_iterator.next();
 17624                       IN2_param_value = function_call_param_iterator.next();
 18825 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17625                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18826 					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 ;
 17626                     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 ;
 18827 					
 17627                     
 18828 					
 17628                     
 18829 					{
 17629                     {
 18830 				
 17630                 
 18831 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17631                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18832 						s4o.print("__gt_");
 17632                         s4o.print("__gt_");
 18833 						return_type_symbol->accept(*this);
 17633                         return_type_symbol->accept(*this);
 18834 						s4o.print("(");
 17634                         s4o.print("(");
 18835 						s4o.print_integer(nb_param);
 17635                         s4o.print_integer(nb_param);
 18836 						s4o.print(",");
 17636                         s4o.print(",");
 18837 						IN1_param_value->accept(*this);
 17637                         IN1_param_value->accept(*this);
 18838 						s4o.print(",");
 17638                         s4o.print(",");
 18839 						IN2_param_value->accept(*this);
 17639                         IN2_param_value->accept(*this);
 18840 						
 17640                         
 18841 						int base_num = 3;
 17641                         int base_num = 3;
 18842 						symbol_c *param_value = NULL;
 17642                         symbol_c *param_value = NULL;
 18843 						do{
 17643                         do{
 18844 							char my_name[10];
 17644                             char my_name[10];
 18845 							sprintf(my_name, "IN%d", base_num++);
 17645                             sprintf(my_name, "IN%d", base_num++);
 18846 							identifier_c param_name(my_name);
 17646                             identifier_c param_name(my_name);
 18847 							
 17647                             
 18848 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17648                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18849 							param_value = function_call_param_iterator.search(&param_name);
 17649                             param_value = function_call_param_iterator.search(&param_name);
 18850 							
 17650                             
 18851 							/* Get the value from a foo(<param_value>) style call */
 17651                             /* Get the value from a foo(<param_value>) style call */
 18852 							if (param_value == NULL)
 17652                             if (param_value == NULL)
 18853 							  param_value = function_call_param_iterator.next();
 17653                               param_value = function_call_param_iterator.next();
 18854 							if (param_value != NULL){
 17654                             if (param_value != NULL){
 18855 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17655                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18856 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17656                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18857 							
 17657                             
 18858 								/*Function specific CODE */
 17658                                 /*Function specific CODE */
 18859 								s4o.print(",");
 17659                                 s4o.print(",");
 18860 								param_value->accept(*this);
 17660                                 param_value->accept(*this);
 18861 								
 17661                                 
 18862 							}
 17662                             }
 18863 							
 17663                             
 18864 						}while(param_value != NULL);
 17664                         }while(param_value != NULL);
 18865 						s4o.print(")");
 17665                         s4o.print(")");
 18866 						return NULL;
 17666                         return NULL;
 18867 						
 17667                         
 18868 						
 17668                         
 18869 					}
 17669                     }
 18870 					
 17670                     
 18871 					ERROR;
 17671                     ERROR;
 18872 				}
 17672                 }
 18873 				
 17673                 
 18874 			}
 17674             }
 18875 			
 17675             
 18876 			ERROR;
 17676             ERROR;
 18877 		}
 17677         }
 18878 		
 17678         
 18879 	}/*function_gt*/
 17679     }/*function_gt*/
 18880 	break;
 17680     break;
 18881 
 17681 
 18882 /****
 17682 /****
 18883  *GE
 17683  *GE
 18884  */
 17684  */
 18885 	case function_ge :
 17685     case function_ge :
 18886 	{
 17686     {
 18887 		symbol_c *last_type_symbol = NULL;
 17687         symbol_c *last_type_symbol = NULL;
 18888 
 17688 
 18889 		{
 17689         {
 18890 			identifier_c param_name("IN1");
 17690             identifier_c param_name("IN1");
 18891 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17691             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18892 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17692             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18893 			
 17693             
 18894 			/* Get the value from a foo(<param_value>) style call */
 17694             /* Get the value from a foo(<param_value>) style call */
 18895 			if (IN1_param_value == NULL)
 17695             if (IN1_param_value == NULL)
 18896 			  IN1_param_value = function_call_param_iterator.next();
 17696               IN1_param_value = function_call_param_iterator.next();
 18897 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17697             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18898 			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 ;
 17698             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 ;
 18899 			
 17699             
 18900 			
 17700             
 18901 			{
 17701             {
 18902 		
 17702         
 18903 				{
 17703                 {
 18904 					identifier_c param_name("IN2");
 17704                     identifier_c param_name("IN2");
 18905 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17705                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18906 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17706                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18907 					
 17707                     
 18908 					/* Get the value from a foo(<param_value>) style call */
 17708                     /* Get the value from a foo(<param_value>) style call */
 18909 					if (IN2_param_value == NULL)
 17709                     if (IN2_param_value == NULL)
 18910 					  IN2_param_value = function_call_param_iterator.next();
 17710                       IN2_param_value = function_call_param_iterator.next();
 18911 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17711                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18912 					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 ;
 17712                     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 ;
 18913 					
 17713                     
 18914 					
 17714                     
 18915 					{
 17715                     {
 18916 				
 17716                 
 18917 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17717                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18918 						s4o.print("__ge_");
 17718                         s4o.print("__ge_");
 18919 						return_type_symbol->accept(*this);
 17719                         return_type_symbol->accept(*this);
 18920 						s4o.print("(");
 17720                         s4o.print("(");
 18921 						s4o.print_integer(nb_param);
 17721                         s4o.print_integer(nb_param);
 18922 						s4o.print(",");
 17722                         s4o.print(",");
 18923 						IN1_param_value->accept(*this);
 17723                         IN1_param_value->accept(*this);
 18924 						s4o.print(",");
 17724                         s4o.print(",");
 18925 						IN2_param_value->accept(*this);
 17725                         IN2_param_value->accept(*this);
 18926 						
 17726                         
 18927 						int base_num = 3;
 17727                         int base_num = 3;
 18928 						symbol_c *param_value = NULL;
 17728                         symbol_c *param_value = NULL;
 18929 						do{
 17729                         do{
 18930 							char my_name[10];
 17730                             char my_name[10];
 18931 							sprintf(my_name, "IN%d", base_num++);
 17731                             sprintf(my_name, "IN%d", base_num++);
 18932 							identifier_c param_name(my_name);
 17732                             identifier_c param_name(my_name);
 18933 							
 17733                             
 18934 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17734                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18935 							param_value = function_call_param_iterator.search(&param_name);
 17735                             param_value = function_call_param_iterator.search(&param_name);
 18936 							
 17736                             
 18937 							/* Get the value from a foo(<param_value>) style call */
 17737                             /* Get the value from a foo(<param_value>) style call */
 18938 							if (param_value == NULL)
 17738                             if (param_value == NULL)
 18939 							  param_value = function_call_param_iterator.next();
 17739                               param_value = function_call_param_iterator.next();
 18940 							if (param_value != NULL){
 17740                             if (param_value != NULL){
 18941 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17741                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18942 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17742                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18943 							
 17743                             
 18944 								/*Function specific CODE */
 17744                                 /*Function specific CODE */
 18945 								s4o.print(",");
 17745                                 s4o.print(",");
 18946 								param_value->accept(*this);
 17746                                 param_value->accept(*this);
 18947 								
 17747                                 
 18948 							}
 17748                             }
 18949 							
 17749                             
 18950 						}while(param_value != NULL);
 17750                         }while(param_value != NULL);
 18951 						s4o.print(")");
 17751                         s4o.print(")");
 18952 						return NULL;
 17752                         return NULL;
 18953 						
 17753                         
 18954 						
 17754                         
 18955 					}
 17755                     }
 18956 					
 17756                     
 18957 					ERROR;
 17757                     ERROR;
 18958 				}
 17758                 }
 18959 				
 17759                 
 18960 			}
 17760             }
 18961 			
 17761             
 18962 			ERROR;
 17762             ERROR;
 18963 		}
 17763         }
 18964 		
 17764         
 18965 	}/*function_ge*/
 17765     }/*function_ge*/
 18966 	break;
 17766     break;
 18967 
 17767 
 18968 /****
 17768 /****
 18969  *EQ
 17769  *EQ
 18970  */
 17770  */
 18971 	case function_eq :
 17771     case function_eq :
 18972 	{
 17772     {
 18973 		symbol_c *last_type_symbol = NULL;
 17773         symbol_c *last_type_symbol = NULL;
 18974 
 17774 
 18975 		{
 17775         {
 18976 			identifier_c param_name("IN1");
 17776             identifier_c param_name("IN1");
 18977 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17777             /* Get the value from a foo(<param_name> = <param_value>) style call */
 18978 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17778             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18979 			
 17779             
 18980 			/* Get the value from a foo(<param_value>) style call */
 17780             /* Get the value from a foo(<param_value>) style call */
 18981 			if (IN1_param_value == NULL)
 17781             if (IN1_param_value == NULL)
 18982 			  IN1_param_value = function_call_param_iterator.next();
 17782               IN1_param_value = function_call_param_iterator.next();
 18983 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17783             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18984 			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 ;
 17784             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 ;
 18985 			
 17785             
 18986 			
 17786             
 18987 			{
 17787             {
 18988 		
 17788         
 18989 				{
 17789                 {
 18990 					identifier_c param_name("IN2");
 17790                     identifier_c param_name("IN2");
 18991 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17791                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 18992 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17792                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18993 					
 17793                     
 18994 					/* Get the value from a foo(<param_value>) style call */
 17794                     /* Get the value from a foo(<param_value>) style call */
 18995 					if (IN2_param_value == NULL)
 17795                     if (IN2_param_value == NULL)
 18996 					  IN2_param_value = function_call_param_iterator.next();
 17796                       IN2_param_value = function_call_param_iterator.next();
 18997 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17797                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18998 					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 ;
 17798                     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 ;
 18999 					
 17799                     
 19000 					
 17800                     
 19001 					{
 17801                     {
 19002 				
 17802                 
 19003 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17803                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19004 						s4o.print("__eq_");
 17804                         s4o.print("__eq_");
 19005 						return_type_symbol->accept(*this);
 17805                         return_type_symbol->accept(*this);
 19006 						s4o.print("(");
 17806                         s4o.print("(");
 19007 						s4o.print_integer(nb_param);
 17807                         s4o.print_integer(nb_param);
 19008 						s4o.print(",");
 17808                         s4o.print(",");
 19009 						IN1_param_value->accept(*this);
 17809                         IN1_param_value->accept(*this);
 19010 						s4o.print(",");
 17810                         s4o.print(",");
 19011 						IN2_param_value->accept(*this);
 17811                         IN2_param_value->accept(*this);
 19012 						
 17812                         
 19013 						int base_num = 3;
 17813                         int base_num = 3;
 19014 						symbol_c *param_value = NULL;
 17814                         symbol_c *param_value = NULL;
 19015 						do{
 17815                         do{
 19016 							char my_name[10];
 17816                             char my_name[10];
 19017 							sprintf(my_name, "IN%d", base_num++);
 17817                             sprintf(my_name, "IN%d", base_num++);
 19018 							identifier_c param_name(my_name);
 17818                             identifier_c param_name(my_name);
 19019 							
 17819                             
 19020 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17820                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19021 							param_value = function_call_param_iterator.search(&param_name);
 17821                             param_value = function_call_param_iterator.search(&param_name);
 19022 							
 17822                             
 19023 							/* Get the value from a foo(<param_value>) style call */
 17823                             /* Get the value from a foo(<param_value>) style call */
 19024 							if (param_value == NULL)
 17824                             if (param_value == NULL)
 19025 							  param_value = function_call_param_iterator.next();
 17825                               param_value = function_call_param_iterator.next();
 19026 							if (param_value != NULL){
 17826                             if (param_value != NULL){
 19027 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17827                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 19028 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17828                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 19029 							
 17829                             
 19030 								/*Function specific CODE */
 17830                                 /*Function specific CODE */
 19031 								s4o.print(",");
 17831                                 s4o.print(",");
 19032 								param_value->accept(*this);
 17832                                 param_value->accept(*this);
 19033 								
 17833                                 
 19034 							}
 17834                             }
 19035 							
 17835                             
 19036 						}while(param_value != NULL);
 17836                         }while(param_value != NULL);
 19037 						s4o.print(")");
 17837                         s4o.print(")");
 19038 						return NULL;
 17838                         return NULL;
 19039 						
 17839                         
 19040 						
 17840                         
 19041 					}
 17841                     }
 19042 					
 17842                     
 19043 					ERROR;
 17843                     ERROR;
 19044 				}
 17844                 }
 19045 				
 17845                 
 19046 			}
 17846             }
 19047 			
 17847             
 19048 			ERROR;
 17848             ERROR;
 19049 		}
 17849         }
 19050 		
 17850         
 19051 	}/*function_eq*/
 17851     }/*function_eq*/
 19052 	break;
 17852     break;
 19053 
 17853 
 19054 /****
 17854 /****
 19055  *LT
 17855  *LT
 19056  */
 17856  */
 19057 	case function_lt :
 17857     case function_lt :
 19058 	{
 17858     {
 19059 		symbol_c *last_type_symbol = NULL;
 17859         symbol_c *last_type_symbol = NULL;
 19060 
 17860 
 19061 		{
 17861         {
 19062 			identifier_c param_name("IN1");
 17862             identifier_c param_name("IN1");
 19063 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17863             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19064 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17864             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19065 			
 17865             
 19066 			/* Get the value from a foo(<param_value>) style call */
 17866             /* Get the value from a foo(<param_value>) style call */
 19067 			if (IN1_param_value == NULL)
 17867             if (IN1_param_value == NULL)
 19068 			  IN1_param_value = function_call_param_iterator.next();
 17868               IN1_param_value = function_call_param_iterator.next();
 19069 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17869             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19070 			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 ;
 17870             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 ;
 19071 			
 17871             
 19072 			
 17872             
 19073 			{
 17873             {
 19074 		
 17874         
 19075 				{
 17875                 {
 19076 					identifier_c param_name("IN2");
 17876                     identifier_c param_name("IN2");
 19077 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17877                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19078 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17878                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19079 					
 17879                     
 19080 					/* Get the value from a foo(<param_value>) style call */
 17880                     /* Get the value from a foo(<param_value>) style call */
 19081 					if (IN2_param_value == NULL)
 17881                     if (IN2_param_value == NULL)
 19082 					  IN2_param_value = function_call_param_iterator.next();
 17882                       IN2_param_value = function_call_param_iterator.next();
 19083 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17883                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19084 					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 ;
 17884                     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 ;
 19085 					
 17885                     
 19086 					
 17886                     
 19087 					{
 17887                     {
 19088 				
 17888                 
 19089 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17889                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19090 						s4o.print("__lt_");
 17890                         s4o.print("__lt_");
 19091 						return_type_symbol->accept(*this);
 17891                         return_type_symbol->accept(*this);
 19092 						s4o.print("(");
 17892                         s4o.print("(");
 19093 						s4o.print_integer(nb_param);
 17893                         s4o.print_integer(nb_param);
 19094 						s4o.print(",");
 17894                         s4o.print(",");
 19095 						IN1_param_value->accept(*this);
 17895                         IN1_param_value->accept(*this);
 19096 						s4o.print(",");
 17896                         s4o.print(",");
 19097 						IN2_param_value->accept(*this);
 17897                         IN2_param_value->accept(*this);
 19098 						
 17898                         
 19099 						int base_num = 3;
 17899                         int base_num = 3;
 19100 						symbol_c *param_value = NULL;
 17900                         symbol_c *param_value = NULL;
 19101 						do{
 17901                         do{
 19102 							char my_name[10];
 17902                             char my_name[10];
 19103 							sprintf(my_name, "IN%d", base_num++);
 17903                             sprintf(my_name, "IN%d", base_num++);
 19104 							identifier_c param_name(my_name);
 17904                             identifier_c param_name(my_name);
 19105 							
 17905                             
 19106 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17906                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19107 							param_value = function_call_param_iterator.search(&param_name);
 17907                             param_value = function_call_param_iterator.search(&param_name);
 19108 							
 17908                             
 19109 							/* Get the value from a foo(<param_value>) style call */
 17909                             /* Get the value from a foo(<param_value>) style call */
 19110 							if (param_value == NULL)
 17910                             if (param_value == NULL)
 19111 							  param_value = function_call_param_iterator.next();
 17911                               param_value = function_call_param_iterator.next();
 19112 							if (param_value != NULL){
 17912                             if (param_value != NULL){
 19113 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17913                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 19114 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 17914                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 19115 							
 17915                             
 19116 								/*Function specific CODE */
 17916                                 /*Function specific CODE */
 19117 								s4o.print(",");
 17917                                 s4o.print(",");
 19118 								param_value->accept(*this);
 17918                                 param_value->accept(*this);
 19119 								
 17919                                 
 19120 							}
 17920                             }
 19121 							
 17921                             
 19122 						}while(param_value != NULL);
 17922                         }while(param_value != NULL);
 19123 						s4o.print(")");
 17923                         s4o.print(")");
 19124 						return NULL;
 17924                         return NULL;
 19125 						
 17925                         
 19126 						
 17926                         
 19127 					}
 17927                     }
 19128 					
 17928                     
 19129 					ERROR;
 17929                     ERROR;
 19130 				}
 17930                 }
 19131 				
 17931                 
 19132 			}
 17932             }
 19133 			
 17933             
 19134 			ERROR;
 17934             ERROR;
 19135 		}
 17935         }
 19136 		
 17936         
 19137 	}/*function_lt*/
 17937     }/*function_lt*/
 19138 	break;
 17938     break;
 19139 
 17939 
 19140 /****
 17940 /****
 19141  *LE
 17941  *LE
 19142  */
 17942  */
 19143 	case function_le :
 17943     case function_le :
 19144 	{
 17944     {
 19145 		symbol_c *last_type_symbol = NULL;
 17945         symbol_c *last_type_symbol = NULL;
 19146 
 17946 
 19147 		{
 17947         {
 19148 			identifier_c param_name("IN1");
 17948             identifier_c param_name("IN1");
 19149 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 17949             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19150 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 17950             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19151 			
 17951             
 19152 			/* Get the value from a foo(<param_value>) style call */
 17952             /* Get the value from a foo(<param_value>) style call */
 19153 			if (IN1_param_value == NULL)
 17953             if (IN1_param_value == NULL)
 19154 			  IN1_param_value = function_call_param_iterator.next();
 17954               IN1_param_value = function_call_param_iterator.next();
 19155 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17955             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19156 			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 ;
 17956             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 ;
 19157 			
 17957             
 19158 			
 17958             
 19159 			{
 17959             {
 19160 		
 17960         
 19161 				{
 17961                 {
 19162 					identifier_c param_name("IN2");
 17962                     identifier_c param_name("IN2");
 19163 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 17963                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19164 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 17964                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19165 					
 17965                     
 19166 					/* Get the value from a foo(<param_value>) style call */
 17966                     /* Get the value from a foo(<param_value>) style call */
 19167 					if (IN2_param_value == NULL)
 17967                     if (IN2_param_value == NULL)
 19168 					  IN2_param_value = function_call_param_iterator.next();
 17968                       IN2_param_value = function_call_param_iterator.next();
 19169 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17969                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19170 					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 ;
 17970                     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 ;
 19171 					
 17971                     
 19172 					
 17972                     
 19173 					{
 17973                     {
 19174 				
 17974                 
 19175 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17975                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19176 						s4o.print("__le_");
 17976                         s4o.print("__le_");
 19177 						return_type_symbol->accept(*this);
 17977                         return_type_symbol->accept(*this);
 19178 						s4o.print("(");
 17978                         s4o.print("(");
 19179 						s4o.print_integer(nb_param);
 17979                         s4o.print_integer(nb_param);
 19180 						s4o.print(",");
 17980                         s4o.print(",");
 19181 						IN1_param_value->accept(*this);
 17981                         IN1_param_value->accept(*this);
 19182 						s4o.print(",");
 17982                         s4o.print(",");
 19183 						IN2_param_value->accept(*this);
 17983                         IN2_param_value->accept(*this);
 19184 						
 17984                         
 19185 						int base_num = 3;
 17985                         int base_num = 3;
 19186 						symbol_c *param_value = NULL;
 17986                         symbol_c *param_value = NULL;
 19187 						do{
 17987                         do{
 19188 							char my_name[10];
 17988                             char my_name[10];
 19189 							sprintf(my_name, "IN%d", base_num++);
 17989                             sprintf(my_name, "IN%d", base_num++);
 19190 							identifier_c param_name(my_name);
 17990                             identifier_c param_name(my_name);
 19191 							
 17991                             
 19192 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 17992                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19193 							param_value = function_call_param_iterator.search(&param_name);
 17993                             param_value = function_call_param_iterator.search(&param_name);
 19194 							
 17994                             
 19195 							/* Get the value from a foo(<param_value>) style call */
 17995                             /* Get the value from a foo(<param_value>) style call */
 19196 							if (param_value == NULL)
 17996                             if (param_value == NULL)
 19197 							  param_value = function_call_param_iterator.next();
 17997                               param_value = function_call_param_iterator.next();
 19198 							if (param_value != NULL){
 17998                             if (param_value != NULL){
 19199 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 17999                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 19200 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18000                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 19201 							
 18001                             
 19202 								/*Function specific CODE */
 18002                                 /*Function specific CODE */
 19203 								s4o.print(",");
 18003                                 s4o.print(",");
 19204 								param_value->accept(*this);
 18004                                 param_value->accept(*this);
 19205 								
 18005                                 
 19206 							}
 18006                             }
 19207 							
 18007                             
 19208 						}while(param_value != NULL);
 18008                         }while(param_value != NULL);
 19209 						s4o.print(")");
 18009                         s4o.print(")");
 19210 						return NULL;
 18010                         return NULL;
 19211 						
 18011                         
 19212 						
 18012                         
 19213 					}
 18013                     }
 19214 					
 18014                     
 19215 					ERROR;
 18015                     ERROR;
 19216 				}
 18016                 }
 19217 				
 18017                 
 19218 			}
 18018             }
 19219 			
 18019             
 19220 			ERROR;
 18020             ERROR;
 19221 		}
 18021         }
 19222 		
 18022         
 19223 	}/*function_le*/
 18023     }/*function_le*/
 19224 	break;
 18024     break;
 19225 
 18025 
 19226 /****
 18026 /****
 19227  *NE
 18027  *NE
 19228  */
 18028  */
 19229 	case function_ne :
 18029     case function_ne :
 19230 	{
 18030     {
 19231 		symbol_c *last_type_symbol = NULL;
 18031         symbol_c *last_type_symbol = NULL;
 19232 
 18032 
 19233 		{
 18033         {
 19234 			identifier_c param_name("IN1");
 18034             identifier_c param_name("IN1");
 19235 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18035             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19236 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18036             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19237 			
 18037             
 19238 			/* Get the value from a foo(<param_value>) style call */
 18038             /* Get the value from a foo(<param_value>) style call */
 19239 			if (IN1_param_value == NULL)
 18039             if (IN1_param_value == NULL)
 19240 			  IN1_param_value = function_call_param_iterator.next();
 18040               IN1_param_value = function_call_param_iterator.next();
 19241 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18041             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19242 			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 ;
 18042             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 ;
 19243 			
 18043             
 19244 			
 18044             
 19245 			{
 18045             {
 19246 		
 18046         
 19247 				{
 18047                 {
 19248 					identifier_c param_name("IN2");
 18048                     identifier_c param_name("IN2");
 19249 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18049                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19250 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18050                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19251 					
 18051                     
 19252 					/* Get the value from a foo(<param_value>) style call */
 18052                     /* Get the value from a foo(<param_value>) style call */
 19253 					if (IN2_param_value == NULL)
 18053                     if (IN2_param_value == NULL)
 19254 					  IN2_param_value = function_call_param_iterator.next();
 18054                       IN2_param_value = function_call_param_iterator.next();
 19255 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18055                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19256 					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 ;
 18056                     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 ;
 19257 					
 18057                     
 19258 					
 18058                     
 19259 					{
 18059                     {
 19260 				
 18060                 
 19261 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18061                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19262 						s4o.print("__ne_");
 18062                         s4o.print("__ne_");
 19263 						return_type_symbol->accept(*this);
 18063                         return_type_symbol->accept(*this);
 19264 						s4o.print("(");
 18064                         s4o.print("(");
 19265 						s4o.print_integer(nb_param);
 18065                         s4o.print_integer(nb_param);
 19266 						s4o.print(",");
 18066                         s4o.print(",");
 19267 						IN1_param_value->accept(*this);
 18067                         IN1_param_value->accept(*this);
 19268 						s4o.print(",");
 18068                         s4o.print(",");
 19269 						IN2_param_value->accept(*this);
 18069                         IN2_param_value->accept(*this);
 19270 						
 18070                         
 19271 						int base_num = 3;
 18071                         int base_num = 3;
 19272 						symbol_c *param_value = NULL;
 18072                         symbol_c *param_value = NULL;
 19273 						do{
 18073                         do{
 19274 							char my_name[10];
 18074                             char my_name[10];
 19275 							sprintf(my_name, "IN%d", base_num++);
 18075                             sprintf(my_name, "IN%d", base_num++);
 19276 							identifier_c param_name(my_name);
 18076                             identifier_c param_name(my_name);
 19277 							
 18077                             
 19278 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18078                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19279 							param_value = function_call_param_iterator.search(&param_name);
 18079                             param_value = function_call_param_iterator.search(&param_name);
 19280 							
 18080                             
 19281 							/* Get the value from a foo(<param_value>) style call */
 18081                             /* Get the value from a foo(<param_value>) style call */
 19282 							if (param_value == NULL)
 18082                             if (param_value == NULL)
 19283 							  param_value = function_call_param_iterator.next();
 18083                               param_value = function_call_param_iterator.next();
 19284 							if (param_value != NULL){
 18084                             if (param_value != NULL){
 19285 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18085                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 19286 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18086                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 19287 							
 18087                             
 19288 								/*Function specific CODE */
 18088                                 /*Function specific CODE */
 19289 								s4o.print(",");
 18089                                 s4o.print(",");
 19290 								param_value->accept(*this);
 18090                                 param_value->accept(*this);
 19291 								
 18091                                 
 19292 							}
 18092                             }
 19293 							
 18093                             
 19294 						}while(param_value != NULL);
 18094                         }while(param_value != NULL);
 19295 						s4o.print(")");
 18095                         s4o.print(")");
 19296 						return NULL;
 18096                         return NULL;
 19297 						
 18097                         
 19298 						
 18098                         
 19299 					}
 18099                     }
 19300 					
 18100                     
 19301 					ERROR;
 18101                     ERROR;
 19302 				}
 18102                 }
 19303 				
 18103                 
 19304 			}
 18104             }
 19305 			
 18105             
 19306 			ERROR;
 18106             ERROR;
 19307 		}
 18107         }
 19308 		
 18108         
 19309 	}/*function_ne*/
 18109     }/*function_ne*/
 19310 	break;
 18110     break;
 19311 
 18111 
 19312 /****
 18112 /****
 19313  *LEN
 18113  *LEN
 19314  */
 18114  */
 19315 	case function_len :
 18115     case function_len :
 19316 	{
 18116     {
 19317 		symbol_c *last_type_symbol = NULL;
 18117         symbol_c *last_type_symbol = NULL;
 19318 
 18118 
 19319 		{
 18119         {
 19320 			identifier_c param_name("IN");
 18120             identifier_c param_name("IN");
 19321 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18121             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19322 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18122             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19323 			
 18123             
 19324 			/* Get the value from a foo(<param_value>) style call */
 18124             /* Get the value from a foo(<param_value>) style call */
 19325 			if (IN_param_value == NULL)
 18125             if (IN_param_value == NULL)
 19326 			  IN_param_value = function_call_param_iterator.next();
 18126               IN_param_value = function_call_param_iterator.next();
 19327 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18127             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19328 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18128             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19329 			
 18129             
 19330 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18130             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19331 			{
 18131             {
 19332 		
 18132         
 19333 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18133                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19334 				s4o.print("__len(&");
 18134                 s4o.print("__len(&");
 19335 				IN_param_value->accept(*this);
 18135                 IN_param_value->accept(*this);
 19336 				s4o.print(")");
 18136                 s4o.print(")");
 19337 				return NULL;
 18137                 return NULL;
 19338 				
 18138                 
 19339 			}
 18139             }
 19340 			
 18140             
 19341 			ERROR;
 18141             ERROR;
 19342 		}
 18142         }
 19343 		
 18143         
 19344 	}/*function_len*/
 18144     }/*function_len*/
 19345 	break;
 18145     break;
 19346 
 18146 
 19347 /****
 18147 /****
 19348  *LEFT
 18148  *LEFT
 19349  */
 18149  */
 19350 	case function_left :
 18150     case function_left :
 19351 	{
 18151     {
 19352 		symbol_c *last_type_symbol = NULL;
 18152         symbol_c *last_type_symbol = NULL;
 19353 
 18153 
 19354 		{
 18154         {
 19355 			identifier_c param_name("IN");
 18155             identifier_c param_name("IN");
 19356 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18156             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19357 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18157             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19358 			
 18158             
 19359 			/* Get the value from a foo(<param_value>) style call */
 18159             /* Get the value from a foo(<param_value>) style call */
 19360 			if (IN_param_value == NULL)
 18160             if (IN_param_value == NULL)
 19361 			  IN_param_value = function_call_param_iterator.next();
 18161               IN_param_value = function_call_param_iterator.next();
 19362 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18162             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19363 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18163             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19364 			
 18164             
 19365 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18165             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19366 			{
 18166             {
 19367 		
 18167         
 19368 				{
 18168                 {
 19369 					identifier_c param_name("L");
 18169                     identifier_c param_name("L");
 19370 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18170                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19371 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 18171                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 19372 					
 18172                     
 19373 					/* Get the value from a foo(<param_value>) style call */
 18173                     /* Get the value from a foo(<param_value>) style call */
 19374 					if (L_param_value == NULL)
 18174                     if (L_param_value == NULL)
 19375 					  L_param_value = function_call_param_iterator.next();
 18175                       L_param_value = function_call_param_iterator.next();
 19376 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 18176                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 19377 					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 ;
 18177                     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 ;
 19378 					
 18178                     
 19379 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18179                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19380 					{
 18180                     {
 19381 				
 18181                 
 19382 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18182                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19383 						s4o.print("__left(&");
 18183                         s4o.print("__left(&");
 19384 						IN_param_value->accept(*this);
 18184                         IN_param_value->accept(*this);
 19385 						s4o.print(", ");
 18185                         s4o.print(", ");
 19386 						L_param_value->accept(*this);
 18186                         L_param_value->accept(*this);
 19387 						s4o.print(")");
 18187                         s4o.print(")");
 19388 						return NULL;
 18188                         return NULL;
 19389 						
 18189                         
 19390 					}
 18190                     }
 19391 					
 18191                     
 19392 					ERROR;
 18192                     ERROR;
 19393 				}
 18193                 }
 19394 				
 18194                 
 19395 			}
 18195             }
 19396 			
 18196             
 19397 			ERROR;
 18197             ERROR;
 19398 		}
 18198         }
 19399 		
 18199         
 19400 	}/*function_left*/
 18200     }/*function_left*/
 19401 	break;
 18201     break;
 19402 
 18202 
 19403 /****
 18203 /****
 19404  *RIGHT
 18204  *RIGHT
 19405  */
 18205  */
 19406 	case function_right :
 18206     case function_right :
 19407 	{
 18207     {
 19408 		symbol_c *last_type_symbol = NULL;
 18208         symbol_c *last_type_symbol = NULL;
 19409 
 18209 
 19410 		{
 18210         {
 19411 			identifier_c param_name("IN");
 18211             identifier_c param_name("IN");
 19412 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18212             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19413 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18213             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19414 			
 18214             
 19415 			/* Get the value from a foo(<param_value>) style call */
 18215             /* Get the value from a foo(<param_value>) style call */
 19416 			if (IN_param_value == NULL)
 18216             if (IN_param_value == NULL)
 19417 			  IN_param_value = function_call_param_iterator.next();
 18217               IN_param_value = function_call_param_iterator.next();
 19418 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18218             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19419 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18219             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19420 			
 18220             
 19421 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18221             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19422 			{
 18222             {
 19423 		
 18223         
 19424 				{
 18224                 {
 19425 					identifier_c param_name("L");
 18225                     identifier_c param_name("L");
 19426 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18226                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19427 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 18227                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 19428 					
 18228                     
 19429 					/* Get the value from a foo(<param_value>) style call */
 18229                     /* Get the value from a foo(<param_value>) style call */
 19430 					if (L_param_value == NULL)
 18230                     if (L_param_value == NULL)
 19431 					  L_param_value = function_call_param_iterator.next();
 18231                       L_param_value = function_call_param_iterator.next();
 19432 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 18232                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 19433 					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 ;
 18233                     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 ;
 19434 					
 18234                     
 19435 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18235                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19436 					{
 18236                     {
 19437 				
 18237                 
 19438 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18238                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19439 						s4o.print("__right(&");
 18239                         s4o.print("__right(&");
 19440 						IN_param_value->accept(*this);
 18240                         IN_param_value->accept(*this);
 19441 						s4o.print(", ");
 18241                         s4o.print(", ");
 19442 						L_param_value->accept(*this);
 18242                         L_param_value->accept(*this);
 19443 						s4o.print(")");
 18243                         s4o.print(")");
 19444 						return NULL;
 18244                         return NULL;
 19445 						
 18245                         
 19446 					}
 18246                     }
 19447 					
 18247                     
 19448 					ERROR;
 18248                     ERROR;
 19449 				}
 18249                 }
 19450 				
 18250                 
 19451 			}
 18251             }
 19452 			
 18252             
 19453 			ERROR;
 18253             ERROR;
 19454 		}
 18254         }
 19455 		
 18255         
 19456 	}/*function_right*/
 18256     }/*function_right*/
 19457 	break;
 18257     break;
 19458 
 18258 
 19459 /****
 18259 /****
 19460  *MID
 18260  *MID
 19461  */
 18261  */
 19462 	case function_mid :
 18262     case function_mid :
 19463 	{
 18263     {
 19464 		symbol_c *last_type_symbol = NULL;
 18264         symbol_c *last_type_symbol = NULL;
 19465 
 18265 
 19466 		{
 18266         {
 19467 			identifier_c param_name("IN");
 18267             identifier_c param_name("IN");
 19468 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18268             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19469 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18269             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19470 			
 18270             
 19471 			/* Get the value from a foo(<param_value>) style call */
 18271             /* Get the value from a foo(<param_value>) style call */
 19472 			if (IN_param_value == NULL)
 18272             if (IN_param_value == NULL)
 19473 			  IN_param_value = function_call_param_iterator.next();
 18273               IN_param_value = function_call_param_iterator.next();
 19474 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18274             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19475 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18275             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 19476 			
 18276             
 19477 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18277             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19478 			{
 18278             {
 19479 		
 18279         
 19480 				{
 18280                 {
 19481 					identifier_c param_name("L");
 18281                     identifier_c param_name("L");
 19482 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18282                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19483 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 18283                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 19484 					
 18284                     
 19485 					/* Get the value from a foo(<param_value>) style call */
 18285                     /* Get the value from a foo(<param_value>) style call */
 19486 					if (L_param_value == NULL)
 18286                     if (L_param_value == NULL)
 19487 					  L_param_value = function_call_param_iterator.next();
 18287                       L_param_value = function_call_param_iterator.next();
 19488 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 18288                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 19489 					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 ;
 18289                     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 ;
 19490 					
 18290                     
 19491 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18291                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19492 					{
 18292                     {
 19493 				
 18293                 
 19494 						{
 18294                         {
 19495 							identifier_c param_name("P");
 18295                             identifier_c param_name("P");
 19496 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18296                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19497 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 18297                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 19498 							
 18298                             
 19499 							/* Get the value from a foo(<param_value>) style call */
 18299                             /* Get the value from a foo(<param_value>) style call */
 19500 							if (P_param_value == NULL)
 18300                             if (P_param_value == NULL)
 19501 							  P_param_value = function_call_param_iterator.next();
 18301                               P_param_value = function_call_param_iterator.next();
 19502 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 18302                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 19503 							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 ;
 18303                             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 ;
 19504 							
 18304                             
 19505 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18305                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19506 							{
 18306                             {
 19507 						
 18307                         
 19508 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18308                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19509 								s4o.print("__mid(&");
 18309                                 s4o.print("__mid(&");
 19510 								IN_param_value->accept(*this);
 18310                                 IN_param_value->accept(*this);
 19511 								s4o.print(", ");
 18311                                 s4o.print(", ");
 19512 								L_param_value->accept(*this);
 18312                                 L_param_value->accept(*this);
 19513 								s4o.print(", ");
 18313                                 s4o.print(", ");
 19514 								P_param_value->accept(*this);
 18314                                 P_param_value->accept(*this);
 19515 								s4o.print(")");
 18315                                 s4o.print(")");
 19516 								return NULL;
 18316                                 return NULL;
 19517 								
 18317                                 
 19518 							}
 18318                             }
 19519 							
 18319                             
 19520 							ERROR;
 18320                             ERROR;
 19521 						}
 18321                         }
 19522 						
 18322                         
 19523 					}
 18323                     }
 19524 					
 18324                     
 19525 					ERROR;
 18325                     ERROR;
 19526 				}
 18326                 }
 19527 				
 18327                 
 19528 			}
 18328             }
 19529 			
 18329             
 19530 			ERROR;
 18330             ERROR;
 19531 		}
 18331         }
 19532 		
 18332         
 19533 	}/*function_mid*/
 18333     }/*function_mid*/
 19534 	break;
 18334     break;
 19535 
 18335 
 19536 /****
 18336 /****
 19537  *CONCAT
 18337  *CONCAT
 19538  */
 18338  */
 19539 	case function_concat :
 18339     case function_concat :
 19540 	{
 18340     {
 19541 		symbol_c *last_type_symbol = NULL;
 18341         symbol_c *last_type_symbol = NULL;
 19542 
 18342 
 19543 		{
 18343         {
 19544 			identifier_c param_name("IN1");
 18344             identifier_c param_name("IN1");
 19545 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18345             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19546 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18346             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19547 			
 18347             
 19548 			/* Get the value from a foo(<param_value>) style call */
 18348             /* Get the value from a foo(<param_value>) style call */
 19549 			if (IN1_param_value == NULL)
 18349             if (IN1_param_value == NULL)
 19550 			  IN1_param_value = function_call_param_iterator.next();
 18350               IN1_param_value = function_call_param_iterator.next();
 19551 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18351             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19552 			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 ;
 18352             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 ;
 19553 			
 18353             
 19554 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 18354             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 19555 			{
 18355             {
 19556 		
 18356         
 19557 				{
 18357                 {
 19558 					identifier_c param_name("IN2");
 18358                     identifier_c param_name("IN2");
 19559 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18359                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19560 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18360                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19561 					
 18361                     
 19562 					/* Get the value from a foo(<param_value>) style call */
 18362                     /* Get the value from a foo(<param_value>) style call */
 19563 					if (IN2_param_value == NULL)
 18363                     if (IN2_param_value == NULL)
 19564 					  IN2_param_value = function_call_param_iterator.next();
 18364                       IN2_param_value = function_call_param_iterator.next();
 19565 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18365                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19566 					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 ;
 18366                     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 ;
 19567 					
 18367                     
 19568 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 18368                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 19569 					{
 18369                     {
 19570 				
 18370                 
 19571 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 18371                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19572 						s4o.print("__time_add(&");
 18372                         s4o.print("__time_add(&");
 19573 						IN1_param_value->accept(*this);
 18373                         IN1_param_value->accept(*this);
 19574 						s4o.print(", &");
 18374                         s4o.print(", &");
 19575 						IN2_param_value->accept(*this);
 18375                         IN2_param_value->accept(*this);
 19576 						s4o.print(")");
 18376                         s4o.print(")");
 19577 						return NULL;
 18377                         return NULL;
 19578 						
 18378                         
 19579 					}
 18379                     }
 19580 					
 18380                     
 19581 					ERROR;
 18381                     ERROR;
 19582 				}
 18382                 }
 19583 				
 18383                 
 19584 			}
 18384             }
 19585 			
 18385             
 19586 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18386             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19587 			{
 18387             {
 19588 		
 18388         
 19589 				{
 18389                 {
 19590 					identifier_c param_name("IN2");
 18390                     identifier_c param_name("IN2");
 19591 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18391                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19592 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18392                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19593 					
 18393                     
 19594 					/* Get the value from a foo(<param_value>) style call */
 18394                     /* Get the value from a foo(<param_value>) style call */
 19595 					if (IN2_param_value == NULL)
 18395                     if (IN2_param_value == NULL)
 19596 					  IN2_param_value = function_call_param_iterator.next();
 18396                       IN2_param_value = function_call_param_iterator.next();
 19597 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18397                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19598 					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 ;
 18398                     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 ;
 19599 					
 18399                     
 19600 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18400                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19601 					{
 18401                     {
 19602 				
 18402                 
 19603 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18403                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19604 						s4o.print("__concat(");
 18404                         s4o.print("__concat(");
 19605 						s4o.print_integer(nb_param);
 18405                         s4o.print_integer(nb_param);
 19606 						s4o.print(",");
 18406                         s4o.print(",");
 19607 						IN1_param_value->accept(*this);
 18407                         IN1_param_value->accept(*this);
 19608 						s4o.print(",&");
 18408                         s4o.print(",&");
 19609 						IN2_param_value->accept(*this);
 18409                         IN2_param_value->accept(*this);
 19610 						
 18410                         
 19611 						int base_num = 3;
 18411                         int base_num = 3;
 19612 						symbol_c *param_value = NULL;
 18412                         symbol_c *param_value = NULL;
 19613 						do{
 18413                         do{
 19614 							char my_name[10];
 18414                             char my_name[10];
 19615 							sprintf(my_name, "IN%d", base_num++);
 18415                             sprintf(my_name, "IN%d", base_num++);
 19616 							identifier_c param_name(my_name);
 18416                             identifier_c param_name(my_name);
 19617 							
 18417                             
 19618 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18418                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19619 							param_value = function_call_param_iterator.search(&param_name);
 18419                             param_value = function_call_param_iterator.search(&param_name);
 19620 							
 18420                             
 19621 							/* Get the value from a foo(<param_value>) style call */
 18421                             /* Get the value from a foo(<param_value>) style call */
 19622 							if (param_value == NULL)
 18422                             if (param_value == NULL)
 19623 							  param_value = function_call_param_iterator.next();
 18423                               param_value = function_call_param_iterator.next();
 19624 							if (param_value != NULL){
 18424                             if (param_value != NULL){
 19625 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 18425                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 19626 								last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 18426                                 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
 19627 							
 18427                             
 19628 								/*Function specific CODE */
 18428                                 /*Function specific CODE */
 19629 								s4o.print(",&");
 18429                                 s4o.print(",&");
 19630 								param_value->accept(*this);
 18430                                 param_value->accept(*this);
 19631 								
 18431                                 
 19632 							}
 18432                             }
 19633 							
 18433                             
 19634 						}while(param_value != NULL);
 18434                         }while(param_value != NULL);
 19635 						s4o.print(")");
 18435                         s4o.print(")");
 19636 						return NULL;
 18436                         return NULL;
 19637 						
 18437                         
 19638 						
 18438                         
 19639 					}
 18439                     }
 19640 					
 18440                     
 19641 					ERROR;
 18441                     ERROR;
 19642 				}
 18442                 }
 19643 				
 18443                 
 19644 			}
 18444             }
 19645 			
 18445             
 19646 			ERROR;
 18446             ERROR;
 19647 		}
 18447         }
 19648 		
 18448         
 19649 	}/*function_concat*/
 18449     }/*function_concat*/
 19650 	break;
 18450     break;
 19651 
 18451 
 19652 /****
 18452 /****
 19653  *INSERT
 18453  *INSERT
 19654  */
 18454  */
 19655 	case function_insert :
 18455     case function_insert :
 19656 	{
 18456     {
 19657 		symbol_c *last_type_symbol = NULL;
 18457         symbol_c *last_type_symbol = NULL;
 19658 
 18458 
 19659 		{
 18459         {
 19660 			identifier_c param_name("IN1");
 18460             identifier_c param_name("IN1");
 19661 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18461             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19662 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18462             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19663 			
 18463             
 19664 			/* Get the value from a foo(<param_value>) style call */
 18464             /* Get the value from a foo(<param_value>) style call */
 19665 			if (IN1_param_value == NULL)
 18465             if (IN1_param_value == NULL)
 19666 			  IN1_param_value = function_call_param_iterator.next();
 18466               IN1_param_value = function_call_param_iterator.next();
 19667 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18467             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19668 			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 ;
 18468             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 ;
 19669 			
 18469             
 19670 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18470             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19671 			{
 18471             {
 19672 		
 18472         
 19673 				{
 18473                 {
 19674 					identifier_c param_name("IN2");
 18474                     identifier_c param_name("IN2");
 19675 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18475                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19676 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18476                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19677 					
 18477                     
 19678 					/* Get the value from a foo(<param_value>) style call */
 18478                     /* Get the value from a foo(<param_value>) style call */
 19679 					if (IN2_param_value == NULL)
 18479                     if (IN2_param_value == NULL)
 19680 					  IN2_param_value = function_call_param_iterator.next();
 18480                       IN2_param_value = function_call_param_iterator.next();
 19681 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18481                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19682 					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 ;
 18482                     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 ;
 19683 					
 18483                     
 19684 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18484                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19685 					{
 18485                     {
 19686 				
 18486                 
 19687 						{
 18487                         {
 19688 							identifier_c param_name("P");
 18488                             identifier_c param_name("P");
 19689 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18489                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19690 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 18490                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 19691 							
 18491                             
 19692 							/* Get the value from a foo(<param_value>) style call */
 18492                             /* Get the value from a foo(<param_value>) style call */
 19693 							if (P_param_value == NULL)
 18493                             if (P_param_value == NULL)
 19694 							  P_param_value = function_call_param_iterator.next();
 18494                               P_param_value = function_call_param_iterator.next();
 19695 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 18495                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 19696 							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 ;
 18496                             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 ;
 19697 							
 18497                             
 19698 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18498                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19699 							{
 18499                             {
 19700 						
 18500                         
 19701 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18501                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19702 								s4o.print("__insert(&");
 18502                                 s4o.print("__insert(&");
 19703 								IN1_param_value->accept(*this);
 18503                                 IN1_param_value->accept(*this);
 19704 								s4o.print(", &");
 18504                                 s4o.print(", &");
 19705 								IN2_param_value->accept(*this);
 18505                                 IN2_param_value->accept(*this);
 19706 								s4o.print(", ");
 18506                                 s4o.print(", ");
 19707 								P_param_value->accept(*this);
 18507                                 P_param_value->accept(*this);
 19708 								s4o.print(")");
 18508                                 s4o.print(")");
 19709 								return NULL;
 18509                                 return NULL;
 19710 								
 18510                                 
 19711 							}
 18511                             }
 19712 							
 18512                             
 19713 							ERROR;
 18513                             ERROR;
 19714 						}
 18514                         }
 19715 						
 18515                         
 19716 					}
 18516                     }
 19717 					
 18517                     
 19718 					ERROR;
 18518                     ERROR;
 19719 				}
 18519                 }
 19720 				
 18520                 
 19721 			}
 18521             }
 19722 			
 18522             
 19723 			ERROR;
 18523             ERROR;
 19724 		}
 18524         }
 19725 		
 18525         
 19726 	}/*function_insert*/
 18526     }/*function_insert*/
 19727 	break;
 18527     break;
 19728 
 18528 
 19729 /****
 18529 /****
 19730  *DELETE
 18530  *DELETE
 19731  */
 18531  */
 19732 	case function_delete :
 18532     case function_delete :
 19733 	{
 18533     {
 19734 		symbol_c *last_type_symbol = NULL;
 18534         symbol_c *last_type_symbol = NULL;
 19735 
 18535 
 19736 		{
 18536         {
 19737 			identifier_c param_name("IN");
 18537             identifier_c param_name("IN");
 19738 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18538             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19739 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 18539             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 19740 			
 18540             
 19741 			/* Get the value from a foo(<param_value>) style call */
 18541             /* Get the value from a foo(<param_value>) style call */
 19742 			if (IN_param_value == NULL)
 18542             if (IN_param_value == NULL)
 19743 			  IN_param_value = function_call_param_iterator.next();
 18543               IN_param_value = function_call_param_iterator.next();
 19744 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 18544             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 19745 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 18545             last_type_symbol = last_type_symbol && search_expression_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 			
 18546             
 19747 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18547             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19748 			{
 18548             {
 19749 		
 18549         
 19750 				{
 18550                 {
 19751 					identifier_c param_name("L");
 18551                     identifier_c param_name("L");
 19752 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18552                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19753 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 18553                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 19754 					
 18554                     
 19755 					/* Get the value from a foo(<param_value>) style call */
 18555                     /* Get the value from a foo(<param_value>) style call */
 19756 					if (L_param_value == NULL)
 18556                     if (L_param_value == NULL)
 19757 					  L_param_value = function_call_param_iterator.next();
 18557                       L_param_value = function_call_param_iterator.next();
 19758 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 18558                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 19759 					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 ;
 18559                     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 ;
 19760 					
 18560                     
 19761 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18561                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19762 					{
 18562                     {
 19763 				
 18563                 
 19764 						{
 18564                         {
 19765 							identifier_c param_name("P");
 18565                             identifier_c param_name("P");
 19766 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18566                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19767 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 18567                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 19768 							
 18568                             
 19769 							/* Get the value from a foo(<param_value>) style call */
 18569                             /* Get the value from a foo(<param_value>) style call */
 19770 							if (P_param_value == NULL)
 18570                             if (P_param_value == NULL)
 19771 							  P_param_value = function_call_param_iterator.next();
 18571                               P_param_value = function_call_param_iterator.next();
 19772 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 18572                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 19773 							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 ;
 18573                             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 ;
 19774 							
 18574                             
 19775 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18575                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19776 							{
 18576                             {
 19777 						
 18577                         
 19778 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18578                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19779 								s4o.print("__delete(&");
 18579                                 s4o.print("__delete(&");
 19780 								IN_param_value->accept(*this);
 18580                                 IN_param_value->accept(*this);
 19781 								s4o.print(", ");
 18581                                 s4o.print(", ");
 19782 								L_param_value->accept(*this);
 18582                                 L_param_value->accept(*this);
 19783 								s4o.print(", ");
 18583                                 s4o.print(", ");
 19784 								P_param_value->accept(*this);
 18584                                 P_param_value->accept(*this);
 19785 								s4o.print(")");
 18585                                 s4o.print(")");
 19786 								return NULL;
 18586                                 return NULL;
 19787 								
 18587                                 
 19788 							}
 18588                             }
 19789 							
 18589                             
 19790 							ERROR;
 18590                             ERROR;
 19791 						}
 18591                         }
 19792 						
 18592                         
 19793 					}
 18593                     }
 19794 					
 18594                     
 19795 					ERROR;
 18595                     ERROR;
 19796 				}
 18596                 }
 19797 				
 18597                 
 19798 			}
 18598             }
 19799 			
 18599             
 19800 			ERROR;
 18600             ERROR;
 19801 		}
 18601         }
 19802 		
 18602         
 19803 	}/*function_delete*/
 18603     }/*function_delete*/
 19804 	break;
 18604     break;
 19805 
 18605 
 19806 /****
 18606 /****
 19807  *REPLACE
 18607  *REPLACE
 19808  */
 18608  */
 19809 	case function_replace :
 18609     case function_replace :
 19810 	{
 18610     {
 19811 		symbol_c *last_type_symbol = NULL;
 18611         symbol_c *last_type_symbol = NULL;
 19812 
 18612 
 19813 		{
 18613         {
 19814 			identifier_c param_name("IN1");
 18614             identifier_c param_name("IN1");
 19815 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18615             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19816 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18616             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19817 			
 18617             
 19818 			/* Get the value from a foo(<param_value>) style call */
 18618             /* Get the value from a foo(<param_value>) style call */
 19819 			if (IN1_param_value == NULL)
 18619             if (IN1_param_value == NULL)
 19820 			  IN1_param_value = function_call_param_iterator.next();
 18620               IN1_param_value = function_call_param_iterator.next();
 19821 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18621             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19822 			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 ;
 18622             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 ;
 19823 			
 18623             
 19824 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18624             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19825 			{
 18625             {
 19826 		
 18626         
 19827 				{
 18627                 {
 19828 					identifier_c param_name("IN2");
 18628                     identifier_c param_name("IN2");
 19829 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18629                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19830 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18630                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19831 					
 18631                     
 19832 					/* Get the value from a foo(<param_value>) style call */
 18632                     /* Get the value from a foo(<param_value>) style call */
 19833 					if (IN2_param_value == NULL)
 18633                     if (IN2_param_value == NULL)
 19834 					  IN2_param_value = function_call_param_iterator.next();
 18634                       IN2_param_value = function_call_param_iterator.next();
 19835 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18635                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19836 					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 ;
 18636                     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 ;
 19837 					
 18637                     
 19838 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18638                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19839 					{
 18639                     {
 19840 				
 18640                 
 19841 						{
 18641                         {
 19842 							identifier_c param_name("L");
 18642                             identifier_c param_name("L");
 19843 							/* Get the value from a foo(<param_name> = <param_value>) style call */
 18643                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19844 							symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 18644                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
 19845 							
 18645                             
 19846 							/* Get the value from a foo(<param_value>) style call */
 18646                             /* Get the value from a foo(<param_value>) style call */
 19847 							if (L_param_value == NULL)
 18647                             if (L_param_value == NULL)
 19848 							  L_param_value = function_call_param_iterator.next();
 18648                               L_param_value = function_call_param_iterator.next();
 19849 							symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 18649                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 19850 							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 ;
 18650                             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 ;
 19851 							
 18651                             
 19852 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18652                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19853 							{
 18653                             {
 19854 						
 18654                         
 19855 								{
 18655                                 {
 19856 									identifier_c param_name("P");
 18656                                     identifier_c param_name("P");
 19857 									/* Get the value from a foo(<param_name> = <param_value>) style call */
 18657                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19858 									symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 18658                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
 19859 									
 18659                                     
 19860 									/* Get the value from a foo(<param_value>) style call */
 18660                                     /* Get the value from a foo(<param_value>) style call */
 19861 									if (P_param_value == NULL)
 18661                                     if (P_param_value == NULL)
 19862 									  P_param_value = function_call_param_iterator.next();
 18662                                       P_param_value = function_call_param_iterator.next();
 19863 									symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 18663                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 19864 									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 ;
 18664                                     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 ;
 19865 									
 18665                                     
 19866 									if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 18666                                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 19867 									{
 18667                                     {
 19868 								
 18668                                 
 19869 										symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18669                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19870 										s4o.print("__replace(&");
 18670                                         s4o.print("__replace(&");
 19871 										IN1_param_value->accept(*this);
 18671                                         IN1_param_value->accept(*this);
 19872 										s4o.print(", &");
 18672                                         s4o.print(", &");
 19873 										IN2_param_value->accept(*this);
 18673                                         IN2_param_value->accept(*this);
 19874 										s4o.print(", ");
 18674                                         s4o.print(", ");
 19875 										L_param_value->accept(*this);
 18675                                         L_param_value->accept(*this);
 19876 										s4o.print(", ");
 18676                                         s4o.print(", ");
 19877 										P_param_value->accept(*this);
 18677                                         P_param_value->accept(*this);
 19878 										s4o.print(")");
 18678                                         s4o.print(")");
 19879 										return NULL;
 18679                                         return NULL;
 19880 										
 18680                                         
 19881 									}
 18681                                     }
 19882 									
 18682                                     
 19883 									ERROR;
 18683                                     ERROR;
 19884 								}
 18684                                 }
 19885 								
 18685                                 
 19886 							}
 18686                             }
 19887 							
 18687                             
 19888 							ERROR;
 18688                             ERROR;
 19889 						}
 18689                         }
 19890 						
 18690                         
 19891 					}
 18691                     }
 19892 					
 18692                     
 19893 					ERROR;
 18693                     ERROR;
 19894 				}
 18694                 }
 19895 				
 18695                 
 19896 			}
 18696             }
 19897 			
 18697             
 19898 			ERROR;
 18698             ERROR;
 19899 		}
 18699         }
 19900 		
 18700         
 19901 	}/*function_replace*/
 18701     }/*function_replace*/
 19902 	break;
 18702     break;
 19903 
 18703 
 19904 /****
 18704 /****
 19905  *FIND
 18705  *FIND
 19906  */
 18706  */
 19907 	case function_find :
 18707     case function_find :
 19908 	{
 18708     {
 19909 		symbol_c *last_type_symbol = NULL;
 18709         symbol_c *last_type_symbol = NULL;
 19910 
 18710 
 19911 		{
 18711         {
 19912 			identifier_c param_name("IN1");
 18712             identifier_c param_name("IN1");
 19913 			/* Get the value from a foo(<param_name> = <param_value>) style call */
 18713             /* Get the value from a foo(<param_name> = <param_value>) style call */
 19914 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 18714             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
 19915 			
 18715             
 19916 			/* Get the value from a foo(<param_value>) style call */
 18716             /* Get the value from a foo(<param_value>) style call */
 19917 			if (IN1_param_value == NULL)
 18717             if (IN1_param_value == NULL)
 19918 			  IN1_param_value = function_call_param_iterator.next();
 18718               IN1_param_value = function_call_param_iterator.next();
 19919 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 18719             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 19920 			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 ;
 18720             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 ;
 19921 			
 18721             
 19922 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18722             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19923 			{
 18723             {
 19924 		
 18724         
 19925 				{
 18725                 {
 19926 					identifier_c param_name("IN2");
 18726                     identifier_c param_name("IN2");
 19927 					/* Get the value from a foo(<param_name> = <param_value>) style call */
 18727                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 19928 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 18728                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
 19929 					
 18729                     
 19930 					/* Get the value from a foo(<param_value>) style call */
 18730                     /* Get the value from a foo(<param_value>) style call */
 19931 					if (IN2_param_value == NULL)
 18731                     if (IN2_param_value == NULL)
 19932 					  IN2_param_value = function_call_param_iterator.next();
 18732                       IN2_param_value = function_call_param_iterator.next();
 19933 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 18733                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 19934 					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 ;
 18734                     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 ;
 19935 					
 18735                     
 19936 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 18736                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 19937 					{
 18737                     {
 19938 				
 18738                 
 19939 						symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18739                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19940 						s4o.print("__find(&");
 18740                         s4o.print("__find(&");
 19941 						IN1_param_value->accept(*this);
 18741                         IN1_param_value->accept(*this);
 19942 						s4o.print(", &");
 18742                         s4o.print(", &");
 19943 						IN2_param_value->accept(*this);
 18743                         IN2_param_value->accept(*this);
 19944 						s4o.print(")");
 18744                         s4o.print(")");
 19945 						return NULL;
 18745                         return NULL;
 19946 						
 18746                         
 19947 					}
 18747                     }
 19948 					
 18748                     
 19949 					ERROR;
 18749                     ERROR;
 19950 				}
 18750                 }
 19951 				
 18751                 
 19952 			}
 18752             }
 19953 			
 18753             
 19954 			ERROR;
 18754             ERROR;
 19955 		}
 18755         }
 19956 		
 18756         
 19957 	}/*function_find*/
 18757     }/*function_find*/
 19958 	break;
 18758     break;
 19959 
 18759 
 19960 	case function_none :
 18760     case function_none :
 19961 	ERROR;
 18761     ERROR;
 19962 }
 18762 }
 19963 return NULL;
 18763 return NULL;