stage4/generate_cc/st_code_gen.c
changeset 33 4507beb2aac6
child 34 a793b010e371
equal deleted inserted replaced
32:289256ec66f1 33:4507beb2aac6
       
     1 
       
     2 /****
       
     3  * IEC 61131-3 standard function lib
       
     4  * generated code, do not edit by hand
       
     5  */
       
     6 switch(current_function_type){
       
     7 
       
     8 /****
       
     9  *REAL_TO_REAL
       
    10  */
       
    11 	case function_real_to_real :
       
    12 	{
       
    13 		symbol_c *last_type_symbol = NULL;
       
    14 
       
    15 		{
       
    16 			identifier_c param_name("IN");
       
    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);
       
    19 			
       
    20 			/* Get the value from a foo(<param_value>) style call */
       
    21 			if (IN_param_value == NULL)
       
    22 			  IN_param_value = function_call_param_iterator.next();
       
    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 ;
       
    25 			
       
    26 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
    27 			{
       
    28 		
       
    29 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
    30 				s4o.print("(");
       
    31 				return_type_symbol->accept(*this);
       
    32 				s4o.print(")");
       
    33 				IN_param_value->accept(*this);
       
    34 				return NULL;
       
    35 				
       
    36 			}
       
    37 			
       
    38 			ERROR;
       
    39 		}
       
    40 		
       
    41 	}/*function_real_to_real*/
       
    42 	break;
       
    43 
       
    44 /****
       
    45  *REAL_TO_SINT
       
    46  */
       
    47 	case function_real_to_sint :
       
    48 	{
       
    49 		symbol_c *last_type_symbol = NULL;
       
    50 
       
    51 		{
       
    52 			identifier_c param_name("IN");
       
    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);
       
    55 			
       
    56 			/* Get the value from a foo(<param_value>) style call */
       
    57 			if (IN_param_value == NULL)
       
    58 			  IN_param_value = function_call_param_iterator.next();
       
    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 ;
       
    61 			
       
    62 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
    63 			{
       
    64 		
       
    65 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    66 				s4o.print("(");
       
    67 				return_type_symbol->accept(*this);
       
    68 				s4o.print(")");
       
    69 				IN_param_value->accept(*this);
       
    70 				return NULL;
       
    71 				
       
    72 			}
       
    73 			
       
    74 			ERROR;
       
    75 		}
       
    76 		
       
    77 	}/*function_real_to_sint*/
       
    78 	break;
       
    79 
       
    80 /****
       
    81  *REAL_TO_LINT
       
    82  */
       
    83 	case function_real_to_lint :
       
    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::lint_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_lint*/
       
   114 	break;
       
   115 
       
   116 /****
       
   117  *REAL_TO_DINT
       
   118  */
       
   119 	case function_real_to_dint :
       
   120 	{
       
   121 		symbol_c *last_type_symbol = NULL;
       
   122 
       
   123 		{
       
   124 			identifier_c param_name("IN");
       
   125 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   126 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   127 			
       
   128 			/* Get the value from a foo(<param_value>) style call */
       
   129 			if (IN_param_value == NULL)
       
   130 			  IN_param_value = function_call_param_iterator.next();
       
   131 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   132 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   133 			
       
   134 			if (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;
       
   151 
       
   152 /****
       
   153  *REAL_TO_DATE
       
   154  */
       
   155 	case function_real_to_date :
       
   156 	{
       
   157 		symbol_c *last_type_symbol = NULL;
       
   158 
       
   159 		{
       
   160 			identifier_c param_name("IN");
       
   161 			/* 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);
       
   163 			
       
   164 			/* Get the value from a foo(<param_value>) style call */
       
   165 			if (IN_param_value == NULL)
       
   166 			  IN_param_value = function_call_param_iterator.next();
       
   167 			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 ;
       
   169 			
       
   170 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   171 			{
       
   172 		
       
   173 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   174 				s4o.print("(");
       
   175 				return_type_symbol->accept(*this);
       
   176 				s4o.print(")time_to_real(");
       
   177 				IN_param_value->accept(*this);
       
   178 				s4o.print(")");
       
   179 				return NULL;
       
   180 				
       
   181 			}
       
   182 			
       
   183 			ERROR;
       
   184 		}
       
   185 		
       
   186 	}/*function_real_to_date*/
       
   187 	break;
       
   188 
       
   189 /****
       
   190  *REAL_TO_DWORD
       
   191  */
       
   192 	case function_real_to_dword :
       
   193 	{
       
   194 		symbol_c *last_type_symbol = NULL;
       
   195 
       
   196 		{
       
   197 			identifier_c param_name("IN");
       
   198 			/* 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);
       
   200 			
       
   201 			/* Get the value from a foo(<param_value>) style call */
       
   202 			if (IN_param_value == NULL)
       
   203 			  IN_param_value = function_call_param_iterator.next();
       
   204 			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 ;
       
   206 			
       
   207 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   208 			{
       
   209 		
       
   210 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   211 				s4o.print("(");
       
   212 				return_type_symbol->accept(*this);
       
   213 				s4o.print(")");
       
   214 				IN_param_value->accept(*this);
       
   215 				return NULL;
       
   216 				
       
   217 			}
       
   218 			
       
   219 			ERROR;
       
   220 		}
       
   221 		
       
   222 	}/*function_real_to_dword*/
       
   223 	break;
       
   224 
       
   225 /****
       
   226  *REAL_TO_DT
       
   227  */
       
   228 	case function_real_to_dt :
       
   229 	{
       
   230 		symbol_c *last_type_symbol = NULL;
       
   231 
       
   232 		{
       
   233 			identifier_c param_name("IN");
       
   234 			/* 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);
       
   236 			
       
   237 			/* Get the value from a foo(<param_value>) style call */
       
   238 			if (IN_param_value == NULL)
       
   239 			  IN_param_value = function_call_param_iterator.next();
       
   240 			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 ;
       
   242 			
       
   243 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   244 			{
       
   245 		
       
   246 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   247 				s4o.print("(");
       
   248 				return_type_symbol->accept(*this);
       
   249 				s4o.print(")time_to_real(");
       
   250 				IN_param_value->accept(*this);
       
   251 				s4o.print(")");
       
   252 				return NULL;
       
   253 				
       
   254 			}
       
   255 			
       
   256 			ERROR;
       
   257 		}
       
   258 		
       
   259 	}/*function_real_to_dt*/
       
   260 	break;
       
   261 
       
   262 /****
       
   263  *REAL_TO_TOD
       
   264  */
       
   265 	case function_real_to_tod :
       
   266 	{
       
   267 		symbol_c *last_type_symbol = NULL;
       
   268 
       
   269 		{
       
   270 			identifier_c param_name("IN");
       
   271 			/* 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);
       
   273 			
       
   274 			/* Get the value from a foo(<param_value>) style call */
       
   275 			if (IN_param_value == NULL)
       
   276 			  IN_param_value = function_call_param_iterator.next();
       
   277 			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 ;
       
   279 			
       
   280 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   281 			{
       
   282 		
       
   283 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   284 				s4o.print("(");
       
   285 				return_type_symbol->accept(*this);
       
   286 				s4o.print(")time_to_real(");
       
   287 				IN_param_value->accept(*this);
       
   288 				s4o.print(")");
       
   289 				return NULL;
       
   290 				
       
   291 			}
       
   292 			
       
   293 			ERROR;
       
   294 		}
       
   295 		
       
   296 	}/*function_real_to_tod*/
       
   297 	break;
       
   298 
       
   299 /****
       
   300  *REAL_TO_UDINT
       
   301  */
       
   302 	case function_real_to_udint :
       
   303 	{
       
   304 		symbol_c *last_type_symbol = NULL;
       
   305 
       
   306 		{
       
   307 			identifier_c param_name("IN");
       
   308 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   309 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   310 			
       
   311 			/* Get the value from a foo(<param_value>) style call */
       
   312 			if (IN_param_value == NULL)
       
   313 			  IN_param_value = function_call_param_iterator.next();
       
   314 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   316 			
       
   317 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   318 			{
       
   319 		
       
   320 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   321 				s4o.print("(");
       
   322 				return_type_symbol->accept(*this);
       
   323 				s4o.print(")");
       
   324 				IN_param_value->accept(*this);
       
   325 				return NULL;
       
   326 				
       
   327 			}
       
   328 			
       
   329 			ERROR;
       
   330 		}
       
   331 		
       
   332 	}/*function_real_to_udint*/
       
   333 	break;
       
   334 
       
   335 /****
       
   336  *REAL_TO_WORD
       
   337  */
       
   338 	case function_real_to_word :
       
   339 	{
       
   340 		symbol_c *last_type_symbol = NULL;
       
   341 
       
   342 		{
       
   343 			identifier_c param_name("IN");
       
   344 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   345 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   346 			
       
   347 			/* Get the value from a foo(<param_value>) style call */
       
   348 			if (IN_param_value == NULL)
       
   349 			  IN_param_value = function_call_param_iterator.next();
       
   350 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   351 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   352 			
       
   353 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   354 			{
       
   355 		
       
   356 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   357 				s4o.print("(");
       
   358 				return_type_symbol->accept(*this);
       
   359 				s4o.print(")");
       
   360 				IN_param_value->accept(*this);
       
   361 				return NULL;
       
   362 				
       
   363 			}
       
   364 			
       
   365 			ERROR;
       
   366 		}
       
   367 		
       
   368 	}/*function_real_to_word*/
       
   369 	break;
       
   370 
       
   371 /****
       
   372  *REAL_TO_WSTRING
       
   373  */
       
   374 	case function_real_to_wstring :
       
   375 	{
       
   376 		symbol_c *last_type_symbol = NULL;
       
   377 
       
   378 		{
       
   379 			identifier_c param_name("IN");
       
   380 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   381 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   382 			
       
   383 			/* Get the value from a foo(<param_value>) style call */
       
   384 			if (IN_param_value == NULL)
       
   385 			  IN_param_value = function_call_param_iterator.next();
       
   386 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   388 			
       
   389 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   390 			{
       
   391 		
       
   392 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
   393 				s4o.print("(");
       
   394 				return_type_symbol->accept(*this);
       
   395 				s4o.print(")string_to_int(");
       
   396 				IN_param_value->accept(*this);
       
   397 				s4o.print(", 10)");
       
   398 				return NULL;
       
   399 				
       
   400 			}
       
   401 			
       
   402 			ERROR;
       
   403 		}
       
   404 		
       
   405 	}/*function_real_to_wstring*/
       
   406 	break;
       
   407 
       
   408 /****
       
   409  *REAL_TO_STRING
       
   410  */
       
   411 	case function_real_to_string :
       
   412 	{
       
   413 		symbol_c *last_type_symbol = NULL;
       
   414 
       
   415 		{
       
   416 			identifier_c param_name("IN");
       
   417 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   418 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   419 			
       
   420 			/* Get the value from a foo(<param_value>) style call */
       
   421 			if (IN_param_value == NULL)
       
   422 			  IN_param_value = function_call_param_iterator.next();
       
   423 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   425 			
       
   426 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   427 			{
       
   428 		
       
   429 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   430 				s4o.print("(");
       
   431 				return_type_symbol->accept(*this);
       
   432 				s4o.print(")string_to_int(");
       
   433 				IN_param_value->accept(*this);
       
   434 				s4o.print(", 10)");
       
   435 				return NULL;
       
   436 				
       
   437 			}
       
   438 			
       
   439 			ERROR;
       
   440 		}
       
   441 		
       
   442 	}/*function_real_to_string*/
       
   443 	break;
       
   444 
       
   445 /****
       
   446  *REAL_TO_LWORD
       
   447  */
       
   448 	case function_real_to_lword :
       
   449 	{
       
   450 		symbol_c *last_type_symbol = NULL;
       
   451 
       
   452 		{
       
   453 			identifier_c param_name("IN");
       
   454 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   455 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   456 			
       
   457 			/* Get the value from a foo(<param_value>) style call */
       
   458 			if (IN_param_value == NULL)
       
   459 			  IN_param_value = function_call_param_iterator.next();
       
   460 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   462 			
       
   463 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   464 			{
       
   465 		
       
   466 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   467 				s4o.print("(");
       
   468 				return_type_symbol->accept(*this);
       
   469 				s4o.print(")");
       
   470 				IN_param_value->accept(*this);
       
   471 				return NULL;
       
   472 				
       
   473 			}
       
   474 			
       
   475 			ERROR;
       
   476 		}
       
   477 		
       
   478 	}/*function_real_to_lword*/
       
   479 	break;
       
   480 
       
   481 /****
       
   482  *REAL_TO_UINT
       
   483  */
       
   484 	case function_real_to_uint :
       
   485 	{
       
   486 		symbol_c *last_type_symbol = NULL;
       
   487 
       
   488 		{
       
   489 			identifier_c param_name("IN");
       
   490 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   491 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   492 			
       
   493 			/* Get the value from a foo(<param_value>) style call */
       
   494 			if (IN_param_value == NULL)
       
   495 			  IN_param_value = function_call_param_iterator.next();
       
   496 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   498 			
       
   499 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   500 			{
       
   501 		
       
   502 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   503 				s4o.print("(");
       
   504 				return_type_symbol->accept(*this);
       
   505 				s4o.print(")");
       
   506 				IN_param_value->accept(*this);
       
   507 				return NULL;
       
   508 				
       
   509 			}
       
   510 			
       
   511 			ERROR;
       
   512 		}
       
   513 		
       
   514 	}/*function_real_to_uint*/
       
   515 	break;
       
   516 
       
   517 /****
       
   518  *REAL_TO_LREAL
       
   519  */
       
   520 	case function_real_to_lreal :
       
   521 	{
       
   522 		symbol_c *last_type_symbol = NULL;
       
   523 
       
   524 		{
       
   525 			identifier_c param_name("IN");
       
   526 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   527 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   528 			
       
   529 			/* Get the value from a foo(<param_value>) style call */
       
   530 			if (IN_param_value == NULL)
       
   531 			  IN_param_value = function_call_param_iterator.next();
       
   532 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   534 			
       
   535 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   536 			{
       
   537 		
       
   538 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   539 				s4o.print("(");
       
   540 				return_type_symbol->accept(*this);
       
   541 				s4o.print(")");
       
   542 				IN_param_value->accept(*this);
       
   543 				return NULL;
       
   544 				
       
   545 			}
       
   546 			
       
   547 			ERROR;
       
   548 		}
       
   549 		
       
   550 	}/*function_real_to_lreal*/
       
   551 	break;
       
   552 
       
   553 /****
       
   554  *REAL_TO_BYTE
       
   555  */
       
   556 	case function_real_to_byte :
       
   557 	{
       
   558 		symbol_c *last_type_symbol = NULL;
       
   559 
       
   560 		{
       
   561 			identifier_c param_name("IN");
       
   562 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   563 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   564 			
       
   565 			/* Get the value from a foo(<param_value>) style call */
       
   566 			if (IN_param_value == NULL)
       
   567 			  IN_param_value = function_call_param_iterator.next();
       
   568 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   570 			
       
   571 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   572 			{
       
   573 		
       
   574 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   575 				s4o.print("(");
       
   576 				return_type_symbol->accept(*this);
       
   577 				s4o.print(")");
       
   578 				IN_param_value->accept(*this);
       
   579 				return NULL;
       
   580 				
       
   581 			}
       
   582 			
       
   583 			ERROR;
       
   584 		}
       
   585 		
       
   586 	}/*function_real_to_byte*/
       
   587 	break;
       
   588 
       
   589 /****
       
   590  *REAL_TO_USINT
       
   591  */
       
   592 	case function_real_to_usint :
       
   593 	{
       
   594 		symbol_c *last_type_symbol = NULL;
       
   595 
       
   596 		{
       
   597 			identifier_c param_name("IN");
       
   598 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   599 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   600 			
       
   601 			/* Get the value from a foo(<param_value>) style call */
       
   602 			if (IN_param_value == NULL)
       
   603 			  IN_param_value = function_call_param_iterator.next();
       
   604 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   606 			
       
   607 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   608 			{
       
   609 		
       
   610 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   611 				s4o.print("(");
       
   612 				return_type_symbol->accept(*this);
       
   613 				s4o.print(")");
       
   614 				IN_param_value->accept(*this);
       
   615 				return NULL;
       
   616 				
       
   617 			}
       
   618 			
       
   619 			ERROR;
       
   620 		}
       
   621 		
       
   622 	}/*function_real_to_usint*/
       
   623 	break;
       
   624 
       
   625 /****
       
   626  *REAL_TO_ULINT
       
   627  */
       
   628 	case function_real_to_ulint :
       
   629 	{
       
   630 		symbol_c *last_type_symbol = NULL;
       
   631 
       
   632 		{
       
   633 			identifier_c param_name("IN");
       
   634 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   635 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   636 			
       
   637 			/* Get the value from a foo(<param_value>) style call */
       
   638 			if (IN_param_value == NULL)
       
   639 			  IN_param_value = function_call_param_iterator.next();
       
   640 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   642 			
       
   643 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   644 			{
       
   645 		
       
   646 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   647 				s4o.print("(");
       
   648 				return_type_symbol->accept(*this);
       
   649 				s4o.print(")");
       
   650 				IN_param_value->accept(*this);
       
   651 				return NULL;
       
   652 				
       
   653 			}
       
   654 			
       
   655 			ERROR;
       
   656 		}
       
   657 		
       
   658 	}/*function_real_to_ulint*/
       
   659 	break;
       
   660 
       
   661 /****
       
   662  *REAL_TO_BOOL
       
   663  */
       
   664 	case function_real_to_bool :
       
   665 	{
       
   666 		symbol_c *last_type_symbol = NULL;
       
   667 
       
   668 		{
       
   669 			identifier_c param_name("IN");
       
   670 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   671 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   672 			
       
   673 			/* Get the value from a foo(<param_value>) style call */
       
   674 			if (IN_param_value == NULL)
       
   675 			  IN_param_value = function_call_param_iterator.next();
       
   676 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   678 			
       
   679 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   680 			{
       
   681 		
       
   682 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   683 				s4o.print("(");
       
   684 				return_type_symbol->accept(*this);
       
   685 				s4o.print(")");
       
   686 				IN_param_value->accept(*this);
       
   687 				return NULL;
       
   688 				
       
   689 			}
       
   690 			
       
   691 			ERROR;
       
   692 		}
       
   693 		
       
   694 	}/*function_real_to_bool*/
       
   695 	break;
       
   696 
       
   697 /****
       
   698  *REAL_TO_TIME
       
   699  */
       
   700 	case function_real_to_time :
       
   701 	{
       
   702 		symbol_c *last_type_symbol = NULL;
       
   703 
       
   704 		{
       
   705 			identifier_c param_name("IN");
       
   706 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   707 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   708 			
       
   709 			/* Get the value from a foo(<param_value>) style call */
       
   710 			if (IN_param_value == NULL)
       
   711 			  IN_param_value = function_call_param_iterator.next();
       
   712 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   714 			
       
   715 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   716 			{
       
   717 		
       
   718 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   719 				s4o.print("(");
       
   720 				return_type_symbol->accept(*this);
       
   721 				s4o.print(")time_to_real(");
       
   722 				IN_param_value->accept(*this);
       
   723 				s4o.print(")");
       
   724 				return NULL;
       
   725 				
       
   726 			}
       
   727 			
       
   728 			ERROR;
       
   729 		}
       
   730 		
       
   731 	}/*function_real_to_time*/
       
   732 	break;
       
   733 
       
   734 /****
       
   735  *REAL_TO_INT
       
   736  */
       
   737 	case function_real_to_int :
       
   738 	{
       
   739 		symbol_c *last_type_symbol = NULL;
       
   740 
       
   741 		{
       
   742 			identifier_c param_name("IN");
       
   743 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   744 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   745 			
       
   746 			/* Get the value from a foo(<param_value>) style call */
       
   747 			if (IN_param_value == NULL)
       
   748 			  IN_param_value = function_call_param_iterator.next();
       
   749 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   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 ;
       
   751 			
       
   752 			if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   753 			{
       
   754 		
       
   755 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   756 				s4o.print("(");
       
   757 				return_type_symbol->accept(*this);
       
   758 				s4o.print(")");
       
   759 				IN_param_value->accept(*this);
       
   760 				return NULL;
       
   761 				
       
   762 			}
       
   763 			
       
   764 			ERROR;
       
   765 		}
       
   766 		
       
   767 	}/*function_real_to_int*/
       
   768 	break;
       
   769 
       
   770 /****
       
   771  *SINT_TO_REAL
       
   772  */
       
   773 	case function_sint_to_real :
       
   774 	{
       
   775 		symbol_c *last_type_symbol = NULL;
       
   776 
       
   777 		{
       
   778 			identifier_c param_name("IN");
       
   779 			/* 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);
       
   781 			
       
   782 			/* Get the value from a foo(<param_value>) style call */
       
   783 			if (IN_param_value == NULL)
       
   784 			  IN_param_value = function_call_param_iterator.next();
       
   785 			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 ;
       
   787 			
       
   788 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   789 			{
       
   790 		
       
   791 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   792 				s4o.print("(");
       
   793 				return_type_symbol->accept(*this);
       
   794 				s4o.print(")");
       
   795 				IN_param_value->accept(*this);
       
   796 				return NULL;
       
   797 				
       
   798 			}
       
   799 			
       
   800 			ERROR;
       
   801 		}
       
   802 		
       
   803 	}/*function_sint_to_real*/
       
   804 	break;
       
   805 
       
   806 /****
       
   807  *SINT_TO_SINT
       
   808  */
       
   809 	case function_sint_to_sint :
       
   810 	{
       
   811 		symbol_c *last_type_symbol = NULL;
       
   812 
       
   813 		{
       
   814 			identifier_c param_name("IN");
       
   815 			/* 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);
       
   817 			
       
   818 			/* Get the value from a foo(<param_value>) style call */
       
   819 			if (IN_param_value == NULL)
       
   820 			  IN_param_value = function_call_param_iterator.next();
       
   821 			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 ;
       
   823 			
       
   824 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   825 			{
       
   826 		
       
   827 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
   828 				s4o.print("(");
       
   829 				return_type_symbol->accept(*this);
       
   830 				s4o.print(")");
       
   831 				IN_param_value->accept(*this);
       
   832 				return NULL;
       
   833 				
       
   834 			}
       
   835 			
       
   836 			ERROR;
       
   837 		}
       
   838 		
       
   839 	}/*function_sint_to_sint*/
       
   840 	break;
       
   841 
       
   842 /****
       
   843  *SINT_TO_LINT
       
   844  */
       
   845 	case function_sint_to_lint :
       
   846 	{
       
   847 		symbol_c *last_type_symbol = NULL;
       
   848 
       
   849 		{
       
   850 			identifier_c param_name("IN");
       
   851 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
   852 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   853 			
       
   854 			/* Get the value from a foo(<param_value>) style call */
       
   855 			if (IN_param_value == NULL)
       
   856 			  IN_param_value = function_call_param_iterator.next();
       
   857 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   858 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   859 			
       
   860 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   861 			{
       
   862 		
       
   863 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   864 				s4o.print("(");
       
   865 				return_type_symbol->accept(*this);
       
   866 				s4o.print(")");
       
   867 				IN_param_value->accept(*this);
       
   868 				return NULL;
       
   869 				
       
   870 			}
       
   871 			
       
   872 			ERROR;
       
   873 		}
       
   874 		
       
   875 	}/*function_sint_to_lint*/
       
   876 	break;
       
   877 
       
   878 /****
       
   879  *SINT_TO_DINT
       
   880  */
       
   881 	case function_sint_to_dint :
       
   882 	{
       
   883 		symbol_c *last_type_symbol = NULL;
       
   884 
       
   885 		{
       
   886 			identifier_c param_name("IN");
       
   887 			/* 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);
       
   889 			
       
   890 			/* Get the value from a foo(<param_value>) style call */
       
   891 			if (IN_param_value == NULL)
       
   892 			  IN_param_value = function_call_param_iterator.next();
       
   893 			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 ;
       
   895 			
       
   896 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   897 			{
       
   898 		
       
   899 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   900 				s4o.print("(");
       
   901 				return_type_symbol->accept(*this);
       
   902 				s4o.print(")");
       
   903 				IN_param_value->accept(*this);
       
   904 				return NULL;
       
   905 				
       
   906 			}
       
   907 			
       
   908 			ERROR;
       
   909 		}
       
   910 		
       
   911 	}/*function_sint_to_dint*/
       
   912 	break;
       
   913 
       
   914 /****
       
   915  *SINT_TO_DATE
       
   916  */
       
   917 	case function_sint_to_date :
       
   918 	{
       
   919 		symbol_c *last_type_symbol = NULL;
       
   920 
       
   921 		{
       
   922 			identifier_c param_name("IN");
       
   923 			/* 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);
       
   925 			
       
   926 			/* Get the value from a foo(<param_value>) style call */
       
   927 			if (IN_param_value == NULL)
       
   928 			  IN_param_value = function_call_param_iterator.next();
       
   929 			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 ;
       
   931 			
       
   932 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   933 			{
       
   934 		
       
   935 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   936 				s4o.print("(");
       
   937 				return_type_symbol->accept(*this);
       
   938 				s4o.print(")time_to_real(");
       
   939 				IN_param_value->accept(*this);
       
   940 				s4o.print(")");
       
   941 				return NULL;
       
   942 				
       
   943 			}
       
   944 			
       
   945 			ERROR;
       
   946 		}
       
   947 		
       
   948 	}/*function_sint_to_date*/
       
   949 	break;
       
   950 
       
   951 /****
       
   952  *SINT_TO_DWORD
       
   953  */
       
   954 	case function_sint_to_dword :
       
   955 	{
       
   956 		symbol_c *last_type_symbol = NULL;
       
   957 
       
   958 		{
       
   959 			identifier_c param_name("IN");
       
   960 			/* 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);
       
   962 			
       
   963 			/* Get the value from a foo(<param_value>) style call */
       
   964 			if (IN_param_value == NULL)
       
   965 			  IN_param_value = function_call_param_iterator.next();
       
   966 			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 ;
       
   968 			
       
   969 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   970 			{
       
   971 		
       
   972 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   973 				s4o.print("(");
       
   974 				return_type_symbol->accept(*this);
       
   975 				s4o.print(")");
       
   976 				IN_param_value->accept(*this);
       
   977 				return NULL;
       
   978 				
       
   979 			}
       
   980 			
       
   981 			ERROR;
       
   982 		}
       
   983 		
       
   984 	}/*function_sint_to_dword*/
       
   985 	break;
       
   986 
       
   987 /****
       
   988  *SINT_TO_DT
       
   989  */
       
   990 	case function_sint_to_dt :
       
   991 	{
       
   992 		symbol_c *last_type_symbol = NULL;
       
   993 
       
   994 		{
       
   995 			identifier_c param_name("IN");
       
   996 			/* 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);
       
   998 			
       
   999 			/* Get the value from a foo(<param_value>) style call */
       
  1000 			if (IN_param_value == NULL)
       
  1001 			  IN_param_value = function_call_param_iterator.next();
       
  1002 			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 ;
       
  1004 			
       
  1005 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1006 			{
       
  1007 		
       
  1008 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1009 				s4o.print("(");
       
  1010 				return_type_symbol->accept(*this);
       
  1011 				s4o.print(")time_to_real(");
       
  1012 				IN_param_value->accept(*this);
       
  1013 				s4o.print(")");
       
  1014 				return NULL;
       
  1015 				
       
  1016 			}
       
  1017 			
       
  1018 			ERROR;
       
  1019 		}
       
  1020 		
       
  1021 	}/*function_sint_to_dt*/
       
  1022 	break;
       
  1023 
       
  1024 /****
       
  1025  *SINT_TO_TOD
       
  1026  */
       
  1027 	case function_sint_to_tod :
       
  1028 	{
       
  1029 		symbol_c *last_type_symbol = NULL;
       
  1030 
       
  1031 		{
       
  1032 			identifier_c param_name("IN");
       
  1033 			/* 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);
       
  1035 			
       
  1036 			/* Get the value from a foo(<param_value>) style call */
       
  1037 			if (IN_param_value == NULL)
       
  1038 			  IN_param_value = function_call_param_iterator.next();
       
  1039 			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 ;
       
  1041 			
       
  1042 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1043 			{
       
  1044 		
       
  1045 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1046 				s4o.print("(");
       
  1047 				return_type_symbol->accept(*this);
       
  1048 				s4o.print(")time_to_real(");
       
  1049 				IN_param_value->accept(*this);
       
  1050 				s4o.print(")");
       
  1051 				return NULL;
       
  1052 				
       
  1053 			}
       
  1054 			
       
  1055 			ERROR;
       
  1056 		}
       
  1057 		
       
  1058 	}/*function_sint_to_tod*/
       
  1059 	break;
       
  1060 
       
  1061 /****
       
  1062  *SINT_TO_UDINT
       
  1063  */
       
  1064 	case function_sint_to_udint :
       
  1065 	{
       
  1066 		symbol_c *last_type_symbol = NULL;
       
  1067 
       
  1068 		{
       
  1069 			identifier_c param_name("IN");
       
  1070 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1071 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1072 			
       
  1073 			/* Get the value from a foo(<param_value>) style call */
       
  1074 			if (IN_param_value == NULL)
       
  1075 			  IN_param_value = function_call_param_iterator.next();
       
  1076 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1078 			
       
  1079 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1080 			{
       
  1081 		
       
  1082 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1083 				s4o.print("(");
       
  1084 				return_type_symbol->accept(*this);
       
  1085 				s4o.print(")");
       
  1086 				IN_param_value->accept(*this);
       
  1087 				return NULL;
       
  1088 				
       
  1089 			}
       
  1090 			
       
  1091 			ERROR;
       
  1092 		}
       
  1093 		
       
  1094 	}/*function_sint_to_udint*/
       
  1095 	break;
       
  1096 
       
  1097 /****
       
  1098  *SINT_TO_WORD
       
  1099  */
       
  1100 	case function_sint_to_word :
       
  1101 	{
       
  1102 		symbol_c *last_type_symbol = NULL;
       
  1103 
       
  1104 		{
       
  1105 			identifier_c param_name("IN");
       
  1106 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1107 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1108 			
       
  1109 			/* Get the value from a foo(<param_value>) style call */
       
  1110 			if (IN_param_value == NULL)
       
  1111 			  IN_param_value = function_call_param_iterator.next();
       
  1112 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1114 			
       
  1115 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1116 			{
       
  1117 		
       
  1118 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1119 				s4o.print("(");
       
  1120 				return_type_symbol->accept(*this);
       
  1121 				s4o.print(")");
       
  1122 				IN_param_value->accept(*this);
       
  1123 				return NULL;
       
  1124 				
       
  1125 			}
       
  1126 			
       
  1127 			ERROR;
       
  1128 		}
       
  1129 		
       
  1130 	}/*function_sint_to_word*/
       
  1131 	break;
       
  1132 
       
  1133 /****
       
  1134  *SINT_TO_WSTRING
       
  1135  */
       
  1136 	case function_sint_to_wstring :
       
  1137 	{
       
  1138 		symbol_c *last_type_symbol = NULL;
       
  1139 
       
  1140 		{
       
  1141 			identifier_c param_name("IN");
       
  1142 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1143 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1144 			
       
  1145 			/* Get the value from a foo(<param_value>) style call */
       
  1146 			if (IN_param_value == NULL)
       
  1147 			  IN_param_value = function_call_param_iterator.next();
       
  1148 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1150 			
       
  1151 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1152 			{
       
  1153 		
       
  1154 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1155 				s4o.print("(");
       
  1156 				return_type_symbol->accept(*this);
       
  1157 				s4o.print(")string_to_int(");
       
  1158 				IN_param_value->accept(*this);
       
  1159 				s4o.print(", 10)");
       
  1160 				return NULL;
       
  1161 				
       
  1162 			}
       
  1163 			
       
  1164 			ERROR;
       
  1165 		}
       
  1166 		
       
  1167 	}/*function_sint_to_wstring*/
       
  1168 	break;
       
  1169 
       
  1170 /****
       
  1171  *SINT_TO_STRING
       
  1172  */
       
  1173 	case function_sint_to_string :
       
  1174 	{
       
  1175 		symbol_c *last_type_symbol = NULL;
       
  1176 
       
  1177 		{
       
  1178 			identifier_c param_name("IN");
       
  1179 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1180 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1181 			
       
  1182 			/* Get the value from a foo(<param_value>) style call */
       
  1183 			if (IN_param_value == NULL)
       
  1184 			  IN_param_value = function_call_param_iterator.next();
       
  1185 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1187 			
       
  1188 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1189 			{
       
  1190 		
       
  1191 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1192 				s4o.print("(");
       
  1193 				return_type_symbol->accept(*this);
       
  1194 				s4o.print(")string_to_int(");
       
  1195 				IN_param_value->accept(*this);
       
  1196 				s4o.print(", 10)");
       
  1197 				return NULL;
       
  1198 				
       
  1199 			}
       
  1200 			
       
  1201 			ERROR;
       
  1202 		}
       
  1203 		
       
  1204 	}/*function_sint_to_string*/
       
  1205 	break;
       
  1206 
       
  1207 /****
       
  1208  *SINT_TO_LWORD
       
  1209  */
       
  1210 	case function_sint_to_lword :
       
  1211 	{
       
  1212 		symbol_c *last_type_symbol = NULL;
       
  1213 
       
  1214 		{
       
  1215 			identifier_c param_name("IN");
       
  1216 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1217 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1218 			
       
  1219 			/* Get the value from a foo(<param_value>) style call */
       
  1220 			if (IN_param_value == NULL)
       
  1221 			  IN_param_value = function_call_param_iterator.next();
       
  1222 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1224 			
       
  1225 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1226 			{
       
  1227 		
       
  1228 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1229 				s4o.print("(");
       
  1230 				return_type_symbol->accept(*this);
       
  1231 				s4o.print(")");
       
  1232 				IN_param_value->accept(*this);
       
  1233 				return NULL;
       
  1234 				
       
  1235 			}
       
  1236 			
       
  1237 			ERROR;
       
  1238 		}
       
  1239 		
       
  1240 	}/*function_sint_to_lword*/
       
  1241 	break;
       
  1242 
       
  1243 /****
       
  1244  *SINT_TO_UINT
       
  1245  */
       
  1246 	case function_sint_to_uint :
       
  1247 	{
       
  1248 		symbol_c *last_type_symbol = NULL;
       
  1249 
       
  1250 		{
       
  1251 			identifier_c param_name("IN");
       
  1252 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1253 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1254 			
       
  1255 			/* Get the value from a foo(<param_value>) style call */
       
  1256 			if (IN_param_value == NULL)
       
  1257 			  IN_param_value = function_call_param_iterator.next();
       
  1258 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1260 			
       
  1261 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1262 			{
       
  1263 		
       
  1264 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1265 				s4o.print("(");
       
  1266 				return_type_symbol->accept(*this);
       
  1267 				s4o.print(")");
       
  1268 				IN_param_value->accept(*this);
       
  1269 				return NULL;
       
  1270 				
       
  1271 			}
       
  1272 			
       
  1273 			ERROR;
       
  1274 		}
       
  1275 		
       
  1276 	}/*function_sint_to_uint*/
       
  1277 	break;
       
  1278 
       
  1279 /****
       
  1280  *SINT_TO_LREAL
       
  1281  */
       
  1282 	case function_sint_to_lreal :
       
  1283 	{
       
  1284 		symbol_c *last_type_symbol = NULL;
       
  1285 
       
  1286 		{
       
  1287 			identifier_c param_name("IN");
       
  1288 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1289 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1290 			
       
  1291 			/* Get the value from a foo(<param_value>) style call */
       
  1292 			if (IN_param_value == NULL)
       
  1293 			  IN_param_value = function_call_param_iterator.next();
       
  1294 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1296 			
       
  1297 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1298 			{
       
  1299 		
       
  1300 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1301 				s4o.print("(");
       
  1302 				return_type_symbol->accept(*this);
       
  1303 				s4o.print(")");
       
  1304 				IN_param_value->accept(*this);
       
  1305 				return NULL;
       
  1306 				
       
  1307 			}
       
  1308 			
       
  1309 			ERROR;
       
  1310 		}
       
  1311 		
       
  1312 	}/*function_sint_to_lreal*/
       
  1313 	break;
       
  1314 
       
  1315 /****
       
  1316  *SINT_TO_BYTE
       
  1317  */
       
  1318 	case function_sint_to_byte :
       
  1319 	{
       
  1320 		symbol_c *last_type_symbol = NULL;
       
  1321 
       
  1322 		{
       
  1323 			identifier_c param_name("IN");
       
  1324 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1325 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1326 			
       
  1327 			/* Get the value from a foo(<param_value>) style call */
       
  1328 			if (IN_param_value == NULL)
       
  1329 			  IN_param_value = function_call_param_iterator.next();
       
  1330 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1332 			
       
  1333 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1334 			{
       
  1335 		
       
  1336 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1337 				s4o.print("(");
       
  1338 				return_type_symbol->accept(*this);
       
  1339 				s4o.print(")");
       
  1340 				IN_param_value->accept(*this);
       
  1341 				return NULL;
       
  1342 				
       
  1343 			}
       
  1344 			
       
  1345 			ERROR;
       
  1346 		}
       
  1347 		
       
  1348 	}/*function_sint_to_byte*/
       
  1349 	break;
       
  1350 
       
  1351 /****
       
  1352  *SINT_TO_USINT
       
  1353  */
       
  1354 	case function_sint_to_usint :
       
  1355 	{
       
  1356 		symbol_c *last_type_symbol = NULL;
       
  1357 
       
  1358 		{
       
  1359 			identifier_c param_name("IN");
       
  1360 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1361 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1362 			
       
  1363 			/* Get the value from a foo(<param_value>) style call */
       
  1364 			if (IN_param_value == NULL)
       
  1365 			  IN_param_value = function_call_param_iterator.next();
       
  1366 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1367 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1368 			
       
  1369 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1370 			{
       
  1371 		
       
  1372 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1373 				s4o.print("(");
       
  1374 				return_type_symbol->accept(*this);
       
  1375 				s4o.print(")");
       
  1376 				IN_param_value->accept(*this);
       
  1377 				return NULL;
       
  1378 				
       
  1379 			}
       
  1380 			
       
  1381 			ERROR;
       
  1382 		}
       
  1383 		
       
  1384 	}/*function_sint_to_usint*/
       
  1385 	break;
       
  1386 
       
  1387 /****
       
  1388  *SINT_TO_ULINT
       
  1389  */
       
  1390 	case function_sint_to_ulint :
       
  1391 	{
       
  1392 		symbol_c *last_type_symbol = NULL;
       
  1393 
       
  1394 		{
       
  1395 			identifier_c param_name("IN");
       
  1396 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1397 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1398 			
       
  1399 			/* Get the value from a foo(<param_value>) style call */
       
  1400 			if (IN_param_value == NULL)
       
  1401 			  IN_param_value = function_call_param_iterator.next();
       
  1402 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1404 			
       
  1405 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1406 			{
       
  1407 		
       
  1408 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1409 				s4o.print("(");
       
  1410 				return_type_symbol->accept(*this);
       
  1411 				s4o.print(")");
       
  1412 				IN_param_value->accept(*this);
       
  1413 				return NULL;
       
  1414 				
       
  1415 			}
       
  1416 			
       
  1417 			ERROR;
       
  1418 		}
       
  1419 		
       
  1420 	}/*function_sint_to_ulint*/
       
  1421 	break;
       
  1422 
       
  1423 /****
       
  1424  *SINT_TO_BOOL
       
  1425  */
       
  1426 	case function_sint_to_bool :
       
  1427 	{
       
  1428 		symbol_c *last_type_symbol = NULL;
       
  1429 
       
  1430 		{
       
  1431 			identifier_c param_name("IN");
       
  1432 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1433 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1434 			
       
  1435 			/* Get the value from a foo(<param_value>) style call */
       
  1436 			if (IN_param_value == NULL)
       
  1437 			  IN_param_value = function_call_param_iterator.next();
       
  1438 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1439 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1440 			
       
  1441 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1442 			{
       
  1443 		
       
  1444 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1445 				s4o.print("(");
       
  1446 				return_type_symbol->accept(*this);
       
  1447 				s4o.print(")");
       
  1448 				IN_param_value->accept(*this);
       
  1449 				return NULL;
       
  1450 				
       
  1451 			}
       
  1452 			
       
  1453 			ERROR;
       
  1454 		}
       
  1455 		
       
  1456 	}/*function_sint_to_bool*/
       
  1457 	break;
       
  1458 
       
  1459 /****
       
  1460  *SINT_TO_TIME
       
  1461  */
       
  1462 	case function_sint_to_time :
       
  1463 	{
       
  1464 		symbol_c *last_type_symbol = NULL;
       
  1465 
       
  1466 		{
       
  1467 			identifier_c param_name("IN");
       
  1468 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1469 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1470 			
       
  1471 			/* Get the value from a foo(<param_value>) style call */
       
  1472 			if (IN_param_value == NULL)
       
  1473 			  IN_param_value = function_call_param_iterator.next();
       
  1474 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1476 			
       
  1477 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1478 			{
       
  1479 		
       
  1480 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1481 				s4o.print("(");
       
  1482 				return_type_symbol->accept(*this);
       
  1483 				s4o.print(")time_to_real(");
       
  1484 				IN_param_value->accept(*this);
       
  1485 				s4o.print(")");
       
  1486 				return NULL;
       
  1487 				
       
  1488 			}
       
  1489 			
       
  1490 			ERROR;
       
  1491 		}
       
  1492 		
       
  1493 	}/*function_sint_to_time*/
       
  1494 	break;
       
  1495 
       
  1496 /****
       
  1497  *SINT_TO_INT
       
  1498  */
       
  1499 	case function_sint_to_int :
       
  1500 	{
       
  1501 		symbol_c *last_type_symbol = NULL;
       
  1502 
       
  1503 		{
       
  1504 			identifier_c param_name("IN");
       
  1505 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1506 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1507 			
       
  1508 			/* Get the value from a foo(<param_value>) style call */
       
  1509 			if (IN_param_value == NULL)
       
  1510 			  IN_param_value = function_call_param_iterator.next();
       
  1511 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1513 			
       
  1514 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1515 			{
       
  1516 		
       
  1517 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1518 				s4o.print("(");
       
  1519 				return_type_symbol->accept(*this);
       
  1520 				s4o.print(")");
       
  1521 				IN_param_value->accept(*this);
       
  1522 				return NULL;
       
  1523 				
       
  1524 			}
       
  1525 			
       
  1526 			ERROR;
       
  1527 		}
       
  1528 		
       
  1529 	}/*function_sint_to_int*/
       
  1530 	break;
       
  1531 
       
  1532 /****
       
  1533  *LINT_TO_REAL
       
  1534  */
       
  1535 	case function_lint_to_real :
       
  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(lint_type_name_c))
       
  1551 			{
       
  1552 		
       
  1553 				symbol_c * return_type_symbol = &search_constant_type_c::real_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_lint_to_real*/
       
  1566 	break;
       
  1567 
       
  1568 /****
       
  1569  *LINT_TO_SINT
       
  1570  */
       
  1571 	case function_lint_to_sint :
       
  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(lint_type_name_c))
       
  1587 			{
       
  1588 		
       
  1589 				symbol_c * return_type_symbol = &search_constant_type_c::sint_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_lint_to_sint*/
       
  1602 	break;
       
  1603 
       
  1604 /****
       
  1605  *LINT_TO_LINT
       
  1606  */
       
  1607 	case function_lint_to_lint :
       
  1608 	{
       
  1609 		symbol_c *last_type_symbol = NULL;
       
  1610 
       
  1611 		{
       
  1612 			identifier_c param_name("IN");
       
  1613 			/* 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);
       
  1615 			
       
  1616 			/* Get the value from a foo(<param_value>) style call */
       
  1617 			if (IN_param_value == NULL)
       
  1618 			  IN_param_value = function_call_param_iterator.next();
       
  1619 			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 ;
       
  1621 			
       
  1622 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1623 			{
       
  1624 		
       
  1625 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1626 				s4o.print("(");
       
  1627 				return_type_symbol->accept(*this);
       
  1628 				s4o.print(")");
       
  1629 				IN_param_value->accept(*this);
       
  1630 				return NULL;
       
  1631 				
       
  1632 			}
       
  1633 			
       
  1634 			ERROR;
       
  1635 		}
       
  1636 		
       
  1637 	}/*function_lint_to_lint*/
       
  1638 	break;
       
  1639 
       
  1640 /****
       
  1641  *LINT_TO_DINT
       
  1642  */
       
  1643 	case function_lint_to_dint :
       
  1644 	{
       
  1645 		symbol_c *last_type_symbol = NULL;
       
  1646 
       
  1647 		{
       
  1648 			identifier_c param_name("IN");
       
  1649 			/* 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);
       
  1651 			
       
  1652 			/* Get the value from a foo(<param_value>) style call */
       
  1653 			if (IN_param_value == NULL)
       
  1654 			  IN_param_value = function_call_param_iterator.next();
       
  1655 			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 ;
       
  1657 			
       
  1658 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1659 			{
       
  1660 		
       
  1661 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1662 				s4o.print("(");
       
  1663 				return_type_symbol->accept(*this);
       
  1664 				s4o.print(")");
       
  1665 				IN_param_value->accept(*this);
       
  1666 				return NULL;
       
  1667 				
       
  1668 			}
       
  1669 			
       
  1670 			ERROR;
       
  1671 		}
       
  1672 		
       
  1673 	}/*function_lint_to_dint*/
       
  1674 	break;
       
  1675 
       
  1676 /****
       
  1677  *LINT_TO_DATE
       
  1678  */
       
  1679 	case function_lint_to_date :
       
  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(lint_type_name_c))
       
  1695 			{
       
  1696 		
       
  1697 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1698 				s4o.print("(");
       
  1699 				return_type_symbol->accept(*this);
       
  1700 				s4o.print(")time_to_real(");
       
  1701 				IN_param_value->accept(*this);
       
  1702 				s4o.print(")");
       
  1703 				return NULL;
       
  1704 				
       
  1705 			}
       
  1706 			
       
  1707 			ERROR;
       
  1708 		}
       
  1709 		
       
  1710 	}/*function_lint_to_date*/
       
  1711 	break;
       
  1712 
       
  1713 /****
       
  1714  *LINT_TO_DWORD
       
  1715  */
       
  1716 	case function_lint_to_dword :
       
  1717 	{
       
  1718 		symbol_c *last_type_symbol = NULL;
       
  1719 
       
  1720 		{
       
  1721 			identifier_c param_name("IN");
       
  1722 			/* 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);
       
  1724 			
       
  1725 			/* Get the value from a foo(<param_value>) style call */
       
  1726 			if (IN_param_value == NULL)
       
  1727 			  IN_param_value = function_call_param_iterator.next();
       
  1728 			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 ;
       
  1730 			
       
  1731 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1732 			{
       
  1733 		
       
  1734 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1735 				s4o.print("(");
       
  1736 				return_type_symbol->accept(*this);
       
  1737 				s4o.print(")");
       
  1738 				IN_param_value->accept(*this);
       
  1739 				return NULL;
       
  1740 				
       
  1741 			}
       
  1742 			
       
  1743 			ERROR;
       
  1744 		}
       
  1745 		
       
  1746 	}/*function_lint_to_dword*/
       
  1747 	break;
       
  1748 
       
  1749 /****
       
  1750  *LINT_TO_DT
       
  1751  */
       
  1752 	case function_lint_to_dt :
       
  1753 	{
       
  1754 		symbol_c *last_type_symbol = NULL;
       
  1755 
       
  1756 		{
       
  1757 			identifier_c param_name("IN");
       
  1758 			/* 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);
       
  1760 			
       
  1761 			/* Get the value from a foo(<param_value>) style call */
       
  1762 			if (IN_param_value == NULL)
       
  1763 			  IN_param_value = function_call_param_iterator.next();
       
  1764 			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 ;
       
  1766 			
       
  1767 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1768 			{
       
  1769 		
       
  1770 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1771 				s4o.print("(");
       
  1772 				return_type_symbol->accept(*this);
       
  1773 				s4o.print(")time_to_real(");
       
  1774 				IN_param_value->accept(*this);
       
  1775 				s4o.print(")");
       
  1776 				return NULL;
       
  1777 				
       
  1778 			}
       
  1779 			
       
  1780 			ERROR;
       
  1781 		}
       
  1782 		
       
  1783 	}/*function_lint_to_dt*/
       
  1784 	break;
       
  1785 
       
  1786 /****
       
  1787  *LINT_TO_TOD
       
  1788  */
       
  1789 	case function_lint_to_tod :
       
  1790 	{
       
  1791 		symbol_c *last_type_symbol = NULL;
       
  1792 
       
  1793 		{
       
  1794 			identifier_c param_name("IN");
       
  1795 			/* 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);
       
  1797 			
       
  1798 			/* Get the value from a foo(<param_value>) style call */
       
  1799 			if (IN_param_value == NULL)
       
  1800 			  IN_param_value = function_call_param_iterator.next();
       
  1801 			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 ;
       
  1803 			
       
  1804 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1805 			{
       
  1806 		
       
  1807 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1808 				s4o.print("(");
       
  1809 				return_type_symbol->accept(*this);
       
  1810 				s4o.print(")time_to_real(");
       
  1811 				IN_param_value->accept(*this);
       
  1812 				s4o.print(")");
       
  1813 				return NULL;
       
  1814 				
       
  1815 			}
       
  1816 			
       
  1817 			ERROR;
       
  1818 		}
       
  1819 		
       
  1820 	}/*function_lint_to_tod*/
       
  1821 	break;
       
  1822 
       
  1823 /****
       
  1824  *LINT_TO_UDINT
       
  1825  */
       
  1826 	case function_lint_to_udint :
       
  1827 	{
       
  1828 		symbol_c *last_type_symbol = NULL;
       
  1829 
       
  1830 		{
       
  1831 			identifier_c param_name("IN");
       
  1832 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1833 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1834 			
       
  1835 			/* Get the value from a foo(<param_value>) style call */
       
  1836 			if (IN_param_value == NULL)
       
  1837 			  IN_param_value = function_call_param_iterator.next();
       
  1838 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1840 			
       
  1841 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1842 			{
       
  1843 		
       
  1844 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1845 				s4o.print("(");
       
  1846 				return_type_symbol->accept(*this);
       
  1847 				s4o.print(")");
       
  1848 				IN_param_value->accept(*this);
       
  1849 				return NULL;
       
  1850 				
       
  1851 			}
       
  1852 			
       
  1853 			ERROR;
       
  1854 		}
       
  1855 		
       
  1856 	}/*function_lint_to_udint*/
       
  1857 	break;
       
  1858 
       
  1859 /****
       
  1860  *LINT_TO_WORD
       
  1861  */
       
  1862 	case function_lint_to_word :
       
  1863 	{
       
  1864 		symbol_c *last_type_symbol = NULL;
       
  1865 
       
  1866 		{
       
  1867 			identifier_c param_name("IN");
       
  1868 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1869 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1870 			
       
  1871 			/* Get the value from a foo(<param_value>) style call */
       
  1872 			if (IN_param_value == NULL)
       
  1873 			  IN_param_value = function_call_param_iterator.next();
       
  1874 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1876 			
       
  1877 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1878 			{
       
  1879 		
       
  1880 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1881 				s4o.print("(");
       
  1882 				return_type_symbol->accept(*this);
       
  1883 				s4o.print(")");
       
  1884 				IN_param_value->accept(*this);
       
  1885 				return NULL;
       
  1886 				
       
  1887 			}
       
  1888 			
       
  1889 			ERROR;
       
  1890 		}
       
  1891 		
       
  1892 	}/*function_lint_to_word*/
       
  1893 	break;
       
  1894 
       
  1895 /****
       
  1896  *LINT_TO_WSTRING
       
  1897  */
       
  1898 	case function_lint_to_wstring :
       
  1899 	{
       
  1900 		symbol_c *last_type_symbol = NULL;
       
  1901 
       
  1902 		{
       
  1903 			identifier_c param_name("IN");
       
  1904 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1905 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1906 			
       
  1907 			/* Get the value from a foo(<param_value>) style call */
       
  1908 			if (IN_param_value == NULL)
       
  1909 			  IN_param_value = function_call_param_iterator.next();
       
  1910 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1911 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1912 			
       
  1913 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1914 			{
       
  1915 		
       
  1916 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1917 				s4o.print("(");
       
  1918 				return_type_symbol->accept(*this);
       
  1919 				s4o.print(")string_to_int(");
       
  1920 				IN_param_value->accept(*this);
       
  1921 				s4o.print(", 10)");
       
  1922 				return NULL;
       
  1923 				
       
  1924 			}
       
  1925 			
       
  1926 			ERROR;
       
  1927 		}
       
  1928 		
       
  1929 	}/*function_lint_to_wstring*/
       
  1930 	break;
       
  1931 
       
  1932 /****
       
  1933  *LINT_TO_STRING
       
  1934  */
       
  1935 	case function_lint_to_string :
       
  1936 	{
       
  1937 		symbol_c *last_type_symbol = NULL;
       
  1938 
       
  1939 		{
       
  1940 			identifier_c param_name("IN");
       
  1941 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1942 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1943 			
       
  1944 			/* Get the value from a foo(<param_value>) style call */
       
  1945 			if (IN_param_value == NULL)
       
  1946 			  IN_param_value = function_call_param_iterator.next();
       
  1947 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1949 			
       
  1950 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1951 			{
       
  1952 		
       
  1953 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1954 				s4o.print("(");
       
  1955 				return_type_symbol->accept(*this);
       
  1956 				s4o.print(")string_to_int(");
       
  1957 				IN_param_value->accept(*this);
       
  1958 				s4o.print(", 10)");
       
  1959 				return NULL;
       
  1960 				
       
  1961 			}
       
  1962 			
       
  1963 			ERROR;
       
  1964 		}
       
  1965 		
       
  1966 	}/*function_lint_to_string*/
       
  1967 	break;
       
  1968 
       
  1969 /****
       
  1970  *LINT_TO_LWORD
       
  1971  */
       
  1972 	case function_lint_to_lword :
       
  1973 	{
       
  1974 		symbol_c *last_type_symbol = NULL;
       
  1975 
       
  1976 		{
       
  1977 			identifier_c param_name("IN");
       
  1978 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1979 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1980 			
       
  1981 			/* Get the value from a foo(<param_value>) style call */
       
  1982 			if (IN_param_value == NULL)
       
  1983 			  IN_param_value = function_call_param_iterator.next();
       
  1984 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  1986 			
       
  1987 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  1988 			{
       
  1989 		
       
  1990 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1991 				s4o.print("(");
       
  1992 				return_type_symbol->accept(*this);
       
  1993 				s4o.print(")");
       
  1994 				IN_param_value->accept(*this);
       
  1995 				return NULL;
       
  1996 				
       
  1997 			}
       
  1998 			
       
  1999 			ERROR;
       
  2000 		}
       
  2001 		
       
  2002 	}/*function_lint_to_lword*/
       
  2003 	break;
       
  2004 
       
  2005 /****
       
  2006  *LINT_TO_UINT
       
  2007  */
       
  2008 	case function_lint_to_uint :
       
  2009 	{
       
  2010 		symbol_c *last_type_symbol = NULL;
       
  2011 
       
  2012 		{
       
  2013 			identifier_c param_name("IN");
       
  2014 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2015 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2016 			
       
  2017 			/* Get the value from a foo(<param_value>) style call */
       
  2018 			if (IN_param_value == NULL)
       
  2019 			  IN_param_value = function_call_param_iterator.next();
       
  2020 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2022 			
       
  2023 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2024 			{
       
  2025 		
       
  2026 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2027 				s4o.print("(");
       
  2028 				return_type_symbol->accept(*this);
       
  2029 				s4o.print(")");
       
  2030 				IN_param_value->accept(*this);
       
  2031 				return NULL;
       
  2032 				
       
  2033 			}
       
  2034 			
       
  2035 			ERROR;
       
  2036 		}
       
  2037 		
       
  2038 	}/*function_lint_to_uint*/
       
  2039 	break;
       
  2040 
       
  2041 /****
       
  2042  *LINT_TO_LREAL
       
  2043  */
       
  2044 	case function_lint_to_lreal :
       
  2045 	{
       
  2046 		symbol_c *last_type_symbol = NULL;
       
  2047 
       
  2048 		{
       
  2049 			identifier_c param_name("IN");
       
  2050 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2051 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2052 			
       
  2053 			/* Get the value from a foo(<param_value>) style call */
       
  2054 			if (IN_param_value == NULL)
       
  2055 			  IN_param_value = function_call_param_iterator.next();
       
  2056 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2058 			
       
  2059 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2060 			{
       
  2061 		
       
  2062 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2063 				s4o.print("(");
       
  2064 				return_type_symbol->accept(*this);
       
  2065 				s4o.print(")");
       
  2066 				IN_param_value->accept(*this);
       
  2067 				return NULL;
       
  2068 				
       
  2069 			}
       
  2070 			
       
  2071 			ERROR;
       
  2072 		}
       
  2073 		
       
  2074 	}/*function_lint_to_lreal*/
       
  2075 	break;
       
  2076 
       
  2077 /****
       
  2078  *LINT_TO_BYTE
       
  2079  */
       
  2080 	case function_lint_to_byte :
       
  2081 	{
       
  2082 		symbol_c *last_type_symbol = NULL;
       
  2083 
       
  2084 		{
       
  2085 			identifier_c param_name("IN");
       
  2086 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2087 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2088 			
       
  2089 			/* Get the value from a foo(<param_value>) style call */
       
  2090 			if (IN_param_value == NULL)
       
  2091 			  IN_param_value = function_call_param_iterator.next();
       
  2092 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2094 			
       
  2095 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2096 			{
       
  2097 		
       
  2098 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2099 				s4o.print("(");
       
  2100 				return_type_symbol->accept(*this);
       
  2101 				s4o.print(")");
       
  2102 				IN_param_value->accept(*this);
       
  2103 				return NULL;
       
  2104 				
       
  2105 			}
       
  2106 			
       
  2107 			ERROR;
       
  2108 		}
       
  2109 		
       
  2110 	}/*function_lint_to_byte*/
       
  2111 	break;
       
  2112 
       
  2113 /****
       
  2114  *LINT_TO_USINT
       
  2115  */
       
  2116 	case function_lint_to_usint :
       
  2117 	{
       
  2118 		symbol_c *last_type_symbol = NULL;
       
  2119 
       
  2120 		{
       
  2121 			identifier_c param_name("IN");
       
  2122 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2123 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2124 			
       
  2125 			/* Get the value from a foo(<param_value>) style call */
       
  2126 			if (IN_param_value == NULL)
       
  2127 			  IN_param_value = function_call_param_iterator.next();
       
  2128 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2130 			
       
  2131 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2132 			{
       
  2133 		
       
  2134 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2135 				s4o.print("(");
       
  2136 				return_type_symbol->accept(*this);
       
  2137 				s4o.print(")");
       
  2138 				IN_param_value->accept(*this);
       
  2139 				return NULL;
       
  2140 				
       
  2141 			}
       
  2142 			
       
  2143 			ERROR;
       
  2144 		}
       
  2145 		
       
  2146 	}/*function_lint_to_usint*/
       
  2147 	break;
       
  2148 
       
  2149 /****
       
  2150  *LINT_TO_ULINT
       
  2151  */
       
  2152 	case function_lint_to_ulint :
       
  2153 	{
       
  2154 		symbol_c *last_type_symbol = NULL;
       
  2155 
       
  2156 		{
       
  2157 			identifier_c param_name("IN");
       
  2158 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2159 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2160 			
       
  2161 			/* Get the value from a foo(<param_value>) style call */
       
  2162 			if (IN_param_value == NULL)
       
  2163 			  IN_param_value = function_call_param_iterator.next();
       
  2164 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2166 			
       
  2167 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2168 			{
       
  2169 		
       
  2170 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2171 				s4o.print("(");
       
  2172 				return_type_symbol->accept(*this);
       
  2173 				s4o.print(")");
       
  2174 				IN_param_value->accept(*this);
       
  2175 				return NULL;
       
  2176 				
       
  2177 			}
       
  2178 			
       
  2179 			ERROR;
       
  2180 		}
       
  2181 		
       
  2182 	}/*function_lint_to_ulint*/
       
  2183 	break;
       
  2184 
       
  2185 /****
       
  2186  *LINT_TO_BOOL
       
  2187  */
       
  2188 	case function_lint_to_bool :
       
  2189 	{
       
  2190 		symbol_c *last_type_symbol = NULL;
       
  2191 
       
  2192 		{
       
  2193 			identifier_c param_name("IN");
       
  2194 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2195 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2196 			
       
  2197 			/* Get the value from a foo(<param_value>) style call */
       
  2198 			if (IN_param_value == NULL)
       
  2199 			  IN_param_value = function_call_param_iterator.next();
       
  2200 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2202 			
       
  2203 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2204 			{
       
  2205 		
       
  2206 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2207 				s4o.print("(");
       
  2208 				return_type_symbol->accept(*this);
       
  2209 				s4o.print(")");
       
  2210 				IN_param_value->accept(*this);
       
  2211 				return NULL;
       
  2212 				
       
  2213 			}
       
  2214 			
       
  2215 			ERROR;
       
  2216 		}
       
  2217 		
       
  2218 	}/*function_lint_to_bool*/
       
  2219 	break;
       
  2220 
       
  2221 /****
       
  2222  *LINT_TO_TIME
       
  2223  */
       
  2224 	case function_lint_to_time :
       
  2225 	{
       
  2226 		symbol_c *last_type_symbol = NULL;
       
  2227 
       
  2228 		{
       
  2229 			identifier_c param_name("IN");
       
  2230 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2231 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2232 			
       
  2233 			/* Get the value from a foo(<param_value>) style call */
       
  2234 			if (IN_param_value == NULL)
       
  2235 			  IN_param_value = function_call_param_iterator.next();
       
  2236 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2238 			
       
  2239 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2240 			{
       
  2241 		
       
  2242 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2243 				s4o.print("(");
       
  2244 				return_type_symbol->accept(*this);
       
  2245 				s4o.print(")time_to_real(");
       
  2246 				IN_param_value->accept(*this);
       
  2247 				s4o.print(")");
       
  2248 				return NULL;
       
  2249 				
       
  2250 			}
       
  2251 			
       
  2252 			ERROR;
       
  2253 		}
       
  2254 		
       
  2255 	}/*function_lint_to_time*/
       
  2256 	break;
       
  2257 
       
  2258 /****
       
  2259  *LINT_TO_INT
       
  2260  */
       
  2261 	case function_lint_to_int :
       
  2262 	{
       
  2263 		symbol_c *last_type_symbol = NULL;
       
  2264 
       
  2265 		{
       
  2266 			identifier_c param_name("IN");
       
  2267 			/* 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);
       
  2269 			
       
  2270 			/* Get the value from a foo(<param_value>) style call */
       
  2271 			if (IN_param_value == NULL)
       
  2272 			  IN_param_value = function_call_param_iterator.next();
       
  2273 			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 ;
       
  2275 			
       
  2276 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2277 			{
       
  2278 		
       
  2279 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2280 				s4o.print("(");
       
  2281 				return_type_symbol->accept(*this);
       
  2282 				s4o.print(")");
       
  2283 				IN_param_value->accept(*this);
       
  2284 				return NULL;
       
  2285 				
       
  2286 			}
       
  2287 			
       
  2288 			ERROR;
       
  2289 		}
       
  2290 		
       
  2291 	}/*function_lint_to_int*/
       
  2292 	break;
       
  2293 
       
  2294 /****
       
  2295  *DINT_TO_REAL
       
  2296  */
       
  2297 	case function_dint_to_real :
       
  2298 	{
       
  2299 		symbol_c *last_type_symbol = NULL;
       
  2300 
       
  2301 		{
       
  2302 			identifier_c param_name("IN");
       
  2303 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2304 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2305 			
       
  2306 			/* Get the value from a foo(<param_value>) style call */
       
  2307 			if (IN_param_value == NULL)
       
  2308 			  IN_param_value = function_call_param_iterator.next();
       
  2309 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2310 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2311 			
       
  2312 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2313 			{
       
  2314 		
       
  2315 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2316 				s4o.print("(");
       
  2317 				return_type_symbol->accept(*this);
       
  2318 				s4o.print(")");
       
  2319 				IN_param_value->accept(*this);
       
  2320 				return NULL;
       
  2321 				
       
  2322 			}
       
  2323 			
       
  2324 			ERROR;
       
  2325 		}
       
  2326 		
       
  2327 	}/*function_dint_to_real*/
       
  2328 	break;
       
  2329 
       
  2330 /****
       
  2331  *DINT_TO_SINT
       
  2332  */
       
  2333 	case function_dint_to_sint :
       
  2334 	{
       
  2335 		symbol_c *last_type_symbol = NULL;
       
  2336 
       
  2337 		{
       
  2338 			identifier_c param_name("IN");
       
  2339 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2340 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2341 			
       
  2342 			/* Get the value from a foo(<param_value>) style call */
       
  2343 			if (IN_param_value == NULL)
       
  2344 			  IN_param_value = function_call_param_iterator.next();
       
  2345 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2347 			
       
  2348 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2349 			{
       
  2350 		
       
  2351 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2352 				s4o.print("(");
       
  2353 				return_type_symbol->accept(*this);
       
  2354 				s4o.print(")");
       
  2355 				IN_param_value->accept(*this);
       
  2356 				return NULL;
       
  2357 				
       
  2358 			}
       
  2359 			
       
  2360 			ERROR;
       
  2361 		}
       
  2362 		
       
  2363 	}/*function_dint_to_sint*/
       
  2364 	break;
       
  2365 
       
  2366 /****
       
  2367  *DINT_TO_LINT
       
  2368  */
       
  2369 	case function_dint_to_lint :
       
  2370 	{
       
  2371 		symbol_c *last_type_symbol = NULL;
       
  2372 
       
  2373 		{
       
  2374 			identifier_c param_name("IN");
       
  2375 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2376 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2377 			
       
  2378 			/* Get the value from a foo(<param_value>) style call */
       
  2379 			if (IN_param_value == NULL)
       
  2380 			  IN_param_value = function_call_param_iterator.next();
       
  2381 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2383 			
       
  2384 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2385 			{
       
  2386 		
       
  2387 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2388 				s4o.print("(");
       
  2389 				return_type_symbol->accept(*this);
       
  2390 				s4o.print(")");
       
  2391 				IN_param_value->accept(*this);
       
  2392 				return NULL;
       
  2393 				
       
  2394 			}
       
  2395 			
       
  2396 			ERROR;
       
  2397 		}
       
  2398 		
       
  2399 	}/*function_dint_to_lint*/
       
  2400 	break;
       
  2401 
       
  2402 /****
       
  2403  *DINT_TO_DINT
       
  2404  */
       
  2405 	case function_dint_to_dint :
       
  2406 	{
       
  2407 		symbol_c *last_type_symbol = NULL;
       
  2408 
       
  2409 		{
       
  2410 			identifier_c param_name("IN");
       
  2411 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2412 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2413 			
       
  2414 			/* Get the value from a foo(<param_value>) style call */
       
  2415 			if (IN_param_value == NULL)
       
  2416 			  IN_param_value = function_call_param_iterator.next();
       
  2417 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2419 			
       
  2420 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2421 			{
       
  2422 		
       
  2423 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2424 				s4o.print("(");
       
  2425 				return_type_symbol->accept(*this);
       
  2426 				s4o.print(")");
       
  2427 				IN_param_value->accept(*this);
       
  2428 				return NULL;
       
  2429 				
       
  2430 			}
       
  2431 			
       
  2432 			ERROR;
       
  2433 		}
       
  2434 		
       
  2435 	}/*function_dint_to_dint*/
       
  2436 	break;
       
  2437 
       
  2438 /****
       
  2439  *DINT_TO_DATE
       
  2440  */
       
  2441 	case function_dint_to_date :
       
  2442 	{
       
  2443 		symbol_c *last_type_symbol = NULL;
       
  2444 
       
  2445 		{
       
  2446 			identifier_c param_name("IN");
       
  2447 			/* 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);
       
  2449 			
       
  2450 			/* Get the value from a foo(<param_value>) style call */
       
  2451 			if (IN_param_value == NULL)
       
  2452 			  IN_param_value = function_call_param_iterator.next();
       
  2453 			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 ;
       
  2455 			
       
  2456 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2457 			{
       
  2458 		
       
  2459 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2460 				s4o.print("(");
       
  2461 				return_type_symbol->accept(*this);
       
  2462 				s4o.print(")time_to_real(");
       
  2463 				IN_param_value->accept(*this);
       
  2464 				s4o.print(")");
       
  2465 				return NULL;
       
  2466 				
       
  2467 			}
       
  2468 			
       
  2469 			ERROR;
       
  2470 		}
       
  2471 		
       
  2472 	}/*function_dint_to_date*/
       
  2473 	break;
       
  2474 
       
  2475 /****
       
  2476  *DINT_TO_DWORD
       
  2477  */
       
  2478 	case function_dint_to_dword :
       
  2479 	{
       
  2480 		symbol_c *last_type_symbol = NULL;
       
  2481 
       
  2482 		{
       
  2483 			identifier_c param_name("IN");
       
  2484 			/* 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);
       
  2486 			
       
  2487 			/* Get the value from a foo(<param_value>) style call */
       
  2488 			if (IN_param_value == NULL)
       
  2489 			  IN_param_value = function_call_param_iterator.next();
       
  2490 			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 ;
       
  2492 			
       
  2493 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2494 			{
       
  2495 		
       
  2496 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2497 				s4o.print("(");
       
  2498 				return_type_symbol->accept(*this);
       
  2499 				s4o.print(")");
       
  2500 				IN_param_value->accept(*this);
       
  2501 				return NULL;
       
  2502 				
       
  2503 			}
       
  2504 			
       
  2505 			ERROR;
       
  2506 		}
       
  2507 		
       
  2508 	}/*function_dint_to_dword*/
       
  2509 	break;
       
  2510 
       
  2511 /****
       
  2512  *DINT_TO_DT
       
  2513  */
       
  2514 	case function_dint_to_dt :
       
  2515 	{
       
  2516 		symbol_c *last_type_symbol = NULL;
       
  2517 
       
  2518 		{
       
  2519 			identifier_c param_name("IN");
       
  2520 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2521 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2522 			
       
  2523 			/* Get the value from a foo(<param_value>) style call */
       
  2524 			if (IN_param_value == NULL)
       
  2525 			  IN_param_value = function_call_param_iterator.next();
       
  2526 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2527 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2528 			
       
  2529 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2530 			{
       
  2531 		
       
  2532 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2533 				s4o.print("(");
       
  2534 				return_type_symbol->accept(*this);
       
  2535 				s4o.print(")time_to_real(");
       
  2536 				IN_param_value->accept(*this);
       
  2537 				s4o.print(")");
       
  2538 				return NULL;
       
  2539 				
       
  2540 			}
       
  2541 			
       
  2542 			ERROR;
       
  2543 		}
       
  2544 		
       
  2545 	}/*function_dint_to_dt*/
       
  2546 	break;
       
  2547 
       
  2548 /****
       
  2549  *DINT_TO_TOD
       
  2550  */
       
  2551 	case function_dint_to_tod :
       
  2552 	{
       
  2553 		symbol_c *last_type_symbol = NULL;
       
  2554 
       
  2555 		{
       
  2556 			identifier_c param_name("IN");
       
  2557 			/* 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);
       
  2559 			
       
  2560 			/* Get the value from a foo(<param_value>) style call */
       
  2561 			if (IN_param_value == NULL)
       
  2562 			  IN_param_value = function_call_param_iterator.next();
       
  2563 			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 ;
       
  2565 			
       
  2566 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2567 			{
       
  2568 		
       
  2569 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2570 				s4o.print("(");
       
  2571 				return_type_symbol->accept(*this);
       
  2572 				s4o.print(")time_to_real(");
       
  2573 				IN_param_value->accept(*this);
       
  2574 				s4o.print(")");
       
  2575 				return NULL;
       
  2576 				
       
  2577 			}
       
  2578 			
       
  2579 			ERROR;
       
  2580 		}
       
  2581 		
       
  2582 	}/*function_dint_to_tod*/
       
  2583 	break;
       
  2584 
       
  2585 /****
       
  2586  *DINT_TO_UDINT
       
  2587  */
       
  2588 	case function_dint_to_udint :
       
  2589 	{
       
  2590 		symbol_c *last_type_symbol = NULL;
       
  2591 
       
  2592 		{
       
  2593 			identifier_c param_name("IN");
       
  2594 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2595 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2596 			
       
  2597 			/* Get the value from a foo(<param_value>) style call */
       
  2598 			if (IN_param_value == NULL)
       
  2599 			  IN_param_value = function_call_param_iterator.next();
       
  2600 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2602 			
       
  2603 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2604 			{
       
  2605 		
       
  2606 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2607 				s4o.print("(");
       
  2608 				return_type_symbol->accept(*this);
       
  2609 				s4o.print(")");
       
  2610 				IN_param_value->accept(*this);
       
  2611 				return NULL;
       
  2612 				
       
  2613 			}
       
  2614 			
       
  2615 			ERROR;
       
  2616 		}
       
  2617 		
       
  2618 	}/*function_dint_to_udint*/
       
  2619 	break;
       
  2620 
       
  2621 /****
       
  2622  *DINT_TO_WORD
       
  2623  */
       
  2624 	case function_dint_to_word :
       
  2625 	{
       
  2626 		symbol_c *last_type_symbol = NULL;
       
  2627 
       
  2628 		{
       
  2629 			identifier_c param_name("IN");
       
  2630 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2631 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2632 			
       
  2633 			/* Get the value from a foo(<param_value>) style call */
       
  2634 			if (IN_param_value == NULL)
       
  2635 			  IN_param_value = function_call_param_iterator.next();
       
  2636 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2638 			
       
  2639 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2640 			{
       
  2641 		
       
  2642 				symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2643 				s4o.print("(");
       
  2644 				return_type_symbol->accept(*this);
       
  2645 				s4o.print(")");
       
  2646 				IN_param_value->accept(*this);
       
  2647 				return NULL;
       
  2648 				
       
  2649 			}
       
  2650 			
       
  2651 			ERROR;
       
  2652 		}
       
  2653 		
       
  2654 	}/*function_dint_to_word*/
       
  2655 	break;
       
  2656 
       
  2657 /****
       
  2658  *DINT_TO_WSTRING
       
  2659  */
       
  2660 	case function_dint_to_wstring :
       
  2661 	{
       
  2662 		symbol_c *last_type_symbol = NULL;
       
  2663 
       
  2664 		{
       
  2665 			identifier_c param_name("IN");
       
  2666 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2667 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2668 			
       
  2669 			/* Get the value from a foo(<param_value>) style call */
       
  2670 			if (IN_param_value == NULL)
       
  2671 			  IN_param_value = function_call_param_iterator.next();
       
  2672 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2673 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2674 			
       
  2675 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2676 			{
       
  2677 		
       
  2678 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  2679 				s4o.print("(");
       
  2680 				return_type_symbol->accept(*this);
       
  2681 				s4o.print(")string_to_int(");
       
  2682 				IN_param_value->accept(*this);
       
  2683 				s4o.print(", 10)");
       
  2684 				return NULL;
       
  2685 				
       
  2686 			}
       
  2687 			
       
  2688 			ERROR;
       
  2689 		}
       
  2690 		
       
  2691 	}/*function_dint_to_wstring*/
       
  2692 	break;
       
  2693 
       
  2694 /****
       
  2695  *DINT_TO_STRING
       
  2696  */
       
  2697 	case function_dint_to_string :
       
  2698 	{
       
  2699 		symbol_c *last_type_symbol = NULL;
       
  2700 
       
  2701 		{
       
  2702 			identifier_c param_name("IN");
       
  2703 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2704 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2705 			
       
  2706 			/* Get the value from a foo(<param_value>) style call */
       
  2707 			if (IN_param_value == NULL)
       
  2708 			  IN_param_value = function_call_param_iterator.next();
       
  2709 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2711 			
       
  2712 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2713 			{
       
  2714 		
       
  2715 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2716 				s4o.print("(");
       
  2717 				return_type_symbol->accept(*this);
       
  2718 				s4o.print(")string_to_int(");
       
  2719 				IN_param_value->accept(*this);
       
  2720 				s4o.print(", 10)");
       
  2721 				return NULL;
       
  2722 				
       
  2723 			}
       
  2724 			
       
  2725 			ERROR;
       
  2726 		}
       
  2727 		
       
  2728 	}/*function_dint_to_string*/
       
  2729 	break;
       
  2730 
       
  2731 /****
       
  2732  *DINT_TO_LWORD
       
  2733  */
       
  2734 	case function_dint_to_lword :
       
  2735 	{
       
  2736 		symbol_c *last_type_symbol = NULL;
       
  2737 
       
  2738 		{
       
  2739 			identifier_c param_name("IN");
       
  2740 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2741 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2742 			
       
  2743 			/* Get the value from a foo(<param_value>) style call */
       
  2744 			if (IN_param_value == NULL)
       
  2745 			  IN_param_value = function_call_param_iterator.next();
       
  2746 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2748 			
       
  2749 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2750 			{
       
  2751 		
       
  2752 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2753 				s4o.print("(");
       
  2754 				return_type_symbol->accept(*this);
       
  2755 				s4o.print(")");
       
  2756 				IN_param_value->accept(*this);
       
  2757 				return NULL;
       
  2758 				
       
  2759 			}
       
  2760 			
       
  2761 			ERROR;
       
  2762 		}
       
  2763 		
       
  2764 	}/*function_dint_to_lword*/
       
  2765 	break;
       
  2766 
       
  2767 /****
       
  2768  *DINT_TO_UINT
       
  2769  */
       
  2770 	case function_dint_to_uint :
       
  2771 	{
       
  2772 		symbol_c *last_type_symbol = NULL;
       
  2773 
       
  2774 		{
       
  2775 			identifier_c param_name("IN");
       
  2776 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2777 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2778 			
       
  2779 			/* Get the value from a foo(<param_value>) style call */
       
  2780 			if (IN_param_value == NULL)
       
  2781 			  IN_param_value = function_call_param_iterator.next();
       
  2782 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2783 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2784 			
       
  2785 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2786 			{
       
  2787 		
       
  2788 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2789 				s4o.print("(");
       
  2790 				return_type_symbol->accept(*this);
       
  2791 				s4o.print(")");
       
  2792 				IN_param_value->accept(*this);
       
  2793 				return NULL;
       
  2794 				
       
  2795 			}
       
  2796 			
       
  2797 			ERROR;
       
  2798 		}
       
  2799 		
       
  2800 	}/*function_dint_to_uint*/
       
  2801 	break;
       
  2802 
       
  2803 /****
       
  2804  *DINT_TO_LREAL
       
  2805  */
       
  2806 	case function_dint_to_lreal :
       
  2807 	{
       
  2808 		symbol_c *last_type_symbol = NULL;
       
  2809 
       
  2810 		{
       
  2811 			identifier_c param_name("IN");
       
  2812 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2813 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2814 			
       
  2815 			/* Get the value from a foo(<param_value>) style call */
       
  2816 			if (IN_param_value == NULL)
       
  2817 			  IN_param_value = function_call_param_iterator.next();
       
  2818 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2820 			
       
  2821 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2822 			{
       
  2823 		
       
  2824 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2825 				s4o.print("(");
       
  2826 				return_type_symbol->accept(*this);
       
  2827 				s4o.print(")");
       
  2828 				IN_param_value->accept(*this);
       
  2829 				return NULL;
       
  2830 				
       
  2831 			}
       
  2832 			
       
  2833 			ERROR;
       
  2834 		}
       
  2835 		
       
  2836 	}/*function_dint_to_lreal*/
       
  2837 	break;
       
  2838 
       
  2839 /****
       
  2840  *DINT_TO_BYTE
       
  2841  */
       
  2842 	case function_dint_to_byte :
       
  2843 	{
       
  2844 		symbol_c *last_type_symbol = NULL;
       
  2845 
       
  2846 		{
       
  2847 			identifier_c param_name("IN");
       
  2848 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2849 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2850 			
       
  2851 			/* Get the value from a foo(<param_value>) style call */
       
  2852 			if (IN_param_value == NULL)
       
  2853 			  IN_param_value = function_call_param_iterator.next();
       
  2854 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2856 			
       
  2857 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2858 			{
       
  2859 		
       
  2860 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2861 				s4o.print("(");
       
  2862 				return_type_symbol->accept(*this);
       
  2863 				s4o.print(")");
       
  2864 				IN_param_value->accept(*this);
       
  2865 				return NULL;
       
  2866 				
       
  2867 			}
       
  2868 			
       
  2869 			ERROR;
       
  2870 		}
       
  2871 		
       
  2872 	}/*function_dint_to_byte*/
       
  2873 	break;
       
  2874 
       
  2875 /****
       
  2876  *DINT_TO_USINT
       
  2877  */
       
  2878 	case function_dint_to_usint :
       
  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(dint_type_name_c))
       
  2894 			{
       
  2895 		
       
  2896 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2897 				s4o.print("(");
       
  2898 				return_type_symbol->accept(*this);
       
  2899 				s4o.print(")");
       
  2900 				IN_param_value->accept(*this);
       
  2901 				return NULL;
       
  2902 				
       
  2903 			}
       
  2904 			
       
  2905 			ERROR;
       
  2906 		}
       
  2907 		
       
  2908 	}/*function_dint_to_usint*/
       
  2909 	break;
       
  2910 
       
  2911 /****
       
  2912  *DINT_TO_ULINT
       
  2913  */
       
  2914 	case function_dint_to_ulint :
       
  2915 	{
       
  2916 		symbol_c *last_type_symbol = NULL;
       
  2917 
       
  2918 		{
       
  2919 			identifier_c param_name("IN");
       
  2920 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2921 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2922 			
       
  2923 			/* Get the value from a foo(<param_value>) style call */
       
  2924 			if (IN_param_value == NULL)
       
  2925 			  IN_param_value = function_call_param_iterator.next();
       
  2926 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2928 			
       
  2929 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2930 			{
       
  2931 		
       
  2932 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2933 				s4o.print("(");
       
  2934 				return_type_symbol->accept(*this);
       
  2935 				s4o.print(")");
       
  2936 				IN_param_value->accept(*this);
       
  2937 				return NULL;
       
  2938 				
       
  2939 			}
       
  2940 			
       
  2941 			ERROR;
       
  2942 		}
       
  2943 		
       
  2944 	}/*function_dint_to_ulint*/
       
  2945 	break;
       
  2946 
       
  2947 /****
       
  2948  *DINT_TO_BOOL
       
  2949  */
       
  2950 	case function_dint_to_bool :
       
  2951 	{
       
  2952 		symbol_c *last_type_symbol = NULL;
       
  2953 
       
  2954 		{
       
  2955 			identifier_c param_name("IN");
       
  2956 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2957 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2958 			
       
  2959 			/* Get the value from a foo(<param_value>) style call */
       
  2960 			if (IN_param_value == NULL)
       
  2961 			  IN_param_value = function_call_param_iterator.next();
       
  2962 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  2964 			
       
  2965 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2966 			{
       
  2967 		
       
  2968 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2969 				s4o.print("(");
       
  2970 				return_type_symbol->accept(*this);
       
  2971 				s4o.print(")");
       
  2972 				IN_param_value->accept(*this);
       
  2973 				return NULL;
       
  2974 				
       
  2975 			}
       
  2976 			
       
  2977 			ERROR;
       
  2978 		}
       
  2979 		
       
  2980 	}/*function_dint_to_bool*/
       
  2981 	break;
       
  2982 
       
  2983 /****
       
  2984  *DINT_TO_TIME
       
  2985  */
       
  2986 	case function_dint_to_time :
       
  2987 	{
       
  2988 		symbol_c *last_type_symbol = NULL;
       
  2989 
       
  2990 		{
       
  2991 			identifier_c param_name("IN");
       
  2992 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2993 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2994 			
       
  2995 			/* Get the value from a foo(<param_value>) style call */
       
  2996 			if (IN_param_value == NULL)
       
  2997 			  IN_param_value = function_call_param_iterator.next();
       
  2998 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2999 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3000 			
       
  3001 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3002 			{
       
  3003 		
       
  3004 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3005 				s4o.print("(");
       
  3006 				return_type_symbol->accept(*this);
       
  3007 				s4o.print(")time_to_real(");
       
  3008 				IN_param_value->accept(*this);
       
  3009 				s4o.print(")");
       
  3010 				return NULL;
       
  3011 				
       
  3012 			}
       
  3013 			
       
  3014 			ERROR;
       
  3015 		}
       
  3016 		
       
  3017 	}/*function_dint_to_time*/
       
  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  *DATE_TO_REAL
       
  3058  */
       
  3059 	case function_date_to_real :
       
  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(date_type_name_c))
       
  3075 			{
       
  3076 		
       
  3077 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3078 				s4o.print("(");
       
  3079 				return_type_symbol->accept(*this);
       
  3080 				s4o.print(")real_to_time(");
       
  3081 				IN_param_value->accept(*this);
       
  3082 				s4o.print(")");
       
  3083 				return NULL;
       
  3084 				
       
  3085 			}
       
  3086 			
       
  3087 			ERROR;
       
  3088 		}
       
  3089 		
       
  3090 	}/*function_date_to_real*/
       
  3091 	break;
       
  3092 
       
  3093 /****
       
  3094  *DATE_TO_SINT
       
  3095  */
       
  3096 	case function_date_to_sint :
       
  3097 	{
       
  3098 		symbol_c *last_type_symbol = NULL;
       
  3099 
       
  3100 		{
       
  3101 			identifier_c param_name("IN");
       
  3102 			/* 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);
       
  3104 			
       
  3105 			/* Get the value from a foo(<param_value>) style call */
       
  3106 			if (IN_param_value == NULL)
       
  3107 			  IN_param_value = function_call_param_iterator.next();
       
  3108 			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 ;
       
  3110 			
       
  3111 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3112 			{
       
  3113 		
       
  3114 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3115 				s4o.print("(");
       
  3116 				return_type_symbol->accept(*this);
       
  3117 				s4o.print(")real_to_time(");
       
  3118 				IN_param_value->accept(*this);
       
  3119 				s4o.print(")");
       
  3120 				return NULL;
       
  3121 				
       
  3122 			}
       
  3123 			
       
  3124 			ERROR;
       
  3125 		}
       
  3126 		
       
  3127 	}/*function_date_to_sint*/
       
  3128 	break;
       
  3129 
       
  3130 /****
       
  3131  *DATE_TO_LINT
       
  3132  */
       
  3133 	case function_date_to_lint :
       
  3134 	{
       
  3135 		symbol_c *last_type_symbol = NULL;
       
  3136 
       
  3137 		{
       
  3138 			identifier_c param_name("IN");
       
  3139 			/* 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);
       
  3141 			
       
  3142 			/* Get the value from a foo(<param_value>) style call */
       
  3143 			if (IN_param_value == NULL)
       
  3144 			  IN_param_value = function_call_param_iterator.next();
       
  3145 			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 ;
       
  3147 			
       
  3148 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3149 			{
       
  3150 		
       
  3151 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3152 				s4o.print("(");
       
  3153 				return_type_symbol->accept(*this);
       
  3154 				s4o.print(")real_to_time(");
       
  3155 				IN_param_value->accept(*this);
       
  3156 				s4o.print(")");
       
  3157 				return NULL;
       
  3158 				
       
  3159 			}
       
  3160 			
       
  3161 			ERROR;
       
  3162 		}
       
  3163 		
       
  3164 	}/*function_date_to_lint*/
       
  3165 	break;
       
  3166 
       
  3167 /****
       
  3168  *DATE_TO_DINT
       
  3169  */
       
  3170 	case function_date_to_dint :
       
  3171 	{
       
  3172 		symbol_c *last_type_symbol = NULL;
       
  3173 
       
  3174 		{
       
  3175 			identifier_c param_name("IN");
       
  3176 			/* 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);
       
  3178 			
       
  3179 			/* Get the value from a foo(<param_value>) style call */
       
  3180 			if (IN_param_value == NULL)
       
  3181 			  IN_param_value = function_call_param_iterator.next();
       
  3182 			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 ;
       
  3184 			
       
  3185 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3186 			{
       
  3187 		
       
  3188 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3189 				s4o.print("(");
       
  3190 				return_type_symbol->accept(*this);
       
  3191 				s4o.print(")real_to_time(");
       
  3192 				IN_param_value->accept(*this);
       
  3193 				s4o.print(")");
       
  3194 				return NULL;
       
  3195 				
       
  3196 			}
       
  3197 			
       
  3198 			ERROR;
       
  3199 		}
       
  3200 		
       
  3201 	}/*function_date_to_dint*/
       
  3202 	break;
       
  3203 
       
  3204 /****
       
  3205  *DATE_TO_DATE
       
  3206  */
       
  3207 	case function_date_to_date :
       
  3208 	{
       
  3209 		symbol_c *last_type_symbol = NULL;
       
  3210 
       
  3211 		{
       
  3212 			identifier_c param_name("IN");
       
  3213 			/* 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);
       
  3215 			
       
  3216 			/* Get the value from a foo(<param_value>) style call */
       
  3217 			if (IN_param_value == NULL)
       
  3218 			  IN_param_value = function_call_param_iterator.next();
       
  3219 			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 ;
       
  3221 			
       
  3222 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3223 			{
       
  3224 		
       
  3225 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3226 				s4o.print("#error DATE_TO_DATE not implemented!");
       
  3227 				return NULL;
       
  3228 				
       
  3229 			}
       
  3230 			
       
  3231 			ERROR;
       
  3232 		}
       
  3233 		
       
  3234 	}/*function_date_to_date*/
       
  3235 	break;
       
  3236 
       
  3237 /****
       
  3238  *DATE_TO_DWORD
       
  3239  */
       
  3240 	case function_date_to_dword :
       
  3241 	{
       
  3242 		symbol_c *last_type_symbol = NULL;
       
  3243 
       
  3244 		{
       
  3245 			identifier_c param_name("IN");
       
  3246 			/* 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);
       
  3248 			
       
  3249 			/* Get the value from a foo(<param_value>) style call */
       
  3250 			if (IN_param_value == NULL)
       
  3251 			  IN_param_value = function_call_param_iterator.next();
       
  3252 			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 ;
       
  3254 			
       
  3255 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3256 			{
       
  3257 		
       
  3258 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3259 				s4o.print("(");
       
  3260 				return_type_symbol->accept(*this);
       
  3261 				s4o.print(")real_to_time(");
       
  3262 				IN_param_value->accept(*this);
       
  3263 				s4o.print(")");
       
  3264 				return NULL;
       
  3265 				
       
  3266 			}
       
  3267 			
       
  3268 			ERROR;
       
  3269 		}
       
  3270 		
       
  3271 	}/*function_date_to_dword*/
       
  3272 	break;
       
  3273 
       
  3274 /****
       
  3275  *DATE_TO_DT
       
  3276  */
       
  3277 	case function_date_to_dt :
       
  3278 	{
       
  3279 		symbol_c *last_type_symbol = NULL;
       
  3280 
       
  3281 		{
       
  3282 			identifier_c param_name("IN");
       
  3283 			/* 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);
       
  3285 			
       
  3286 			/* Get the value from a foo(<param_value>) style call */
       
  3287 			if (IN_param_value == NULL)
       
  3288 			  IN_param_value = function_call_param_iterator.next();
       
  3289 			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 ;
       
  3291 			
       
  3292 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3293 			{
       
  3294 		
       
  3295 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3296 				s4o.print("#error DATE_TO_DT not implemented!");
       
  3297 				return NULL;
       
  3298 				
       
  3299 			}
       
  3300 			
       
  3301 			ERROR;
       
  3302 		}
       
  3303 		
       
  3304 	}/*function_date_to_dt*/
       
  3305 	break;
       
  3306 
       
  3307 /****
       
  3308  *DATE_TO_TOD
       
  3309  */
       
  3310 	case function_date_to_tod :
       
  3311 	{
       
  3312 		symbol_c *last_type_symbol = NULL;
       
  3313 
       
  3314 		{
       
  3315 			identifier_c param_name("IN");
       
  3316 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3317 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3318 			
       
  3319 			/* Get the value from a foo(<param_value>) style call */
       
  3320 			if (IN_param_value == NULL)
       
  3321 			  IN_param_value = function_call_param_iterator.next();
       
  3322 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3324 			
       
  3325 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3326 			{
       
  3327 		
       
  3328 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3329 				s4o.print("#error DATE_TO_TOD not implemented!");
       
  3330 				return NULL;
       
  3331 				
       
  3332 			}
       
  3333 			
       
  3334 			ERROR;
       
  3335 		}
       
  3336 		
       
  3337 	}/*function_date_to_tod*/
       
  3338 	break;
       
  3339 
       
  3340 /****
       
  3341  *DATE_TO_UDINT
       
  3342  */
       
  3343 	case function_date_to_udint :
       
  3344 	{
       
  3345 		symbol_c *last_type_symbol = NULL;
       
  3346 
       
  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 
       
  3414 /****
       
  3415  *DATE_TO_WSTRING
       
  3416  */
       
  3417 	case function_date_to_wstring :
       
  3418 	{
       
  3419 		symbol_c *last_type_symbol = NULL;
       
  3420 
       
  3421 		{
       
  3422 			identifier_c param_name("IN");
       
  3423 			/* 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);
       
  3425 			
       
  3426 			/* Get the value from a foo(<param_value>) style call */
       
  3427 			if (IN_param_value == NULL)
       
  3428 			  IN_param_value = function_call_param_iterator.next();
       
  3429 			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 ;
       
  3431 			
       
  3432 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3433 			{
       
  3434 		
       
  3435 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3436 				s4o.print("(");
       
  3437 				return_type_symbol->accept(*this);
       
  3438 				s4o.print(")string_to_time(");
       
  3439 				IN_param_value->accept(*this);
       
  3440 				s4o.print(")");
       
  3441 				return NULL;
       
  3442 				
       
  3443 			}
       
  3444 			
       
  3445 			ERROR;
       
  3446 		}
       
  3447 		
       
  3448 	}/*function_date_to_wstring*/
       
  3449 	break;
       
  3450 
       
  3451 /****
       
  3452  *DATE_TO_STRING
       
  3453  */
       
  3454 	case function_date_to_string :
       
  3455 	{
       
  3456 		symbol_c *last_type_symbol = NULL;
       
  3457 
       
  3458 		{
       
  3459 			identifier_c param_name("IN");
       
  3460 			/* 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);
       
  3462 			
       
  3463 			/* Get the value from a foo(<param_value>) style call */
       
  3464 			if (IN_param_value == NULL)
       
  3465 			  IN_param_value = function_call_param_iterator.next();
       
  3466 			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 ;
       
  3468 			
       
  3469 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3470 			{
       
  3471 		
       
  3472 				symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3473 				s4o.print("(");
       
  3474 				return_type_symbol->accept(*this);
       
  3475 				s4o.print(")string_to_time(");
       
  3476 				IN_param_value->accept(*this);
       
  3477 				s4o.print(")");
       
  3478 				return NULL;
       
  3479 				
       
  3480 			}
       
  3481 			
       
  3482 			ERROR;
       
  3483 		}
       
  3484 		
       
  3485 	}/*function_date_to_string*/
       
  3486 	break;
       
  3487 
       
  3488 /****
       
  3489  *DATE_TO_LWORD
       
  3490  */
       
  3491 	case function_date_to_lword :
       
  3492 	{
       
  3493 		symbol_c *last_type_symbol = NULL;
       
  3494 
       
  3495 		{
       
  3496 			identifier_c param_name("IN");
       
  3497 			/* 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);
       
  3499 			
       
  3500 			/* Get the value from a foo(<param_value>) style call */
       
  3501 			if (IN_param_value == NULL)
       
  3502 			  IN_param_value = function_call_param_iterator.next();
       
  3503 			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 ;
       
  3505 			
       
  3506 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3507 			{
       
  3508 		
       
  3509 				symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3510 				s4o.print("(");
       
  3511 				return_type_symbol->accept(*this);
       
  3512 				s4o.print(")real_to_time(");
       
  3513 				IN_param_value->accept(*this);
       
  3514 				s4o.print(")");
       
  3515 				return NULL;
       
  3516 				
       
  3517 			}
       
  3518 			
       
  3519 			ERROR;
       
  3520 		}
       
  3521 		
       
  3522 	}/*function_date_to_lword*/
       
  3523 	break;
       
  3524 
       
  3525 /****
       
  3526  *DATE_TO_UINT
       
  3527  */
       
  3528 	case function_date_to_uint :
       
  3529 	{
       
  3530 		symbol_c *last_type_symbol = NULL;
       
  3531 
       
  3532 		{
       
  3533 			identifier_c param_name("IN");
       
  3534 			/* 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);
       
  3536 			
       
  3537 			/* Get the value from a foo(<param_value>) style call */
       
  3538 			if (IN_param_value == NULL)
       
  3539 			  IN_param_value = function_call_param_iterator.next();
       
  3540 			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 ;
       
  3542 			
       
  3543 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3544 			{
       
  3545 		
       
  3546 				symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3547 				s4o.print("(");
       
  3548 				return_type_symbol->accept(*this);
       
  3549 				s4o.print(")real_to_time(");
       
  3550 				IN_param_value->accept(*this);
       
  3551 				s4o.print(")");
       
  3552 				return NULL;
       
  3553 				
       
  3554 			}
       
  3555 			
       
  3556 			ERROR;
       
  3557 		}
       
  3558 		
       
  3559 	}/*function_date_to_uint*/
       
  3560 	break;
       
  3561 
       
  3562 /****
       
  3563  *DATE_TO_LREAL
       
  3564  */
       
  3565 	case function_date_to_lreal :
       
  3566 	{
       
  3567 		symbol_c *last_type_symbol = NULL;
       
  3568 
       
  3569 		{
       
  3570 			identifier_c param_name("IN");
       
  3571 			/* 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);
       
  3573 			
       
  3574 			/* Get the value from a foo(<param_value>) style call */
       
  3575 			if (IN_param_value == NULL)
       
  3576 			  IN_param_value = function_call_param_iterator.next();
       
  3577 			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 ;
       
  3579 			
       
  3580 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3581 			{
       
  3582 		
       
  3583 				symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3584 				s4o.print("(");
       
  3585 				return_type_symbol->accept(*this);
       
  3586 				s4o.print(")real_to_time(");
       
  3587 				IN_param_value->accept(*this);
       
  3588 				s4o.print(")");
       
  3589 				return NULL;
       
  3590 				
       
  3591 			}
       
  3592 			
       
  3593 			ERROR;
       
  3594 		}
       
  3595 		
       
  3596 	}/*function_date_to_lreal*/
       
  3597 	break;
       
  3598 
       
  3599 /****
       
  3600  *DATE_TO_BYTE
       
  3601  */
       
  3602 	case function_date_to_byte :
       
  3603 	{
       
  3604 		symbol_c *last_type_symbol = NULL;
       
  3605 
       
  3606 		{
       
  3607 			identifier_c param_name("IN");
       
  3608 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3609 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3610 			
       
  3611 			/* Get the value from a foo(<param_value>) style call */
       
  3612 			if (IN_param_value == NULL)
       
  3613 			  IN_param_value = function_call_param_iterator.next();
       
  3614 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3615 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3616 			
       
  3617 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3618 			{
       
  3619 		
       
  3620 				symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3621 				s4o.print("(");
       
  3622 				return_type_symbol->accept(*this);
       
  3623 				s4o.print(")real_to_time(");
       
  3624 				IN_param_value->accept(*this);
       
  3625 				s4o.print(")");
       
  3626 				return NULL;
       
  3627 				
       
  3628 			}
       
  3629 			
       
  3630 			ERROR;
       
  3631 		}
       
  3632 		
       
  3633 	}/*function_date_to_byte*/
       
  3634 	break;
       
  3635 
       
  3636 /****
       
  3637  *DATE_TO_USINT
       
  3638  */
       
  3639 	case function_date_to_usint :
       
  3640 	{
       
  3641 		symbol_c *last_type_symbol = NULL;
       
  3642 
       
  3643 		{
       
  3644 			identifier_c param_name("IN");
       
  3645 			/* 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);
       
  3647 			
       
  3648 			/* Get the value from a foo(<param_value>) style call */
       
  3649 			if (IN_param_value == NULL)
       
  3650 			  IN_param_value = function_call_param_iterator.next();
       
  3651 			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 ;
       
  3653 			
       
  3654 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3655 			{
       
  3656 		
       
  3657 				symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3658 				s4o.print("(");
       
  3659 				return_type_symbol->accept(*this);
       
  3660 				s4o.print(")real_to_time(");
       
  3661 				IN_param_value->accept(*this);
       
  3662 				s4o.print(")");
       
  3663 				return NULL;
       
  3664 				
       
  3665 			}
       
  3666 			
       
  3667 			ERROR;
       
  3668 		}
       
  3669 		
       
  3670 	}/*function_date_to_usint*/
       
  3671 	break;
       
  3672 
       
  3673 /****
       
  3674  *DATE_TO_ULINT
       
  3675  */
       
  3676 	case function_date_to_ulint :
       
  3677 	{
       
  3678 		symbol_c *last_type_symbol = NULL;
       
  3679 
       
  3680 		{
       
  3681 			identifier_c param_name("IN");
       
  3682 			/* 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);
       
  3684 			
       
  3685 			/* Get the value from a foo(<param_value>) style call */
       
  3686 			if (IN_param_value == NULL)
       
  3687 			  IN_param_value = function_call_param_iterator.next();
       
  3688 			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 ;
       
  3690 			
       
  3691 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3692 			{
       
  3693 		
       
  3694 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3695 				s4o.print("(");
       
  3696 				return_type_symbol->accept(*this);
       
  3697 				s4o.print(")real_to_time(");
       
  3698 				IN_param_value->accept(*this);
       
  3699 				s4o.print(")");
       
  3700 				return NULL;
       
  3701 				
       
  3702 			}
       
  3703 			
       
  3704 			ERROR;
       
  3705 		}
       
  3706 		
       
  3707 	}/*function_date_to_ulint*/
       
  3708 	break;
       
  3709 
       
  3710 /****
       
  3711  *DATE_TO_BOOL
       
  3712  */
       
  3713 	case function_date_to_bool :
       
  3714 	{
       
  3715 		symbol_c *last_type_symbol = NULL;
       
  3716 
       
  3717 		{
       
  3718 			identifier_c param_name("IN");
       
  3719 			/* 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);
       
  3721 			
       
  3722 			/* Get the value from a foo(<param_value>) style call */
       
  3723 			if (IN_param_value == NULL)
       
  3724 			  IN_param_value = function_call_param_iterator.next();
       
  3725 			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 ;
       
  3727 			
       
  3728 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3729 			{
       
  3730 		
       
  3731 				symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3732 				s4o.print("(");
       
  3733 				return_type_symbol->accept(*this);
       
  3734 				s4o.print(")real_to_time(");
       
  3735 				IN_param_value->accept(*this);
       
  3736 				s4o.print(")");
       
  3737 				return NULL;
       
  3738 				
       
  3739 			}
       
  3740 			
       
  3741 			ERROR;
       
  3742 		}
       
  3743 		
       
  3744 	}/*function_date_to_bool*/
       
  3745 	break;
       
  3746 
       
  3747 /****
       
  3748  *DATE_TO_TIME
       
  3749  */
       
  3750 	case function_date_to_time :
       
  3751 	{
       
  3752 		symbol_c *last_type_symbol = NULL;
       
  3753 
       
  3754 		{
       
  3755 			identifier_c param_name("IN");
       
  3756 			/* 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);
       
  3758 			
       
  3759 			/* Get the value from a foo(<param_value>) style call */
       
  3760 			if (IN_param_value == NULL)
       
  3761 			  IN_param_value = function_call_param_iterator.next();
       
  3762 			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 ;
       
  3764 			
       
  3765 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3766 			{
       
  3767 		
       
  3768 				symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3769 				s4o.print("#error DATE_TO_TIME not implemented!");
       
  3770 				return NULL;
       
  3771 				
       
  3772 			}
       
  3773 			
       
  3774 			ERROR;
       
  3775 		}
       
  3776 		
       
  3777 	}/*function_date_to_time*/
       
  3778 	break;
       
  3779 
       
  3780 /****
       
  3781  *DATE_TO_INT
       
  3782  */
       
  3783 	case function_date_to_int :
       
  3784 	{
       
  3785 		symbol_c *last_type_symbol = NULL;
       
  3786 
       
  3787 		{
       
  3788 			identifier_c param_name("IN");
       
  3789 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3790 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3791 			
       
  3792 			/* Get the value from a foo(<param_value>) style call */
       
  3793 			if (IN_param_value == NULL)
       
  3794 			  IN_param_value = function_call_param_iterator.next();
       
  3795 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3797 			
       
  3798 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  3799 			{
       
  3800 		
       
  3801 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3802 				s4o.print("(");
       
  3803 				return_type_symbol->accept(*this);
       
  3804 				s4o.print(")real_to_time(");
       
  3805 				IN_param_value->accept(*this);
       
  3806 				s4o.print(")");
       
  3807 				return NULL;
       
  3808 				
       
  3809 			}
       
  3810 			
       
  3811 			ERROR;
       
  3812 		}
       
  3813 		
       
  3814 	}/*function_date_to_int*/
       
  3815 	break;
       
  3816 
       
  3817 /****
       
  3818  *DWORD_TO_REAL
       
  3819  */
       
  3820 	case function_dword_to_real :
       
  3821 	{
       
  3822 		symbol_c *last_type_symbol = NULL;
       
  3823 
       
  3824 		{
       
  3825 			identifier_c param_name("IN");
       
  3826 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3827 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3828 			
       
  3829 			/* Get the value from a foo(<param_value>) style call */
       
  3830 			if (IN_param_value == NULL)
       
  3831 			  IN_param_value = function_call_param_iterator.next();
       
  3832 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3834 			
       
  3835 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3836 			{
       
  3837 		
       
  3838 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3839 				s4o.print("(");
       
  3840 				return_type_symbol->accept(*this);
       
  3841 				s4o.print(")");
       
  3842 				IN_param_value->accept(*this);
       
  3843 				return NULL;
       
  3844 				
       
  3845 			}
       
  3846 			
       
  3847 			ERROR;
       
  3848 		}
       
  3849 		
       
  3850 	}/*function_dword_to_real*/
       
  3851 	break;
       
  3852 
       
  3853 /****
       
  3854  *DWORD_TO_SINT
       
  3855  */
       
  3856 	case function_dword_to_sint :
       
  3857 	{
       
  3858 		symbol_c *last_type_symbol = NULL;
       
  3859 
       
  3860 		{
       
  3861 			identifier_c param_name("IN");
       
  3862 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3863 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3864 			
       
  3865 			/* Get the value from a foo(<param_value>) style call */
       
  3866 			if (IN_param_value == NULL)
       
  3867 			  IN_param_value = function_call_param_iterator.next();
       
  3868 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3870 			
       
  3871 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3872 			{
       
  3873 		
       
  3874 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3875 				s4o.print("(");
       
  3876 				return_type_symbol->accept(*this);
       
  3877 				s4o.print(")");
       
  3878 				IN_param_value->accept(*this);
       
  3879 				return NULL;
       
  3880 				
       
  3881 			}
       
  3882 			
       
  3883 			ERROR;
       
  3884 		}
       
  3885 		
       
  3886 	}/*function_dword_to_sint*/
       
  3887 	break;
       
  3888 
       
  3889 /****
       
  3890  *DWORD_TO_LINT
       
  3891  */
       
  3892 	case function_dword_to_lint :
       
  3893 	{
       
  3894 		symbol_c *last_type_symbol = NULL;
       
  3895 
       
  3896 		{
       
  3897 			identifier_c param_name("IN");
       
  3898 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3899 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3900 			
       
  3901 			/* Get the value from a foo(<param_value>) style call */
       
  3902 			if (IN_param_value == NULL)
       
  3903 			  IN_param_value = function_call_param_iterator.next();
       
  3904 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3906 			
       
  3907 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3908 			{
       
  3909 		
       
  3910 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3911 				s4o.print("(");
       
  3912 				return_type_symbol->accept(*this);
       
  3913 				s4o.print(")");
       
  3914 				IN_param_value->accept(*this);
       
  3915 				return NULL;
       
  3916 				
       
  3917 			}
       
  3918 			
       
  3919 			ERROR;
       
  3920 		}
       
  3921 		
       
  3922 	}/*function_dword_to_lint*/
       
  3923 	break;
       
  3924 
       
  3925 /****
       
  3926  *DWORD_TO_DINT
       
  3927  */
       
  3928 	case function_dword_to_dint :
       
  3929 	{
       
  3930 		symbol_c *last_type_symbol = NULL;
       
  3931 
       
  3932 		{
       
  3933 			identifier_c param_name("IN");
       
  3934 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3935 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3936 			
       
  3937 			/* Get the value from a foo(<param_value>) style call */
       
  3938 			if (IN_param_value == NULL)
       
  3939 			  IN_param_value = function_call_param_iterator.next();
       
  3940 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3942 			
       
  3943 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3944 			{
       
  3945 		
       
  3946 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3947 				s4o.print("(");
       
  3948 				return_type_symbol->accept(*this);
       
  3949 				s4o.print(")");
       
  3950 				IN_param_value->accept(*this);
       
  3951 				return NULL;
       
  3952 				
       
  3953 			}
       
  3954 			
       
  3955 			ERROR;
       
  3956 		}
       
  3957 		
       
  3958 	}/*function_dword_to_dint*/
       
  3959 	break;
       
  3960 
       
  3961 /****
       
  3962  *DWORD_TO_DATE
       
  3963  */
       
  3964 	case function_dword_to_date :
       
  3965 	{
       
  3966 		symbol_c *last_type_symbol = NULL;
       
  3967 
       
  3968 		{
       
  3969 			identifier_c param_name("IN");
       
  3970 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3971 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3972 			
       
  3973 			/* Get the value from a foo(<param_value>) style call */
       
  3974 			if (IN_param_value == NULL)
       
  3975 			  IN_param_value = function_call_param_iterator.next();
       
  3976 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  3978 			
       
  3979 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  3980 			{
       
  3981 		
       
  3982 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3983 				s4o.print("(");
       
  3984 				return_type_symbol->accept(*this);
       
  3985 				s4o.print(")time_to_real(");
       
  3986 				IN_param_value->accept(*this);
       
  3987 				s4o.print(")");
       
  3988 				return NULL;
       
  3989 				
       
  3990 			}
       
  3991 			
       
  3992 			ERROR;
       
  3993 		}
       
  3994 		
       
  3995 	}/*function_dword_to_date*/
       
  3996 	break;
       
  3997 
       
  3998 /****
       
  3999  *DWORD_TO_DWORD
       
  4000  */
       
  4001 	case function_dword_to_dword :
       
  4002 	{
       
  4003 		symbol_c *last_type_symbol = NULL;
       
  4004 
       
  4005 		{
       
  4006 			identifier_c param_name("IN");
       
  4007 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4008 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4009 			
       
  4010 			/* Get the value from a foo(<param_value>) style call */
       
  4011 			if (IN_param_value == NULL)
       
  4012 			  IN_param_value = function_call_param_iterator.next();
       
  4013 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  4015 			
       
  4016 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4017 			{
       
  4018 		
       
  4019 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4020 				s4o.print("(");
       
  4021 				return_type_symbol->accept(*this);
       
  4022 				s4o.print(")");
       
  4023 				IN_param_value->accept(*this);
       
  4024 				return NULL;
       
  4025 				
       
  4026 			}
       
  4027 			
       
  4028 			ERROR;
       
  4029 		}
       
  4030 		
       
  4031 	}/*function_dword_to_dword*/
       
  4032 	break;
       
  4033 
       
  4034 /****
       
  4035  *DWORD_TO_DT
       
  4036  */
       
  4037 	case function_dword_to_dt :
       
  4038 	{
       
  4039 		symbol_c *last_type_symbol = NULL;
       
  4040 
       
  4041 		{
       
  4042 			identifier_c param_name("IN");
       
  4043 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4044 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4045 			
       
  4046 			/* Get the value from a foo(<param_value>) style call */
       
  4047 			if (IN_param_value == NULL)
       
  4048 			  IN_param_value = function_call_param_iterator.next();
       
  4049 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  4051 			
       
  4052 			if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  4053 			{
       
  4054 		
       
  4055 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4056 				s4o.print("(");
       
  4057 				return_type_symbol->accept(*this);
       
  4058 				s4o.print(")time_to_real(");
       
  4059 				IN_param_value->accept(*this);
       
  4060 				s4o.print(")");
       
  4061 				return NULL;
       
  4062 				
       
  4063 			}
       
  4064 			
       
  4065 			ERROR;
       
  4066 		}
       
  4067 		
       
  4068 	}/*function_dword_to_dt*/
       
  4069 	break;
       
  4070 
       
  4071 /****
       
  4072  *DWORD_TO_TOD
       
  4073  */
       
  4074 	case function_dword_to_tod :
       
  4075 	{
       
  4076 		symbol_c *last_type_symbol = NULL;
       
  4077 
       
  4078 		{
       
  4079 			identifier_c param_name("IN");
       
  4080 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4081 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4082 			
       
  4083 			/* Get the value from a foo(<param_value>) style call */
       
  4084 			if (IN_param_value == NULL)
       
  4085 			  IN_param_value = function_call_param_iterator.next();
       
  4086 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4087 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4088 			
       
  4089 			if (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 
       
  4579 /****
       
  4580  *DT_TO_REAL
       
  4581  */
       
  4582 	case function_dt_to_real :
       
  4583 	{
       
  4584 		symbol_c *last_type_symbol = NULL;
       
  4585 
       
  4586 		{
       
  4587 			identifier_c param_name("IN");
       
  4588 			/* 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);
       
  4590 			
       
  4591 			/* Get the value from a foo(<param_value>) style call */
       
  4592 			if (IN_param_value == NULL)
       
  4593 			  IN_param_value = function_call_param_iterator.next();
       
  4594 			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 ;
       
  4596 			
       
  4597 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4598 			{
       
  4599 		
       
  4600 				symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4601 				s4o.print("(");
       
  4602 				return_type_symbol->accept(*this);
       
  4603 				s4o.print(")real_to_time(");
       
  4604 				IN_param_value->accept(*this);
       
  4605 				s4o.print(")");
       
  4606 				return NULL;
       
  4607 				
       
  4608 			}
       
  4609 			
       
  4610 			ERROR;
       
  4611 		}
       
  4612 		
       
  4613 	}/*function_dt_to_real*/
       
  4614 	break;
       
  4615 
       
  4616 /****
       
  4617  *DT_TO_SINT
       
  4618  */
       
  4619 	case function_dt_to_sint :
       
  4620 	{
       
  4621 		symbol_c *last_type_symbol = NULL;
       
  4622 
       
  4623 		{
       
  4624 			identifier_c param_name("IN");
       
  4625 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4626 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4627 			
       
  4628 			/* Get the value from a foo(<param_value>) style call */
       
  4629 			if (IN_param_value == NULL)
       
  4630 			  IN_param_value = function_call_param_iterator.next();
       
  4631 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4632 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4633 			
       
  4634 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4635 			{
       
  4636 		
       
  4637 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4638 				s4o.print("(");
       
  4639 				return_type_symbol->accept(*this);
       
  4640 				s4o.print(")real_to_time(");
       
  4641 				IN_param_value->accept(*this);
       
  4642 				s4o.print(")");
       
  4643 				return NULL;
       
  4644 				
       
  4645 			}
       
  4646 			
       
  4647 			ERROR;
       
  4648 		}
       
  4649 		
       
  4650 	}/*function_dt_to_sint*/
       
  4651 	break;
       
  4652 
       
  4653 /****
       
  4654  *DT_TO_LINT
       
  4655  */
       
  4656 	case function_dt_to_lint :
       
  4657 	{
       
  4658 		symbol_c *last_type_symbol = NULL;
       
  4659 
       
  4660 		{
       
  4661 			identifier_c param_name("IN");
       
  4662 			/* 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);
       
  4664 			
       
  4665 			/* Get the value from a foo(<param_value>) style call */
       
  4666 			if (IN_param_value == NULL)
       
  4667 			  IN_param_value = function_call_param_iterator.next();
       
  4668 			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 ;
       
  4670 			
       
  4671 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4672 			{
       
  4673 		
       
  4674 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4675 				s4o.print("(");
       
  4676 				return_type_symbol->accept(*this);
       
  4677 				s4o.print(")real_to_time(");
       
  4678 				IN_param_value->accept(*this);
       
  4679 				s4o.print(")");
       
  4680 				return NULL;
       
  4681 				
       
  4682 			}
       
  4683 			
       
  4684 			ERROR;
       
  4685 		}
       
  4686 		
       
  4687 	}/*function_dt_to_lint*/
       
  4688 	break;
       
  4689 
       
  4690 /****
       
  4691  *DT_TO_DINT
       
  4692  */
       
  4693 	case function_dt_to_dint :
       
  4694 	{
       
  4695 		symbol_c *last_type_symbol = NULL;
       
  4696 
       
  4697 		{
       
  4698 			identifier_c param_name("IN");
       
  4699 			/* 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);
       
  4701 			
       
  4702 			/* Get the value from a foo(<param_value>) style call */
       
  4703 			if (IN_param_value == NULL)
       
  4704 			  IN_param_value = function_call_param_iterator.next();
       
  4705 			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 ;
       
  4707 			
       
  4708 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4709 			{
       
  4710 		
       
  4711 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4712 				s4o.print("(");
       
  4713 				return_type_symbol->accept(*this);
       
  4714 				s4o.print(")real_to_time(");
       
  4715 				IN_param_value->accept(*this);
       
  4716 				s4o.print(")");
       
  4717 				return NULL;
       
  4718 				
       
  4719 			}
       
  4720 			
       
  4721 			ERROR;
       
  4722 		}
       
  4723 		
       
  4724 	}/*function_dt_to_dint*/
       
  4725 	break;
       
  4726 
       
  4727 /****
       
  4728  *DT_TO_DATE
       
  4729  */
       
  4730 	case function_dt_to_date :
       
  4731 	{
       
  4732 		symbol_c *last_type_symbol = NULL;
       
  4733 
       
  4734 		{
       
  4735 			identifier_c param_name("IN");
       
  4736 			/* 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);
       
  4738 			
       
  4739 			/* Get the value from a foo(<param_value>) style call */
       
  4740 			if (IN_param_value == NULL)
       
  4741 			  IN_param_value = function_call_param_iterator.next();
       
  4742 			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 ;
       
  4744 			
       
  4745 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4746 			{
       
  4747 		
       
  4748 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4749 				s4o.print("#error DT_TO_DATE not implemented!");
       
  4750 				return NULL;
       
  4751 				
       
  4752 			}
       
  4753 			
       
  4754 			ERROR;
       
  4755 		}
       
  4756 		
       
  4757 	}/*function_dt_to_date*/
       
  4758 	break;
       
  4759 
       
  4760 /****
       
  4761  *DT_TO_DWORD
       
  4762  */
       
  4763 	case function_dt_to_dword :
       
  4764 	{
       
  4765 		symbol_c *last_type_symbol = NULL;
       
  4766 
       
  4767 		{
       
  4768 			identifier_c param_name("IN");
       
  4769 			/* 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);
       
  4771 			
       
  4772 			/* Get the value from a foo(<param_value>) style call */
       
  4773 			if (IN_param_value == NULL)
       
  4774 			  IN_param_value = function_call_param_iterator.next();
       
  4775 			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 ;
       
  4777 			
       
  4778 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4779 			{
       
  4780 		
       
  4781 				symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4782 				s4o.print("(");
       
  4783 				return_type_symbol->accept(*this);
       
  4784 				s4o.print(")real_to_time(");
       
  4785 				IN_param_value->accept(*this);
       
  4786 				s4o.print(")");
       
  4787 				return NULL;
       
  4788 				
       
  4789 			}
       
  4790 			
       
  4791 			ERROR;
       
  4792 		}
       
  4793 		
       
  4794 	}/*function_dt_to_dword*/
       
  4795 	break;
       
  4796 
       
  4797 /****
       
  4798  *DT_TO_DT
       
  4799  */
       
  4800 	case function_dt_to_dt :
       
  4801 	{
       
  4802 		symbol_c *last_type_symbol = NULL;
       
  4803 
       
  4804 		{
       
  4805 			identifier_c param_name("IN");
       
  4806 			/* 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);
       
  4808 			
       
  4809 			/* Get the value from a foo(<param_value>) style call */
       
  4810 			if (IN_param_value == NULL)
       
  4811 			  IN_param_value = function_call_param_iterator.next();
       
  4812 			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 ;
       
  4814 			
       
  4815 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4816 			{
       
  4817 		
       
  4818 				symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4819 				s4o.print("#error DT_TO_DT not implemented!");
       
  4820 				return NULL;
       
  4821 				
       
  4822 			}
       
  4823 			
       
  4824 			ERROR;
       
  4825 		}
       
  4826 		
       
  4827 	}/*function_dt_to_dt*/
       
  4828 	break;
       
  4829 
       
  4830 /****
       
  4831  *DT_TO_TOD
       
  4832  */
       
  4833 	case function_dt_to_tod :
       
  4834 	{
       
  4835 		symbol_c *last_type_symbol = NULL;
       
  4836 
       
  4837 		{
       
  4838 			identifier_c param_name("IN");
       
  4839 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4840 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4841 			
       
  4842 			/* Get the value from a foo(<param_value>) style call */
       
  4843 			if (IN_param_value == NULL)
       
  4844 			  IN_param_value = function_call_param_iterator.next();
       
  4845 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  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 ;
       
  4847 			
       
  4848 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4849 			{
       
  4850 		
       
  4851 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4852 				s4o.print("#error DT_TO_TOD not implemented!");
       
  4853 				return NULL;
       
  4854 				
       
  4855 			}
       
  4856 			
       
  4857 			ERROR;
       
  4858 		}
       
  4859 		
       
  4860 	}/*function_dt_to_tod*/
       
  4861 	break;
       
  4862 
       
  4863 /****
       
  4864  *DT_TO_UDINT
       
  4865  */
       
  4866 	case function_dt_to_udint :
       
  4867 	{
       
  4868 		symbol_c *last_type_symbol = NULL;
       
  4869 
       
  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 
       
  4937 /****
       
  4938  *DT_TO_WSTRING
       
  4939  */
       
  4940 	case function_dt_to_wstring :
       
  4941 	{
       
  4942 		symbol_c *last_type_symbol = NULL;
       
  4943 
       
  4944 		{
       
  4945 			identifier_c param_name("IN");
       
  4946 			/* 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);
       
  4948 			
       
  4949 			/* Get the value from a foo(<param_value>) style call */
       
  4950 			if (IN_param_value == NULL)
       
  4951 			  IN_param_value = function_call_param_iterator.next();
       
  4952 			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 ;
       
  4954 			
       
  4955 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  4956 			{
       
  4957 		
       
  4958 				symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  4959 				s4o.print("(");
       
  4960 				return_type_symbol->accept(*this);
       
  4961 				s4o.print(")string_to_time(");
       
  4962 				IN_param_value->accept(*this);
       
  4963 				s4o.print(")");
       
  4964 				return NULL;
       
  4965 				
       
  4966 			}
       
  4967 			
       
  4968 			ERROR;
       
  4969 		}
       
  4970 		
       
  4971 	}/*function_dt_to_wstring*/
       
  4972 	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 
       
 16020 /****
       
 16021  *TRUNC
       
 16022  */
       
 16023 	case function_trunc :
       
 16024 	{
       
 16025 		symbol_c *last_type_symbol = NULL;
       
 16026 
       
 16027 		{
       
 16028 			identifier_c param_name("IN");
       
 16029 			/* 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);
       
 16031 			
       
 16032 			/* Get the value from a foo(<param_value>) style call */
       
 16033 			if (IN_param_value == NULL)
       
 16034 			  IN_param_value = function_call_param_iterator.next();
       
 16035 			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 ;
       
 16037 			
       
 16038 			if(search_expression_type->is_real_type(IN_param_value))
       
 16039 			{
       
 16040 		
       
 16041 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16042 				s4o.print("(int)");
       
 16043 				IN_param_value->accept(*this);
       
 16044 				return NULL;
       
 16045 				
       
 16046 			}
       
 16047 			
       
 16048 			ERROR;
       
 16049 		}
       
 16050 		
       
 16051 	}/*function_trunc*/
       
 16052 	break;
       
 16053 
       
 16054 /****
       
 16055  *BCD_TO_SINT
       
 16056  */
       
 16057 	case function_bcd_to_sint :
       
 16058 	{
       
 16059 		symbol_c *last_type_symbol = NULL;
       
 16060 
       
 16061 		{
       
 16062 			identifier_c param_name("IN");
       
 16063 			/* 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);
       
 16065 			
       
 16066 			/* Get the value from a foo(<param_value>) style call */
       
 16067 			if (IN_param_value == NULL)
       
 16068 			  IN_param_value = function_call_param_iterator.next();
       
 16069 			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 ;
       
 16071 			
       
 16072 			if(search_expression_type->is_binary_type(IN_param_value))
       
 16073 			{
       
 16074 		
       
 16075 				symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16076 				s4o.print("__bcd_to_something(sizeof(");
       
 16077 				IN_type_symbol->accept(*this);
       
 16078 				s4o.print("),&");
       
 16079 				IN_param_value->accept(*this);
       
 16080 				s4o.print(")");
       
 16081 				return NULL;
       
 16082 				
       
 16083 			}
       
 16084 			
       
 16085 			ERROR;
       
 16086 		}
       
 16087 		
       
 16088 	}/*function_bcd_to_sint*/
       
 16089 	break;
       
 16090 
       
 16091 /****
       
 16092  *BCD_TO_LINT
       
 16093  */
       
 16094 	case function_bcd_to_lint :
       
 16095 	{
       
 16096 		symbol_c *last_type_symbol = NULL;
       
 16097 
       
 16098 		{
       
 16099 			identifier_c param_name("IN");
       
 16100 			/* 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);
       
 16102 			
       
 16103 			/* Get the value from a foo(<param_value>) style call */
       
 16104 			if (IN_param_value == NULL)
       
 16105 			  IN_param_value = function_call_param_iterator.next();
       
 16106 			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 ;
       
 16108 			
       
 16109 			if(search_expression_type->is_binary_type(IN_param_value))
       
 16110 			{
       
 16111 		
       
 16112 				symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16113 				s4o.print("__bcd_to_something(sizeof(");
       
 16114 				IN_type_symbol->accept(*this);
       
 16115 				s4o.print("),&");
       
 16116 				IN_param_value->accept(*this);
       
 16117 				s4o.print(")");
       
 16118 				return NULL;
       
 16119 				
       
 16120 			}
       
 16121 			
       
 16122 			ERROR;
       
 16123 		}
       
 16124 		
       
 16125 	}/*function_bcd_to_lint*/
       
 16126 	break;
       
 16127 
       
 16128 /****
       
 16129  *BCD_TO_DINT
       
 16130  */
       
 16131 	case function_bcd_to_dint :
       
 16132 	{
       
 16133 		symbol_c *last_type_symbol = NULL;
       
 16134 
       
 16135 		{
       
 16136 			identifier_c param_name("IN");
       
 16137 			/* 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);
       
 16139 			
       
 16140 			/* Get the value from a foo(<param_value>) style call */
       
 16141 			if (IN_param_value == NULL)
       
 16142 			  IN_param_value = function_call_param_iterator.next();
       
 16143 			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 ;
       
 16145 			
       
 16146 			if(search_expression_type->is_binary_type(IN_param_value))
       
 16147 			{
       
 16148 		
       
 16149 				symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 16150 				s4o.print("__bcd_to_something(sizeof(");
       
 16151 				IN_type_symbol->accept(*this);
       
 16152 				s4o.print("),&");
       
 16153 				IN_param_value->accept(*this);
       
 16154 				s4o.print(")");
       
 16155 				return NULL;
       
 16156 				
       
 16157 			}
       
 16158 			
       
 16159 			ERROR;
       
 16160 		}
       
 16161 		
       
 16162 	}/*function_bcd_to_dint*/
       
 16163 	break;
       
 16164 
       
 16165 /****
       
 16166  *BCD_TO_UDINT
       
 16167  */
       
 16168 	case function_bcd_to_udint :
       
 16169 	{
       
 16170 		symbol_c *last_type_symbol = NULL;
       
 16171 
       
 16172 		{
       
 16173 			identifier_c param_name("IN");
       
 16174 			/* 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);
       
 16176 			
       
 16177 			/* Get the value from a foo(<param_value>) style call */
       
 16178 			if (IN_param_value == NULL)
       
 16179 			  IN_param_value = function_call_param_iterator.next();
       
 16180 			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 ;
       
 16182 			
       
 16183 			if(search_expression_type->is_binary_type(IN_param_value))
       
 16184 			{
       
 16185 		
       
 16186 				symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16187 				s4o.print("__bcd_to_something(sizeof(");
       
 16188 				IN_type_symbol->accept(*this);
       
 16189 				s4o.print("),&");
       
 16190 				IN_param_value->accept(*this);
       
 16191 				s4o.print(")");
       
 16192 				return NULL;
       
 16193 				
       
 16194 			}
       
 16195 			
       
 16196 			ERROR;
       
 16197 		}
       
 16198 		
       
 16199 	}/*function_bcd_to_udint*/
       
 16200 	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_param_value))
       
 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_param_value))
       
 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 
       
 16276 /****
       
 16277  *BCD_TO_ULINT
       
 16278  */
       
 16279 	case function_bcd_to_ulint :
       
 16280 	{
       
 16281 		symbol_c *last_type_symbol = NULL;
       
 16282 
       
 16283 		{
       
 16284 			identifier_c param_name("IN");
       
 16285 			/* 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);
       
 16287 			
       
 16288 			/* Get the value from a foo(<param_value>) style call */
       
 16289 			if (IN_param_value == NULL)
       
 16290 			  IN_param_value = function_call_param_iterator.next();
       
 16291 			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 ;
       
 16293 			
       
 16294 			if(search_expression_type->is_binary_type(IN_param_value))
       
 16295 			{
       
 16296 		
       
 16297 				symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16298 				s4o.print("__bcd_to_something(sizeof(");
       
 16299 				IN_type_symbol->accept(*this);
       
 16300 				s4o.print("),&");
       
 16301 				IN_param_value->accept(*this);
       
 16302 				s4o.print(")");
       
 16303 				return NULL;
       
 16304 				
       
 16305 			}
       
 16306 			
       
 16307 			ERROR;
       
 16308 		}
       
 16309 		
       
 16310 	}/*function_bcd_to_ulint*/
       
 16311 	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_param_value))
       
 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 
       
 16350 /****
       
 16351  *SINT_TO_BCD
       
 16352  */
       
 16353 	case function_sint_to_bcd :
       
 16354 	{
       
 16355 		symbol_c *last_type_symbol = NULL;
       
 16356 
       
 16357 		{
       
 16358 			identifier_c param_name("IN");
       
 16359 			/* 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);
       
 16361 			
       
 16362 			/* Get the value from a foo(<param_value>) style call */
       
 16363 			if (IN_param_value == NULL)
       
 16364 			  IN_param_value = function_call_param_iterator.next();
       
 16365 			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 ;
       
 16367 			
       
 16368 			if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 16369 			{
       
 16370 		
       
 16371 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16372 				s4o.print("__something_to_bcd(sizeof(");
       
 16373 				IN_type_symbol->accept(*this);
       
 16374 				s4o.print("),&");
       
 16375 				IN_param_value->accept(*this);
       
 16376 				s4o.print(")");
       
 16377 				return NULL;
       
 16378 				
       
 16379 			}
       
 16380 			
       
 16381 			ERROR;
       
 16382 		}
       
 16383 		
       
 16384 	}/*function_sint_to_bcd*/
       
 16385 	break;
       
 16386 
       
 16387 /****
       
 16388  *LINT_TO_BCD
       
 16389  */
       
 16390 	case function_lint_to_bcd :
       
 16391 	{
       
 16392 		symbol_c *last_type_symbol = NULL;
       
 16393 
       
 16394 		{
       
 16395 			identifier_c param_name("IN");
       
 16396 			/* 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);
       
 16398 			
       
 16399 			/* Get the value from a foo(<param_value>) style call */
       
 16400 			if (IN_param_value == NULL)
       
 16401 			  IN_param_value = function_call_param_iterator.next();
       
 16402 			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 ;
       
 16404 			
       
 16405 			if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 16406 			{
       
 16407 		
       
 16408 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16409 				s4o.print("__something_to_bcd(sizeof(");
       
 16410 				IN_type_symbol->accept(*this);
       
 16411 				s4o.print("),&");
       
 16412 				IN_param_value->accept(*this);
       
 16413 				s4o.print(")");
       
 16414 				return NULL;
       
 16415 				
       
 16416 			}
       
 16417 			
       
 16418 			ERROR;
       
 16419 		}
       
 16420 		
       
 16421 	}/*function_lint_to_bcd*/
       
 16422 	break;
       
 16423 
       
 16424 /****
       
 16425  *DINT_TO_BCD
       
 16426  */
       
 16427 	case function_dint_to_bcd :
       
 16428 	{
       
 16429 		symbol_c *last_type_symbol = NULL;
       
 16430 
       
 16431 		{
       
 16432 			identifier_c param_name("IN");
       
 16433 			/* 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);
       
 16435 			
       
 16436 			/* Get the value from a foo(<param_value>) style call */
       
 16437 			if (IN_param_value == NULL)
       
 16438 			  IN_param_value = function_call_param_iterator.next();
       
 16439 			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 ;
       
 16441 			
       
 16442 			if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16443 			{
       
 16444 		
       
 16445 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16446 				s4o.print("__something_to_bcd(sizeof(");
       
 16447 				IN_type_symbol->accept(*this);
       
 16448 				s4o.print("),&");
       
 16449 				IN_param_value->accept(*this);
       
 16450 				s4o.print(")");
       
 16451 				return NULL;
       
 16452 				
       
 16453 			}
       
 16454 			
       
 16455 			ERROR;
       
 16456 		}
       
 16457 		
       
 16458 	}/*function_dint_to_bcd*/
       
 16459 	break;
       
 16460 
       
 16461 /****
       
 16462  *UDINT_TO_BCD
       
 16463  */
       
 16464 	case function_udint_to_bcd :
       
 16465 	{
       
 16466 		symbol_c *last_type_symbol = NULL;
       
 16467 
       
 16468 		{
       
 16469 			identifier_c param_name("IN");
       
 16470 			/* 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);
       
 16472 			
       
 16473 			/* Get the value from a foo(<param_value>) style call */
       
 16474 			if (IN_param_value == NULL)
       
 16475 			  IN_param_value = function_call_param_iterator.next();
       
 16476 			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 ;
       
 16478 			
       
 16479 			if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 16480 			{
       
 16481 		
       
 16482 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16483 				s4o.print("__something_to_bcd(sizeof(");
       
 16484 				IN_type_symbol->accept(*this);
       
 16485 				s4o.print("),&");
       
 16486 				IN_param_value->accept(*this);
       
 16487 				s4o.print(")");
       
 16488 				return NULL;
       
 16489 				
       
 16490 			}
       
 16491 			
       
 16492 			ERROR;
       
 16493 		}
       
 16494 		
       
 16495 	}/*function_udint_to_bcd*/
       
 16496 	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 
       
 16572 /****
       
 16573  *ULINT_TO_BCD
       
 16574  */
       
 16575 	case function_ulint_to_bcd :
       
 16576 	{
       
 16577 		symbol_c *last_type_symbol = NULL;
       
 16578 
       
 16579 		{
       
 16580 			identifier_c param_name("IN");
       
 16581 			/* 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);
       
 16583 			
       
 16584 			/* Get the value from a foo(<param_value>) style call */
       
 16585 			if (IN_param_value == NULL)
       
 16586 			  IN_param_value = function_call_param_iterator.next();
       
 16587 			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 ;
       
 16589 			
       
 16590 			if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 16591 			{
       
 16592 		
       
 16593 				symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 16594 				s4o.print("__something_to_bcd(sizeof(");
       
 16595 				IN_type_symbol->accept(*this);
       
 16596 				s4o.print("),&");
       
 16597 				IN_param_value->accept(*this);
       
 16598 				s4o.print(")");
       
 16599 				return NULL;
       
 16600 				
       
 16601 			}
       
 16602 			
       
 16603 			ERROR;
       
 16604 		}
       
 16605 		
       
 16606 	}/*function_ulint_to_bcd*/
       
 16607 	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 
       
 16646 /****
       
 16647  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 16648  */
       
 16649 	case function_date_and_time_to_time_of_day :
       
 16650 	{
       
 16651 		symbol_c *last_type_symbol = NULL;
       
 16652 
       
 16653 		{
       
 16654 			identifier_c param_name("IN");
       
 16655 			/* 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);
       
 16657 			
       
 16658 			/* Get the value from a foo(<param_value>) style call */
       
 16659 			if (IN_param_value == NULL)
       
 16660 			  IN_param_value = function_call_param_iterator.next();
       
 16661 			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 ;
       
 16663 			
       
 16664 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 16665 			{
       
 16666 		
       
 16667 				symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16668 				s4o.print("__date_and_time_to_time_of_day(&");
       
 16669 				IN_param_value->accept(*this);
       
 16670 				s4o.print(")");
       
 16671 				return NULL;
       
 16672 				
       
 16673 			}
       
 16674 			
       
 16675 			ERROR;
       
 16676 		}
       
 16677 		
       
 16678 	}/*function_date_and_time_to_time_of_day*/
       
 16679 	break;
       
 16680 
       
 16681 /****
       
 16682  *DATE_AND_TIME_TO_DATE
       
 16683  */
       
 16684 	case function_date_and_time_to_date :
       
 16685 	{
       
 16686 		symbol_c *last_type_symbol = NULL;
       
 16687 
       
 16688 		{
       
 16689 			identifier_c param_name("IN");
       
 16690 			/* 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);
       
 16692 			
       
 16693 			/* Get the value from a foo(<param_value>) style call */
       
 16694 			if (IN_param_value == NULL)
       
 16695 			  IN_param_value = function_call_param_iterator.next();
       
 16696 			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 ;
       
 16698 			
       
 16699 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 16700 			{
       
 16701 		
       
 16702 				symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16703 				s4o.print("__date_and_time_to_time_of_day(&");
       
 16704 				IN_param_value->accept(*this);
       
 16705 				s4o.print(")");
       
 16706 				return NULL;
       
 16707 				
       
 16708 			}
       
 16709 			
       
 16710 			ERROR;
       
 16711 		}
       
 16712 		
       
 16713 	}/*function_date_and_time_to_date*/
       
 16714 	break;
       
 16715 
       
 16716 /****
       
 16717  *ABS
       
 16718  */
       
 16719 	case function_abs :
       
 16720 	{
       
 16721 		symbol_c *last_type_symbol = NULL;
       
 16722 
       
 16723 		{
       
 16724 			identifier_c param_name("IN");
       
 16725 			/* 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);
       
 16727 			
       
 16728 			/* Get the value from a foo(<param_value>) style call */
       
 16729 			if (IN_param_value == NULL)
       
 16730 			  IN_param_value = function_call_param_iterator.next();
       
 16731 			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 ;
       
 16733 			
       
 16734 			if(search_expression_type->is_num_type(IN_param_value))
       
 16735 			{
       
 16736 		
       
 16737 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16738 				s4o.print("__abs_");
       
 16739 				IN_type_symbol->accept(*this);
       
 16740 				s4o.print("(");
       
 16741 				IN_param_value->accept(*this);
       
 16742 				s4o.print(")");
       
 16743 				return NULL;
       
 16744 				
       
 16745 			}
       
 16746 			
       
 16747 			ERROR;
       
 16748 		}
       
 16749 		
       
 16750 	}/*function_abs*/
       
 16751 	break;
       
 16752 
       
 16753 /****
       
 16754  *SQRT
       
 16755  */
       
 16756 	case function_sqrt :
       
 16757 	{
       
 16758 		symbol_c *last_type_symbol = NULL;
       
 16759 
       
 16760 		{
       
 16761 			identifier_c param_name("IN");
       
 16762 			/* 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);
       
 16764 			
       
 16765 			/* Get the value from a foo(<param_value>) style call */
       
 16766 			if (IN_param_value == NULL)
       
 16767 			  IN_param_value = function_call_param_iterator.next();
       
 16768 			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 ;
       
 16770 			
       
 16771 			if(search_expression_type->is_real_type(IN_param_value))
       
 16772 			{
       
 16773 		
       
 16774 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16775 				s4o.print("sqrt(");
       
 16776 				IN_param_value->accept(*this);
       
 16777 				s4o.print(")");
       
 16778 				return NULL;
       
 16779 				
       
 16780 			}
       
 16781 			
       
 16782 			ERROR;
       
 16783 		}
       
 16784 		
       
 16785 	}/*function_sqrt*/
       
 16786 	break;
       
 16787 
       
 16788 /****
       
 16789  *LN
       
 16790  */
       
 16791 	case function_ln :
       
 16792 	{
       
 16793 		symbol_c *last_type_symbol = NULL;
       
 16794 
       
 16795 		{
       
 16796 			identifier_c param_name("IN");
       
 16797 			/* 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);
       
 16799 			
       
 16800 			/* Get the value from a foo(<param_value>) style call */
       
 16801 			if (IN_param_value == NULL)
       
 16802 			  IN_param_value = function_call_param_iterator.next();
       
 16803 			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 ;
       
 16805 			
       
 16806 			if(search_expression_type->is_real_type(IN_param_value))
       
 16807 			{
       
 16808 		
       
 16809 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16810 				s4o.print("ln(");
       
 16811 				IN_param_value->accept(*this);
       
 16812 				s4o.print(")");
       
 16813 				return NULL;
       
 16814 				
       
 16815 			}
       
 16816 			
       
 16817 			ERROR;
       
 16818 		}
       
 16819 		
       
 16820 	}/*function_ln*/
       
 16821 	break;
       
 16822 
       
 16823 /****
       
 16824  *LOG
       
 16825  */
       
 16826 	case function_log :
       
 16827 	{
       
 16828 		symbol_c *last_type_symbol = NULL;
       
 16829 
       
 16830 		{
       
 16831 			identifier_c param_name("IN");
       
 16832 			/* 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);
       
 16834 			
       
 16835 			/* Get the value from a foo(<param_value>) style call */
       
 16836 			if (IN_param_value == NULL)
       
 16837 			  IN_param_value = function_call_param_iterator.next();
       
 16838 			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 ;
       
 16840 			
       
 16841 			if(search_expression_type->is_real_type(IN_param_value))
       
 16842 			{
       
 16843 		
       
 16844 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16845 				s4o.print("log(");
       
 16846 				IN_param_value->accept(*this);
       
 16847 				s4o.print(")");
       
 16848 				return NULL;
       
 16849 				
       
 16850 			}
       
 16851 			
       
 16852 			ERROR;
       
 16853 		}
       
 16854 		
       
 16855 	}/*function_log*/
       
 16856 	break;
       
 16857 
       
 16858 /****
       
 16859  *EXP
       
 16860  */
       
 16861 	case function_exp :
       
 16862 	{
       
 16863 		symbol_c *last_type_symbol = NULL;
       
 16864 
       
 16865 		{
       
 16866 			identifier_c param_name("IN");
       
 16867 			/* 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);
       
 16869 			
       
 16870 			/* Get the value from a foo(<param_value>) style call */
       
 16871 			if (IN_param_value == NULL)
       
 16872 			  IN_param_value = function_call_param_iterator.next();
       
 16873 			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 ;
       
 16875 			
       
 16876 			if(search_expression_type->is_real_type(IN_param_value))
       
 16877 			{
       
 16878 		
       
 16879 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16880 				s4o.print("exp(");
       
 16881 				IN_param_value->accept(*this);
       
 16882 				s4o.print(")");
       
 16883 				return NULL;
       
 16884 				
       
 16885 			}
       
 16886 			
       
 16887 			ERROR;
       
 16888 		}
       
 16889 		
       
 16890 	}/*function_exp*/
       
 16891 	break;
       
 16892 
       
 16893 /****
       
 16894  *SIN
       
 16895  */
       
 16896 	case function_sin :
       
 16897 	{
       
 16898 		symbol_c *last_type_symbol = NULL;
       
 16899 
       
 16900 		{
       
 16901 			identifier_c param_name("IN");
       
 16902 			/* 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);
       
 16904 			
       
 16905 			/* Get the value from a foo(<param_value>) style call */
       
 16906 			if (IN_param_value == NULL)
       
 16907 			  IN_param_value = function_call_param_iterator.next();
       
 16908 			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 ;
       
 16910 			
       
 16911 			if(search_expression_type->is_real_type(IN_param_value))
       
 16912 			{
       
 16913 		
       
 16914 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16915 				s4o.print("sin(");
       
 16916 				IN_param_value->accept(*this);
       
 16917 				s4o.print(")");
       
 16918 				return NULL;
       
 16919 				
       
 16920 			}
       
 16921 			
       
 16922 			ERROR;
       
 16923 		}
       
 16924 		
       
 16925 	}/*function_sin*/
       
 16926 	break;
       
 16927 
       
 16928 /****
       
 16929  *COS
       
 16930  */
       
 16931 	case function_cos :
       
 16932 	{
       
 16933 		symbol_c *last_type_symbol = NULL;
       
 16934 
       
 16935 		{
       
 16936 			identifier_c param_name("IN");
       
 16937 			/* 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);
       
 16939 			
       
 16940 			/* Get the value from a foo(<param_value>) style call */
       
 16941 			if (IN_param_value == NULL)
       
 16942 			  IN_param_value = function_call_param_iterator.next();
       
 16943 			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 ;
       
 16945 			
       
 16946 			if(search_expression_type->is_real_type(IN_param_value))
       
 16947 			{
       
 16948 		
       
 16949 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16950 				s4o.print("cos(");
       
 16951 				IN_param_value->accept(*this);
       
 16952 				s4o.print(")");
       
 16953 				return NULL;
       
 16954 				
       
 16955 			}
       
 16956 			
       
 16957 			ERROR;
       
 16958 		}
       
 16959 		
       
 16960 	}/*function_cos*/
       
 16961 	break;
       
 16962 
       
 16963 /****
       
 16964  *TAN
       
 16965  */
       
 16966 	case function_tan :
       
 16967 	{
       
 16968 		symbol_c *last_type_symbol = NULL;
       
 16969 
       
 16970 		{
       
 16971 			identifier_c param_name("IN");
       
 16972 			/* 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);
       
 16974 			
       
 16975 			/* Get the value from a foo(<param_value>) style call */
       
 16976 			if (IN_param_value == NULL)
       
 16977 			  IN_param_value = function_call_param_iterator.next();
       
 16978 			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 ;
       
 16980 			
       
 16981 			if(search_expression_type->is_real_type(IN_param_value))
       
 16982 			{
       
 16983 		
       
 16984 				symbol_c * return_type_symbol = IN_type_symbol;
       
 16985 				s4o.print("tan(");
       
 16986 				IN_param_value->accept(*this);
       
 16987 				s4o.print(")");
       
 16988 				return NULL;
       
 16989 				
       
 16990 			}
       
 16991 			
       
 16992 			ERROR;
       
 16993 		}
       
 16994 		
       
 16995 	}/*function_tan*/
       
 16996 	break;
       
 16997 
       
 16998 /****
       
 16999  *ASIN
       
 17000  */
       
 17001 	case function_asin :
       
 17002 	{
       
 17003 		symbol_c *last_type_symbol = NULL;
       
 17004 
       
 17005 		{
       
 17006 			identifier_c param_name("IN");
       
 17007 			/* 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);
       
 17009 			
       
 17010 			/* Get the value from a foo(<param_value>) style call */
       
 17011 			if (IN_param_value == NULL)
       
 17012 			  IN_param_value = function_call_param_iterator.next();
       
 17013 			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 ;
       
 17015 			
       
 17016 			if(search_expression_type->is_real_type(IN_param_value))
       
 17017 			{
       
 17018 		
       
 17019 				symbol_c * return_type_symbol = IN_type_symbol;
       
 17020 				s4o.print("asin(");
       
 17021 				IN_param_value->accept(*this);
       
 17022 				s4o.print(")");
       
 17023 				return NULL;
       
 17024 				
       
 17025 			}
       
 17026 			
       
 17027 			ERROR;
       
 17028 		}
       
 17029 		
       
 17030 	}/*function_asin*/
       
 17031 	break;
       
 17032 
       
 17033 /****
       
 17034  *ACOS
       
 17035  */
       
 17036 	case function_acos :
       
 17037 	{
       
 17038 		symbol_c *last_type_symbol = NULL;
       
 17039 
       
 17040 		{
       
 17041 			identifier_c param_name("IN");
       
 17042 			/* 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);
       
 17044 			
       
 17045 			/* Get the value from a foo(<param_value>) style call */
       
 17046 			if (IN_param_value == NULL)
       
 17047 			  IN_param_value = function_call_param_iterator.next();
       
 17048 			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 ;
       
 17050 			
       
 17051 			if(search_expression_type->is_real_type(IN_param_value))
       
 17052 			{
       
 17053 		
       
 17054 				symbol_c * return_type_symbol = IN_type_symbol;
       
 17055 				s4o.print("acos(");
       
 17056 				IN_param_value->accept(*this);
       
 17057 				s4o.print(")");
       
 17058 				return NULL;
       
 17059 				
       
 17060 			}
       
 17061 			
       
 17062 			ERROR;
       
 17063 		}
       
 17064 		
       
 17065 	}/*function_acos*/
       
 17066 	break;
       
 17067 
       
 17068 /****
       
 17069  *ATAN
       
 17070  */
       
 17071 	case function_atan :
       
 17072 	{
       
 17073 		symbol_c *last_type_symbol = NULL;
       
 17074 
       
 17075 		{
       
 17076 			identifier_c param_name("IN");
       
 17077 			/* 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);
       
 17079 			
       
 17080 			/* Get the value from a foo(<param_value>) style call */
       
 17081 			if (IN_param_value == NULL)
       
 17082 			  IN_param_value = function_call_param_iterator.next();
       
 17083 			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 ;
       
 17085 			
       
 17086 			if(search_expression_type->is_real_type(IN_param_value))
       
 17087 			{
       
 17088 		
       
 17089 				symbol_c * return_type_symbol = IN_type_symbol;
       
 17090 				s4o.print("atan(");
       
 17091 				IN_param_value->accept(*this);
       
 17092 				s4o.print(")");
       
 17093 				return NULL;
       
 17094 				
       
 17095 			}
       
 17096 			
       
 17097 			ERROR;
       
 17098 		}
       
 17099 		
       
 17100 	}/*function_atan*/
       
 17101 	break;
       
 17102 
       
 17103 /****
       
 17104  *ADD
       
 17105  */
       
 17106 	case function_add :
       
 17107 	{
       
 17108 		symbol_c *last_type_symbol = NULL;
       
 17109 
       
 17110 		{
       
 17111 			identifier_c param_name("IN1");
       
 17112 			/* 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);
       
 17114 			
       
 17115 			/* Get the value from a foo(<param_value>) style call */
       
 17116 			if (IN1_param_value == NULL)
       
 17117 			  IN1_param_value = function_call_param_iterator.next();
       
 17118 			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 ;
       
 17120 			
       
 17121 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17122 			{
       
 17123 		
       
 17124 				{
       
 17125 					identifier_c param_name("IN2");
       
 17126 					/* 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);
       
 17128 					
       
 17129 					/* Get the value from a foo(<param_value>) style call */
       
 17130 					if (IN2_param_value == NULL)
       
 17131 					  IN2_param_value = function_call_param_iterator.next();
       
 17132 					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 ;
       
 17134 					
       
 17135 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17136 					{
       
 17137 				
       
 17138 						symbol_c * return_type_symbol = last_type_symbol;
       
 17139 						s4o.print("(");
       
 17140 						IN1_param_value->accept(*this);
       
 17141 						s4o.print("+");
       
 17142 						IN2_param_value->accept(*this);
       
 17143 						
       
 17144 						int base_num = 3;
       
 17145 						symbol_c *param_value = NULL;
       
 17146 						do{
       
 17147 							char my_name[10];
       
 17148 							sprintf(my_name, "IN%d", base_num++);
       
 17149 							identifier_c param_name(my_name);
       
 17150 							
       
 17151 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17152 							param_value = function_call_param_iterator.search(&param_name);
       
 17153 							
       
 17154 							/* Get the value from a foo(<param_value>) style call */
       
 17155 							if (param_value == NULL)
       
 17156 							  param_value = function_call_param_iterator.next();
       
 17157 							if (param_value != NULL){
       
 17158 								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 ;
       
 17160 							
       
 17161 								/*Function specific CODE */
       
 17162 								s4o.print("+");
       
 17163 								param_value->accept(*this);
       
 17164 								
       
 17165 							}
       
 17166 							
       
 17167 						}while(param_value != NULL);
       
 17168 						s4o.print(")");
       
 17169 						return NULL;
       
 17170 						
       
 17171 						
       
 17172 					}
       
 17173 					
       
 17174 					ERROR;
       
 17175 				}
       
 17176 				
       
 17177 			}
       
 17178 			
       
 17179 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 17180 			{
       
 17181 		
       
 17182 				{
       
 17183 					identifier_c param_name("IN2");
       
 17184 					/* 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);
       
 17186 					
       
 17187 					/* Get the value from a foo(<param_value>) style call */
       
 17188 					if (IN2_param_value == NULL)
       
 17189 					  IN2_param_value = function_call_param_iterator.next();
       
 17190 					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 ;
       
 17192 					
       
 17193 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17194 					{
       
 17195 				
       
 17196 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17197 						s4o.print("__time_add(&");
       
 17198 						IN1_param_value->accept(*this);
       
 17199 						s4o.print(", &");
       
 17200 						IN2_param_value->accept(*this);
       
 17201 						s4o.print(")");
       
 17202 						return NULL;
       
 17203 						
       
 17204 					}
       
 17205 					
       
 17206 					ERROR;
       
 17207 				}
       
 17208 				
       
 17209 			}
       
 17210 			
       
 17211 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 17212 			{
       
 17213 		
       
 17214 				{
       
 17215 					identifier_c param_name("IN2");
       
 17216 					/* 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);
       
 17218 					
       
 17219 					/* Get the value from a foo(<param_value>) style call */
       
 17220 					if (IN2_param_value == NULL)
       
 17221 					  IN2_param_value = function_call_param_iterator.next();
       
 17222 					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 ;
       
 17224 					
       
 17225 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17226 					{
       
 17227 				
       
 17228 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17229 						s4o.print("__time_add(&");
       
 17230 						IN1_param_value->accept(*this);
       
 17231 						s4o.print(", &");
       
 17232 						IN2_param_value->accept(*this);
       
 17233 						s4o.print(")");
       
 17234 						return NULL;
       
 17235 						
       
 17236 					}
       
 17237 					
       
 17238 					ERROR;
       
 17239 				}
       
 17240 				
       
 17241 			}
       
 17242 			
       
 17243 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17244 			{
       
 17245 		
       
 17246 				{
       
 17247 					identifier_c param_name("IN2");
       
 17248 					/* 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);
       
 17250 					
       
 17251 					/* Get the value from a foo(<param_value>) style call */
       
 17252 					if (IN2_param_value == NULL)
       
 17253 					  IN2_param_value = function_call_param_iterator.next();
       
 17254 					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 ;
       
 17256 					
       
 17257 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17258 					{
       
 17259 				
       
 17260 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17261 						s4o.print("__time_add(&");
       
 17262 						IN1_param_value->accept(*this);
       
 17263 						s4o.print(", &");
       
 17264 						IN2_param_value->accept(*this);
       
 17265 						s4o.print(")");
       
 17266 						return NULL;
       
 17267 						
       
 17268 					}
       
 17269 					
       
 17270 					ERROR;
       
 17271 				}
       
 17272 				
       
 17273 			}
       
 17274 			
       
 17275 			ERROR;
       
 17276 		}
       
 17277 		
       
 17278 	}/*function_add*/
       
 17279 	break;
       
 17280 
       
 17281 /****
       
 17282  *MUL
       
 17283  */
       
 17284 	case function_mul :
       
 17285 	{
       
 17286 		symbol_c *last_type_symbol = NULL;
       
 17287 
       
 17288 		{
       
 17289 			identifier_c param_name("IN1");
       
 17290 			/* 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);
       
 17292 			
       
 17293 			/* Get the value from a foo(<param_value>) style call */
       
 17294 			if (IN1_param_value == NULL)
       
 17295 			  IN1_param_value = function_call_param_iterator.next();
       
 17296 			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 ;
       
 17298 			
       
 17299 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17300 			{
       
 17301 		
       
 17302 				{
       
 17303 					identifier_c param_name("IN2");
       
 17304 					/* 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);
       
 17306 					
       
 17307 					/* Get the value from a foo(<param_value>) style call */
       
 17308 					if (IN2_param_value == NULL)
       
 17309 					  IN2_param_value = function_call_param_iterator.next();
       
 17310 					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 ;
       
 17312 					
       
 17313 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17314 					{
       
 17315 				
       
 17316 						symbol_c * return_type_symbol = last_type_symbol;
       
 17317 						s4o.print("(");
       
 17318 						IN1_param_value->accept(*this);
       
 17319 						s4o.print("*");
       
 17320 						IN2_param_value->accept(*this);
       
 17321 						
       
 17322 						int base_num = 3;
       
 17323 						symbol_c *param_value = NULL;
       
 17324 						do{
       
 17325 							char my_name[10];
       
 17326 							sprintf(my_name, "IN%d", base_num++);
       
 17327 							identifier_c param_name(my_name);
       
 17328 							
       
 17329 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 17330 							param_value = function_call_param_iterator.search(&param_name);
       
 17331 							
       
 17332 							/* Get the value from a foo(<param_value>) style call */
       
 17333 							if (param_value == NULL)
       
 17334 							  param_value = function_call_param_iterator.next();
       
 17335 							if (param_value != NULL){
       
 17336 								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 ;
       
 17338 							
       
 17339 								/*Function specific CODE */
       
 17340 								s4o.print("*");
       
 17341 								param_value->accept(*this);
       
 17342 								
       
 17343 							}
       
 17344 							
       
 17345 						}while(param_value != NULL);
       
 17346 						s4o.print(")");
       
 17347 						return NULL;
       
 17348 						
       
 17349 						
       
 17350 					}
       
 17351 					
       
 17352 					ERROR;
       
 17353 				}
       
 17354 				
       
 17355 			}
       
 17356 			
       
 17357 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17358 			{
       
 17359 		
       
 17360 				{
       
 17361 					identifier_c param_name("IN2");
       
 17362 					/* 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);
       
 17364 					
       
 17365 					/* Get the value from a foo(<param_value>) style call */
       
 17366 					if (IN2_param_value == NULL)
       
 17367 					  IN2_param_value = function_call_param_iterator.next();
       
 17368 					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 ;
       
 17370 					
       
 17371 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17372 					{
       
 17373 				
       
 17374 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17375 						s4o.print("__time_mul(&");
       
 17376 						IN1_param_value->accept(*this);
       
 17377 						s4o.print(", &");
       
 17378 						IN2_param_value->accept(*this);
       
 17379 						s4o.print(")");
       
 17380 						return NULL;
       
 17381 						
       
 17382 					}
       
 17383 					
       
 17384 					ERROR;
       
 17385 				}
       
 17386 				
       
 17387 			}
       
 17388 			
       
 17389 			ERROR;
       
 17390 		}
       
 17391 		
       
 17392 	}/*function_mul*/
       
 17393 	break;
       
 17394 
       
 17395 /****
       
 17396  *SUB
       
 17397  */
       
 17398 	case function_sub :
       
 17399 	{
       
 17400 		symbol_c *last_type_symbol = NULL;
       
 17401 
       
 17402 		{
       
 17403 			identifier_c param_name("IN1");
       
 17404 			/* 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);
       
 17406 			
       
 17407 			/* Get the value from a foo(<param_value>) style call */
       
 17408 			if (IN1_param_value == NULL)
       
 17409 			  IN1_param_value = function_call_param_iterator.next();
       
 17410 			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 ;
       
 17412 			
       
 17413 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17414 			{
       
 17415 		
       
 17416 				{
       
 17417 					identifier_c param_name("IN2");
       
 17418 					/* 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);
       
 17420 					
       
 17421 					/* Get the value from a foo(<param_value>) style call */
       
 17422 					if (IN2_param_value == NULL)
       
 17423 					  IN2_param_value = function_call_param_iterator.next();
       
 17424 					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 ;
       
 17426 					
       
 17427 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17428 					{
       
 17429 				
       
 17430 						symbol_c * return_type_symbol = last_type_symbol;
       
 17431 						s4o.print("(");
       
 17432 						IN1_param_value->accept(*this);
       
 17433 						s4o.print("-");
       
 17434 						IN2_param_value->accept(*this);
       
 17435 						s4o.print(")");
       
 17436 						return NULL;
       
 17437 						
       
 17438 					}
       
 17439 					
       
 17440 					ERROR;
       
 17441 				}
       
 17442 				
       
 17443 			}
       
 17444 			
       
 17445 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 17446 			{
       
 17447 		
       
 17448 				{
       
 17449 					identifier_c param_name("IN2");
       
 17450 					/* 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);
       
 17452 					
       
 17453 					/* Get the value from a foo(<param_value>) style call */
       
 17454 					if (IN2_param_value == NULL)
       
 17455 					  IN2_param_value = function_call_param_iterator.next();
       
 17456 					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 ;
       
 17458 					
       
 17459 					if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 17460 					{
       
 17461 				
       
 17462 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17463 						s4o.print("__time_sub(&");
       
 17464 						IN1_param_value->accept(*this);
       
 17465 						s4o.print(", &");
       
 17466 						IN2_param_value->accept(*this);
       
 17467 						s4o.print(")");
       
 17468 						return NULL;
       
 17469 						
       
 17470 					}
       
 17471 					
       
 17472 					ERROR;
       
 17473 				}
       
 17474 				
       
 17475 			}
       
 17476 			
       
 17477 			if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 17478 			{
       
 17479 		
       
 17480 				{
       
 17481 					identifier_c param_name("IN2");
       
 17482 					/* 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);
       
 17484 					
       
 17485 					/* Get the value from a foo(<param_value>) style call */
       
 17486 					if (IN2_param_value == NULL)
       
 17487 					  IN2_param_value = function_call_param_iterator.next();
       
 17488 					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 ;
       
 17490 					
       
 17491 					if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 17492 					{
       
 17493 				
       
 17494 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17495 						s4o.print("__time_sub(&");
       
 17496 						IN1_param_value->accept(*this);
       
 17497 						s4o.print(", &");
       
 17498 						IN2_param_value->accept(*this);
       
 17499 						s4o.print(")");
       
 17500 						return NULL;
       
 17501 						
       
 17502 					}
       
 17503 					
       
 17504 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17505 					{
       
 17506 				
       
 17507 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17508 						s4o.print("__time_sub(&");
       
 17509 						IN1_param_value->accept(*this);
       
 17510 						s4o.print(", &");
       
 17511 						IN2_param_value->accept(*this);
       
 17512 						s4o.print(")");
       
 17513 						return NULL;
       
 17514 						
       
 17515 					}
       
 17516 					
       
 17517 					ERROR;
       
 17518 				}
       
 17519 				
       
 17520 			}
       
 17521 			
       
 17522 			if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 17523 			{
       
 17524 		
       
 17525 				{
       
 17526 					identifier_c param_name("IN2");
       
 17527 					/* 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);
       
 17529 					
       
 17530 					/* Get the value from a foo(<param_value>) style call */
       
 17531 					if (IN2_param_value == NULL)
       
 17532 					  IN2_param_value = function_call_param_iterator.next();
       
 17533 					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 ;
       
 17535 					
       
 17536 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 17537 					{
       
 17538 				
       
 17539 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17540 						s4o.print("__time_sub(&");
       
 17541 						IN1_param_value->accept(*this);
       
 17542 						s4o.print(", &");
       
 17543 						IN2_param_value->accept(*this);
       
 17544 						s4o.print(")");
       
 17545 						return NULL;
       
 17546 						
       
 17547 					}
       
 17548 					
       
 17549 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17550 					{
       
 17551 				
       
 17552 						symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17553 						s4o.print("__time_sub(&");
       
 17554 						IN1_param_value->accept(*this);
       
 17555 						s4o.print(", &");
       
 17556 						IN2_param_value->accept(*this);
       
 17557 						s4o.print(")");
       
 17558 						return NULL;
       
 17559 						
       
 17560 					}
       
 17561 					
       
 17562 					ERROR;
       
 17563 				}
       
 17564 				
       
 17565 			}
       
 17566 			
       
 17567 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17568 			{
       
 17569 		
       
 17570 				{
       
 17571 					identifier_c param_name("IN2");
       
 17572 					/* 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);
       
 17574 					
       
 17575 					/* Get the value from a foo(<param_value>) style call */
       
 17576 					if (IN2_param_value == NULL)
       
 17577 					  IN2_param_value = function_call_param_iterator.next();
       
 17578 					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 ;
       
 17580 					
       
 17581 					if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17582 					{
       
 17583 				
       
 17584 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17585 						s4o.print("__time_sub(&");
       
 17586 						IN1_param_value->accept(*this);
       
 17587 						s4o.print(", &");
       
 17588 						IN2_param_value->accept(*this);
       
 17589 						s4o.print(")");
       
 17590 						return NULL;
       
 17591 						
       
 17592 					}
       
 17593 					
       
 17594 					ERROR;
       
 17595 				}
       
 17596 				
       
 17597 			}
       
 17598 			
       
 17599 			ERROR;
       
 17600 		}
       
 17601 		
       
 17602 	}/*function_sub*/
       
 17603 	break;
       
 17604 
       
 17605 /****
       
 17606  *DIV
       
 17607  */
       
 17608 	case function_div :
       
 17609 	{
       
 17610 		symbol_c *last_type_symbol = NULL;
       
 17611 
       
 17612 		{
       
 17613 			identifier_c param_name("IN1");
       
 17614 			/* 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);
       
 17616 			
       
 17617 			/* Get the value from a foo(<param_value>) style call */
       
 17618 			if (IN1_param_value == NULL)
       
 17619 			  IN1_param_value = function_call_param_iterator.next();
       
 17620 			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 ;
       
 17622 			
       
 17623 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17624 			{
       
 17625 		
       
 17626 				{
       
 17627 					identifier_c param_name("IN2");
       
 17628 					/* 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);
       
 17630 					
       
 17631 					/* Get the value from a foo(<param_value>) style call */
       
 17632 					if (IN2_param_value == NULL)
       
 17633 					  IN2_param_value = function_call_param_iterator.next();
       
 17634 					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 ;
       
 17636 					
       
 17637 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17638 					{
       
 17639 				
       
 17640 						symbol_c * return_type_symbol = last_type_symbol;
       
 17641 						s4o.print("(");
       
 17642 						IN1_param_value->accept(*this);
       
 17643 						s4o.print("/");
       
 17644 						IN2_param_value->accept(*this);
       
 17645 						s4o.print(")");
       
 17646 						return NULL;
       
 17647 						
       
 17648 					}
       
 17649 					
       
 17650 					ERROR;
       
 17651 				}
       
 17652 				
       
 17653 			}
       
 17654 			
       
 17655 			if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 17656 			{
       
 17657 		
       
 17658 				{
       
 17659 					identifier_c param_name("IN2");
       
 17660 					/* 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);
       
 17662 					
       
 17663 					/* Get the value from a foo(<param_value>) style call */
       
 17664 					if (IN2_param_value == NULL)
       
 17665 					  IN2_param_value = function_call_param_iterator.next();
       
 17666 					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 ;
       
 17668 					
       
 17669 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17670 					{
       
 17671 				
       
 17672 						symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17673 						s4o.print("__time_div(&");
       
 17674 						IN1_param_value->accept(*this);
       
 17675 						s4o.print(", &");
       
 17676 						IN2_param_value->accept(*this);
       
 17677 						s4o.print(")");
       
 17678 						return NULL;
       
 17679 						
       
 17680 					}
       
 17681 					
       
 17682 					ERROR;
       
 17683 				}
       
 17684 				
       
 17685 			}
       
 17686 			
       
 17687 			ERROR;
       
 17688 		}
       
 17689 		
       
 17690 	}/*function_div*/
       
 17691 	break;
       
 17692 
       
 17693 /****
       
 17694  *MOD
       
 17695  */
       
 17696 	case function_mod :
       
 17697 	{
       
 17698 		symbol_c *last_type_symbol = NULL;
       
 17699 
       
 17700 		{
       
 17701 			identifier_c param_name("IN1");
       
 17702 			/* 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);
       
 17704 			
       
 17705 			/* Get the value from a foo(<param_value>) style call */
       
 17706 			if (IN1_param_value == NULL)
       
 17707 			  IN1_param_value = function_call_param_iterator.next();
       
 17708 			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 ;
       
 17710 			
       
 17711 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17712 			{
       
 17713 		
       
 17714 				{
       
 17715 					identifier_c param_name("IN2");
       
 17716 					/* 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);
       
 17718 					
       
 17719 					/* Get the value from a foo(<param_value>) style call */
       
 17720 					if (IN2_param_value == NULL)
       
 17721 					  IN2_param_value = function_call_param_iterator.next();
       
 17722 					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 ;
       
 17724 					
       
 17725 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17726 					{
       
 17727 				
       
 17728 						symbol_c * return_type_symbol = last_type_symbol;
       
 17729 						s4o.print("(");
       
 17730 						IN1_param_value->accept(*this);
       
 17731 						s4o.print("%");
       
 17732 						IN2_param_value->accept(*this);
       
 17733 						s4o.print(")");
       
 17734 						return NULL;
       
 17735 						
       
 17736 					}
       
 17737 					
       
 17738 					ERROR;
       
 17739 				}
       
 17740 				
       
 17741 			}
       
 17742 			
       
 17743 			ERROR;
       
 17744 		}
       
 17745 		
       
 17746 	}/*function_mod*/
       
 17747 	break;
       
 17748 
       
 17749 /****
       
 17750  *EXPT
       
 17751  */
       
 17752 	case function_expt :
       
 17753 	{
       
 17754 		symbol_c *last_type_symbol = NULL;
       
 17755 
       
 17756 		{
       
 17757 			identifier_c param_name("IN1");
       
 17758 			/* 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);
       
 17760 			
       
 17761 			/* Get the value from a foo(<param_value>) style call */
       
 17762 			if (IN1_param_value == NULL)
       
 17763 			  IN1_param_value = function_call_param_iterator.next();
       
 17764 			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 ;
       
 17766 			
       
 17767 			if(search_expression_type->is_num_type(IN1_param_value))
       
 17768 			{
       
 17769 		
       
 17770 				{
       
 17771 					identifier_c param_name("IN2");
       
 17772 					/* 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);
       
 17774 					
       
 17775 					/* Get the value from a foo(<param_value>) style call */
       
 17776 					if (IN2_param_value == NULL)
       
 17777 					  IN2_param_value = function_call_param_iterator.next();
       
 17778 					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 ;
       
 17780 					
       
 17781 					if(search_expression_type->is_num_type(IN2_param_value))
       
 17782 					{
       
 17783 				
       
 17784 						symbol_c * return_type_symbol = last_type_symbol;
       
 17785 						s4o.print("pow(&");
       
 17786 						IN1_param_value->accept(*this);
       
 17787 						s4o.print(", &");
       
 17788 						IN2_param_value->accept(*this);
       
 17789 						s4o.print(")");
       
 17790 						return NULL;
       
 17791 						
       
 17792 					}
       
 17793 					
       
 17794 					ERROR;
       
 17795 				}
       
 17796 				
       
 17797 			}
       
 17798 			
       
 17799 			ERROR;
       
 17800 		}
       
 17801 		
       
 17802 	}/*function_expt*/
       
 17803 	break;
       
 17804 
       
 17805 /****
       
 17806  *MOVE
       
 17807  */
       
 17808 	case function_move :
       
 17809 	{
       
 17810 		symbol_c *last_type_symbol = NULL;
       
 17811 
       
 17812 		{
       
 17813 			identifier_c param_name("IN");
       
 17814 			/* 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);
       
 17816 			
       
 17817 			/* Get the value from a foo(<param_value>) style call */
       
 17818 			if (IN_param_value == NULL)
       
 17819 			  IN_param_value = function_call_param_iterator.next();
       
 17820 			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 ;
       
 17822 			
       
 17823 			if(search_expression_type->is_num_type(IN_param_value))
       
 17824 			{
       
 17825 		
       
 17826 				symbol_c * return_type_symbol = last_type_symbol;
       
 17827 				IN_param_value->accept(*this);
       
 17828 				return NULL;
       
 17829 				
       
 17830 			}
       
 17831 			
       
 17832 			ERROR;
       
 17833 		}
       
 17834 		
       
 17835 	}/*function_move*/
       
 17836 	break;
       
 17837 
       
 17838 /****
       
 17839  *SHL
       
 17840  */
       
 17841 	case function_shl :
       
 17842 	{
       
 17843 		symbol_c *last_type_symbol = NULL;
       
 17844 
       
 17845 		{
       
 17846 			identifier_c param_name("IN");
       
 17847 			/* 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);
       
 17849 			
       
 17850 			/* Get the value from a foo(<param_value>) style call */
       
 17851 			if (IN_param_value == NULL)
       
 17852 			  IN_param_value = function_call_param_iterator.next();
       
 17853 			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 ;
       
 17855 			
       
 17856 			if(search_expression_type->is_binary_type(IN_param_value))
       
 17857 			{
       
 17858 		
       
 17859 				{
       
 17860 					identifier_c param_name("N");
       
 17861 					/* 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);
       
 17863 					
       
 17864 					/* Get the value from a foo(<param_value>) style call */
       
 17865 					if (N_param_value == NULL)
       
 17866 					  N_param_value = function_call_param_iterator.next();
       
 17867 					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 ;
       
 17869 					
       
 17870 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 17871 					{
       
 17872 				
       
 17873 						symbol_c * return_type_symbol = IN_type_symbol;
       
 17874 						IN_param_value->accept(*this);
       
 17875 						s4o.print("<<");
       
 17876 						N_param_value->accept(*this);
       
 17877 						return NULL;
       
 17878 						
       
 17879 					}
       
 17880 					
       
 17881 					ERROR;
       
 17882 				}
       
 17883 				
       
 17884 			}
       
 17885 			
       
 17886 			ERROR;
       
 17887 		}
       
 17888 		
       
 17889 	}/*function_shl*/
       
 17890 	break;
       
 17891 
       
 17892 /****
       
 17893  *SHR
       
 17894  */
       
 17895 	case function_shr :
       
 17896 	{
       
 17897 		symbol_c *last_type_symbol = NULL;
       
 17898 
       
 17899 		{
       
 17900 			identifier_c param_name("IN");
       
 17901 			/* 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);
       
 17903 			
       
 17904 			/* Get the value from a foo(<param_value>) style call */
       
 17905 			if (IN_param_value == NULL)
       
 17906 			  IN_param_value = function_call_param_iterator.next();
       
 17907 			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 ;
       
 17909 			
       
 17910 			if(search_expression_type->is_binary_type(IN_param_value))
       
 17911 			{
       
 17912 		
       
 17913 				{
       
 17914 					identifier_c param_name("N");
       
 17915 					/* 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);
       
 17917 					
       
 17918 					/* Get the value from a foo(<param_value>) style call */
       
 17919 					if (N_param_value == NULL)
       
 17920 					  N_param_value = function_call_param_iterator.next();
       
 17921 					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 ;
       
 17923 					
       
 17924 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 17925 					{
       
 17926 				
       
 17927 						symbol_c * return_type_symbol = IN_type_symbol;
       
 17928 						IN_param_value->accept(*this);
       
 17929 						s4o.print(">>");
       
 17930 						N_param_value->accept(*this);
       
 17931 						return NULL;
       
 17932 						
       
 17933 					}
       
 17934 					
       
 17935 					ERROR;
       
 17936 				}
       
 17937 				
       
 17938 			}
       
 17939 			
       
 17940 			ERROR;
       
 17941 		}
       
 17942 		
       
 17943 	}/*function_shr*/
       
 17944 	break;
       
 17945 
       
 17946 /****
       
 17947  *ROR
       
 17948  */
       
 17949 	case function_ror :
       
 17950 	{
       
 17951 		symbol_c *last_type_symbol = NULL;
       
 17952 
       
 17953 		{
       
 17954 			identifier_c param_name("IN");
       
 17955 			/* 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);
       
 17957 			
       
 17958 			/* Get the value from a foo(<param_value>) style call */
       
 17959 			if (IN_param_value == NULL)
       
 17960 			  IN_param_value = function_call_param_iterator.next();
       
 17961 			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 ;
       
 17963 			
       
 17964 			if(search_expression_type->is_binary_type(IN_param_value))
       
 17965 			{
       
 17966 		
       
 17967 				{
       
 17968 					identifier_c param_name("N");
       
 17969 					/* 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);
       
 17971 					
       
 17972 					/* Get the value from a foo(<param_value>) style call */
       
 17973 					if (N_param_value == NULL)
       
 17974 					  N_param_value = function_call_param_iterator.next();
       
 17975 					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 ;
       
 17977 					
       
 17978 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 17979 					{
       
 17980 				
       
 17981 						symbol_c * return_type_symbol = IN_type_symbol;
       
 17982 						s4o.print("__ror(sizeof(");
       
 17983 						IN_type_symbol->accept(*this);
       
 17984 						s4o.print("), &");
       
 17985 						IN_param_value->accept(*this);
       
 17986 						s4o.print(", ");
       
 17987 						N_param_value->accept(*this);
       
 17988 						s4o.print(")");
       
 17989 						return NULL;
       
 17990 						
       
 17991 					}
       
 17992 					
       
 17993 					ERROR;
       
 17994 				}
       
 17995 				
       
 17996 			}
       
 17997 			
       
 17998 			ERROR;
       
 17999 		}
       
 18000 		
       
 18001 	}/*function_ror*/
       
 18002 	break;
       
 18003 
       
 18004 /****
       
 18005  *ROL
       
 18006  */
       
 18007 	case function_rol :
       
 18008 	{
       
 18009 		symbol_c *last_type_symbol = NULL;
       
 18010 
       
 18011 		{
       
 18012 			identifier_c param_name("IN");
       
 18013 			/* 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);
       
 18015 			
       
 18016 			/* Get the value from a foo(<param_value>) style call */
       
 18017 			if (IN_param_value == NULL)
       
 18018 			  IN_param_value = function_call_param_iterator.next();
       
 18019 			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 ;
       
 18021 			
       
 18022 			if(search_expression_type->is_binary_type(IN_param_value))
       
 18023 			{
       
 18024 		
       
 18025 				{
       
 18026 					identifier_c param_name("N");
       
 18027 					/* 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);
       
 18029 					
       
 18030 					/* Get the value from a foo(<param_value>) style call */
       
 18031 					if (N_param_value == NULL)
       
 18032 					  N_param_value = function_call_param_iterator.next();
       
 18033 					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 ;
       
 18035 					
       
 18036 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18037 					{
       
 18038 				
       
 18039 						symbol_c * return_type_symbol = IN_type_symbol;
       
 18040 						s4o.print("__rol(sizeof(");
       
 18041 						IN_type_symbol->accept(*this);
       
 18042 						s4o.print("), &");
       
 18043 						IN_param_value->accept(*this);
       
 18044 						s4o.print(", ");
       
 18045 						N_param_value->accept(*this);
       
 18046 						s4o.print(")");
       
 18047 						return NULL;
       
 18048 						
       
 18049 					}
       
 18050 					
       
 18051 					ERROR;
       
 18052 				}
       
 18053 				
       
 18054 			}
       
 18055 			
       
 18056 			ERROR;
       
 18057 		}
       
 18058 		
       
 18059 	}/*function_rol*/
       
 18060 	break;
       
 18061 
       
 18062 /****
       
 18063  *AND
       
 18064  */
       
 18065 	case function_and :
       
 18066 	{
       
 18067 		symbol_c *last_type_symbol = NULL;
       
 18068 
       
 18069 		{
       
 18070 			identifier_c param_name("IN1");
       
 18071 			/* 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);
       
 18073 			
       
 18074 			/* Get the value from a foo(<param_value>) style call */
       
 18075 			if (IN1_param_value == NULL)
       
 18076 			  IN1_param_value = function_call_param_iterator.next();
       
 18077 			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 ;
       
 18079 			
       
 18080 			if(search_expression_type->is_binary_type(IN1_param_value))
       
 18081 			{
       
 18082 		
       
 18083 				{
       
 18084 					identifier_c param_name("IN2");
       
 18085 					/* 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);
       
 18087 					
       
 18088 					/* Get the value from a foo(<param_value>) style call */
       
 18089 					if (IN2_param_value == NULL)
       
 18090 					  IN2_param_value = function_call_param_iterator.next();
       
 18091 					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 ;
       
 18093 					
       
 18094 					if(search_expression_type->is_binary_type(IN2_param_value))
       
 18095 					{
       
 18096 				
       
 18097 						symbol_c * return_type_symbol = last_type_symbol;
       
 18098 						s4o.print("(");
       
 18099 						IN1_param_value->accept(*this);
       
 18100 						s4o.print("&");
       
 18101 						IN2_param_value->accept(*this);
       
 18102 						
       
 18103 						int base_num = 3;
       
 18104 						symbol_c *param_value = NULL;
       
 18105 						do{
       
 18106 							char my_name[10];
       
 18107 							sprintf(my_name, "IN%d", base_num++);
       
 18108 							identifier_c param_name(my_name);
       
 18109 							
       
 18110 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18111 							param_value = function_call_param_iterator.search(&param_name);
       
 18112 							
       
 18113 							/* Get the value from a foo(<param_value>) style call */
       
 18114 							if (param_value == NULL)
       
 18115 							  param_value = function_call_param_iterator.next();
       
 18116 							if (param_value != NULL){
       
 18117 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18118 								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 ;
       
 18119 							
       
 18120 								/*Function specific CODE */
       
 18121 								s4o.print("&");
       
 18122 								param_value->accept(*this);
       
 18123 								
       
 18124 							}
       
 18125 							
       
 18126 						}while(param_value != NULL);
       
 18127 						s4o.print(")");
       
 18128 						return NULL;
       
 18129 						
       
 18130 						
       
 18131 					}
       
 18132 					
       
 18133 					ERROR;
       
 18134 				}
       
 18135 				
       
 18136 			}
       
 18137 			
       
 18138 			ERROR;
       
 18139 		}
       
 18140 		
       
 18141 	}/*function_and*/
       
 18142 	break;
       
 18143 
       
 18144 /****
       
 18145  *OR
       
 18146  */
       
 18147 	case function_or :
       
 18148 	{
       
 18149 		symbol_c *last_type_symbol = NULL;
       
 18150 
       
 18151 		{
       
 18152 			identifier_c param_name("IN1");
       
 18153 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18154 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18155 			
       
 18156 			/* Get the value from a foo(<param_value>) style call */
       
 18157 			if (IN1_param_value == NULL)
       
 18158 			  IN1_param_value = function_call_param_iterator.next();
       
 18159 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18160 			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 ;
       
 18161 			
       
 18162 			if(search_expression_type->is_binary_type(IN1_param_value))
       
 18163 			{
       
 18164 		
       
 18165 				{
       
 18166 					identifier_c param_name("IN2");
       
 18167 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18168 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18169 					
       
 18170 					/* Get the value from a foo(<param_value>) style call */
       
 18171 					if (IN2_param_value == NULL)
       
 18172 					  IN2_param_value = function_call_param_iterator.next();
       
 18173 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18174 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18175 					
       
 18176 					if(search_expression_type->is_binary_type(IN2_param_value))
       
 18177 					{
       
 18178 				
       
 18179 						symbol_c * return_type_symbol = last_type_symbol;
       
 18180 						s4o.print("(");
       
 18181 						IN1_param_value->accept(*this);
       
 18182 						s4o.print("|");
       
 18183 						IN2_param_value->accept(*this);
       
 18184 						
       
 18185 						int base_num = 3;
       
 18186 						symbol_c *param_value = NULL;
       
 18187 						do{
       
 18188 							char my_name[10];
       
 18189 							sprintf(my_name, "IN%d", base_num++);
       
 18190 							identifier_c param_name(my_name);
       
 18191 							
       
 18192 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18193 							param_value = function_call_param_iterator.search(&param_name);
       
 18194 							
       
 18195 							/* Get the value from a foo(<param_value>) style call */
       
 18196 							if (param_value == NULL)
       
 18197 							  param_value = function_call_param_iterator.next();
       
 18198 							if (param_value != NULL){
       
 18199 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18200 								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 ;
       
 18201 							
       
 18202 								/*Function specific CODE */
       
 18203 								s4o.print("|");
       
 18204 								param_value->accept(*this);
       
 18205 								
       
 18206 							}
       
 18207 							
       
 18208 						}while(param_value != NULL);
       
 18209 						s4o.print(")");
       
 18210 						return NULL;
       
 18211 						
       
 18212 						
       
 18213 					}
       
 18214 					
       
 18215 					ERROR;
       
 18216 				}
       
 18217 				
       
 18218 			}
       
 18219 			
       
 18220 			ERROR;
       
 18221 		}
       
 18222 		
       
 18223 	}/*function_or*/
       
 18224 	break;
       
 18225 
       
 18226 /****
       
 18227  *XOR
       
 18228  */
       
 18229 	case function_xor :
       
 18230 	{
       
 18231 		symbol_c *last_type_symbol = NULL;
       
 18232 
       
 18233 		{
       
 18234 			identifier_c param_name("IN1");
       
 18235 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18236 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18237 			
       
 18238 			/* Get the value from a foo(<param_value>) style call */
       
 18239 			if (IN1_param_value == NULL)
       
 18240 			  IN1_param_value = function_call_param_iterator.next();
       
 18241 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18242 			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 ;
       
 18243 			
       
 18244 			if(search_expression_type->is_binary_type(IN1_param_value))
       
 18245 			{
       
 18246 		
       
 18247 				{
       
 18248 					identifier_c param_name("IN2");
       
 18249 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18250 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18251 					
       
 18252 					/* Get the value from a foo(<param_value>) style call */
       
 18253 					if (IN2_param_value == NULL)
       
 18254 					  IN2_param_value = function_call_param_iterator.next();
       
 18255 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18256 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18257 					
       
 18258 					if(search_expression_type->is_binary_type(IN2_param_value))
       
 18259 					{
       
 18260 				
       
 18261 						symbol_c * return_type_symbol = last_type_symbol;
       
 18262 						s4o.print("(");
       
 18263 						IN1_param_value->accept(*this);
       
 18264 						s4o.print("^");
       
 18265 						IN2_param_value->accept(*this);
       
 18266 						
       
 18267 						int base_num = 3;
       
 18268 						symbol_c *param_value = NULL;
       
 18269 						do{
       
 18270 							char my_name[10];
       
 18271 							sprintf(my_name, "IN%d", base_num++);
       
 18272 							identifier_c param_name(my_name);
       
 18273 							
       
 18274 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18275 							param_value = function_call_param_iterator.search(&param_name);
       
 18276 							
       
 18277 							/* Get the value from a foo(<param_value>) style call */
       
 18278 							if (param_value == NULL)
       
 18279 							  param_value = function_call_param_iterator.next();
       
 18280 							if (param_value != NULL){
       
 18281 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18282 								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 ;
       
 18283 							
       
 18284 								/*Function specific CODE */
       
 18285 								s4o.print("^");
       
 18286 								param_value->accept(*this);
       
 18287 								
       
 18288 							}
       
 18289 							
       
 18290 						}while(param_value != NULL);
       
 18291 						s4o.print(")");
       
 18292 						return NULL;
       
 18293 						
       
 18294 						
       
 18295 					}
       
 18296 					
       
 18297 					ERROR;
       
 18298 				}
       
 18299 				
       
 18300 			}
       
 18301 			
       
 18302 			ERROR;
       
 18303 		}
       
 18304 		
       
 18305 	}/*function_xor*/
       
 18306 	break;
       
 18307 
       
 18308 /****
       
 18309  *NOT
       
 18310  */
       
 18311 	case function_not :
       
 18312 	{
       
 18313 		symbol_c *last_type_symbol = NULL;
       
 18314 
       
 18315 		{
       
 18316 			identifier_c param_name("IN");
       
 18317 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18318 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 18319 			
       
 18320 			/* Get the value from a foo(<param_value>) style call */
       
 18321 			if (IN_param_value == NULL)
       
 18322 			  IN_param_value = function_call_param_iterator.next();
       
 18323 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 18324 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 18325 			
       
 18326 			if(search_expression_type->is_binary_type(IN_param_value))
       
 18327 			{
       
 18328 		
       
 18329 				symbol_c * return_type_symbol = IN_type_symbol;
       
 18330 				s4o.print("~");
       
 18331 				IN_param_value->accept(*this);
       
 18332 				return NULL;
       
 18333 				
       
 18334 			}
       
 18335 			
       
 18336 			ERROR;
       
 18337 		}
       
 18338 		
       
 18339 	}/*function_not*/
       
 18340 	break;
       
 18341 
       
 18342 /****
       
 18343  *SEL
       
 18344  */
       
 18345 	case function_sel :
       
 18346 	{
       
 18347 		symbol_c *last_type_symbol = NULL;
       
 18348 
       
 18349 		{
       
 18350 			identifier_c param_name("G");
       
 18351 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18352 			symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
       
 18353 			
       
 18354 			/* Get the value from a foo(<param_value>) style call */
       
 18355 			if (G_param_value == NULL)
       
 18356 			  G_param_value = function_call_param_iterator.next();
       
 18357 			symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
       
 18358 			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 ;
       
 18359 			
       
 18360 			if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 18361 			{
       
 18362 		
       
 18363 				{
       
 18364 					identifier_c param_name("IN0");
       
 18365 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18366 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 18367 					
       
 18368 					/* Get the value from a foo(<param_value>) style call */
       
 18369 					if (IN0_param_value == NULL)
       
 18370 					  IN0_param_value = function_call_param_iterator.next();
       
 18371 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 18372 					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 ;
       
 18373 					
       
 18374 					
       
 18375 					{
       
 18376 				
       
 18377 						{
       
 18378 							identifier_c param_name("IN1");
       
 18379 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18380 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18381 							
       
 18382 							/* Get the value from a foo(<param_value>) style call */
       
 18383 							if (IN1_param_value == NULL)
       
 18384 							  IN1_param_value = function_call_param_iterator.next();
       
 18385 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18386 							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 ;
       
 18387 							
       
 18388 							
       
 18389 							{
       
 18390 						
       
 18391 								symbol_c * return_type_symbol = last_type_symbol;
       
 18392 								G_param_value->accept(*this);
       
 18393 								s4o.print(" ? ");
       
 18394 								IN1_param_value->accept(*this);
       
 18395 								s4o.print(" :  ");
       
 18396 								IN0_param_value->accept(*this);
       
 18397 								return NULL;
       
 18398 								
       
 18399 							}
       
 18400 							
       
 18401 							ERROR;
       
 18402 						}
       
 18403 						
       
 18404 					}
       
 18405 					
       
 18406 					ERROR;
       
 18407 				}
       
 18408 				
       
 18409 			}
       
 18410 			
       
 18411 			ERROR;
       
 18412 		}
       
 18413 		
       
 18414 	}/*function_sel*/
       
 18415 	break;
       
 18416 
       
 18417 /****
       
 18418  *MAX
       
 18419  */
       
 18420 	case function_max :
       
 18421 	{
       
 18422 		symbol_c *last_type_symbol = NULL;
       
 18423 
       
 18424 		{
       
 18425 			identifier_c param_name("IN1");
       
 18426 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18427 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18428 			
       
 18429 			/* Get the value from a foo(<param_value>) style call */
       
 18430 			if (IN1_param_value == NULL)
       
 18431 			  IN1_param_value = function_call_param_iterator.next();
       
 18432 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18433 			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 ;
       
 18434 			
       
 18435 			
       
 18436 			{
       
 18437 		
       
 18438 				{
       
 18439 					identifier_c param_name("IN2");
       
 18440 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18441 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18442 					
       
 18443 					/* Get the value from a foo(<param_value>) style call */
       
 18444 					if (IN2_param_value == NULL)
       
 18445 					  IN2_param_value = function_call_param_iterator.next();
       
 18446 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18447 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18448 					
       
 18449 					
       
 18450 					{
       
 18451 				
       
 18452 						symbol_c * return_type_symbol = last_type_symbol;
       
 18453 						s4o.print("__max_");
       
 18454 						return_type_symbol->accept(*this);
       
 18455 						s4o.print("(");
       
 18456 						s4o.print_integer(nb_param);
       
 18457 						s4o.print(",");
       
 18458 						IN1_param_value->accept(*this);
       
 18459 						s4o.print(",");
       
 18460 						IN2_param_value->accept(*this);
       
 18461 						
       
 18462 						int base_num = 3;
       
 18463 						symbol_c *param_value = NULL;
       
 18464 						do{
       
 18465 							char my_name[10];
       
 18466 							sprintf(my_name, "IN%d", base_num++);
       
 18467 							identifier_c param_name(my_name);
       
 18468 							
       
 18469 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18470 							param_value = function_call_param_iterator.search(&param_name);
       
 18471 							
       
 18472 							/* Get the value from a foo(<param_value>) style call */
       
 18473 							if (param_value == NULL)
       
 18474 							  param_value = function_call_param_iterator.next();
       
 18475 							if (param_value != NULL){
       
 18476 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18477 								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 ;
       
 18478 							
       
 18479 								/*Function specific CODE */
       
 18480 								s4o.print(",");
       
 18481 								param_value->accept(*this);
       
 18482 								
       
 18483 							}
       
 18484 							
       
 18485 						}while(param_value != NULL);
       
 18486 						s4o.print(")");
       
 18487 						return NULL;
       
 18488 						
       
 18489 						
       
 18490 					}
       
 18491 					
       
 18492 					ERROR;
       
 18493 				}
       
 18494 				
       
 18495 			}
       
 18496 			
       
 18497 			ERROR;
       
 18498 		}
       
 18499 		
       
 18500 	}/*function_max*/
       
 18501 	break;
       
 18502 
       
 18503 /****
       
 18504  *MIN
       
 18505  */
       
 18506 	case function_min :
       
 18507 	{
       
 18508 		symbol_c *last_type_symbol = NULL;
       
 18509 
       
 18510 		{
       
 18511 			identifier_c param_name("IN1");
       
 18512 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18513 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18514 			
       
 18515 			/* Get the value from a foo(<param_value>) style call */
       
 18516 			if (IN1_param_value == NULL)
       
 18517 			  IN1_param_value = function_call_param_iterator.next();
       
 18518 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18519 			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 ;
       
 18520 			
       
 18521 			
       
 18522 			{
       
 18523 		
       
 18524 				{
       
 18525 					identifier_c param_name("IN2");
       
 18526 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18527 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18528 					
       
 18529 					/* Get the value from a foo(<param_value>) style call */
       
 18530 					if (IN2_param_value == NULL)
       
 18531 					  IN2_param_value = function_call_param_iterator.next();
       
 18532 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18533 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18534 					
       
 18535 					
       
 18536 					{
       
 18537 				
       
 18538 						symbol_c * return_type_symbol = last_type_symbol;
       
 18539 						s4o.print("__min_");
       
 18540 						return_type_symbol->accept(*this);
       
 18541 						s4o.print("(");
       
 18542 						s4o.print_integer(nb_param);
       
 18543 						s4o.print(",");
       
 18544 						IN1_param_value->accept(*this);
       
 18545 						s4o.print(",");
       
 18546 						IN2_param_value->accept(*this);
       
 18547 						
       
 18548 						int base_num = 3;
       
 18549 						symbol_c *param_value = NULL;
       
 18550 						do{
       
 18551 							char my_name[10];
       
 18552 							sprintf(my_name, "IN%d", base_num++);
       
 18553 							identifier_c param_name(my_name);
       
 18554 							
       
 18555 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18556 							param_value = function_call_param_iterator.search(&param_name);
       
 18557 							
       
 18558 							/* Get the value from a foo(<param_value>) style call */
       
 18559 							if (param_value == NULL)
       
 18560 							  param_value = function_call_param_iterator.next();
       
 18561 							if (param_value != NULL){
       
 18562 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18563 								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 ;
       
 18564 							
       
 18565 								/*Function specific CODE */
       
 18566 								s4o.print(",");
       
 18567 								param_value->accept(*this);
       
 18568 								
       
 18569 							}
       
 18570 							
       
 18571 						}while(param_value != NULL);
       
 18572 						s4o.print(")");
       
 18573 						return NULL;
       
 18574 						
       
 18575 						
       
 18576 					}
       
 18577 					
       
 18578 					ERROR;
       
 18579 				}
       
 18580 				
       
 18581 			}
       
 18582 			
       
 18583 			ERROR;
       
 18584 		}
       
 18585 		
       
 18586 	}/*function_min*/
       
 18587 	break;
       
 18588 
       
 18589 /****
       
 18590  *LIMIT
       
 18591  */
       
 18592 	case function_limit :
       
 18593 	{
       
 18594 		symbol_c *last_type_symbol = NULL;
       
 18595 
       
 18596 		{
       
 18597 			identifier_c param_name("MN");
       
 18598 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18599 			symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
       
 18600 			
       
 18601 			/* Get the value from a foo(<param_value>) style call */
       
 18602 			if (MN_param_value == NULL)
       
 18603 			  MN_param_value = function_call_param_iterator.next();
       
 18604 			symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
       
 18605 			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 ;
       
 18606 			
       
 18607 			
       
 18608 			{
       
 18609 		
       
 18610 				{
       
 18611 					identifier_c param_name("IN");
       
 18612 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18613 					symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 18614 					
       
 18615 					/* Get the value from a foo(<param_value>) style call */
       
 18616 					if (IN_param_value == NULL)
       
 18617 					  IN_param_value = function_call_param_iterator.next();
       
 18618 					symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 18619 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 18620 					
       
 18621 					
       
 18622 					{
       
 18623 				
       
 18624 						{
       
 18625 							identifier_c param_name("MX");
       
 18626 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18627 							symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 18628 							
       
 18629 							/* Get the value from a foo(<param_value>) style call */
       
 18630 							if (MX_param_value == NULL)
       
 18631 							  MX_param_value = function_call_param_iterator.next();
       
 18632 							symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 18633 							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 ;
       
 18634 							
       
 18635 							
       
 18636 							{
       
 18637 						
       
 18638 								symbol_c * return_type_symbol = IN_type_symbol;
       
 18639 								s4o.print("__limit_");
       
 18640 								IN_type_symbol->accept(*this);
       
 18641 								s4o.print("(");
       
 18642 								MN_param_value->accept(*this);
       
 18643 								s4o.print(", ");
       
 18644 								IN_param_value->accept(*this);
       
 18645 								s4o.print(", ");
       
 18646 								MX_param_value->accept(*this);
       
 18647 								s4o.print(")");
       
 18648 								return NULL;
       
 18649 								
       
 18650 							}
       
 18651 							
       
 18652 							ERROR;
       
 18653 						}
       
 18654 						
       
 18655 					}
       
 18656 					
       
 18657 					ERROR;
       
 18658 				}
       
 18659 				
       
 18660 			}
       
 18661 			
       
 18662 			ERROR;
       
 18663 		}
       
 18664 		
       
 18665 	}/*function_limit*/
       
 18666 	break;
       
 18667 
       
 18668 /****
       
 18669  *MUX
       
 18670  */
       
 18671 	case function_mux :
       
 18672 	{
       
 18673 		symbol_c *last_type_symbol = NULL;
       
 18674 
       
 18675 		{
       
 18676 			identifier_c param_name("K");
       
 18677 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18678 			symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
       
 18679 			
       
 18680 			/* Get the value from a foo(<param_value>) style call */
       
 18681 			if (K_param_value == NULL)
       
 18682 			  K_param_value = function_call_param_iterator.next();
       
 18683 			symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
       
 18684 			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 ;
       
 18685 			
       
 18686 			if(search_expression_type->is_integer_type(K_param_value))
       
 18687 			{
       
 18688 		
       
 18689 				{
       
 18690 					identifier_c param_name("IN0");
       
 18691 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18692 					symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 18693 					
       
 18694 					/* Get the value from a foo(<param_value>) style call */
       
 18695 					if (IN0_param_value == NULL)
       
 18696 					  IN0_param_value = function_call_param_iterator.next();
       
 18697 					symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 18698 					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 ;
       
 18699 					
       
 18700 					
       
 18701 					{
       
 18702 				
       
 18703 						{
       
 18704 							identifier_c param_name("IN1");
       
 18705 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18706 							symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18707 							
       
 18708 							/* Get the value from a foo(<param_value>) style call */
       
 18709 							if (IN1_param_value == NULL)
       
 18710 							  IN1_param_value = function_call_param_iterator.next();
       
 18711 							symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18712 							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 ;
       
 18713 							
       
 18714 							
       
 18715 							{
       
 18716 						
       
 18717 								symbol_c * return_type_symbol = last_type_symbol;
       
 18718 								s4o.print("__mux_");
       
 18719 								return_type_symbol->accept(*this);
       
 18720 								s4o.print("(");
       
 18721 								s4o.print_integer(nb_param);
       
 18722 								s4o.print(",");
       
 18723 								K_param_value->accept(*this);
       
 18724 								s4o.print(",");
       
 18725 								IN0_param_value->accept(*this);
       
 18726 								s4o.print(",");
       
 18727 								IN1_param_value->accept(*this);
       
 18728 								
       
 18729 								int base_num = 2;
       
 18730 								symbol_c *param_value = NULL;
       
 18731 								do{
       
 18732 									char my_name[10];
       
 18733 									sprintf(my_name, "IN%d", base_num++);
       
 18734 									identifier_c param_name(my_name);
       
 18735 									
       
 18736 									/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18737 									param_value = function_call_param_iterator.search(&param_name);
       
 18738 									
       
 18739 									/* Get the value from a foo(<param_value>) style call */
       
 18740 									if (param_value == NULL)
       
 18741 									  param_value = function_call_param_iterator.next();
       
 18742 									if (param_value != NULL){
       
 18743 										symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18744 										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 ;
       
 18745 									
       
 18746 										/*Function specific CODE */
       
 18747 										s4o.print(",");
       
 18748 										param_value->accept(*this);
       
 18749 										
       
 18750 									}
       
 18751 									
       
 18752 								}while(param_value != NULL);
       
 18753 								s4o.print(")");
       
 18754 								return NULL;
       
 18755 								
       
 18756 								
       
 18757 							}
       
 18758 							
       
 18759 							ERROR;
       
 18760 						}
       
 18761 						
       
 18762 					}
       
 18763 					
       
 18764 					ERROR;
       
 18765 				}
       
 18766 				
       
 18767 			}
       
 18768 			
       
 18769 			ERROR;
       
 18770 		}
       
 18771 		
       
 18772 	}/*function_mux*/
       
 18773 	break;
       
 18774 
       
 18775 /****
       
 18776  *GT
       
 18777  */
       
 18778 	case function_gt :
       
 18779 	{
       
 18780 		symbol_c *last_type_symbol = NULL;
       
 18781 
       
 18782 		{
       
 18783 			identifier_c param_name("IN1");
       
 18784 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18785 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18786 			
       
 18787 			/* Get the value from a foo(<param_value>) style call */
       
 18788 			if (IN1_param_value == NULL)
       
 18789 			  IN1_param_value = function_call_param_iterator.next();
       
 18790 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18791 			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 ;
       
 18792 			
       
 18793 			
       
 18794 			{
       
 18795 		
       
 18796 				{
       
 18797 					identifier_c param_name("IN2");
       
 18798 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18799 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18800 					
       
 18801 					/* Get the value from a foo(<param_value>) style call */
       
 18802 					if (IN2_param_value == NULL)
       
 18803 					  IN2_param_value = function_call_param_iterator.next();
       
 18804 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18805 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18806 					
       
 18807 					
       
 18808 					{
       
 18809 				
       
 18810 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18811 						s4o.print("__gt_");
       
 18812 						return_type_symbol->accept(*this);
       
 18813 						s4o.print("(");
       
 18814 						s4o.print_integer(nb_param);
       
 18815 						s4o.print(",");
       
 18816 						IN1_param_value->accept(*this);
       
 18817 						s4o.print(",");
       
 18818 						IN2_param_value->accept(*this);
       
 18819 						
       
 18820 						int base_num = 3;
       
 18821 						symbol_c *param_value = NULL;
       
 18822 						do{
       
 18823 							char my_name[10];
       
 18824 							sprintf(my_name, "IN%d", base_num++);
       
 18825 							identifier_c param_name(my_name);
       
 18826 							
       
 18827 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18828 							param_value = function_call_param_iterator.search(&param_name);
       
 18829 							
       
 18830 							/* Get the value from a foo(<param_value>) style call */
       
 18831 							if (param_value == NULL)
       
 18832 							  param_value = function_call_param_iterator.next();
       
 18833 							if (param_value != NULL){
       
 18834 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18835 								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 ;
       
 18836 							
       
 18837 								/*Function specific CODE */
       
 18838 								s4o.print(",");
       
 18839 								param_value->accept(*this);
       
 18840 								
       
 18841 							}
       
 18842 							
       
 18843 						}while(param_value != NULL);
       
 18844 						s4o.print(")");
       
 18845 						return NULL;
       
 18846 						
       
 18847 						
       
 18848 					}
       
 18849 					
       
 18850 					ERROR;
       
 18851 				}
       
 18852 				
       
 18853 			}
       
 18854 			
       
 18855 			ERROR;
       
 18856 		}
       
 18857 		
       
 18858 	}/*function_gt*/
       
 18859 	break;
       
 18860 
       
 18861 /****
       
 18862  *GE
       
 18863  */
       
 18864 	case function_ge :
       
 18865 	{
       
 18866 		symbol_c *last_type_symbol = NULL;
       
 18867 
       
 18868 		{
       
 18869 			identifier_c param_name("IN1");
       
 18870 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18871 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18872 			
       
 18873 			/* Get the value from a foo(<param_value>) style call */
       
 18874 			if (IN1_param_value == NULL)
       
 18875 			  IN1_param_value = function_call_param_iterator.next();
       
 18876 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18877 			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 ;
       
 18878 			
       
 18879 			
       
 18880 			{
       
 18881 		
       
 18882 				{
       
 18883 					identifier_c param_name("IN2");
       
 18884 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18885 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18886 					
       
 18887 					/* Get the value from a foo(<param_value>) style call */
       
 18888 					if (IN2_param_value == NULL)
       
 18889 					  IN2_param_value = function_call_param_iterator.next();
       
 18890 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18891 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18892 					
       
 18893 					
       
 18894 					{
       
 18895 				
       
 18896 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18897 						s4o.print("__ge_");
       
 18898 						return_type_symbol->accept(*this);
       
 18899 						s4o.print("(");
       
 18900 						s4o.print_integer(nb_param);
       
 18901 						s4o.print(",");
       
 18902 						IN1_param_value->accept(*this);
       
 18903 						s4o.print(",");
       
 18904 						IN2_param_value->accept(*this);
       
 18905 						
       
 18906 						int base_num = 3;
       
 18907 						symbol_c *param_value = NULL;
       
 18908 						do{
       
 18909 							char my_name[10];
       
 18910 							sprintf(my_name, "IN%d", base_num++);
       
 18911 							identifier_c param_name(my_name);
       
 18912 							
       
 18913 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18914 							param_value = function_call_param_iterator.search(&param_name);
       
 18915 							
       
 18916 							/* Get the value from a foo(<param_value>) style call */
       
 18917 							if (param_value == NULL)
       
 18918 							  param_value = function_call_param_iterator.next();
       
 18919 							if (param_value != NULL){
       
 18920 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 18921 								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 ;
       
 18922 							
       
 18923 								/*Function specific CODE */
       
 18924 								s4o.print(",");
       
 18925 								param_value->accept(*this);
       
 18926 								
       
 18927 							}
       
 18928 							
       
 18929 						}while(param_value != NULL);
       
 18930 						s4o.print(")");
       
 18931 						return NULL;
       
 18932 						
       
 18933 						
       
 18934 					}
       
 18935 					
       
 18936 					ERROR;
       
 18937 				}
       
 18938 				
       
 18939 			}
       
 18940 			
       
 18941 			ERROR;
       
 18942 		}
       
 18943 		
       
 18944 	}/*function_ge*/
       
 18945 	break;
       
 18946 
       
 18947 /****
       
 18948  *EQ
       
 18949  */
       
 18950 	case function_eq :
       
 18951 	{
       
 18952 		symbol_c *last_type_symbol = NULL;
       
 18953 
       
 18954 		{
       
 18955 			identifier_c param_name("IN1");
       
 18956 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18957 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 18958 			
       
 18959 			/* Get the value from a foo(<param_value>) style call */
       
 18960 			if (IN1_param_value == NULL)
       
 18961 			  IN1_param_value = function_call_param_iterator.next();
       
 18962 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 18963 			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 ;
       
 18964 			
       
 18965 			
       
 18966 			{
       
 18967 		
       
 18968 				{
       
 18969 					identifier_c param_name("IN2");
       
 18970 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 18971 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 18972 					
       
 18973 					/* Get the value from a foo(<param_value>) style call */
       
 18974 					if (IN2_param_value == NULL)
       
 18975 					  IN2_param_value = function_call_param_iterator.next();
       
 18976 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 18977 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 18978 					
       
 18979 					
       
 18980 					{
       
 18981 				
       
 18982 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18983 						s4o.print("__eq_");
       
 18984 						return_type_symbol->accept(*this);
       
 18985 						s4o.print("(");
       
 18986 						s4o.print_integer(nb_param);
       
 18987 						s4o.print(",");
       
 18988 						IN1_param_value->accept(*this);
       
 18989 						s4o.print(",");
       
 18990 						IN2_param_value->accept(*this);
       
 18991 						
       
 18992 						int base_num = 3;
       
 18993 						symbol_c *param_value = NULL;
       
 18994 						do{
       
 18995 							char my_name[10];
       
 18996 							sprintf(my_name, "IN%d", base_num++);
       
 18997 							identifier_c param_name(my_name);
       
 18998 							
       
 18999 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19000 							param_value = function_call_param_iterator.search(&param_name);
       
 19001 							
       
 19002 							/* Get the value from a foo(<param_value>) style call */
       
 19003 							if (param_value == NULL)
       
 19004 							  param_value = function_call_param_iterator.next();
       
 19005 							if (param_value != NULL){
       
 19006 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 19007 								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 ;
       
 19008 							
       
 19009 								/*Function specific CODE */
       
 19010 								s4o.print(",");
       
 19011 								param_value->accept(*this);
       
 19012 								
       
 19013 							}
       
 19014 							
       
 19015 						}while(param_value != NULL);
       
 19016 						s4o.print(")");
       
 19017 						return NULL;
       
 19018 						
       
 19019 						
       
 19020 					}
       
 19021 					
       
 19022 					ERROR;
       
 19023 				}
       
 19024 				
       
 19025 			}
       
 19026 			
       
 19027 			ERROR;
       
 19028 		}
       
 19029 		
       
 19030 	}/*function_eq*/
       
 19031 	break;
       
 19032 
       
 19033 /****
       
 19034  *LT
       
 19035  */
       
 19036 	case function_lt :
       
 19037 	{
       
 19038 		symbol_c *last_type_symbol = NULL;
       
 19039 
       
 19040 		{
       
 19041 			identifier_c param_name("IN1");
       
 19042 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19043 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19044 			
       
 19045 			/* Get the value from a foo(<param_value>) style call */
       
 19046 			if (IN1_param_value == NULL)
       
 19047 			  IN1_param_value = function_call_param_iterator.next();
       
 19048 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19049 			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 ;
       
 19050 			
       
 19051 			
       
 19052 			{
       
 19053 		
       
 19054 				{
       
 19055 					identifier_c param_name("IN2");
       
 19056 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19057 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19058 					
       
 19059 					/* Get the value from a foo(<param_value>) style call */
       
 19060 					if (IN2_param_value == NULL)
       
 19061 					  IN2_param_value = function_call_param_iterator.next();
       
 19062 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19063 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19064 					
       
 19065 					
       
 19066 					{
       
 19067 				
       
 19068 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19069 						s4o.print("__lt_");
       
 19070 						return_type_symbol->accept(*this);
       
 19071 						s4o.print("(");
       
 19072 						s4o.print_integer(nb_param);
       
 19073 						s4o.print(",");
       
 19074 						IN1_param_value->accept(*this);
       
 19075 						s4o.print(",");
       
 19076 						IN2_param_value->accept(*this);
       
 19077 						
       
 19078 						int base_num = 3;
       
 19079 						symbol_c *param_value = NULL;
       
 19080 						do{
       
 19081 							char my_name[10];
       
 19082 							sprintf(my_name, "IN%d", base_num++);
       
 19083 							identifier_c param_name(my_name);
       
 19084 							
       
 19085 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19086 							param_value = function_call_param_iterator.search(&param_name);
       
 19087 							
       
 19088 							/* Get the value from a foo(<param_value>) style call */
       
 19089 							if (param_value == NULL)
       
 19090 							  param_value = function_call_param_iterator.next();
       
 19091 							if (param_value != NULL){
       
 19092 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 19093 								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 ;
       
 19094 							
       
 19095 								/*Function specific CODE */
       
 19096 								s4o.print(",");
       
 19097 								param_value->accept(*this);
       
 19098 								
       
 19099 							}
       
 19100 							
       
 19101 						}while(param_value != NULL);
       
 19102 						s4o.print(")");
       
 19103 						return NULL;
       
 19104 						
       
 19105 						
       
 19106 					}
       
 19107 					
       
 19108 					ERROR;
       
 19109 				}
       
 19110 				
       
 19111 			}
       
 19112 			
       
 19113 			ERROR;
       
 19114 		}
       
 19115 		
       
 19116 	}/*function_lt*/
       
 19117 	break;
       
 19118 
       
 19119 /****
       
 19120  *LE
       
 19121  */
       
 19122 	case function_le :
       
 19123 	{
       
 19124 		symbol_c *last_type_symbol = NULL;
       
 19125 
       
 19126 		{
       
 19127 			identifier_c param_name("IN1");
       
 19128 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19129 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19130 			
       
 19131 			/* Get the value from a foo(<param_value>) style call */
       
 19132 			if (IN1_param_value == NULL)
       
 19133 			  IN1_param_value = function_call_param_iterator.next();
       
 19134 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19135 			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 ;
       
 19136 			
       
 19137 			
       
 19138 			{
       
 19139 		
       
 19140 				{
       
 19141 					identifier_c param_name("IN2");
       
 19142 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19143 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19144 					
       
 19145 					/* Get the value from a foo(<param_value>) style call */
       
 19146 					if (IN2_param_value == NULL)
       
 19147 					  IN2_param_value = function_call_param_iterator.next();
       
 19148 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19149 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19150 					
       
 19151 					
       
 19152 					{
       
 19153 				
       
 19154 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19155 						s4o.print("__le_");
       
 19156 						return_type_symbol->accept(*this);
       
 19157 						s4o.print("(");
       
 19158 						s4o.print_integer(nb_param);
       
 19159 						s4o.print(",");
       
 19160 						IN1_param_value->accept(*this);
       
 19161 						s4o.print(",");
       
 19162 						IN2_param_value->accept(*this);
       
 19163 						
       
 19164 						int base_num = 3;
       
 19165 						symbol_c *param_value = NULL;
       
 19166 						do{
       
 19167 							char my_name[10];
       
 19168 							sprintf(my_name, "IN%d", base_num++);
       
 19169 							identifier_c param_name(my_name);
       
 19170 							
       
 19171 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19172 							param_value = function_call_param_iterator.search(&param_name);
       
 19173 							
       
 19174 							/* Get the value from a foo(<param_value>) style call */
       
 19175 							if (param_value == NULL)
       
 19176 							  param_value = function_call_param_iterator.next();
       
 19177 							if (param_value != NULL){
       
 19178 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 19179 								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 ;
       
 19180 							
       
 19181 								/*Function specific CODE */
       
 19182 								s4o.print(",");
       
 19183 								param_value->accept(*this);
       
 19184 								
       
 19185 							}
       
 19186 							
       
 19187 						}while(param_value != NULL);
       
 19188 						s4o.print(")");
       
 19189 						return NULL;
       
 19190 						
       
 19191 						
       
 19192 					}
       
 19193 					
       
 19194 					ERROR;
       
 19195 				}
       
 19196 				
       
 19197 			}
       
 19198 			
       
 19199 			ERROR;
       
 19200 		}
       
 19201 		
       
 19202 	}/*function_le*/
       
 19203 	break;
       
 19204 
       
 19205 /****
       
 19206  *NE
       
 19207  */
       
 19208 	case function_ne :
       
 19209 	{
       
 19210 		symbol_c *last_type_symbol = NULL;
       
 19211 
       
 19212 		{
       
 19213 			identifier_c param_name("IN1");
       
 19214 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19215 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19216 			
       
 19217 			/* Get the value from a foo(<param_value>) style call */
       
 19218 			if (IN1_param_value == NULL)
       
 19219 			  IN1_param_value = function_call_param_iterator.next();
       
 19220 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19221 			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 ;
       
 19222 			
       
 19223 			
       
 19224 			{
       
 19225 		
       
 19226 				{
       
 19227 					identifier_c param_name("IN2");
       
 19228 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19229 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19230 					
       
 19231 					/* Get the value from a foo(<param_value>) style call */
       
 19232 					if (IN2_param_value == NULL)
       
 19233 					  IN2_param_value = function_call_param_iterator.next();
       
 19234 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19235 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19236 					
       
 19237 					
       
 19238 					{
       
 19239 				
       
 19240 						symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19241 						s4o.print("__ne_");
       
 19242 						return_type_symbol->accept(*this);
       
 19243 						s4o.print("(");
       
 19244 						s4o.print_integer(nb_param);
       
 19245 						s4o.print(",");
       
 19246 						IN1_param_value->accept(*this);
       
 19247 						s4o.print(",");
       
 19248 						IN2_param_value->accept(*this);
       
 19249 						
       
 19250 						int base_num = 3;
       
 19251 						symbol_c *param_value = NULL;
       
 19252 						do{
       
 19253 							char my_name[10];
       
 19254 							sprintf(my_name, "IN%d", base_num++);
       
 19255 							identifier_c param_name(my_name);
       
 19256 							
       
 19257 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19258 							param_value = function_call_param_iterator.search(&param_name);
       
 19259 							
       
 19260 							/* Get the value from a foo(<param_value>) style call */
       
 19261 							if (param_value == NULL)
       
 19262 							  param_value = function_call_param_iterator.next();
       
 19263 							if (param_value != NULL){
       
 19264 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 19265 								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 ;
       
 19266 							
       
 19267 								/*Function specific CODE */
       
 19268 								s4o.print(",");
       
 19269 								param_value->accept(*this);
       
 19270 								
       
 19271 							}
       
 19272 							
       
 19273 						}while(param_value != NULL);
       
 19274 						s4o.print(")");
       
 19275 						return NULL;
       
 19276 						
       
 19277 						
       
 19278 					}
       
 19279 					
       
 19280 					ERROR;
       
 19281 				}
       
 19282 				
       
 19283 			}
       
 19284 			
       
 19285 			ERROR;
       
 19286 		}
       
 19287 		
       
 19288 	}/*function_ne*/
       
 19289 	break;
       
 19290 
       
 19291 /****
       
 19292  *LEN
       
 19293  */
       
 19294 	case function_len :
       
 19295 	{
       
 19296 		symbol_c *last_type_symbol = NULL;
       
 19297 
       
 19298 		{
       
 19299 			identifier_c param_name("IN");
       
 19300 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19301 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 19302 			
       
 19303 			/* Get the value from a foo(<param_value>) style call */
       
 19304 			if (IN_param_value == NULL)
       
 19305 			  IN_param_value = function_call_param_iterator.next();
       
 19306 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 19307 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 19308 			
       
 19309 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19310 			{
       
 19311 		
       
 19312 				symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19313 				s4o.print("__len(&");
       
 19314 				IN_param_value->accept(*this);
       
 19315 				s4o.print(")");
       
 19316 				return NULL;
       
 19317 				
       
 19318 			}
       
 19319 			
       
 19320 			ERROR;
       
 19321 		}
       
 19322 		
       
 19323 	}/*function_len*/
       
 19324 	break;
       
 19325 
       
 19326 /****
       
 19327  *LEFT
       
 19328  */
       
 19329 	case function_left :
       
 19330 	{
       
 19331 		symbol_c *last_type_symbol = NULL;
       
 19332 
       
 19333 		{
       
 19334 			identifier_c param_name("IN");
       
 19335 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19336 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 19337 			
       
 19338 			/* Get the value from a foo(<param_value>) style call */
       
 19339 			if (IN_param_value == NULL)
       
 19340 			  IN_param_value = function_call_param_iterator.next();
       
 19341 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 19342 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 19343 			
       
 19344 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19345 			{
       
 19346 		
       
 19347 				{
       
 19348 					identifier_c param_name("L");
       
 19349 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19350 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 19351 					
       
 19352 					/* Get the value from a foo(<param_value>) style call */
       
 19353 					if (L_param_value == NULL)
       
 19354 					  L_param_value = function_call_param_iterator.next();
       
 19355 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 19356 					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 ;
       
 19357 					
       
 19358 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19359 					{
       
 19360 				
       
 19361 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19362 						s4o.print("__left(&");
       
 19363 						IN_param_value->accept(*this);
       
 19364 						s4o.print(", ");
       
 19365 						L_param_value->accept(*this);
       
 19366 						s4o.print(")");
       
 19367 						return NULL;
       
 19368 						
       
 19369 					}
       
 19370 					
       
 19371 					ERROR;
       
 19372 				}
       
 19373 				
       
 19374 			}
       
 19375 			
       
 19376 			ERROR;
       
 19377 		}
       
 19378 		
       
 19379 	}/*function_left*/
       
 19380 	break;
       
 19381 
       
 19382 /****
       
 19383  *RIGHT
       
 19384  */
       
 19385 	case function_right :
       
 19386 	{
       
 19387 		symbol_c *last_type_symbol = NULL;
       
 19388 
       
 19389 		{
       
 19390 			identifier_c param_name("IN");
       
 19391 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19392 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 19393 			
       
 19394 			/* Get the value from a foo(<param_value>) style call */
       
 19395 			if (IN_param_value == NULL)
       
 19396 			  IN_param_value = function_call_param_iterator.next();
       
 19397 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 19398 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 19399 			
       
 19400 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19401 			{
       
 19402 		
       
 19403 				{
       
 19404 					identifier_c param_name("L");
       
 19405 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19406 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 19407 					
       
 19408 					/* Get the value from a foo(<param_value>) style call */
       
 19409 					if (L_param_value == NULL)
       
 19410 					  L_param_value = function_call_param_iterator.next();
       
 19411 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 19412 					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 ;
       
 19413 					
       
 19414 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19415 					{
       
 19416 				
       
 19417 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19418 						s4o.print("__right(&");
       
 19419 						IN_param_value->accept(*this);
       
 19420 						s4o.print(", ");
       
 19421 						L_param_value->accept(*this);
       
 19422 						s4o.print(")");
       
 19423 						return NULL;
       
 19424 						
       
 19425 					}
       
 19426 					
       
 19427 					ERROR;
       
 19428 				}
       
 19429 				
       
 19430 			}
       
 19431 			
       
 19432 			ERROR;
       
 19433 		}
       
 19434 		
       
 19435 	}/*function_right*/
       
 19436 	break;
       
 19437 
       
 19438 /****
       
 19439  *MID
       
 19440  */
       
 19441 	case function_mid :
       
 19442 	{
       
 19443 		symbol_c *last_type_symbol = NULL;
       
 19444 
       
 19445 		{
       
 19446 			identifier_c param_name("IN");
       
 19447 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19448 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 19449 			
       
 19450 			/* Get the value from a foo(<param_value>) style call */
       
 19451 			if (IN_param_value == NULL)
       
 19452 			  IN_param_value = function_call_param_iterator.next();
       
 19453 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 19454 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 19455 			
       
 19456 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19457 			{
       
 19458 		
       
 19459 				{
       
 19460 					identifier_c param_name("L");
       
 19461 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19462 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 19463 					
       
 19464 					/* Get the value from a foo(<param_value>) style call */
       
 19465 					if (L_param_value == NULL)
       
 19466 					  L_param_value = function_call_param_iterator.next();
       
 19467 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 19468 					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 ;
       
 19469 					
       
 19470 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19471 					{
       
 19472 				
       
 19473 						{
       
 19474 							identifier_c param_name("P");
       
 19475 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19476 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 19477 							
       
 19478 							/* Get the value from a foo(<param_value>) style call */
       
 19479 							if (P_param_value == NULL)
       
 19480 							  P_param_value = function_call_param_iterator.next();
       
 19481 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 19482 							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 ;
       
 19483 							
       
 19484 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19485 							{
       
 19486 						
       
 19487 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19488 								s4o.print("__mid(&");
       
 19489 								IN_param_value->accept(*this);
       
 19490 								s4o.print(", ");
       
 19491 								L_param_value->accept(*this);
       
 19492 								s4o.print(", ");
       
 19493 								P_param_value->accept(*this);
       
 19494 								s4o.print(")");
       
 19495 								return NULL;
       
 19496 								
       
 19497 							}
       
 19498 							
       
 19499 							ERROR;
       
 19500 						}
       
 19501 						
       
 19502 					}
       
 19503 					
       
 19504 					ERROR;
       
 19505 				}
       
 19506 				
       
 19507 			}
       
 19508 			
       
 19509 			ERROR;
       
 19510 		}
       
 19511 		
       
 19512 	}/*function_mid*/
       
 19513 	break;
       
 19514 
       
 19515 /****
       
 19516  *CONCAT
       
 19517  */
       
 19518 	case function_concat :
       
 19519 	{
       
 19520 		symbol_c *last_type_symbol = NULL;
       
 19521 
       
 19522 		{
       
 19523 			identifier_c param_name("IN1");
       
 19524 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19525 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19526 			
       
 19527 			/* Get the value from a foo(<param_value>) style call */
       
 19528 			if (IN1_param_value == NULL)
       
 19529 			  IN1_param_value = function_call_param_iterator.next();
       
 19530 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19531 			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 ;
       
 19532 			
       
 19533 			if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 19534 			{
       
 19535 		
       
 19536 				{
       
 19537 					identifier_c param_name("IN2");
       
 19538 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19539 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19540 					
       
 19541 					/* Get the value from a foo(<param_value>) style call */
       
 19542 					if (IN2_param_value == NULL)
       
 19543 					  IN2_param_value = function_call_param_iterator.next();
       
 19544 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19545 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19546 					
       
 19547 					if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 19548 					{
       
 19549 				
       
 19550 						symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19551 						s4o.print("__time_add(&");
       
 19552 						IN1_param_value->accept(*this);
       
 19553 						s4o.print(", &");
       
 19554 						IN2_param_value->accept(*this);
       
 19555 						s4o.print(")");
       
 19556 						return NULL;
       
 19557 						
       
 19558 					}
       
 19559 					
       
 19560 					ERROR;
       
 19561 				}
       
 19562 				
       
 19563 			}
       
 19564 			
       
 19565 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19566 			{
       
 19567 		
       
 19568 				{
       
 19569 					identifier_c param_name("IN2");
       
 19570 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19571 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19572 					
       
 19573 					/* Get the value from a foo(<param_value>) style call */
       
 19574 					if (IN2_param_value == NULL)
       
 19575 					  IN2_param_value = function_call_param_iterator.next();
       
 19576 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19577 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19578 					
       
 19579 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19580 					{
       
 19581 				
       
 19582 						symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19583 						s4o.print("__concat(");
       
 19584 						s4o.print_integer(nb_param);
       
 19585 						s4o.print(",");
       
 19586 						IN1_param_value->accept(*this);
       
 19587 						s4o.print(",&");
       
 19588 						IN2_param_value->accept(*this);
       
 19589 						
       
 19590 						int base_num = 3;
       
 19591 						symbol_c *param_value = NULL;
       
 19592 						do{
       
 19593 							char my_name[10];
       
 19594 							sprintf(my_name, "IN%d", base_num++);
       
 19595 							identifier_c param_name(my_name);
       
 19596 							
       
 19597 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19598 							param_value = function_call_param_iterator.search(&param_name);
       
 19599 							
       
 19600 							/* Get the value from a foo(<param_value>) style call */
       
 19601 							if (param_value == NULL)
       
 19602 							  param_value = function_call_param_iterator.next();
       
 19603 							if (param_value != NULL){
       
 19604 								symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
       
 19605 								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 ;
       
 19606 							
       
 19607 								/*Function specific CODE */
       
 19608 								s4o.print(",&");
       
 19609 								param_value->accept(*this);
       
 19610 								
       
 19611 							}
       
 19612 							
       
 19613 						}while(param_value != NULL);
       
 19614 						s4o.print(")");
       
 19615 						return NULL;
       
 19616 						
       
 19617 						
       
 19618 					}
       
 19619 					
       
 19620 					ERROR;
       
 19621 				}
       
 19622 				
       
 19623 			}
       
 19624 			
       
 19625 			ERROR;
       
 19626 		}
       
 19627 		
       
 19628 	}/*function_concat*/
       
 19629 	break;
       
 19630 
       
 19631 /****
       
 19632  *INSERT
       
 19633  */
       
 19634 	case function_insert :
       
 19635 	{
       
 19636 		symbol_c *last_type_symbol = NULL;
       
 19637 
       
 19638 		{
       
 19639 			identifier_c param_name("IN1");
       
 19640 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19641 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19642 			
       
 19643 			/* Get the value from a foo(<param_value>) style call */
       
 19644 			if (IN1_param_value == NULL)
       
 19645 			  IN1_param_value = function_call_param_iterator.next();
       
 19646 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19647 			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 ;
       
 19648 			
       
 19649 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19650 			{
       
 19651 		
       
 19652 				{
       
 19653 					identifier_c param_name("IN2");
       
 19654 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19655 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19656 					
       
 19657 					/* Get the value from a foo(<param_value>) style call */
       
 19658 					if (IN2_param_value == NULL)
       
 19659 					  IN2_param_value = function_call_param_iterator.next();
       
 19660 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19661 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19662 					
       
 19663 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19664 					{
       
 19665 				
       
 19666 						{
       
 19667 							identifier_c param_name("P");
       
 19668 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19669 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 19670 							
       
 19671 							/* Get the value from a foo(<param_value>) style call */
       
 19672 							if (P_param_value == NULL)
       
 19673 							  P_param_value = function_call_param_iterator.next();
       
 19674 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 19675 							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 ;
       
 19676 							
       
 19677 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19678 							{
       
 19679 						
       
 19680 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19681 								s4o.print("__insert(&");
       
 19682 								IN1_param_value->accept(*this);
       
 19683 								s4o.print(", &");
       
 19684 								IN2_param_value->accept(*this);
       
 19685 								s4o.print(", ");
       
 19686 								P_param_value->accept(*this);
       
 19687 								s4o.print(")");
       
 19688 								return NULL;
       
 19689 								
       
 19690 							}
       
 19691 							
       
 19692 							ERROR;
       
 19693 						}
       
 19694 						
       
 19695 					}
       
 19696 					
       
 19697 					ERROR;
       
 19698 				}
       
 19699 				
       
 19700 			}
       
 19701 			
       
 19702 			ERROR;
       
 19703 		}
       
 19704 		
       
 19705 	}/*function_insert*/
       
 19706 	break;
       
 19707 
       
 19708 /****
       
 19709  *DELETE
       
 19710  */
       
 19711 	case function_delete :
       
 19712 	{
       
 19713 		symbol_c *last_type_symbol = NULL;
       
 19714 
       
 19715 		{
       
 19716 			identifier_c param_name("IN");
       
 19717 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19718 			symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 19719 			
       
 19720 			/* Get the value from a foo(<param_value>) style call */
       
 19721 			if (IN_param_value == NULL)
       
 19722 			  IN_param_value = function_call_param_iterator.next();
       
 19723 			symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 19724 			last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 19725 			
       
 19726 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19727 			{
       
 19728 		
       
 19729 				{
       
 19730 					identifier_c param_name("L");
       
 19731 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19732 					symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 19733 					
       
 19734 					/* Get the value from a foo(<param_value>) style call */
       
 19735 					if (L_param_value == NULL)
       
 19736 					  L_param_value = function_call_param_iterator.next();
       
 19737 					symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 19738 					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 ;
       
 19739 					
       
 19740 					if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19741 					{
       
 19742 				
       
 19743 						{
       
 19744 							identifier_c param_name("P");
       
 19745 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19746 							symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 19747 							
       
 19748 							/* Get the value from a foo(<param_value>) style call */
       
 19749 							if (P_param_value == NULL)
       
 19750 							  P_param_value = function_call_param_iterator.next();
       
 19751 							symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 19752 							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 ;
       
 19753 							
       
 19754 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19755 							{
       
 19756 						
       
 19757 								symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19758 								s4o.print("__delete(&");
       
 19759 								IN_param_value->accept(*this);
       
 19760 								s4o.print(", ");
       
 19761 								L_param_value->accept(*this);
       
 19762 								s4o.print(", ");
       
 19763 								P_param_value->accept(*this);
       
 19764 								s4o.print(")");
       
 19765 								return NULL;
       
 19766 								
       
 19767 							}
       
 19768 							
       
 19769 							ERROR;
       
 19770 						}
       
 19771 						
       
 19772 					}
       
 19773 					
       
 19774 					ERROR;
       
 19775 				}
       
 19776 				
       
 19777 			}
       
 19778 			
       
 19779 			ERROR;
       
 19780 		}
       
 19781 		
       
 19782 	}/*function_delete*/
       
 19783 	break;
       
 19784 
       
 19785 /****
       
 19786  *REPLACE
       
 19787  */
       
 19788 	case function_replace :
       
 19789 	{
       
 19790 		symbol_c *last_type_symbol = NULL;
       
 19791 
       
 19792 		{
       
 19793 			identifier_c param_name("IN1");
       
 19794 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19795 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19796 			
       
 19797 			/* Get the value from a foo(<param_value>) style call */
       
 19798 			if (IN1_param_value == NULL)
       
 19799 			  IN1_param_value = function_call_param_iterator.next();
       
 19800 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19801 			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 ;
       
 19802 			
       
 19803 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19804 			{
       
 19805 		
       
 19806 				{
       
 19807 					identifier_c param_name("IN2");
       
 19808 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19809 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19810 					
       
 19811 					/* Get the value from a foo(<param_value>) style call */
       
 19812 					if (IN2_param_value == NULL)
       
 19813 					  IN2_param_value = function_call_param_iterator.next();
       
 19814 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19815 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19816 					
       
 19817 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19818 					{
       
 19819 				
       
 19820 						{
       
 19821 							identifier_c param_name("L");
       
 19822 							/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19823 							symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 19824 							
       
 19825 							/* Get the value from a foo(<param_value>) style call */
       
 19826 							if (L_param_value == NULL)
       
 19827 							  L_param_value = function_call_param_iterator.next();
       
 19828 							symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 19829 							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 ;
       
 19830 							
       
 19831 							if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19832 							{
       
 19833 						
       
 19834 								{
       
 19835 									identifier_c param_name("P");
       
 19836 									/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19837 									symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 19838 									
       
 19839 									/* Get the value from a foo(<param_value>) style call */
       
 19840 									if (P_param_value == NULL)
       
 19841 									  P_param_value = function_call_param_iterator.next();
       
 19842 									symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 19843 									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 ;
       
 19844 									
       
 19845 									if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19846 									{
       
 19847 								
       
 19848 										symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19849 										s4o.print("__replace(&");
       
 19850 										IN1_param_value->accept(*this);
       
 19851 										s4o.print(", &");
       
 19852 										IN2_param_value->accept(*this);
       
 19853 										s4o.print(", ");
       
 19854 										L_param_value->accept(*this);
       
 19855 										s4o.print(", ");
       
 19856 										P_param_value->accept(*this);
       
 19857 										s4o.print(")");
       
 19858 										return NULL;
       
 19859 										
       
 19860 									}
       
 19861 									
       
 19862 									ERROR;
       
 19863 								}
       
 19864 								
       
 19865 							}
       
 19866 							
       
 19867 							ERROR;
       
 19868 						}
       
 19869 						
       
 19870 					}
       
 19871 					
       
 19872 					ERROR;
       
 19873 				}
       
 19874 				
       
 19875 			}
       
 19876 			
       
 19877 			ERROR;
       
 19878 		}
       
 19879 		
       
 19880 	}/*function_replace*/
       
 19881 	break;
       
 19882 
       
 19883 /****
       
 19884  *FIND
       
 19885  */
       
 19886 	case function_find :
       
 19887 	{
       
 19888 		symbol_c *last_type_symbol = NULL;
       
 19889 
       
 19890 		{
       
 19891 			identifier_c param_name("IN1");
       
 19892 			/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19893 			symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 19894 			
       
 19895 			/* Get the value from a foo(<param_value>) style call */
       
 19896 			if (IN1_param_value == NULL)
       
 19897 			  IN1_param_value = function_call_param_iterator.next();
       
 19898 			symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 19899 			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 ;
       
 19900 			
       
 19901 			if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19902 			{
       
 19903 		
       
 19904 				{
       
 19905 					identifier_c param_name("IN2");
       
 19906 					/* Get the value from a foo(<param_name> = <param_value>) style call */
       
 19907 					symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 19908 					
       
 19909 					/* Get the value from a foo(<param_value>) style call */
       
 19910 					if (IN2_param_value == NULL)
       
 19911 					  IN2_param_value = function_call_param_iterator.next();
       
 19912 					symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 19913 					last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 19914 					
       
 19915 					if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 19916 					{
       
 19917 				
       
 19918 						symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19919 						s4o.print("__find(&");
       
 19920 						IN1_param_value->accept(*this);
       
 19921 						s4o.print(", &");
       
 19922 						IN2_param_value->accept(*this);
       
 19923 						s4o.print(")");
       
 19924 						return NULL;
       
 19925 						
       
 19926 					}
       
 19927 					
       
 19928 					ERROR;
       
 19929 				}
       
 19930 				
       
 19931 			}
       
 19932 			
       
 19933 			ERROR;
       
 19934 		}
       
 19935 		
       
 19936 	}/*function_find*/
       
 19937 	break;
       
 19938 
       
 19939 	case function_none :
       
 19940 	ERROR;
       
 19941 }
       
 19942 return NULL;