stage4/generate_cc/st_code_gen.c
changeset 42 b45c7f34dec1
parent 41 8998c8b24b60
child 43 37dd4e2fd2ec
equal deleted inserted replaced
41:8998c8b24b60 42:b45c7f34dec1
    21             if (IN_param_value == NULL)
    21             if (IN_param_value == NULL)
    22               IN_param_value = function_call_param_iterator.next();
    22               IN_param_value = function_call_param_iterator.next();
    23             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    23             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    24             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    24             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    25             
    25             
    26             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    26             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    27             {
    27             {
    28         
    28         
    29                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    29                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    30                 s4o.print("(");
    30                 s4o.print("(");
    31                 return_type_symbol->accept(*this);
    31                 return_type_symbol->accept(*this);
    57             if (IN_param_value == NULL)
    57             if (IN_param_value == NULL)
    58               IN_param_value = function_call_param_iterator.next();
    58               IN_param_value = function_call_param_iterator.next();
    59             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    59             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    60             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    60             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    61             
    61             
    62             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    62             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    63             {
    63             {
    64         
    64         
    65                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
    65                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
    66                 s4o.print("(");
    66                 s4o.print("(");
    67                 return_type_symbol->accept(*this);
    67                 return_type_symbol->accept(*this);
    93             if (IN_param_value == NULL)
    93             if (IN_param_value == NULL)
    94               IN_param_value = function_call_param_iterator.next();
    94               IN_param_value = function_call_param_iterator.next();
    95             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    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 ;
    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             
    97             
    98             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    98             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    99             {
    99             {
   100         
   100         
   101                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   101                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   102                 s4o.print("(");
   102                 s4o.print("(");
   103                 return_type_symbol->accept(*this);
   103                 return_type_symbol->accept(*this);
   129             if (IN_param_value == NULL)
   129             if (IN_param_value == NULL)
   130               IN_param_value = function_call_param_iterator.next();
   130               IN_param_value = function_call_param_iterator.next();
   131             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   133             
   134             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   134             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   135             {
   135             {
   136         
   136         
   137                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   137                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   138                 s4o.print("(");
   138                 s4o.print("(");
   139                 return_type_symbol->accept(*this);
   139                 return_type_symbol->accept(*this);
   165             if (IN_param_value == NULL)
   165             if (IN_param_value == NULL)
   166               IN_param_value = function_call_param_iterator.next();
   166               IN_param_value = function_call_param_iterator.next();
   167             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   167             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   169             
   170             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   170             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   171             {
   171             {
   172         
   172         
   173                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   173                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   174                 s4o.print("(");
   174                 s4o.print("(");
   175                 return_type_symbol->accept(*this);
   175                 return_type_symbol->accept(*this);
   201             if (IN_param_value == NULL)
   201             if (IN_param_value == NULL)
   202               IN_param_value = function_call_param_iterator.next();
   202               IN_param_value = function_call_param_iterator.next();
   203             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   203             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   204             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   204             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   205             
   205             
   206             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   206             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   207             {
   207             {
   208         
   208         
   209                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   209                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   210                 s4o.print("(");
   210                 s4o.print("(");
   211                 return_type_symbol->accept(*this);
   211                 return_type_symbol->accept(*this);
   237             if (IN_param_value == NULL)
   237             if (IN_param_value == NULL)
   238               IN_param_value = function_call_param_iterator.next();
   238               IN_param_value = function_call_param_iterator.next();
   239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   241             
   241             
   242             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   242             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   243             {
   243             {
   244         
   244         
   245                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   245                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   246                 s4o.print("(");
   246                 s4o.print("(");
   247                 return_type_symbol->accept(*this);
   247                 return_type_symbol->accept(*this);
   273             if (IN_param_value == NULL)
   273             if (IN_param_value == NULL)
   274               IN_param_value = function_call_param_iterator.next();
   274               IN_param_value = function_call_param_iterator.next();
   275             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   275             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   276             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   276             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   277             
   277             
   278             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   278             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   279             {
   279             {
   280         
   280         
   281                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   281                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   282                 s4o.print("(");
   282                 s4o.print("(");
   283                 return_type_symbol->accept(*this);
   283                 return_type_symbol->accept(*this);
   309             if (IN_param_value == NULL)
   309             if (IN_param_value == NULL)
   310               IN_param_value = function_call_param_iterator.next();
   310               IN_param_value = function_call_param_iterator.next();
   311             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   311             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   312             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   312             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   313             
   313             
   314             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   314             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   315             {
   315             {
   316         
   316         
   317                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   317                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   318                 s4o.print("(");
   318                 s4o.print("(");
   319                 return_type_symbol->accept(*this);
   319                 return_type_symbol->accept(*this);
   345             if (IN_param_value == NULL)
   345             if (IN_param_value == NULL)
   346               IN_param_value = function_call_param_iterator.next();
   346               IN_param_value = function_call_param_iterator.next();
   347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   349             
   349             
   350             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   350             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   351             {
   351             {
   352         
   352         
   353                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   353                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   354                 s4o.print("(");
   354                 s4o.print("(");
   355                 return_type_symbol->accept(*this);
   355                 return_type_symbol->accept(*this);
   381             if (IN_param_value == NULL)
   381             if (IN_param_value == NULL)
   382               IN_param_value = function_call_param_iterator.next();
   382               IN_param_value = function_call_param_iterator.next();
   383             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   383             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   384             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   384             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   385             
   385             
   386             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   386             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   387             {
   387             {
   388         
   388         
   389                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   389                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   390                 s4o.print("(");
   390                 s4o.print("(");
   391                 return_type_symbol->accept(*this);
   391                 return_type_symbol->accept(*this);
   418             if (IN_param_value == NULL)
   418             if (IN_param_value == NULL)
   419               IN_param_value = function_call_param_iterator.next();
   419               IN_param_value = function_call_param_iterator.next();
   420             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   420             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   421             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   421             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   422             
   422             
   423             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   423             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   424             {
   424             {
   425         
   425         
   426                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   426                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   427                 s4o.print("(");
   427                 s4o.print("(");
   428                 return_type_symbol->accept(*this);
   428                 return_type_symbol->accept(*this);
   455             if (IN_param_value == NULL)
   455             if (IN_param_value == NULL)
   456               IN_param_value = function_call_param_iterator.next();
   456               IN_param_value = function_call_param_iterator.next();
   457             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   457             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   458             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   458             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   459             
   459             
   460             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   460             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   461             {
   461             {
   462         
   462         
   463                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   463                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   464                 s4o.print("(");
   464                 s4o.print("(");
   465                 return_type_symbol->accept(*this);
   465                 return_type_symbol->accept(*this);
   492             if (IN_param_value == NULL)
   492             if (IN_param_value == NULL)
   493               IN_param_value = function_call_param_iterator.next();
   493               IN_param_value = function_call_param_iterator.next();
   494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   496             
   496             
   497             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   497             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   498             {
   498             {
   499         
   499         
   500                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   500                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   501                 s4o.print("(");
   501                 s4o.print("(");
   502                 return_type_symbol->accept(*this);
   502                 return_type_symbol->accept(*this);
   529             if (IN_param_value == NULL)
   529             if (IN_param_value == NULL)
   530               IN_param_value = function_call_param_iterator.next();
   530               IN_param_value = function_call_param_iterator.next();
   531             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   531             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   532             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   532             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   533             
   533             
   534             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   534             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   535             {
   535             {
   536         
   536         
   537                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   537                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   538                 s4o.print("(");
   538                 s4o.print("(");
   539                 return_type_symbol->accept(*this);
   539                 return_type_symbol->accept(*this);
   566             if (IN_param_value == NULL)
   566             if (IN_param_value == NULL)
   567               IN_param_value = function_call_param_iterator.next();
   567               IN_param_value = function_call_param_iterator.next();
   568             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   570             
   571             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   571             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   572             {
   572             {
   573         
   573         
   574                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   574                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   575                 s4o.print("(");
   575                 s4o.print("(");
   576                 return_type_symbol->accept(*this);
   576                 return_type_symbol->accept(*this);
   602             if (IN_param_value == NULL)
   602             if (IN_param_value == NULL)
   603               IN_param_value = function_call_param_iterator.next();
   603               IN_param_value = function_call_param_iterator.next();
   604             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   606             
   607             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   607             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   608             {
   608             {
   609         
   609         
   610                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   610                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   611                 s4o.print("(");
   611                 s4o.print("(");
   612                 return_type_symbol->accept(*this);
   612                 return_type_symbol->accept(*this);
   638             if (IN_param_value == NULL)
   638             if (IN_param_value == NULL)
   639               IN_param_value = function_call_param_iterator.next();
   639               IN_param_value = function_call_param_iterator.next();
   640             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   642             
   643             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   643             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   644             {
   644             {
   645         
   645         
   646                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   646                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   647                 s4o.print("(");
   647                 s4o.print("(");
   648                 return_type_symbol->accept(*this);
   648                 return_type_symbol->accept(*this);
   674             if (IN_param_value == NULL)
   674             if (IN_param_value == NULL)
   675               IN_param_value = function_call_param_iterator.next();
   675               IN_param_value = function_call_param_iterator.next();
   676             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   678             
   679             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   679             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   680             {
   680             {
   681         
   681         
   682                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   682                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   683                 s4o.print("(");
   683                 s4o.print("(");
   684                 return_type_symbol->accept(*this);
   684                 return_type_symbol->accept(*this);
   710             if (IN_param_value == NULL)
   710             if (IN_param_value == NULL)
   711               IN_param_value = function_call_param_iterator.next();
   711               IN_param_value = function_call_param_iterator.next();
   712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   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 ;
   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             
   714             
   715             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   715             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   716             {
   716             {
   717         
   717         
   718                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   718                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   719                 s4o.print("(");
   719                 s4o.print("(");
   720                 return_type_symbol->accept(*this);
   720                 return_type_symbol->accept(*this);
   746             if (IN_param_value == NULL)
   746             if (IN_param_value == NULL)
   747               IN_param_value = function_call_param_iterator.next();
   747               IN_param_value = function_call_param_iterator.next();
   748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   749             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   749             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   750             
   750             
   751             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   751             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   752             {
   752             {
   753         
   753         
   754                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   754                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   755                 s4o.print("(");
   755                 s4o.print("(");
   756                 return_type_symbol->accept(*this);
   756                 return_type_symbol->accept(*this);
   782             if (IN_param_value == NULL)
   782             if (IN_param_value == NULL)
   783               IN_param_value = function_call_param_iterator.next();
   783               IN_param_value = function_call_param_iterator.next();
   784             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   784             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   785             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   785             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   786             
   786             
   787             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   787             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   788             {
   788             {
   789         
   789         
   790                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   790                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   791                 s4o.print("(");
   791                 s4o.print("(");
   792                 return_type_symbol->accept(*this);
   792                 return_type_symbol->accept(*this);
   818             if (IN_param_value == NULL)
   818             if (IN_param_value == NULL)
   819               IN_param_value = function_call_param_iterator.next();
   819               IN_param_value = function_call_param_iterator.next();
   820             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   820             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   821             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   821             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   822             
   822             
   823             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   823             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   824             {
   824             {
   825         
   825         
   826                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   826                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   827                 s4o.print("(");
   827                 s4o.print("(");
   828                 return_type_symbol->accept(*this);
   828                 return_type_symbol->accept(*this);
   854             if (IN_param_value == NULL)
   854             if (IN_param_value == NULL)
   855               IN_param_value = function_call_param_iterator.next();
   855               IN_param_value = function_call_param_iterator.next();
   856             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   856             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   857             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   857             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   858             
   858             
   859             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   859             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   860             {
   860             {
   861         
   861         
   862                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   862                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   863                 s4o.print("(");
   863                 s4o.print("(");
   864                 return_type_symbol->accept(*this);
   864                 return_type_symbol->accept(*this);
   890             if (IN_param_value == NULL)
   890             if (IN_param_value == NULL)
   891               IN_param_value = function_call_param_iterator.next();
   891               IN_param_value = function_call_param_iterator.next();
   892             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   892             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   893             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   893             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   894             
   894             
   895             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   895             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   896             {
   896             {
   897         
   897         
   898                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   898                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   899                 s4o.print("(");
   899                 s4o.print("(");
   900                 return_type_symbol->accept(*this);
   900                 return_type_symbol->accept(*this);
   926             if (IN_param_value == NULL)
   926             if (IN_param_value == NULL)
   927               IN_param_value = function_call_param_iterator.next();
   927               IN_param_value = function_call_param_iterator.next();
   928             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   928             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   929             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   929             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   930             
   930             
   931             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   931             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   932             {
   932             {
   933         
   933         
   934                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   934                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   935                 s4o.print("(");
   935                 s4o.print("(");
   936                 return_type_symbol->accept(*this);
   936                 return_type_symbol->accept(*this);
   962             if (IN_param_value == NULL)
   962             if (IN_param_value == NULL)
   963               IN_param_value = function_call_param_iterator.next();
   963               IN_param_value = function_call_param_iterator.next();
   964             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   964             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   965             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   965             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   966             
   966             
   967             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   967             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   968             {
   968             {
   969         
   969         
   970                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   970                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   971                 s4o.print("(");
   971                 s4o.print("(");
   972                 return_type_symbol->accept(*this);
   972                 return_type_symbol->accept(*this);
   998             if (IN_param_value == NULL)
   998             if (IN_param_value == NULL)
   999               IN_param_value = function_call_param_iterator.next();
   999               IN_param_value = function_call_param_iterator.next();
  1000             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1000             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1001             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1001             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1002             
  1002             
  1003             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1003             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1004             {
  1004             {
  1005         
  1005         
  1006                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1006                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1007                 s4o.print("(");
  1007                 s4o.print("(");
  1008                 return_type_symbol->accept(*this);
  1008                 return_type_symbol->accept(*this);
  1034             if (IN_param_value == NULL)
  1034             if (IN_param_value == NULL)
  1035               IN_param_value = function_call_param_iterator.next();
  1035               IN_param_value = function_call_param_iterator.next();
  1036             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1036             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1037             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1037             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1038             
  1038             
  1039             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1039             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1040             {
  1040             {
  1041         
  1041         
  1042                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1042                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1043                 s4o.print("(");
  1043                 s4o.print("(");
  1044                 return_type_symbol->accept(*this);
  1044                 return_type_symbol->accept(*this);
  1070             if (IN_param_value == NULL)
  1070             if (IN_param_value == NULL)
  1071               IN_param_value = function_call_param_iterator.next();
  1071               IN_param_value = function_call_param_iterator.next();
  1072             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1072             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1073             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1073             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1074             
  1074             
  1075             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1075             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1076             {
  1076             {
  1077         
  1077         
  1078                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1078                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1079                 s4o.print("(");
  1079                 s4o.print("(");
  1080                 return_type_symbol->accept(*this);
  1080                 return_type_symbol->accept(*this);
  1107             if (IN_param_value == NULL)
  1107             if (IN_param_value == NULL)
  1108               IN_param_value = function_call_param_iterator.next();
  1108               IN_param_value = function_call_param_iterator.next();
  1109             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1109             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1110             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1110             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1111             
  1111             
  1112             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1112             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1113             {
  1113             {
  1114         
  1114         
  1115                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1115                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1116                 s4o.print("(");
  1116                 s4o.print("(");
  1117                 return_type_symbol->accept(*this);
  1117                 return_type_symbol->accept(*this);
  1144             if (IN_param_value == NULL)
  1144             if (IN_param_value == NULL)
  1145               IN_param_value = function_call_param_iterator.next();
  1145               IN_param_value = function_call_param_iterator.next();
  1146             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1146             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1147             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1147             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1148             
  1148             
  1149             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1149             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1150             {
  1150             {
  1151         
  1151         
  1152                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1152                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1153                 s4o.print("(");
  1153                 s4o.print("(");
  1154                 return_type_symbol->accept(*this);
  1154                 return_type_symbol->accept(*this);
  1181             if (IN_param_value == NULL)
  1181             if (IN_param_value == NULL)
  1182               IN_param_value = function_call_param_iterator.next();
  1182               IN_param_value = function_call_param_iterator.next();
  1183             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1183             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1184             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1184             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1185             
  1185             
  1186             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1186             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1187             {
  1187             {
  1188         
  1188         
  1189                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1189                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1190                 s4o.print("(");
  1190                 s4o.print("(");
  1191                 return_type_symbol->accept(*this);
  1191                 return_type_symbol->accept(*this);
  1218             if (IN_param_value == NULL)
  1218             if (IN_param_value == NULL)
  1219               IN_param_value = function_call_param_iterator.next();
  1219               IN_param_value = function_call_param_iterator.next();
  1220             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1220             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1221             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1221             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1222             
  1222             
  1223             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1223             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1224             {
  1224             {
  1225         
  1225         
  1226                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1226                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1227                 s4o.print("(");
  1227                 s4o.print("(");
  1228                 return_type_symbol->accept(*this);
  1228                 return_type_symbol->accept(*this);
  1255             if (IN_param_value == NULL)
  1255             if (IN_param_value == NULL)
  1256               IN_param_value = function_call_param_iterator.next();
  1256               IN_param_value = function_call_param_iterator.next();
  1257             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1257             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1258             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1258             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1259             
  1259             
  1260             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1260             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1261             {
  1261             {
  1262         
  1262         
  1263                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1263                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1264                 s4o.print("(");
  1264                 s4o.print("(");
  1265                 return_type_symbol->accept(*this);
  1265                 return_type_symbol->accept(*this);
  1291             if (IN_param_value == NULL)
  1291             if (IN_param_value == NULL)
  1292               IN_param_value = function_call_param_iterator.next();
  1292               IN_param_value = function_call_param_iterator.next();
  1293             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1293             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1294             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1294             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1295             
  1295             
  1296             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1296             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1297             {
  1297             {
  1298         
  1298         
  1299                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1299                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1300                 s4o.print("(");
  1300                 s4o.print("(");
  1301                 return_type_symbol->accept(*this);
  1301                 return_type_symbol->accept(*this);
  1327             if (IN_param_value == NULL)
  1327             if (IN_param_value == NULL)
  1328               IN_param_value = function_call_param_iterator.next();
  1328               IN_param_value = function_call_param_iterator.next();
  1329             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1329             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1330             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1330             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1331             
  1331             
  1332             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1332             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1333             {
  1333             {
  1334         
  1334         
  1335                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1335                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1336                 s4o.print("(");
  1336                 s4o.print("(");
  1337                 return_type_symbol->accept(*this);
  1337                 return_type_symbol->accept(*this);
  1363             if (IN_param_value == NULL)
  1363             if (IN_param_value == NULL)
  1364               IN_param_value = function_call_param_iterator.next();
  1364               IN_param_value = function_call_param_iterator.next();
  1365             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1365             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1366             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1366             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1367             
  1367             
  1368             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1368             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1369             {
  1369             {
  1370         
  1370         
  1371                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1371                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1372                 s4o.print("(");
  1372                 s4o.print("(");
  1373                 return_type_symbol->accept(*this);
  1373                 return_type_symbol->accept(*this);
  1399             if (IN_param_value == NULL)
  1399             if (IN_param_value == NULL)
  1400               IN_param_value = function_call_param_iterator.next();
  1400               IN_param_value = function_call_param_iterator.next();
  1401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1403             
  1403             
  1404             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1404             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1405             {
  1405             {
  1406         
  1406         
  1407                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1407                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1408                 s4o.print("(");
  1408                 s4o.print("(");
  1409                 return_type_symbol->accept(*this);
  1409                 return_type_symbol->accept(*this);
  1435             if (IN_param_value == NULL)
  1435             if (IN_param_value == NULL)
  1436               IN_param_value = function_call_param_iterator.next();
  1436               IN_param_value = function_call_param_iterator.next();
  1437             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1437             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1438             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1438             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1439             
  1439             
  1440             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1440             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1441             {
  1441             {
  1442         
  1442         
  1443                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1443                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1444                 s4o.print("(");
  1444                 s4o.print("(");
  1445                 return_type_symbol->accept(*this);
  1445                 return_type_symbol->accept(*this);
  1471             if (IN_param_value == NULL)
  1471             if (IN_param_value == NULL)
  1472               IN_param_value = function_call_param_iterator.next();
  1472               IN_param_value = function_call_param_iterator.next();
  1473             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1473             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1474             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1474             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1475             
  1475             
  1476             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1476             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1477             {
  1477             {
  1478         
  1478         
  1479                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1479                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1480                 s4o.print("(");
  1480                 s4o.print("(");
  1481                 return_type_symbol->accept(*this);
  1481                 return_type_symbol->accept(*this);
  1507             if (IN_param_value == NULL)
  1507             if (IN_param_value == NULL)
  1508               IN_param_value = function_call_param_iterator.next();
  1508               IN_param_value = function_call_param_iterator.next();
  1509             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1509             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1510             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1510             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1511             
  1511             
  1512             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1512             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1513             {
  1513             {
  1514         
  1514         
  1515                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1515                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1516                 s4o.print("(");
  1516                 s4o.print("(");
  1517                 return_type_symbol->accept(*this);
  1517                 return_type_symbol->accept(*this);
  1543             if (IN_param_value == NULL)
  1543             if (IN_param_value == NULL)
  1544               IN_param_value = function_call_param_iterator.next();
  1544               IN_param_value = function_call_param_iterator.next();
  1545             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1545             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1546             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1546             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1547             
  1547             
  1548             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1548             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1549             {
  1549             {
  1550         
  1550         
  1551                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1551                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1552                 s4o.print("(");
  1552                 s4o.print("(");
  1553                 return_type_symbol->accept(*this);
  1553                 return_type_symbol->accept(*this);
  1579             if (IN_param_value == NULL)
  1579             if (IN_param_value == NULL)
  1580               IN_param_value = function_call_param_iterator.next();
  1580               IN_param_value = function_call_param_iterator.next();
  1581             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1581             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1582             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1582             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1583             
  1583             
  1584             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1584             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1585             {
  1585             {
  1586         
  1586         
  1587                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1587                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1588                 s4o.print("(");
  1588                 s4o.print("(");
  1589                 return_type_symbol->accept(*this);
  1589                 return_type_symbol->accept(*this);
  1615             if (IN_param_value == NULL)
  1615             if (IN_param_value == NULL)
  1616               IN_param_value = function_call_param_iterator.next();
  1616               IN_param_value = function_call_param_iterator.next();
  1617             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1617             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1618             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1618             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1619             
  1619             
  1620             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1620             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1621             {
  1621             {
  1622         
  1622         
  1623                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1623                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1624                 s4o.print("(");
  1624                 s4o.print("(");
  1625                 return_type_symbol->accept(*this);
  1625                 return_type_symbol->accept(*this);
  1651             if (IN_param_value == NULL)
  1651             if (IN_param_value == NULL)
  1652               IN_param_value = function_call_param_iterator.next();
  1652               IN_param_value = function_call_param_iterator.next();
  1653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1655             
  1655             
  1656             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1656             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1657             {
  1657             {
  1658         
  1658         
  1659                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1659                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1660                 s4o.print("(");
  1660                 s4o.print("(");
  1661                 return_type_symbol->accept(*this);
  1661                 return_type_symbol->accept(*this);
  1687             if (IN_param_value == NULL)
  1687             if (IN_param_value == NULL)
  1688               IN_param_value = function_call_param_iterator.next();
  1688               IN_param_value = function_call_param_iterator.next();
  1689             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1689             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1690             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1690             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1691             
  1691             
  1692             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1692             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1693             {
  1693             {
  1694         
  1694         
  1695                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1695                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1696                 s4o.print("(");
  1696                 s4o.print("(");
  1697                 return_type_symbol->accept(*this);
  1697                 return_type_symbol->accept(*this);
  1723             if (IN_param_value == NULL)
  1723             if (IN_param_value == NULL)
  1724               IN_param_value = function_call_param_iterator.next();
  1724               IN_param_value = function_call_param_iterator.next();
  1725             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1725             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1726             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1726             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1727             
  1727             
  1728             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1728             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1729             {
  1729             {
  1730         
  1730         
  1731                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1731                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1732                 s4o.print("(");
  1732                 s4o.print("(");
  1733                 return_type_symbol->accept(*this);
  1733                 return_type_symbol->accept(*this);
  1759             if (IN_param_value == NULL)
  1759             if (IN_param_value == NULL)
  1760               IN_param_value = function_call_param_iterator.next();
  1760               IN_param_value = function_call_param_iterator.next();
  1761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1763             
  1763             
  1764             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1764             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1765             {
  1765             {
  1766         
  1766         
  1767                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1767                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1768                 s4o.print("(");
  1768                 s4o.print("(");
  1769                 return_type_symbol->accept(*this);
  1769                 return_type_symbol->accept(*this);
  1796             if (IN_param_value == NULL)
  1796             if (IN_param_value == NULL)
  1797               IN_param_value = function_call_param_iterator.next();
  1797               IN_param_value = function_call_param_iterator.next();
  1798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1800             
  1800             
  1801             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1801             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1802             {
  1802             {
  1803         
  1803         
  1804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1805                 s4o.print("(");
  1805                 s4o.print("(");
  1806                 return_type_symbol->accept(*this);
  1806                 return_type_symbol->accept(*this);
  1833             if (IN_param_value == NULL)
  1833             if (IN_param_value == NULL)
  1834               IN_param_value = function_call_param_iterator.next();
  1834               IN_param_value = function_call_param_iterator.next();
  1835             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1835             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1836             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1836             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1837             
  1837             
  1838             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1838             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1839             {
  1839             {
  1840         
  1840         
  1841                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1841                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1842                 s4o.print("(");
  1842                 s4o.print("(");
  1843                 return_type_symbol->accept(*this);
  1843                 return_type_symbol->accept(*this);
  1870             if (IN_param_value == NULL)
  1870             if (IN_param_value == NULL)
  1871               IN_param_value = function_call_param_iterator.next();
  1871               IN_param_value = function_call_param_iterator.next();
  1872             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1872             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1873             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1873             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1874             
  1874             
  1875             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1875             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1876             {
  1876             {
  1877         
  1877         
  1878                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1878                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1879                 s4o.print("(");
  1879                 s4o.print("(");
  1880                 return_type_symbol->accept(*this);
  1880                 return_type_symbol->accept(*this);
  1907             if (IN_param_value == NULL)
  1907             if (IN_param_value == NULL)
  1908               IN_param_value = function_call_param_iterator.next();
  1908               IN_param_value = function_call_param_iterator.next();
  1909             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1909             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1910             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1910             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1911             
  1911             
  1912             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1912             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1913             {
  1913             {
  1914         
  1914         
  1915                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1915                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1916                 s4o.print("(");
  1916                 s4o.print("(");
  1917                 return_type_symbol->accept(*this);
  1917                 return_type_symbol->accept(*this);
  1944             if (IN_param_value == NULL)
  1944             if (IN_param_value == NULL)
  1945               IN_param_value = function_call_param_iterator.next();
  1945               IN_param_value = function_call_param_iterator.next();
  1946             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1946             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1947             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1947             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1948             
  1948             
  1949             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1949             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1950             {
  1950             {
  1951         
  1951         
  1952                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1952                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1953                 s4o.print("(");
  1953                 s4o.print("(");
  1954                 return_type_symbol->accept(*this);
  1954                 return_type_symbol->accept(*this);
  1980             if (IN_param_value == NULL)
  1980             if (IN_param_value == NULL)
  1981               IN_param_value = function_call_param_iterator.next();
  1981               IN_param_value = function_call_param_iterator.next();
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1984             
  1984             
  1985             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1985             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1986             {
  1986             {
  1987         
  1987         
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1989                 s4o.print("(");
  1989                 s4o.print("(");
  1990                 return_type_symbol->accept(*this);
  1990                 return_type_symbol->accept(*this);
  2016             if (IN_param_value == NULL)
  2016             if (IN_param_value == NULL)
  2017               IN_param_value = function_call_param_iterator.next();
  2017               IN_param_value = function_call_param_iterator.next();
  2018             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2018             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2019             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2019             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2020             
  2020             
  2021             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  2021             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  2022             {
  2022             {
  2023         
  2023         
  2024                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2024                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2025                 s4o.print("(");
  2025                 s4o.print("(");
  2026                 return_type_symbol->accept(*this);
  2026                 return_type_symbol->accept(*this);
  2052             if (IN_param_value == NULL)
  2052             if (IN_param_value == NULL)
  2053               IN_param_value = function_call_param_iterator.next();
  2053               IN_param_value = function_call_param_iterator.next();
  2054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2056             
  2056             
  2057             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  2057             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  2058             {
  2058             {
  2059         
  2059         
  2060                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2060                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2061                 s4o.print("(");
  2061                 s4o.print("(");
  2062                 return_type_symbol->accept(*this);
  2062                 return_type_symbol->accept(*this);
  2088             if (IN_param_value == NULL)
  2088             if (IN_param_value == NULL)
  2089               IN_param_value = function_call_param_iterator.next();
  2089               IN_param_value = function_call_param_iterator.next();
  2090             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2090             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2091             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2091             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2092             
  2092             
  2093             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2093             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2094             {
  2094             {
  2095         
  2095         
  2096                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2096                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2097                 s4o.print("(");
  2097                 s4o.print("(");
  2098                 return_type_symbol->accept(*this);
  2098                 return_type_symbol->accept(*this);
  2124             if (IN_param_value == NULL)
  2124             if (IN_param_value == NULL)
  2125               IN_param_value = function_call_param_iterator.next();
  2125               IN_param_value = function_call_param_iterator.next();
  2126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2128             
  2128             
  2129             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2129             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2130             {
  2130             {
  2131         
  2131         
  2132                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2132                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2133                 s4o.print("(");
  2133                 s4o.print("(");
  2134                 return_type_symbol->accept(*this);
  2134                 return_type_symbol->accept(*this);
  2160             if (IN_param_value == NULL)
  2160             if (IN_param_value == NULL)
  2161               IN_param_value = function_call_param_iterator.next();
  2161               IN_param_value = function_call_param_iterator.next();
  2162             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2162             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2163             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2163             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2164             
  2164             
  2165             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2165             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2166             {
  2166             {
  2167         
  2167         
  2168                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2168                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2169                 s4o.print("(");
  2169                 s4o.print("(");
  2170                 return_type_symbol->accept(*this);
  2170                 return_type_symbol->accept(*this);
  2196             if (IN_param_value == NULL)
  2196             if (IN_param_value == NULL)
  2197               IN_param_value = function_call_param_iterator.next();
  2197               IN_param_value = function_call_param_iterator.next();
  2198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2200             
  2200             
  2201             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2201             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2202             {
  2202             {
  2203         
  2203         
  2204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2205                 s4o.print("(");
  2205                 s4o.print("(");
  2206                 return_type_symbol->accept(*this);
  2206                 return_type_symbol->accept(*this);
  2232             if (IN_param_value == NULL)
  2232             if (IN_param_value == NULL)
  2233               IN_param_value = function_call_param_iterator.next();
  2233               IN_param_value = function_call_param_iterator.next();
  2234             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2234             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2235             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2235             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2236             
  2236             
  2237             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2237             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2238             {
  2238             {
  2239         
  2239         
  2240                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2240                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2241                 s4o.print("(");
  2241                 s4o.print("(");
  2242                 return_type_symbol->accept(*this);
  2242                 return_type_symbol->accept(*this);
  2268             if (IN_param_value == NULL)
  2268             if (IN_param_value == NULL)
  2269               IN_param_value = function_call_param_iterator.next();
  2269               IN_param_value = function_call_param_iterator.next();
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2272             
  2272             
  2273             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2273             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2274             {
  2274             {
  2275         
  2275         
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2277                 s4o.print("(");
  2277                 s4o.print("(");
  2278                 return_type_symbol->accept(*this);
  2278                 return_type_symbol->accept(*this);
  2304             if (IN_param_value == NULL)
  2304             if (IN_param_value == NULL)
  2305               IN_param_value = function_call_param_iterator.next();
  2305               IN_param_value = function_call_param_iterator.next();
  2306             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2306             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2307             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2307             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2308             
  2308             
  2309             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2309             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2310             {
  2310             {
  2311         
  2311         
  2312                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2312                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2313                 s4o.print("(");
  2313                 s4o.print("(");
  2314                 return_type_symbol->accept(*this);
  2314                 return_type_symbol->accept(*this);
  2340             if (IN_param_value == NULL)
  2340             if (IN_param_value == NULL)
  2341               IN_param_value = function_call_param_iterator.next();
  2341               IN_param_value = function_call_param_iterator.next();
  2342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2344             
  2344             
  2345             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2345             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2346             {
  2346             {
  2347         
  2347         
  2348                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2348                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2349                 s4o.print("(");
  2349                 s4o.print("(");
  2350                 return_type_symbol->accept(*this);
  2350                 return_type_symbol->accept(*this);
  2376             if (IN_param_value == NULL)
  2376             if (IN_param_value == NULL)
  2377               IN_param_value = function_call_param_iterator.next();
  2377               IN_param_value = function_call_param_iterator.next();
  2378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2380             
  2380             
  2381             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2381             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2382             {
  2382             {
  2383         
  2383         
  2384                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2384                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2385                 s4o.print("(");
  2385                 s4o.print("(");
  2386                 return_type_symbol->accept(*this);
  2386                 return_type_symbol->accept(*this);
  2412             if (IN_param_value == NULL)
  2412             if (IN_param_value == NULL)
  2413               IN_param_value = function_call_param_iterator.next();
  2413               IN_param_value = function_call_param_iterator.next();
  2414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2416             
  2416             
  2417             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2417             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2418             {
  2418             {
  2419         
  2419         
  2420                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2420                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2421                 s4o.print("(");
  2421                 s4o.print("(");
  2422                 return_type_symbol->accept(*this);
  2422                 return_type_symbol->accept(*this);
  2448             if (IN_param_value == NULL)
  2448             if (IN_param_value == NULL)
  2449               IN_param_value = function_call_param_iterator.next();
  2449               IN_param_value = function_call_param_iterator.next();
  2450             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2450             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2451             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2451             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2452             
  2452             
  2453             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2453             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2454             {
  2454             {
  2455         
  2455         
  2456                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2456                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2457                 s4o.print("(");
  2457                 s4o.print("(");
  2458                 return_type_symbol->accept(*this);
  2458                 return_type_symbol->accept(*this);
  2485             if (IN_param_value == NULL)
  2485             if (IN_param_value == NULL)
  2486               IN_param_value = function_call_param_iterator.next();
  2486               IN_param_value = function_call_param_iterator.next();
  2487             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2487             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2488             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2488             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2489             
  2489             
  2490             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2490             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2491             {
  2491             {
  2492         
  2492         
  2493                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2493                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2494                 s4o.print("(");
  2494                 s4o.print("(");
  2495                 return_type_symbol->accept(*this);
  2495                 return_type_symbol->accept(*this);
  2522             if (IN_param_value == NULL)
  2522             if (IN_param_value == NULL)
  2523               IN_param_value = function_call_param_iterator.next();
  2523               IN_param_value = function_call_param_iterator.next();
  2524             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2524             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2525             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2525             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2526             
  2526             
  2527             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2527             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2528             {
  2528             {
  2529         
  2529         
  2530                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2530                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2531                 s4o.print("(");
  2531                 s4o.print("(");
  2532                 return_type_symbol->accept(*this);
  2532                 return_type_symbol->accept(*this);
  2559             if (IN_param_value == NULL)
  2559             if (IN_param_value == NULL)
  2560               IN_param_value = function_call_param_iterator.next();
  2560               IN_param_value = function_call_param_iterator.next();
  2561             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2561             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2562             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2562             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2563             
  2563             
  2564             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2564             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2565             {
  2565             {
  2566         
  2566         
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2568                 s4o.print("(");
  2568                 s4o.print("(");
  2569                 return_type_symbol->accept(*this);
  2569                 return_type_symbol->accept(*this);
  2596             if (IN_param_value == NULL)
  2596             if (IN_param_value == NULL)
  2597               IN_param_value = function_call_param_iterator.next();
  2597               IN_param_value = function_call_param_iterator.next();
  2598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2600             
  2600             
  2601             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2601             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2602             {
  2602             {
  2603         
  2603         
  2604                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2604                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2605                 s4o.print("(");
  2605                 s4o.print("(");
  2606                 return_type_symbol->accept(*this);
  2606                 return_type_symbol->accept(*this);
  2633             if (IN_param_value == NULL)
  2633             if (IN_param_value == NULL)
  2634               IN_param_value = function_call_param_iterator.next();
  2634               IN_param_value = function_call_param_iterator.next();
  2635             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2635             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2636             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2636             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2637             
  2637             
  2638             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2638             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2639             {
  2639             {
  2640         
  2640         
  2641                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2641                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2642                 s4o.print("(");
  2642                 s4o.print("(");
  2643                 return_type_symbol->accept(*this);
  2643                 return_type_symbol->accept(*this);
  2669             if (IN_param_value == NULL)
  2669             if (IN_param_value == NULL)
  2670               IN_param_value = function_call_param_iterator.next();
  2670               IN_param_value = function_call_param_iterator.next();
  2671             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2671             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2672             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2672             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2673             
  2673             
  2674             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2674             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2675             {
  2675             {
  2676         
  2676         
  2677                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2677                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2678                 s4o.print("(");
  2678                 s4o.print("(");
  2679                 return_type_symbol->accept(*this);
  2679                 return_type_symbol->accept(*this);
  2705             if (IN_param_value == NULL)
  2705             if (IN_param_value == NULL)
  2706               IN_param_value = function_call_param_iterator.next();
  2706               IN_param_value = function_call_param_iterator.next();
  2707             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2707             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2708             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2708             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2709             
  2709             
  2710             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2710             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2711             {
  2711             {
  2712         
  2712         
  2713                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2713                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2714                 s4o.print("(");
  2714                 s4o.print("(");
  2715                 return_type_symbol->accept(*this);
  2715                 return_type_symbol->accept(*this);
  2741             if (IN_param_value == NULL)
  2741             if (IN_param_value == NULL)
  2742               IN_param_value = function_call_param_iterator.next();
  2742               IN_param_value = function_call_param_iterator.next();
  2743             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2743             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2744             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2744             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2745             
  2745             
  2746             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2746             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2747             {
  2747             {
  2748         
  2748         
  2749                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2749                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2750                 s4o.print("(");
  2750                 s4o.print("(");
  2751                 return_type_symbol->accept(*this);
  2751                 return_type_symbol->accept(*this);
  2777             if (IN_param_value == NULL)
  2777             if (IN_param_value == NULL)
  2778               IN_param_value = function_call_param_iterator.next();
  2778               IN_param_value = function_call_param_iterator.next();
  2779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2781             
  2781             
  2782             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2782             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2783             {
  2783             {
  2784         
  2784         
  2785                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2785                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2786                 s4o.print("(");
  2786                 s4o.print("(");
  2787                 return_type_symbol->accept(*this);
  2787                 return_type_symbol->accept(*this);
  2813             if (IN_param_value == NULL)
  2813             if (IN_param_value == NULL)
  2814               IN_param_value = function_call_param_iterator.next();
  2814               IN_param_value = function_call_param_iterator.next();
  2815             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2815             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2816             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2816             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2817             
  2817             
  2818             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2818             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2819             {
  2819             {
  2820         
  2820         
  2821                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2821                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2822                 s4o.print("(");
  2822                 s4o.print("(");
  2823                 return_type_symbol->accept(*this);
  2823                 return_type_symbol->accept(*this);
  2849             if (IN_param_value == NULL)
  2849             if (IN_param_value == NULL)
  2850               IN_param_value = function_call_param_iterator.next();
  2850               IN_param_value = function_call_param_iterator.next();
  2851             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2851             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2852             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2852             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2853             
  2853             
  2854             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2854             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2855             {
  2855             {
  2856         
  2856         
  2857                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2857                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2858                 s4o.print("(");
  2858                 s4o.print("(");
  2859                 return_type_symbol->accept(*this);
  2859                 return_type_symbol->accept(*this);
  2885             if (IN_param_value == NULL)
  2885             if (IN_param_value == NULL)
  2886               IN_param_value = function_call_param_iterator.next();
  2886               IN_param_value = function_call_param_iterator.next();
  2887             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2887             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2888             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2888             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2889             
  2889             
  2890             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2890             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2891             {
  2891             {
  2892         
  2892         
  2893                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2893                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2894                 s4o.print("(");
  2894                 s4o.print("(");
  2895                 return_type_symbol->accept(*this);
  2895                 return_type_symbol->accept(*this);
  2921             if (IN_param_value == NULL)
  2921             if (IN_param_value == NULL)
  2922               IN_param_value = function_call_param_iterator.next();
  2922               IN_param_value = function_call_param_iterator.next();
  2923             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2923             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2924             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2924             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2925             
  2925             
  2926             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2926             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2927             {
  2927             {
  2928         
  2928         
  2929                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2929                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2930                 s4o.print("(");
  2930                 s4o.print("(");
  2931                 return_type_symbol->accept(*this);
  2931                 return_type_symbol->accept(*this);
  2957             if (IN_param_value == NULL)
  2957             if (IN_param_value == NULL)
  2958               IN_param_value = function_call_param_iterator.next();
  2958               IN_param_value = function_call_param_iterator.next();
  2959             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2959             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2960             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2960             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2961             
  2961             
  2962             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2962             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2963             {
  2963             {
  2964         
  2964         
  2965                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2965                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2966                 s4o.print("(");
  2966                 s4o.print("(");
  2967                 return_type_symbol->accept(*this);
  2967                 return_type_symbol->accept(*this);
  2993             if (IN_param_value == NULL)
  2993             if (IN_param_value == NULL)
  2994               IN_param_value = function_call_param_iterator.next();
  2994               IN_param_value = function_call_param_iterator.next();
  2995             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2995             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2996             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2996             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2997             
  2997             
  2998             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2998             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2999             {
  2999             {
  3000         
  3000         
  3001                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3001                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3002                 s4o.print("(");
  3002                 s4o.print("(");
  3003                 return_type_symbol->accept(*this);
  3003                 return_type_symbol->accept(*this);
  3029             if (IN_param_value == NULL)
  3029             if (IN_param_value == NULL)
  3030               IN_param_value = function_call_param_iterator.next();
  3030               IN_param_value = function_call_param_iterator.next();
  3031             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3031             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3032             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3032             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3033             
  3033             
  3034             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3034             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3035             {
  3035             {
  3036         
  3036         
  3037                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3037                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3038                 s4o.print("(");
  3038                 s4o.print("(");
  3039                 return_type_symbol->accept(*this);
  3039                 return_type_symbol->accept(*this);
  3065             if (IN_param_value == NULL)
  3065             if (IN_param_value == NULL)
  3066               IN_param_value = function_call_param_iterator.next();
  3066               IN_param_value = function_call_param_iterator.next();
  3067             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3067             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3068             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3068             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3069             
  3069             
  3070             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3070             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3071             {
  3071             {
  3072         
  3072         
  3073                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3073                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3074                 s4o.print("(");
  3074                 s4o.print("(");
  3075                 return_type_symbol->accept(*this);
  3075                 return_type_symbol->accept(*this);
  3101             if (IN_param_value == NULL)
  3101             if (IN_param_value == NULL)
  3102               IN_param_value = function_call_param_iterator.next();
  3102               IN_param_value = function_call_param_iterator.next();
  3103             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3103             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3104             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3104             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3105             
  3105             
  3106             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3106             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3107             {
  3107             {
  3108         
  3108         
  3109                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3109                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3110                 s4o.print("(");
  3110                 s4o.print("(");
  3111                 return_type_symbol->accept(*this);
  3111                 return_type_symbol->accept(*this);
  3137             if (IN_param_value == NULL)
  3137             if (IN_param_value == NULL)
  3138               IN_param_value = function_call_param_iterator.next();
  3138               IN_param_value = function_call_param_iterator.next();
  3139             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3139             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3140             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3140             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3141             
  3141             
  3142             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3142             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3143             {
  3143             {
  3144         
  3144         
  3145                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3145                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3146                 s4o.print("(");
  3146                 s4o.print("(");
  3147                 return_type_symbol->accept(*this);
  3147                 return_type_symbol->accept(*this);
  3174             if (IN_param_value == NULL)
  3174             if (IN_param_value == NULL)
  3175               IN_param_value = function_call_param_iterator.next();
  3175               IN_param_value = function_call_param_iterator.next();
  3176             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3176             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3177             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3177             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3178             
  3178             
  3179             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3179             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3180             {
  3180             {
  3181         
  3181         
  3182                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3182                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3183                 s4o.print("(");
  3183                 s4o.print("(");
  3184                 return_type_symbol->accept(*this);
  3184                 return_type_symbol->accept(*this);
  3211             if (IN_param_value == NULL)
  3211             if (IN_param_value == NULL)
  3212               IN_param_value = function_call_param_iterator.next();
  3212               IN_param_value = function_call_param_iterator.next();
  3213             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3213             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3214             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3214             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3215             
  3215             
  3216             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3216             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3217             {
  3217             {
  3218         
  3218         
  3219                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3219                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3220                 s4o.print("(");
  3220                 s4o.print("(");
  3221                 return_type_symbol->accept(*this);
  3221                 return_type_symbol->accept(*this);
  3248             if (IN_param_value == NULL)
  3248             if (IN_param_value == NULL)
  3249               IN_param_value = function_call_param_iterator.next();
  3249               IN_param_value = function_call_param_iterator.next();
  3250             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3250             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3251             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3251             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3252             
  3252             
  3253             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3253             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3254             {
  3254             {
  3255         
  3255         
  3256                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3256                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3257                 s4o.print("(");
  3257                 s4o.print("(");
  3258                 return_type_symbol->accept(*this);
  3258                 return_type_symbol->accept(*this);
  3285             if (IN_param_value == NULL)
  3285             if (IN_param_value == NULL)
  3286               IN_param_value = function_call_param_iterator.next();
  3286               IN_param_value = function_call_param_iterator.next();
  3287             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3287             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3288             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3288             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3289             
  3289             
  3290             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3290             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3291             {
  3291             {
  3292         
  3292         
  3293                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3293                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3294                 s4o.print("(");
  3294                 s4o.print("(");
  3295                 return_type_symbol->accept(*this);
  3295                 return_type_symbol->accept(*this);
  3322             if (IN_param_value == NULL)
  3322             if (IN_param_value == NULL)
  3323               IN_param_value = function_call_param_iterator.next();
  3323               IN_param_value = function_call_param_iterator.next();
  3324             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3324             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3325             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3325             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3326             
  3326             
  3327             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3327             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3328             {
  3328             {
  3329         
  3329         
  3330                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3330                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3331                 s4o.print("(");
  3331                 s4o.print("(");
  3332                 return_type_symbol->accept(*this);
  3332                 return_type_symbol->accept(*this);
  3358             if (IN_param_value == NULL)
  3358             if (IN_param_value == NULL)
  3359               IN_param_value = function_call_param_iterator.next();
  3359               IN_param_value = function_call_param_iterator.next();
  3360             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3360             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3361             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3361             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3362             
  3362             
  3363             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3363             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3364             {
  3364             {
  3365         
  3365         
  3366                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3366                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3367                 s4o.print("(");
  3367                 s4o.print("(");
  3368                 return_type_symbol->accept(*this);
  3368                 return_type_symbol->accept(*this);
  3394             if (IN_param_value == NULL)
  3394             if (IN_param_value == NULL)
  3395               IN_param_value = function_call_param_iterator.next();
  3395               IN_param_value = function_call_param_iterator.next();
  3396             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3396             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3397             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3397             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3398             
  3398             
  3399             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3399             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3400             {
  3400             {
  3401         
  3401         
  3402                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3402                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3403                 s4o.print("(");
  3403                 s4o.print("(");
  3404                 return_type_symbol->accept(*this);
  3404                 return_type_symbol->accept(*this);
  3430             if (IN_param_value == NULL)
  3430             if (IN_param_value == NULL)
  3431               IN_param_value = function_call_param_iterator.next();
  3431               IN_param_value = function_call_param_iterator.next();
  3432             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3432             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3433             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3433             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3434             
  3434             
  3435             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3435             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3436             {
  3436             {
  3437         
  3437         
  3438                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3438                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3439                 s4o.print("(");
  3439                 s4o.print("(");
  3440                 return_type_symbol->accept(*this);
  3440                 return_type_symbol->accept(*this);
  3466             if (IN_param_value == NULL)
  3466             if (IN_param_value == NULL)
  3467               IN_param_value = function_call_param_iterator.next();
  3467               IN_param_value = function_call_param_iterator.next();
  3468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3470             
  3470             
  3471             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3471             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3472             {
  3472             {
  3473         
  3473         
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3475                 s4o.print("(");
  3475                 s4o.print("(");
  3476                 return_type_symbol->accept(*this);
  3476                 return_type_symbol->accept(*this);
  3502             if (IN_param_value == NULL)
  3502             if (IN_param_value == NULL)
  3503               IN_param_value = function_call_param_iterator.next();
  3503               IN_param_value = function_call_param_iterator.next();
  3504             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3504             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3505             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3506             
  3506             
  3507             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3507             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3508             {
  3508             {
  3509         
  3509         
  3510                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3510                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3511                 s4o.print("(");
  3511                 s4o.print("(");
  3512                 return_type_symbol->accept(*this);
  3512                 return_type_symbol->accept(*this);
  3538             if (IN_param_value == NULL)
  3538             if (IN_param_value == NULL)
  3539               IN_param_value = function_call_param_iterator.next();
  3539               IN_param_value = function_call_param_iterator.next();
  3540             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  3542             
  3543             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3543             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3544             {
  3544             {
  3545         
  3545         
  3546                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3546                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3547                 s4o.print("(");
  3547                 s4o.print("(");
  3548                 return_type_symbol->accept(*this);
  3548                 return_type_symbol->accept(*this);
  3574             if (IN_param_value == NULL)
  3574             if (IN_param_value == NULL)
  3575               IN_param_value = function_call_param_iterator.next();
  3575               IN_param_value = function_call_param_iterator.next();
  3576             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3576             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3577             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3577             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3578             
  3578             
  3579             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3579             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3580             {
  3580             {
  3581         
  3581         
  3582                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3582                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3583                 s4o.print("(");
  3583                 s4o.print("(");
  3584                 return_type_symbol->accept(*this);
  3584                 return_type_symbol->accept(*this);
  3610             if (IN_param_value == NULL)
  3610             if (IN_param_value == NULL)
  3611               IN_param_value = function_call_param_iterator.next();
  3611               IN_param_value = function_call_param_iterator.next();
  3612             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3612             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3613             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3613             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3614             
  3614             
  3615             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3615             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3616             {
  3616             {
  3617         
  3617         
  3618                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3618                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3619                 s4o.print("(");
  3619                 s4o.print("(");
  3620                 return_type_symbol->accept(*this);
  3620                 return_type_symbol->accept(*this);
  3646             if (IN_param_value == NULL)
  3646             if (IN_param_value == NULL)
  3647               IN_param_value = function_call_param_iterator.next();
  3647               IN_param_value = function_call_param_iterator.next();
  3648             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3648             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3649             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3649             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3650             
  3650             
  3651             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3651             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3652             {
  3652             {
  3653         
  3653         
  3654                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3654                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3655                 s4o.print("(");
  3655                 s4o.print("(");
  3656                 return_type_symbol->accept(*this);
  3656                 return_type_symbol->accept(*this);
  3682             if (IN_param_value == NULL)
  3682             if (IN_param_value == NULL)
  3683               IN_param_value = function_call_param_iterator.next();
  3683               IN_param_value = function_call_param_iterator.next();
  3684             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3684             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3685             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3685             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3686             
  3686             
  3687             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3687             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3688             {
  3688             {
  3689         
  3689         
  3690                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3690                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3691                 s4o.print("(");
  3691                 s4o.print("(");
  3692                 return_type_symbol->accept(*this);
  3692                 return_type_symbol->accept(*this);
  3718             if (IN_param_value == NULL)
  3718             if (IN_param_value == NULL)
  3719               IN_param_value = function_call_param_iterator.next();
  3719               IN_param_value = function_call_param_iterator.next();
  3720             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3720             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3721             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3721             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3722             
  3722             
  3723             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3723             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3724             {
  3724             {
  3725         
  3725         
  3726                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3726                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3727                 s4o.print("(");
  3727                 s4o.print("(");
  3728                 return_type_symbol->accept(*this);
  3728                 return_type_symbol->accept(*this);
  3754             if (IN_param_value == NULL)
  3754             if (IN_param_value == NULL)
  3755               IN_param_value = function_call_param_iterator.next();
  3755               IN_param_value = function_call_param_iterator.next();
  3756             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3756             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3757             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3757             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3758             
  3758             
  3759             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3759             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3760             {
  3760             {
  3761         
  3761         
  3762                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3762                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3763                 s4o.print("(");
  3763                 s4o.print("(");
  3764                 return_type_symbol->accept(*this);
  3764                 return_type_symbol->accept(*this);
  3790             if (IN_param_value == NULL)
  3790             if (IN_param_value == NULL)
  3791               IN_param_value = function_call_param_iterator.next();
  3791               IN_param_value = function_call_param_iterator.next();
  3792             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3792             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3793             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3793             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3794             
  3794             
  3795             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3795             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3796             {
  3796             {
  3797         
  3797         
  3798                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3798                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3799                 s4o.print("(");
  3799                 s4o.print("(");
  3800                 return_type_symbol->accept(*this);
  3800                 return_type_symbol->accept(*this);
  3826             if (IN_param_value == NULL)
  3826             if (IN_param_value == NULL)
  3827               IN_param_value = function_call_param_iterator.next();
  3827               IN_param_value = function_call_param_iterator.next();
  3828             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3828             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3829             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3829             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3830             
  3830             
  3831             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3831             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3832             {
  3832             {
  3833         
  3833         
  3834                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3834                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3835                 s4o.print("(");
  3835                 s4o.print("(");
  3836                 return_type_symbol->accept(*this);
  3836                 return_type_symbol->accept(*this);
  3863             if (IN_param_value == NULL)
  3863             if (IN_param_value == NULL)
  3864               IN_param_value = function_call_param_iterator.next();
  3864               IN_param_value = function_call_param_iterator.next();
  3865             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3865             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3866             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3866             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3867             
  3867             
  3868             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3868             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3869             {
  3869             {
  3870         
  3870         
  3871                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3871                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3872                 s4o.print("(");
  3872                 s4o.print("(");
  3873                 return_type_symbol->accept(*this);
  3873                 return_type_symbol->accept(*this);
  3900             if (IN_param_value == NULL)
  3900             if (IN_param_value == NULL)
  3901               IN_param_value = function_call_param_iterator.next();
  3901               IN_param_value = function_call_param_iterator.next();
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3904             
  3904             
  3905             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3905             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3906             {
  3906             {
  3907         
  3907         
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3909                 s4o.print("(");
  3909                 s4o.print("(");
  3910                 return_type_symbol->accept(*this);
  3910                 return_type_symbol->accept(*this);
  3937             if (IN_param_value == NULL)
  3937             if (IN_param_value == NULL)
  3938               IN_param_value = function_call_param_iterator.next();
  3938               IN_param_value = function_call_param_iterator.next();
  3939             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3939             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3940             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3940             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3941             
  3941             
  3942             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3942             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3943             {
  3943             {
  3944         
  3944         
  3945                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3945                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3946                 s4o.print("(");
  3946                 s4o.print("(");
  3947                 return_type_symbol->accept(*this);
  3947                 return_type_symbol->accept(*this);
  3974             if (IN_param_value == NULL)
  3974             if (IN_param_value == NULL)
  3975               IN_param_value = function_call_param_iterator.next();
  3975               IN_param_value = function_call_param_iterator.next();
  3976             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  3978             
  3979             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3979             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3980             {
  3980             {
  3981         
  3981         
  3982                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3982                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3983                 s4o.print("(");
  3983                 s4o.print("(");
  3984                 return_type_symbol->accept(*this);
  3984                 return_type_symbol->accept(*this);
  4011             if (IN_param_value == NULL)
  4011             if (IN_param_value == NULL)
  4012               IN_param_value = function_call_param_iterator.next();
  4012               IN_param_value = function_call_param_iterator.next();
  4013             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  4015             
  4016             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  4016             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  4017             {
  4017             {
  4018         
  4018         
  4019                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4019                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4020                 s4o.print("(");
  4020                 s4o.print("(");
  4021                 return_type_symbol->accept(*this);
  4021                 return_type_symbol->accept(*this);
  4047             if (IN_param_value == NULL)
  4047             if (IN_param_value == NULL)
  4048               IN_param_value = function_call_param_iterator.next();
  4048               IN_param_value = function_call_param_iterator.next();
  4049             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  4051             
  4052             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  4052             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  4053             {
  4053             {
  4054         
  4054         
  4055                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4055                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4056                 s4o.print("(");
  4056                 s4o.print("(");
  4057                 return_type_symbol->accept(*this);
  4057                 return_type_symbol->accept(*this);
  4083             if (IN_param_value == NULL)
  4083             if (IN_param_value == NULL)
  4084               IN_param_value = function_call_param_iterator.next();
  4084               IN_param_value = function_call_param_iterator.next();
  4085             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4085             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4086             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4086             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4087             
  4087             
  4088             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  4088             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  4089             {
  4089             {
  4090         
  4090         
  4091                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4091                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4092                 s4o.print("(");
  4092                 s4o.print("(");
  4093                 return_type_symbol->accept(*this);
  4093                 return_type_symbol->accept(*this);
  4119             if (IN_param_value == NULL)
  4119             if (IN_param_value == NULL)
  4120               IN_param_value = function_call_param_iterator.next();
  4120               IN_param_value = function_call_param_iterator.next();
  4121             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4121             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4122             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4122             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4123             
  4123             
  4124             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  4124             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  4125             {
  4125             {
  4126         
  4126         
  4127                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4127                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4128                 s4o.print("(");
  4128                 s4o.print("(");
  4129                 return_type_symbol->accept(*this);
  4129                 return_type_symbol->accept(*this);
  4155             if (IN_param_value == NULL)
  4155             if (IN_param_value == NULL)
  4156               IN_param_value = function_call_param_iterator.next();
  4156               IN_param_value = function_call_param_iterator.next();
  4157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4158             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4158             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4159             
  4159             
  4160             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4160             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4161             {
  4161             {
  4162         
  4162         
  4163                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4163                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4164                 s4o.print("(");
  4164                 s4o.print("(");
  4165                 return_type_symbol->accept(*this);
  4165                 return_type_symbol->accept(*this);
  4191             if (IN_param_value == NULL)
  4191             if (IN_param_value == NULL)
  4192               IN_param_value = function_call_param_iterator.next();
  4192               IN_param_value = function_call_param_iterator.next();
  4193             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4193             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4194             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4194             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4195             
  4195             
  4196             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4196             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4197             {
  4197             {
  4198         
  4198         
  4199                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4199                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4200                 s4o.print("(");
  4200                 s4o.print("(");
  4201                 return_type_symbol->accept(*this);
  4201                 return_type_symbol->accept(*this);
  4227             if (IN_param_value == NULL)
  4227             if (IN_param_value == NULL)
  4228               IN_param_value = function_call_param_iterator.next();
  4228               IN_param_value = function_call_param_iterator.next();
  4229             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4229             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4230             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4230             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4231             
  4231             
  4232             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4232             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4233             {
  4233             {
  4234         
  4234         
  4235                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4235                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4236                 s4o.print("(");
  4236                 s4o.print("(");
  4237                 return_type_symbol->accept(*this);
  4237                 return_type_symbol->accept(*this);
  4263             if (IN_param_value == NULL)
  4263             if (IN_param_value == NULL)
  4264               IN_param_value = function_call_param_iterator.next();
  4264               IN_param_value = function_call_param_iterator.next();
  4265             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4265             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4266             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4266             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4267             
  4267             
  4268             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4268             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4269             {
  4269             {
  4270         
  4270         
  4271                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4271                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4272                 s4o.print("(");
  4272                 s4o.print("(");
  4273                 return_type_symbol->accept(*this);
  4273                 return_type_symbol->accept(*this);
  4299             if (IN_param_value == NULL)
  4299             if (IN_param_value == NULL)
  4300               IN_param_value = function_call_param_iterator.next();
  4300               IN_param_value = function_call_param_iterator.next();
  4301             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4301             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4302             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4302             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4303             
  4303             
  4304             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4304             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4305             {
  4305             {
  4306         
  4306         
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4308                 s4o.print("(");
  4308                 s4o.print("(");
  4309                 return_type_symbol->accept(*this);
  4309                 return_type_symbol->accept(*this);
  4335             if (IN_param_value == NULL)
  4335             if (IN_param_value == NULL)
  4336               IN_param_value = function_call_param_iterator.next();
  4336               IN_param_value = function_call_param_iterator.next();
  4337             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4337             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4338             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4338             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4339             
  4339             
  4340             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4340             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4341             {
  4341             {
  4342         
  4342         
  4343                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4343                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4344                 s4o.print("(");
  4344                 s4o.print("(");
  4345                 return_type_symbol->accept(*this);
  4345                 return_type_symbol->accept(*this);
  4371             if (IN_param_value == NULL)
  4371             if (IN_param_value == NULL)
  4372               IN_param_value = function_call_param_iterator.next();
  4372               IN_param_value = function_call_param_iterator.next();
  4373             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4373             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4374             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4374             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4375             
  4375             
  4376             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4376             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4377             {
  4377             {
  4378         
  4378         
  4379                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  4379                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  4380                 s4o.print("(");
  4380                 s4o.print("(");
  4381                 return_type_symbol->accept(*this);
  4381                 return_type_symbol->accept(*this);
  4407             if (IN_param_value == NULL)
  4407             if (IN_param_value == NULL)
  4408               IN_param_value = function_call_param_iterator.next();
  4408               IN_param_value = function_call_param_iterator.next();
  4409             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4409             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4410             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4410             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4411             
  4411             
  4412             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4412             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4413             {
  4413             {
  4414         
  4414         
  4415                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  4415                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  4416                 s4o.print("(");
  4416                 s4o.print("(");
  4417                 return_type_symbol->accept(*this);
  4417                 return_type_symbol->accept(*this);
  4443             if (IN_param_value == NULL)
  4443             if (IN_param_value == NULL)
  4444               IN_param_value = function_call_param_iterator.next();
  4444               IN_param_value = function_call_param_iterator.next();
  4445             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4445             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4446             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4446             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4447             
  4447             
  4448             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4448             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4449             {
  4449             {
  4450         
  4450         
  4451                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4451                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4452                 s4o.print("(");
  4452                 s4o.print("(");
  4453                 return_type_symbol->accept(*this);
  4453                 return_type_symbol->accept(*this);
  4479             if (IN_param_value == NULL)
  4479             if (IN_param_value == NULL)
  4480               IN_param_value = function_call_param_iterator.next();
  4480               IN_param_value = function_call_param_iterator.next();
  4481             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4481             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4482             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4482             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4483             
  4483             
  4484             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4484             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4485             {
  4485             {
  4486         
  4486         
  4487                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  4487                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  4488                 s4o.print("(");
  4488                 s4o.print("(");
  4489                 return_type_symbol->accept(*this);
  4489                 return_type_symbol->accept(*this);
  4515             if (IN_param_value == NULL)
  4515             if (IN_param_value == NULL)
  4516               IN_param_value = function_call_param_iterator.next();
  4516               IN_param_value = function_call_param_iterator.next();
  4517             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4517             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4518             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4518             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4519             
  4519             
  4520             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4520             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4521             {
  4521             {
  4522         
  4522         
  4523                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4523                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4524                 s4o.print("(");
  4524                 s4o.print("(");
  4525                 return_type_symbol->accept(*this);
  4525                 return_type_symbol->accept(*this);
  4552             if (IN_param_value == NULL)
  4552             if (IN_param_value == NULL)
  4553               IN_param_value = function_call_param_iterator.next();
  4553               IN_param_value = function_call_param_iterator.next();
  4554             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4554             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4555             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4555             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4556             
  4556             
  4557             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4557             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4558             {
  4558             {
  4559         
  4559         
  4560                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4560                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4561                 s4o.print("(");
  4561                 s4o.print("(");
  4562                 return_type_symbol->accept(*this);
  4562                 return_type_symbol->accept(*this);
  4589             if (IN_param_value == NULL)
  4589             if (IN_param_value == NULL)
  4590               IN_param_value = function_call_param_iterator.next();
  4590               IN_param_value = function_call_param_iterator.next();
  4591             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4591             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4592             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4592             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4593             
  4593             
  4594             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4594             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4595             {
  4595             {
  4596         
  4596         
  4597                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4597                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4598                 s4o.print("(");
  4598                 s4o.print("(");
  4599                 return_type_symbol->accept(*this);
  4599                 return_type_symbol->accept(*this);
  4626             if (IN_param_value == NULL)
  4626             if (IN_param_value == NULL)
  4627               IN_param_value = function_call_param_iterator.next();
  4627               IN_param_value = function_call_param_iterator.next();
  4628             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4628             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4629             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4629             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4630             
  4630             
  4631             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4631             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4632             {
  4632             {
  4633         
  4633         
  4634                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4634                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4635                 s4o.print("(");
  4635                 s4o.print("(");
  4636                 return_type_symbol->accept(*this);
  4636                 return_type_symbol->accept(*this);
  4663             if (IN_param_value == NULL)
  4663             if (IN_param_value == NULL)
  4664               IN_param_value = function_call_param_iterator.next();
  4664               IN_param_value = function_call_param_iterator.next();
  4665             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4665             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4666             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4666             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4667             
  4667             
  4668             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4668             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4669             {
  4669             {
  4670         
  4670         
  4671                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4671                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4672                 s4o.print("(");
  4672                 s4o.print("(");
  4673                 return_type_symbol->accept(*this);
  4673                 return_type_symbol->accept(*this);
  4700             if (IN_param_value == NULL)
  4700             if (IN_param_value == NULL)
  4701               IN_param_value = function_call_param_iterator.next();
  4701               IN_param_value = function_call_param_iterator.next();
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4704             
  4704             
  4705             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4705             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4706             {
  4706             {
  4707         
  4707         
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4709                 s4o.print("(");
  4709                 s4o.print("(");
  4710                 return_type_symbol->accept(*this);
  4710                 return_type_symbol->accept(*this);
  4736             if (IN_param_value == NULL)
  4736             if (IN_param_value == NULL)
  4737               IN_param_value = function_call_param_iterator.next();
  4737               IN_param_value = function_call_param_iterator.next();
  4738             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4738             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4739             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4739             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4740             
  4740             
  4741             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4741             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4742             {
  4742             {
  4743         
  4743         
  4744                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4744                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4745                 s4o.print("(");
  4745                 s4o.print("(");
  4746                 return_type_symbol->accept(*this);
  4746                 return_type_symbol->accept(*this);
  4772             if (IN_param_value == NULL)
  4772             if (IN_param_value == NULL)
  4773               IN_param_value = function_call_param_iterator.next();
  4773               IN_param_value = function_call_param_iterator.next();
  4774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4776             
  4776             
  4777             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4777             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4778             {
  4778             {
  4779         
  4779         
  4780                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4780                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4781                 s4o.print("(");
  4781                 s4o.print("(");
  4782                 return_type_symbol->accept(*this);
  4782                 return_type_symbol->accept(*this);
  4808             if (IN_param_value == NULL)
  4808             if (IN_param_value == NULL)
  4809               IN_param_value = function_call_param_iterator.next();
  4809               IN_param_value = function_call_param_iterator.next();
  4810             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4810             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4811             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4811             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4812             
  4812             
  4813             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4813             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4814             {
  4814             {
  4815         
  4815         
  4816                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4816                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4817                 s4o.print("(");
  4817                 s4o.print("(");
  4818                 return_type_symbol->accept(*this);
  4818                 return_type_symbol->accept(*this);
  4844             if (IN_param_value == NULL)
  4844             if (IN_param_value == NULL)
  4845               IN_param_value = function_call_param_iterator.next();
  4845               IN_param_value = function_call_param_iterator.next();
  4846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4847             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4848             
  4848             
  4849             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4849             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4850             {
  4850             {
  4851         
  4851         
  4852                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4852                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4853                 s4o.print("(");
  4853                 s4o.print("(");
  4854                 return_type_symbol->accept(*this);
  4854                 return_type_symbol->accept(*this);
  4880             if (IN_param_value == NULL)
  4880             if (IN_param_value == NULL)
  4881               IN_param_value = function_call_param_iterator.next();
  4881               IN_param_value = function_call_param_iterator.next();
  4882             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4882             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4883             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4883             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4884             
  4884             
  4885             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4885             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4886             {
  4886             {
  4887         
  4887         
  4888                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4888                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4889                 s4o.print("(");
  4889                 s4o.print("(");
  4890                 return_type_symbol->accept(*this);
  4890                 return_type_symbol->accept(*this);
  4916             if (IN_param_value == NULL)
  4916             if (IN_param_value == NULL)
  4917               IN_param_value = function_call_param_iterator.next();
  4917               IN_param_value = function_call_param_iterator.next();
  4918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4920             
  4920             
  4921             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4921             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4922             {
  4922             {
  4923         
  4923         
  4924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4925                 s4o.print("(");
  4925                 s4o.print("(");
  4926                 return_type_symbol->accept(*this);
  4926                 return_type_symbol->accept(*this);
  4952             if (IN_param_value == NULL)
  4952             if (IN_param_value == NULL)
  4953               IN_param_value = function_call_param_iterator.next();
  4953               IN_param_value = function_call_param_iterator.next();
  4954             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4954             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4955             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4955             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4956             
  4956             
  4957             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4957             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4958             {
  4958             {
  4959         
  4959         
  4960                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4960                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4961                 s4o.print("(");
  4961                 s4o.print("(");
  4962                 return_type_symbol->accept(*this);
  4962                 return_type_symbol->accept(*this);
  4988             if (IN_param_value == NULL)
  4988             if (IN_param_value == NULL)
  4989               IN_param_value = function_call_param_iterator.next();
  4989               IN_param_value = function_call_param_iterator.next();
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4992             
  4992             
  4993             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4993             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4994             {
  4994             {
  4995         
  4995         
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4997                 s4o.print("(");
  4997                 s4o.print("(");
  4998                 return_type_symbol->accept(*this);
  4998                 return_type_symbol->accept(*this);
  5024             if (IN_param_value == NULL)
  5024             if (IN_param_value == NULL)
  5025               IN_param_value = function_call_param_iterator.next();
  5025               IN_param_value = function_call_param_iterator.next();
  5026             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  5028             
  5029             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5029             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5030             {
  5030             {
  5031         
  5031         
  5032                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5032                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5033                 s4o.print("(");
  5033                 s4o.print("(");
  5034                 return_type_symbol->accept(*this);
  5034                 return_type_symbol->accept(*this);
  5060             if (IN_param_value == NULL)
  5060             if (IN_param_value == NULL)
  5061               IN_param_value = function_call_param_iterator.next();
  5061               IN_param_value = function_call_param_iterator.next();
  5062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5064             
  5064             
  5065             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5065             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5066             {
  5066             {
  5067         
  5067         
  5068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5069                 s4o.print("(");
  5069                 s4o.print("(");
  5070                 return_type_symbol->accept(*this);
  5070                 return_type_symbol->accept(*this);
  5096             if (IN_param_value == NULL)
  5096             if (IN_param_value == NULL)
  5097               IN_param_value = function_call_param_iterator.next();
  5097               IN_param_value = function_call_param_iterator.next();
  5098             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5098             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5099             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5099             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5100             
  5100             
  5101             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5101             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5102             {
  5102             {
  5103         
  5103         
  5104                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  5104                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  5105                 s4o.print("(");
  5105                 s4o.print("(");
  5106                 return_type_symbol->accept(*this);
  5106                 return_type_symbol->accept(*this);
  5132             if (IN_param_value == NULL)
  5132             if (IN_param_value == NULL)
  5133               IN_param_value = function_call_param_iterator.next();
  5133               IN_param_value = function_call_param_iterator.next();
  5134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5136             
  5136             
  5137             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5137             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5138             {
  5138             {
  5139         
  5139         
  5140                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5140                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5141                 s4o.print("(");
  5141                 s4o.print("(");
  5142                 return_type_symbol->accept(*this);
  5142                 return_type_symbol->accept(*this);
  5168             if (IN_param_value == NULL)
  5168             if (IN_param_value == NULL)
  5169               IN_param_value = function_call_param_iterator.next();
  5169               IN_param_value = function_call_param_iterator.next();
  5170             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5170             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5171             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5171             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5172             
  5172             
  5173             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5173             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5174             {
  5174             {
  5175         
  5175         
  5176                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5176                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5177                 s4o.print("(");
  5177                 s4o.print("(");
  5178                 return_type_symbol->accept(*this);
  5178                 return_type_symbol->accept(*this);
  5204             if (IN_param_value == NULL)
  5204             if (IN_param_value == NULL)
  5205               IN_param_value = function_call_param_iterator.next();
  5205               IN_param_value = function_call_param_iterator.next();
  5206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5208             
  5208             
  5209             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5209             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5210             {
  5210             {
  5211         
  5211         
  5212                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5212                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5213                 s4o.print("(");
  5213                 s4o.print("(");
  5214                 return_type_symbol->accept(*this);
  5214                 return_type_symbol->accept(*this);
  5241             if (IN_param_value == NULL)
  5241             if (IN_param_value == NULL)
  5242               IN_param_value = function_call_param_iterator.next();
  5242               IN_param_value = function_call_param_iterator.next();
  5243             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5243             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5244             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5244             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5245             
  5245             
  5246             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5246             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5247             {
  5247             {
  5248         
  5248         
  5249                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5249                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5250                 s4o.print("(");
  5250                 s4o.print("(");
  5251                 return_type_symbol->accept(*this);
  5251                 return_type_symbol->accept(*this);
  5278             if (IN_param_value == NULL)
  5278             if (IN_param_value == NULL)
  5279               IN_param_value = function_call_param_iterator.next();
  5279               IN_param_value = function_call_param_iterator.next();
  5280             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5280             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5281             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5281             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5282             
  5282             
  5283             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5283             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5284             {
  5284             {
  5285         
  5285         
  5286                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5286                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5287                 s4o.print("(");
  5287                 s4o.print("(");
  5288                 return_type_symbol->accept(*this);
  5288                 return_type_symbol->accept(*this);
  5315             if (IN_param_value == NULL)
  5315             if (IN_param_value == NULL)
  5316               IN_param_value = function_call_param_iterator.next();
  5316               IN_param_value = function_call_param_iterator.next();
  5317             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5317             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5318             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5318             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5319             
  5319             
  5320             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5320             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5321             {
  5321             {
  5322         
  5322         
  5323                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5323                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5324                 s4o.print("(");
  5324                 s4o.print("(");
  5325                 return_type_symbol->accept(*this);
  5325                 return_type_symbol->accept(*this);
  5352             if (IN_param_value == NULL)
  5352             if (IN_param_value == NULL)
  5353               IN_param_value = function_call_param_iterator.next();
  5353               IN_param_value = function_call_param_iterator.next();
  5354             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5354             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5355             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5355             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5356             
  5356             
  5357             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5357             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5358             {
  5358             {
  5359         
  5359         
  5360                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5360                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5361                 s4o.print("(");
  5361                 s4o.print("(");
  5362                 return_type_symbol->accept(*this);
  5362                 return_type_symbol->accept(*this);
  5389             if (IN_param_value == NULL)
  5389             if (IN_param_value == NULL)
  5390               IN_param_value = function_call_param_iterator.next();
  5390               IN_param_value = function_call_param_iterator.next();
  5391             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5391             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5392             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5392             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5393             
  5393             
  5394             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5394             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5395             {
  5395             {
  5396         
  5396         
  5397                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5397                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5398                 s4o.print("(");
  5398                 s4o.print("(");
  5399                 return_type_symbol->accept(*this);
  5399                 return_type_symbol->accept(*this);
  5425             if (IN_param_value == NULL)
  5425             if (IN_param_value == NULL)
  5426               IN_param_value = function_call_param_iterator.next();
  5426               IN_param_value = function_call_param_iterator.next();
  5427             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5427             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5428             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5428             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5429             
  5429             
  5430             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5430             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5431             {
  5431             {
  5432         
  5432         
  5433                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  5433                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  5434                 s4o.print("(");
  5434                 s4o.print("(");
  5435                 return_type_symbol->accept(*this);
  5435                 return_type_symbol->accept(*this);
  5461             if (IN_param_value == NULL)
  5461             if (IN_param_value == NULL)
  5462               IN_param_value = function_call_param_iterator.next();
  5462               IN_param_value = function_call_param_iterator.next();
  5463             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5463             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5464             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5464             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5465             
  5465             
  5466             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5466             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5467             {
  5467             {
  5468         
  5468         
  5469                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  5469                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  5470                 s4o.print("(");
  5470                 s4o.print("(");
  5471                 return_type_symbol->accept(*this);
  5471                 return_type_symbol->accept(*this);
  5497             if (IN_param_value == NULL)
  5497             if (IN_param_value == NULL)
  5498               IN_param_value = function_call_param_iterator.next();
  5498               IN_param_value = function_call_param_iterator.next();
  5499             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5499             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5500             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5500             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5501             
  5501             
  5502             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  5502             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  5503             {
  5503             {
  5504         
  5504         
  5505                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  5505                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  5506                 s4o.print("(");
  5506                 s4o.print("(");
  5507                 return_type_symbol->accept(*this);
  5507                 return_type_symbol->accept(*this);
  5533             if (IN_param_value == NULL)
  5533             if (IN_param_value == NULL)
  5534               IN_param_value = function_call_param_iterator.next();
  5534               IN_param_value = function_call_param_iterator.next();
  5535             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5535             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5536             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5536             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5537             
  5537             
  5538             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5538             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5539             {
  5539             {
  5540         
  5540         
  5541                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  5541                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  5542                 s4o.print("(");
  5542                 s4o.print("(");
  5543                 return_type_symbol->accept(*this);
  5543                 return_type_symbol->accept(*this);
  5569             if (IN_param_value == NULL)
  5569             if (IN_param_value == NULL)
  5570               IN_param_value = function_call_param_iterator.next();
  5570               IN_param_value = function_call_param_iterator.next();
  5571             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5571             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5572             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5572             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5573             
  5573             
  5574             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5574             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5575             {
  5575             {
  5576         
  5576         
  5577                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  5577                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  5578                 s4o.print("(");
  5578                 s4o.print("(");
  5579                 return_type_symbol->accept(*this);
  5579                 return_type_symbol->accept(*this);
  5605             if (IN_param_value == NULL)
  5605             if (IN_param_value == NULL)
  5606               IN_param_value = function_call_param_iterator.next();
  5606               IN_param_value = function_call_param_iterator.next();
  5607             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5607             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5608             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5609             
  5609             
  5610             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5610             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5611             {
  5611             {
  5612         
  5612         
  5613                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  5613                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  5614                 s4o.print("(");
  5614                 s4o.print("(");
  5615                 return_type_symbol->accept(*this);
  5615                 return_type_symbol->accept(*this);
  5641             if (IN_param_value == NULL)
  5641             if (IN_param_value == NULL)
  5642               IN_param_value = function_call_param_iterator.next();
  5642               IN_param_value = function_call_param_iterator.next();
  5643             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5643             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5644             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5644             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5645             
  5645             
  5646             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5646             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5647             {
  5647             {
  5648         
  5648         
  5649                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  5649                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  5650                 s4o.print("(");
  5650                 s4o.print("(");
  5651                 return_type_symbol->accept(*this);
  5651                 return_type_symbol->accept(*this);
  5677             if (IN_param_value == NULL)
  5677             if (IN_param_value == NULL)
  5678               IN_param_value = function_call_param_iterator.next();
  5678               IN_param_value = function_call_param_iterator.next();
  5679             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5679             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5680             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5680             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5681             
  5681             
  5682             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5682             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5683             {
  5683             {
  5684         
  5684         
  5685                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5685                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5686                 s4o.print("(");
  5686                 s4o.print("(");
  5687                 return_type_symbol->accept(*this);
  5687                 return_type_symbol->accept(*this);
  5713             if (IN_param_value == NULL)
  5713             if (IN_param_value == NULL)
  5714               IN_param_value = function_call_param_iterator.next();
  5714               IN_param_value = function_call_param_iterator.next();
  5715             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5715             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5716             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5716             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5717             
  5717             
  5718             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5718             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5719             {
  5719             {
  5720         
  5720         
  5721                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5721                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5722                 s4o.print("(");
  5722                 s4o.print("(");
  5723                 return_type_symbol->accept(*this);
  5723                 return_type_symbol->accept(*this);
  5749             if (IN_param_value == NULL)
  5749             if (IN_param_value == NULL)
  5750               IN_param_value = function_call_param_iterator.next();
  5750               IN_param_value = function_call_param_iterator.next();
  5751             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5751             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5752             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5752             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5753             
  5753             
  5754             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5754             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5755             {
  5755             {
  5756         
  5756         
  5757                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5757                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5758                 s4o.print("(");
  5758                 s4o.print("(");
  5759                 return_type_symbol->accept(*this);
  5759                 return_type_symbol->accept(*this);
  5785             if (IN_param_value == NULL)
  5785             if (IN_param_value == NULL)
  5786               IN_param_value = function_call_param_iterator.next();
  5786               IN_param_value = function_call_param_iterator.next();
  5787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  5789             
  5790             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5790             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5791             {
  5791             {
  5792         
  5792         
  5793                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5793                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5794                 s4o.print("(");
  5794                 s4o.print("(");
  5795                 return_type_symbol->accept(*this);
  5795                 return_type_symbol->accept(*this);
  5821             if (IN_param_value == NULL)
  5821             if (IN_param_value == NULL)
  5822               IN_param_value = function_call_param_iterator.next();
  5822               IN_param_value = function_call_param_iterator.next();
  5823             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5823             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5824             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5824             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5825             
  5825             
  5826             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5826             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5827             {
  5827             {
  5828         
  5828         
  5829                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5829                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5830                 s4o.print("(");
  5830                 s4o.print("(");
  5831                 return_type_symbol->accept(*this);
  5831                 return_type_symbol->accept(*this);
  5857             if (IN_param_value == NULL)
  5857             if (IN_param_value == NULL)
  5858               IN_param_value = function_call_param_iterator.next();
  5858               IN_param_value = function_call_param_iterator.next();
  5859             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5859             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5860             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5860             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5861             
  5861             
  5862             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5862             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5863             {
  5863             {
  5864         
  5864         
  5865                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5865                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5866                 s4o.print("(");
  5866                 s4o.print("(");
  5867                 return_type_symbol->accept(*this);
  5867                 return_type_symbol->accept(*this);
  5893             if (IN_param_value == NULL)
  5893             if (IN_param_value == NULL)
  5894               IN_param_value = function_call_param_iterator.next();
  5894               IN_param_value = function_call_param_iterator.next();
  5895             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5895             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5896             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5896             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5897             
  5897             
  5898             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5898             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5899             {
  5899             {
  5900         
  5900         
  5901                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5901                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5902                 s4o.print("(");
  5902                 s4o.print("(");
  5903                 return_type_symbol->accept(*this);
  5903                 return_type_symbol->accept(*this);
  5930             if (IN_param_value == NULL)
  5930             if (IN_param_value == NULL)
  5931               IN_param_value = function_call_param_iterator.next();
  5931               IN_param_value = function_call_param_iterator.next();
  5932             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5932             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5933             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5933             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5934             
  5934             
  5935             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5935             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5936             {
  5936             {
  5937         
  5937         
  5938                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5938                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5939                 s4o.print("(");
  5939                 s4o.print("(");
  5940                 return_type_symbol->accept(*this);
  5940                 return_type_symbol->accept(*this);
  5967             if (IN_param_value == NULL)
  5967             if (IN_param_value == NULL)
  5968               IN_param_value = function_call_param_iterator.next();
  5968               IN_param_value = function_call_param_iterator.next();
  5969             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5969             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5970             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5970             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5971             
  5971             
  5972             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5972             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5973             {
  5973             {
  5974         
  5974         
  5975                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5975                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5976                 s4o.print("(");
  5976                 s4o.print("(");
  5977                 return_type_symbol->accept(*this);
  5977                 return_type_symbol->accept(*this);
  6004             if (IN_param_value == NULL)
  6004             if (IN_param_value == NULL)
  6005               IN_param_value = function_call_param_iterator.next();
  6005               IN_param_value = function_call_param_iterator.next();
  6006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6008             
  6008             
  6009             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6009             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6010             {
  6010             {
  6011         
  6011         
  6012                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6012                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6013                 s4o.print("(");
  6013                 s4o.print("(");
  6014                 return_type_symbol->accept(*this);
  6014                 return_type_symbol->accept(*this);
  6041             if (IN_param_value == NULL)
  6041             if (IN_param_value == NULL)
  6042               IN_param_value = function_call_param_iterator.next();
  6042               IN_param_value = function_call_param_iterator.next();
  6043             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6043             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6044             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6044             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6045             
  6045             
  6046             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6046             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6047             {
  6047             {
  6048         
  6048         
  6049                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6049                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6050                 s4o.print("(");
  6050                 s4o.print("(");
  6051                 return_type_symbol->accept(*this);
  6051                 return_type_symbol->accept(*this);
  6078             if (IN_param_value == NULL)
  6078             if (IN_param_value == NULL)
  6079               IN_param_value = function_call_param_iterator.next();
  6079               IN_param_value = function_call_param_iterator.next();
  6080             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6080             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6081             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6082             
  6082             
  6083             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6083             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6084             {
  6084             {
  6085         
  6085         
  6086                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6086                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6087                 s4o.print("(");
  6087                 s4o.print("(");
  6088                 return_type_symbol->accept(*this);
  6088                 return_type_symbol->accept(*this);
  6114             if (IN_param_value == NULL)
  6114             if (IN_param_value == NULL)
  6115               IN_param_value = function_call_param_iterator.next();
  6115               IN_param_value = function_call_param_iterator.next();
  6116             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6118             
  6119             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6119             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6120             {
  6120             {
  6121         
  6121         
  6122                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6122                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6123                 s4o.print("(");
  6123                 s4o.print("(");
  6124                 return_type_symbol->accept(*this);
  6124                 return_type_symbol->accept(*this);
  6150             if (IN_param_value == NULL)
  6150             if (IN_param_value == NULL)
  6151               IN_param_value = function_call_param_iterator.next();
  6151               IN_param_value = function_call_param_iterator.next();
  6152             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6154             
  6155             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6155             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6156             {
  6156             {
  6157         
  6157         
  6158                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6158                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6159                 s4o.print("(");
  6159                 s4o.print("(");
  6160                 return_type_symbol->accept(*this);
  6160                 return_type_symbol->accept(*this);
  6186             if (IN_param_value == NULL)
  6186             if (IN_param_value == NULL)
  6187               IN_param_value = function_call_param_iterator.next();
  6187               IN_param_value = function_call_param_iterator.next();
  6188             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6190             
  6191             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  6191             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  6192             {
  6192             {
  6193         
  6193         
  6194                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6194                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6195                 s4o.print("(");
  6195                 s4o.print("(");
  6196                 return_type_symbol->accept(*this);
  6196                 return_type_symbol->accept(*this);
  6222             if (IN_param_value == NULL)
  6222             if (IN_param_value == NULL)
  6223               IN_param_value = function_call_param_iterator.next();
  6223               IN_param_value = function_call_param_iterator.next();
  6224             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6226             
  6227             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6227             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6228             {
  6228             {
  6229         
  6229         
  6230                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6230                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6231                 s4o.print("(");
  6231                 s4o.print("(");
  6232                 return_type_symbol->accept(*this);
  6232                 return_type_symbol->accept(*this);
  6258             if (IN_param_value == NULL)
  6258             if (IN_param_value == NULL)
  6259               IN_param_value = function_call_param_iterator.next();
  6259               IN_param_value = function_call_param_iterator.next();
  6260             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6262             
  6263             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6263             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6264             {
  6264             {
  6265         
  6265         
  6266                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6266                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6267                 s4o.print("(");
  6267                 s4o.print("(");
  6268                 return_type_symbol->accept(*this);
  6268                 return_type_symbol->accept(*this);
  6294             if (IN_param_value == NULL)
  6294             if (IN_param_value == NULL)
  6295               IN_param_value = function_call_param_iterator.next();
  6295               IN_param_value = function_call_param_iterator.next();
  6296             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6296             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6297             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6297             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6298             
  6298             
  6299             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6299             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6300             {
  6300             {
  6301         
  6301         
  6302                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6302                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6303                 s4o.print("(");
  6303                 s4o.print("(");
  6304                 return_type_symbol->accept(*this);
  6304                 return_type_symbol->accept(*this);
  6330             if (IN_param_value == NULL)
  6330             if (IN_param_value == NULL)
  6331               IN_param_value = function_call_param_iterator.next();
  6331               IN_param_value = function_call_param_iterator.next();
  6332             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6332             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6333             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6333             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6334             
  6334             
  6335             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6335             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6336             {
  6336             {
  6337         
  6337         
  6338                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  6338                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  6339                 s4o.print("(");
  6339                 s4o.print("(");
  6340                 return_type_symbol->accept(*this);
  6340                 return_type_symbol->accept(*this);
  6366             if (IN_param_value == NULL)
  6366             if (IN_param_value == NULL)
  6367               IN_param_value = function_call_param_iterator.next();
  6367               IN_param_value = function_call_param_iterator.next();
  6368             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6368             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6369             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6369             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6370             
  6370             
  6371             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6371             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6372             {
  6372             {
  6373         
  6373         
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  6375                 s4o.print("(");
  6375                 s4o.print("(");
  6376                 return_type_symbol->accept(*this);
  6376                 return_type_symbol->accept(*this);
  6402             if (IN_param_value == NULL)
  6402             if (IN_param_value == NULL)
  6403               IN_param_value = function_call_param_iterator.next();
  6403               IN_param_value = function_call_param_iterator.next();
  6404             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6404             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6405             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6405             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6406             
  6406             
  6407             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6407             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6408             {
  6408             {
  6409         
  6409         
  6410                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  6410                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  6411                 s4o.print("(");
  6411                 s4o.print("(");
  6412                 return_type_symbol->accept(*this);
  6412                 return_type_symbol->accept(*this);
  6438             if (IN_param_value == NULL)
  6438             if (IN_param_value == NULL)
  6439               IN_param_value = function_call_param_iterator.next();
  6439               IN_param_value = function_call_param_iterator.next();
  6440             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6440             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6441             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6441             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6442             
  6442             
  6443             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6443             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6444             {
  6444             {
  6445         
  6445         
  6446                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  6446                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  6447                 s4o.print("(");
  6447                 s4o.print("(");
  6448                 return_type_symbol->accept(*this);
  6448                 return_type_symbol->accept(*this);
  6474             if (IN_param_value == NULL)
  6474             if (IN_param_value == NULL)
  6475               IN_param_value = function_call_param_iterator.next();
  6475               IN_param_value = function_call_param_iterator.next();
  6476             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6476             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6477             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6477             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6478             
  6478             
  6479             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6479             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6480             {
  6480             {
  6481         
  6481         
  6482                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  6482                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  6483                 s4o.print("(");
  6483                 s4o.print("(");
  6484                 return_type_symbol->accept(*this);
  6484                 return_type_symbol->accept(*this);
  6510             if (IN_param_value == NULL)
  6510             if (IN_param_value == NULL)
  6511               IN_param_value = function_call_param_iterator.next();
  6511               IN_param_value = function_call_param_iterator.next();
  6512             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6512             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6513             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6513             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6514             
  6514             
  6515             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6515             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6516             {
  6516             {
  6517         
  6517         
  6518                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6518                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6519                 s4o.print("(");
  6519                 s4o.print("(");
  6520                 return_type_symbol->accept(*this);
  6520                 return_type_symbol->accept(*this);
  6546             if (IN_param_value == NULL)
  6546             if (IN_param_value == NULL)
  6547               IN_param_value = function_call_param_iterator.next();
  6547               IN_param_value = function_call_param_iterator.next();
  6548             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6548             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6549             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6549             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6550             
  6550             
  6551             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6551             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6552             {
  6552             {
  6553         
  6553         
  6554                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  6554                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  6555                 s4o.print("(");
  6555                 s4o.print("(");
  6556                 return_type_symbol->accept(*this);
  6556                 return_type_symbol->accept(*this);
  6582             if (IN_param_value == NULL)
  6582             if (IN_param_value == NULL)
  6583               IN_param_value = function_call_param_iterator.next();
  6583               IN_param_value = function_call_param_iterator.next();
  6584             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6584             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6585             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6585             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6586             
  6586             
  6587             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6587             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6588             {
  6588             {
  6589         
  6589         
  6590                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  6590                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  6591                 s4o.print("(");
  6591                 s4o.print("(");
  6592                 return_type_symbol->accept(*this);
  6592                 return_type_symbol->accept(*this);
  6619             if (IN_param_value == NULL)
  6619             if (IN_param_value == NULL)
  6620               IN_param_value = function_call_param_iterator.next();
  6620               IN_param_value = function_call_param_iterator.next();
  6621             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6621             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6622             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6622             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6623             
  6623             
  6624             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6624             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6625             {
  6625             {
  6626         
  6626         
  6627                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  6627                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  6628                 s4o.print("(");
  6628                 s4o.print("(");
  6629                 return_type_symbol->accept(*this);
  6629                 return_type_symbol->accept(*this);
  6656             if (IN_param_value == NULL)
  6656             if (IN_param_value == NULL)
  6657               IN_param_value = function_call_param_iterator.next();
  6657               IN_param_value = function_call_param_iterator.next();
  6658             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6658             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6659             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6659             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6660             
  6660             
  6661             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6661             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6662             {
  6662             {
  6663         
  6663         
  6664                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  6664                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  6665                 s4o.print("(");
  6665                 s4o.print("(");
  6666                 return_type_symbol->accept(*this);
  6666                 return_type_symbol->accept(*this);
  6693             if (IN_param_value == NULL)
  6693             if (IN_param_value == NULL)
  6694               IN_param_value = function_call_param_iterator.next();
  6694               IN_param_value = function_call_param_iterator.next();
  6695             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6695             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6696             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6696             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6697             
  6697             
  6698             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6698             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6699             {
  6699             {
  6700         
  6700         
  6701                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6701                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6702                 s4o.print("(");
  6702                 s4o.print("(");
  6703                 return_type_symbol->accept(*this);
  6703                 return_type_symbol->accept(*this);
  6730             if (IN_param_value == NULL)
  6730             if (IN_param_value == NULL)
  6731               IN_param_value = function_call_param_iterator.next();
  6731               IN_param_value = function_call_param_iterator.next();
  6732             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6732             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6733             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6733             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6734             
  6734             
  6735             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6735             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6736             {
  6736             {
  6737         
  6737         
  6738                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6738                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6739                 s4o.print("(");
  6739                 s4o.print("(");
  6740                 return_type_symbol->accept(*this);
  6740                 return_type_symbol->accept(*this);
  6767             if (IN_param_value == NULL)
  6767             if (IN_param_value == NULL)
  6768               IN_param_value = function_call_param_iterator.next();
  6768               IN_param_value = function_call_param_iterator.next();
  6769             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6771             
  6772             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6772             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6773             {
  6773             {
  6774         
  6774         
  6775                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6775                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6776                 s4o.print("(");
  6776                 s4o.print("(");
  6777                 return_type_symbol->accept(*this);
  6777                 return_type_symbol->accept(*this);
  6803             if (IN_param_value == NULL)
  6803             if (IN_param_value == NULL)
  6804               IN_param_value = function_call_param_iterator.next();
  6804               IN_param_value = function_call_param_iterator.next();
  6805             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6807             
  6808             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6808             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6809             {
  6809             {
  6810         
  6810         
  6811                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6811                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6812                 s4o.print("(");
  6812                 s4o.print("(");
  6813                 return_type_symbol->accept(*this);
  6813                 return_type_symbol->accept(*this);
  6839             if (IN_param_value == NULL)
  6839             if (IN_param_value == NULL)
  6840               IN_param_value = function_call_param_iterator.next();
  6840               IN_param_value = function_call_param_iterator.next();
  6841             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6841             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6842             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6842             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6843             
  6843             
  6844             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6844             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6845             {
  6845             {
  6846         
  6846         
  6847                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6847                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6848                 s4o.print("(");
  6848                 s4o.print("(");
  6849                 return_type_symbol->accept(*this);
  6849                 return_type_symbol->accept(*this);
  6875             if (IN_param_value == NULL)
  6875             if (IN_param_value == NULL)
  6876               IN_param_value = function_call_param_iterator.next();
  6876               IN_param_value = function_call_param_iterator.next();
  6877             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6877             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6878             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6878             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6879             
  6879             
  6880             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6880             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6881             {
  6881             {
  6882         
  6882         
  6883                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6883                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6884                 s4o.print("(");
  6884                 s4o.print("(");
  6885                 return_type_symbol->accept(*this);
  6885                 return_type_symbol->accept(*this);
  6911             if (IN_param_value == NULL)
  6911             if (IN_param_value == NULL)
  6912               IN_param_value = function_call_param_iterator.next();
  6912               IN_param_value = function_call_param_iterator.next();
  6913             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6913             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6914             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6914             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6915             
  6915             
  6916             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6916             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6917             {
  6917             {
  6918         
  6918         
  6919                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6919                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6920                 s4o.print("(");
  6920                 s4o.print("(");
  6921                 return_type_symbol->accept(*this);
  6921                 return_type_symbol->accept(*this);
  6947             if (IN_param_value == NULL)
  6947             if (IN_param_value == NULL)
  6948               IN_param_value = function_call_param_iterator.next();
  6948               IN_param_value = function_call_param_iterator.next();
  6949             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6949             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6950             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6950             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6951             
  6951             
  6952             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6952             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6953             {
  6953             {
  6954         
  6954         
  6955                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6955                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6956                 s4o.print("(");
  6956                 s4o.print("(");
  6957                 return_type_symbol->accept(*this);
  6957                 return_type_symbol->accept(*this);
  6983             if (IN_param_value == NULL)
  6983             if (IN_param_value == NULL)
  6984               IN_param_value = function_call_param_iterator.next();
  6984               IN_param_value = function_call_param_iterator.next();
  6985             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6985             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6986             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6986             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6987             
  6987             
  6988             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6988             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6989             {
  6989             {
  6990         
  6990         
  6991                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6991                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6992                 s4o.print("(");
  6992                 s4o.print("(");
  6993                 return_type_symbol->accept(*this);
  6993                 return_type_symbol->accept(*this);
  7019             if (IN_param_value == NULL)
  7019             if (IN_param_value == NULL)
  7020               IN_param_value = function_call_param_iterator.next();
  7020               IN_param_value = function_call_param_iterator.next();
  7021             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7021             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7022             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7022             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7023             
  7023             
  7024             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7024             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7025             {
  7025             {
  7026         
  7026         
  7027                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  7027                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  7028                 s4o.print("(");
  7028                 s4o.print("(");
  7029                 return_type_symbol->accept(*this);
  7029                 return_type_symbol->accept(*this);
  7055             if (IN_param_value == NULL)
  7055             if (IN_param_value == NULL)
  7056               IN_param_value = function_call_param_iterator.next();
  7056               IN_param_value = function_call_param_iterator.next();
  7057             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7057             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7058             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7058             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7059             
  7059             
  7060             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7060             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7061             {
  7061             {
  7062         
  7062         
  7063                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  7063                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  7064                 s4o.print("(");
  7064                 s4o.print("(");
  7065                 return_type_symbol->accept(*this);
  7065                 return_type_symbol->accept(*this);
  7091             if (IN_param_value == NULL)
  7091             if (IN_param_value == NULL)
  7092               IN_param_value = function_call_param_iterator.next();
  7092               IN_param_value = function_call_param_iterator.next();
  7093             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7093             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7094             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7094             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7095             
  7095             
  7096             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7096             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7097             {
  7097             {
  7098         
  7098         
  7099                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  7099                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  7100                 s4o.print("(");
  7100                 s4o.print("(");
  7101                 return_type_symbol->accept(*this);
  7101                 return_type_symbol->accept(*this);
  7127             if (IN_param_value == NULL)
  7127             if (IN_param_value == NULL)
  7128               IN_param_value = function_call_param_iterator.next();
  7128               IN_param_value = function_call_param_iterator.next();
  7129             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7129             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7130             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7130             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7131             
  7131             
  7132             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7132             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7133             {
  7133             {
  7134         
  7134         
  7135                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  7135                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  7136                 s4o.print("(");
  7136                 s4o.print("(");
  7137                 return_type_symbol->accept(*this);
  7137                 return_type_symbol->accept(*this);
  7163             if (IN_param_value == NULL)
  7163             if (IN_param_value == NULL)
  7164               IN_param_value = function_call_param_iterator.next();
  7164               IN_param_value = function_call_param_iterator.next();
  7165             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7165             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7166             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7166             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7167             
  7167             
  7168             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7168             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7169             {
  7169             {
  7170         
  7170         
  7171                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  7171                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  7172                 s4o.print("(");
  7172                 s4o.print("(");
  7173                 return_type_symbol->accept(*this);
  7173                 return_type_symbol->accept(*this);
  7199             if (IN_param_value == NULL)
  7199             if (IN_param_value == NULL)
  7200               IN_param_value = function_call_param_iterator.next();
  7200               IN_param_value = function_call_param_iterator.next();
  7201             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7201             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7202             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7202             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7203             
  7203             
  7204             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7204             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7205             {
  7205             {
  7206         
  7206         
  7207                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  7207                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  7208                 s4o.print("(");
  7208                 s4o.print("(");
  7209                 return_type_symbol->accept(*this);
  7209                 return_type_symbol->accept(*this);
  7235             if (IN_param_value == NULL)
  7235             if (IN_param_value == NULL)
  7236               IN_param_value = function_call_param_iterator.next();
  7236               IN_param_value = function_call_param_iterator.next();
  7237             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7237             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7238             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7238             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7239             
  7239             
  7240             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7240             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7241             {
  7241             {
  7242         
  7242         
  7243                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  7243                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  7244                 s4o.print("(");
  7244                 s4o.print("(");
  7245                 return_type_symbol->accept(*this);
  7245                 return_type_symbol->accept(*this);
  7271             if (IN_param_value == NULL)
  7271             if (IN_param_value == NULL)
  7272               IN_param_value = function_call_param_iterator.next();
  7272               IN_param_value = function_call_param_iterator.next();
  7273             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7273             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7274             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7274             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7275             
  7275             
  7276             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7276             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7277             {
  7277             {
  7278         
  7278         
  7279                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  7279                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  7280                 s4o.print("(");
  7280                 s4o.print("(");
  7281                 return_type_symbol->accept(*this);
  7281                 return_type_symbol->accept(*this);
  7308             if (IN_param_value == NULL)
  7308             if (IN_param_value == NULL)
  7309               IN_param_value = function_call_param_iterator.next();
  7309               IN_param_value = function_call_param_iterator.next();
  7310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7312             
  7312             
  7313             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7313             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7314             {
  7314             {
  7315         
  7315         
  7316                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  7316                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  7317                 s4o.print("(");
  7317                 s4o.print("(");
  7318                 return_type_symbol->accept(*this);
  7318                 return_type_symbol->accept(*this);
  7345             if (IN_param_value == NULL)
  7345             if (IN_param_value == NULL)
  7346               IN_param_value = function_call_param_iterator.next();
  7346               IN_param_value = function_call_param_iterator.next();
  7347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7349             
  7349             
  7350             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7350             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7351             {
  7351             {
  7352         
  7352         
  7353                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  7353                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  7354                 s4o.print("(");
  7354                 s4o.print("(");
  7355                 return_type_symbol->accept(*this);
  7355                 return_type_symbol->accept(*this);
  7382             if (IN_param_value == NULL)
  7382             if (IN_param_value == NULL)
  7383               IN_param_value = function_call_param_iterator.next();
  7383               IN_param_value = function_call_param_iterator.next();
  7384             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7384             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7385             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7385             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7386             
  7386             
  7387             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7387             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7388             {
  7388             {
  7389         
  7389         
  7390                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  7390                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  7391                 s4o.print("(");
  7391                 s4o.print("(");
  7392                 return_type_symbol->accept(*this);
  7392                 return_type_symbol->accept(*this);
  7419             if (IN_param_value == NULL)
  7419             if (IN_param_value == NULL)
  7420               IN_param_value = function_call_param_iterator.next();
  7420               IN_param_value = function_call_param_iterator.next();
  7421             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7421             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7422             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7422             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7423             
  7423             
  7424             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7424             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7425             {
  7425             {
  7426         
  7426         
  7427                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  7427                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  7428                 s4o.print("(");
  7428                 s4o.print("(");
  7429                 return_type_symbol->accept(*this);
  7429                 return_type_symbol->accept(*this);
  7456             if (IN_param_value == NULL)
  7456             if (IN_param_value == NULL)
  7457               IN_param_value = function_call_param_iterator.next();
  7457               IN_param_value = function_call_param_iterator.next();
  7458             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7458             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7459             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7459             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7460             
  7460             
  7461             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7461             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7462             {
  7462             {
  7463         
  7463         
  7464                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  7464                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  7465                 s4o.print("(");
  7465                 s4o.print("(");
  7466                 return_type_symbol->accept(*this);
  7466                 return_type_symbol->accept(*this);
  7492             if (IN_param_value == NULL)
  7492             if (IN_param_value == NULL)
  7493               IN_param_value = function_call_param_iterator.next();
  7493               IN_param_value = function_call_param_iterator.next();
  7494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7496             
  7496             
  7497             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7497             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7498             {
  7498             {
  7499         
  7499         
  7500                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  7500                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  7501                 s4o.print("(");
  7501                 s4o.print("(");
  7502                 return_type_symbol->accept(*this);
  7502                 return_type_symbol->accept(*this);
  7528             if (IN_param_value == NULL)
  7528             if (IN_param_value == NULL)
  7529               IN_param_value = function_call_param_iterator.next();
  7529               IN_param_value = function_call_param_iterator.next();
  7530             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7530             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7531             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7531             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7532             
  7532             
  7533             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7533             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7534             {
  7534             {
  7535         
  7535         
  7536                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  7536                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  7537                 s4o.print("(");
  7537                 s4o.print("(");
  7538                 return_type_symbol->accept(*this);
  7538                 return_type_symbol->accept(*this);
  7564             if (IN_param_value == NULL)
  7564             if (IN_param_value == NULL)
  7565               IN_param_value = function_call_param_iterator.next();
  7565               IN_param_value = function_call_param_iterator.next();
  7566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7568             
  7568             
  7569             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7569             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  7570             {
  7570             {
  7571         
  7571         
  7572                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  7572                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  7573                 s4o.print("(");
  7573                 s4o.print("(");
  7574                 return_type_symbol->accept(*this);
  7574                 return_type_symbol->accept(*this);
  7583         
  7583         
  7584     }/*function_lreal_to_lword*/
  7584     }/*function_lreal_to_lword*/
  7585     break;
  7585     break;
  7586 
  7586 
  7587 /****
  7587 /****
  7588  *TIME_TO_BOOL
  7588  *TIME_TO_SINT
  7589  */
  7589  */
  7590     case function_time_to_bool :
  7590     case function_time_to_sint :
  7591     {
  7591     {
  7592         symbol_c *last_type_symbol = NULL;
  7592         symbol_c *last_type_symbol = NULL;
  7593 
  7593 
  7594         {
  7594         {
  7595             identifier_c param_name("IN");
  7595             identifier_c param_name("IN");
  7596             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7596             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7597             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7597             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7598             
  7598             
  7599             /* Get the value from a foo(<param_value>) style call */
  7599             /* Get the value from a foo(<param_value>) style call */
  7600             if (IN_param_value == NULL)
  7600             if (IN_param_value == NULL)
  7601               IN_param_value = function_call_param_iterator.next();
  7601               IN_param_value = function_call_param_iterator.next();
  7602             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7602             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7603             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7603             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7604             
  7604             
  7605             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  7605             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7606             {
       
  7607         
       
  7608                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7609                 s4o.print("(");
       
  7610                 return_type_symbol->accept(*this);
       
  7611                 s4o.print(")__time_to_int(");
       
  7612                 IN_param_value->accept(*this);
       
  7613                 s4o.print(")");
       
  7614                 return NULL;
       
  7615                 
       
  7616             }
       
  7617             
       
  7618             ERROR;
       
  7619         }
       
  7620         
       
  7621     }/*function_time_to_sint*/
       
  7622     break;
       
  7623 
       
  7624 /****
       
  7625  *TIME_TO_INT
       
  7626  */
       
  7627     case function_time_to_int :
       
  7628     {
       
  7629         symbol_c *last_type_symbol = NULL;
       
  7630 
       
  7631         {
       
  7632             identifier_c param_name("IN");
       
  7633             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7634             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7635             
       
  7636             /* Get the value from a foo(<param_value>) style call */
       
  7637             if (IN_param_value == NULL)
       
  7638               IN_param_value = function_call_param_iterator.next();
       
  7639             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7640             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7641             
       
  7642             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7643             {
       
  7644         
       
  7645                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7646                 s4o.print("(");
       
  7647                 return_type_symbol->accept(*this);
       
  7648                 s4o.print(")__time_to_int(");
       
  7649                 IN_param_value->accept(*this);
       
  7650                 s4o.print(")");
       
  7651                 return NULL;
       
  7652                 
       
  7653             }
       
  7654             
       
  7655             ERROR;
       
  7656         }
       
  7657         
       
  7658     }/*function_time_to_int*/
       
  7659     break;
       
  7660 
       
  7661 /****
       
  7662  *TIME_TO_DINT
       
  7663  */
       
  7664     case function_time_to_dint :
       
  7665     {
       
  7666         symbol_c *last_type_symbol = NULL;
       
  7667 
       
  7668         {
       
  7669             identifier_c param_name("IN");
       
  7670             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7671             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7672             
       
  7673             /* Get the value from a foo(<param_value>) style call */
       
  7674             if (IN_param_value == NULL)
       
  7675               IN_param_value = function_call_param_iterator.next();
       
  7676             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7677             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7678             
       
  7679             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7680             {
       
  7681         
       
  7682                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7683                 s4o.print("(");
       
  7684                 return_type_symbol->accept(*this);
       
  7685                 s4o.print(")__time_to_int(");
       
  7686                 IN_param_value->accept(*this);
       
  7687                 s4o.print(")");
       
  7688                 return NULL;
       
  7689                 
       
  7690             }
       
  7691             
       
  7692             ERROR;
       
  7693         }
       
  7694         
       
  7695     }/*function_time_to_dint*/
       
  7696     break;
       
  7697 
       
  7698 /****
       
  7699  *TIME_TO_LINT
       
  7700  */
       
  7701     case function_time_to_lint :
       
  7702     {
       
  7703         symbol_c *last_type_symbol = NULL;
       
  7704 
       
  7705         {
       
  7706             identifier_c param_name("IN");
       
  7707             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7708             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7709             
       
  7710             /* Get the value from a foo(<param_value>) style call */
       
  7711             if (IN_param_value == NULL)
       
  7712               IN_param_value = function_call_param_iterator.next();
       
  7713             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7714             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7715             
       
  7716             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7717             {
       
  7718         
       
  7719                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7720                 s4o.print("(");
       
  7721                 return_type_symbol->accept(*this);
       
  7722                 s4o.print(")__time_to_int(");
       
  7723                 IN_param_value->accept(*this);
       
  7724                 s4o.print(")");
       
  7725                 return NULL;
       
  7726                 
       
  7727             }
       
  7728             
       
  7729             ERROR;
       
  7730         }
       
  7731         
       
  7732     }/*function_time_to_lint*/
       
  7733     break;
       
  7734 
       
  7735 /****
       
  7736  *TIME_TO_USINT
       
  7737  */
       
  7738     case function_time_to_usint :
       
  7739     {
       
  7740         symbol_c *last_type_symbol = NULL;
       
  7741 
       
  7742         {
       
  7743             identifier_c param_name("IN");
       
  7744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7746             
       
  7747             /* Get the value from a foo(<param_value>) style call */
       
  7748             if (IN_param_value == NULL)
       
  7749               IN_param_value = function_call_param_iterator.next();
       
  7750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7752             
       
  7753             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7754             {
       
  7755         
       
  7756                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7757                 s4o.print("(");
       
  7758                 return_type_symbol->accept(*this);
       
  7759                 s4o.print(")__time_to_int(");
       
  7760                 IN_param_value->accept(*this);
       
  7761                 s4o.print(")");
       
  7762                 return NULL;
       
  7763                 
       
  7764             }
       
  7765             
       
  7766             ERROR;
       
  7767         }
       
  7768         
       
  7769     }/*function_time_to_usint*/
       
  7770     break;
       
  7771 
       
  7772 /****
       
  7773  *TIME_TO_UINT
       
  7774  */
       
  7775     case function_time_to_uint :
       
  7776     {
       
  7777         symbol_c *last_type_symbol = NULL;
       
  7778 
       
  7779         {
       
  7780             identifier_c param_name("IN");
       
  7781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7782             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7783             
       
  7784             /* Get the value from a foo(<param_value>) style call */
       
  7785             if (IN_param_value == NULL)
       
  7786               IN_param_value = function_call_param_iterator.next();
       
  7787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7788             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7789             
       
  7790             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7791             {
       
  7792         
       
  7793                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7794                 s4o.print("(");
       
  7795                 return_type_symbol->accept(*this);
       
  7796                 s4o.print(")__time_to_int(");
       
  7797                 IN_param_value->accept(*this);
       
  7798                 s4o.print(")");
       
  7799                 return NULL;
       
  7800                 
       
  7801             }
       
  7802             
       
  7803             ERROR;
       
  7804         }
       
  7805         
       
  7806     }/*function_time_to_uint*/
       
  7807     break;
       
  7808 
       
  7809 /****
       
  7810  *TIME_TO_UDINT
       
  7811  */
       
  7812     case function_time_to_udint :
       
  7813     {
       
  7814         symbol_c *last_type_symbol = NULL;
       
  7815 
       
  7816         {
       
  7817             identifier_c param_name("IN");
       
  7818             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7819             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7820             
       
  7821             /* Get the value from a foo(<param_value>) style call */
       
  7822             if (IN_param_value == NULL)
       
  7823               IN_param_value = function_call_param_iterator.next();
       
  7824             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7825             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7826             
       
  7827             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7828             {
       
  7829         
       
  7830                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7831                 s4o.print("(");
       
  7832                 return_type_symbol->accept(*this);
       
  7833                 s4o.print(")__time_to_int(");
       
  7834                 IN_param_value->accept(*this);
       
  7835                 s4o.print(")");
       
  7836                 return NULL;
       
  7837                 
       
  7838             }
       
  7839             
       
  7840             ERROR;
       
  7841         }
       
  7842         
       
  7843     }/*function_time_to_udint*/
       
  7844     break;
       
  7845 
       
  7846 /****
       
  7847  *TIME_TO_ULINT
       
  7848  */
       
  7849     case function_time_to_ulint :
       
  7850     {
       
  7851         symbol_c *last_type_symbol = NULL;
       
  7852 
       
  7853         {
       
  7854             identifier_c param_name("IN");
       
  7855             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7856             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7857             
       
  7858             /* Get the value from a foo(<param_value>) style call */
       
  7859             if (IN_param_value == NULL)
       
  7860               IN_param_value = function_call_param_iterator.next();
       
  7861             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7862             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7863             
       
  7864             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7865             {
       
  7866         
       
  7867                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7868                 s4o.print("(");
       
  7869                 return_type_symbol->accept(*this);
       
  7870                 s4o.print(")__time_to_int(");
       
  7871                 IN_param_value->accept(*this);
       
  7872                 s4o.print(")");
       
  7873                 return NULL;
       
  7874                 
       
  7875             }
       
  7876             
       
  7877             ERROR;
       
  7878         }
       
  7879         
       
  7880     }/*function_time_to_ulint*/
       
  7881     break;
       
  7882 
       
  7883 /****
       
  7884  *TIME_TO_REAL
       
  7885  */
       
  7886     case function_time_to_real :
       
  7887     {
       
  7888         symbol_c *last_type_symbol = NULL;
       
  7889 
       
  7890         {
       
  7891             identifier_c param_name("IN");
       
  7892             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7893             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7894             
       
  7895             /* Get the value from a foo(<param_value>) style call */
       
  7896             if (IN_param_value == NULL)
       
  7897               IN_param_value = function_call_param_iterator.next();
       
  7898             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7899             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7900             
       
  7901             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7902             {
       
  7903         
       
  7904                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7905                 s4o.print("(");
       
  7906                 return_type_symbol->accept(*this);
       
  7907                 s4o.print(")__time_to_real(");
       
  7908                 IN_param_value->accept(*this);
       
  7909                 s4o.print(")");
       
  7910                 return NULL;
       
  7911                 
       
  7912             }
       
  7913             
       
  7914             ERROR;
       
  7915         }
       
  7916         
       
  7917     }/*function_time_to_real*/
       
  7918     break;
       
  7919 
       
  7920 /****
       
  7921  *TIME_TO_LREAL
       
  7922  */
       
  7923     case function_time_to_lreal :
       
  7924     {
       
  7925         symbol_c *last_type_symbol = NULL;
       
  7926 
       
  7927         {
       
  7928             identifier_c param_name("IN");
       
  7929             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7930             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7931             
       
  7932             /* Get the value from a foo(<param_value>) style call */
       
  7933             if (IN_param_value == NULL)
       
  7934               IN_param_value = function_call_param_iterator.next();
       
  7935             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7936             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7937             
       
  7938             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7939             {
       
  7940         
       
  7941                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7942                 s4o.print("(");
       
  7943                 return_type_symbol->accept(*this);
       
  7944                 s4o.print(")__time_to_real(");
       
  7945                 IN_param_value->accept(*this);
       
  7946                 s4o.print(")");
       
  7947                 return NULL;
       
  7948                 
       
  7949             }
       
  7950             
       
  7951             ERROR;
       
  7952         }
       
  7953         
       
  7954     }/*function_time_to_lreal*/
       
  7955     break;
       
  7956 
       
  7957 /****
       
  7958  *TIME_TO_STRING
       
  7959  */
       
  7960     case function_time_to_string :
       
  7961     {
       
  7962         symbol_c *last_type_symbol = NULL;
       
  7963 
       
  7964         {
       
  7965             identifier_c param_name("IN");
       
  7966             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7967             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7968             
       
  7969             /* Get the value from a foo(<param_value>) style call */
       
  7970             if (IN_param_value == NULL)
       
  7971               IN_param_value = function_call_param_iterator.next();
       
  7972             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7973             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7974             
       
  7975             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7976             {
       
  7977         
       
  7978                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7979                 s4o.print("(");
       
  7980                 return_type_symbol->accept(*this);
       
  7981                 s4o.print(")__time_to_string(");
       
  7982                 IN_param_value->accept(*this);
       
  7983                 s4o.print(")");
       
  7984                 return NULL;
       
  7985                 
       
  7986             }
       
  7987             
       
  7988             ERROR;
       
  7989         }
       
  7990         
       
  7991     }/*function_time_to_string*/
       
  7992     break;
       
  7993 
       
  7994 /****
       
  7995  *TIME_TO_BYTE
       
  7996  */
       
  7997     case function_time_to_byte :
       
  7998     {
       
  7999         symbol_c *last_type_symbol = NULL;
       
  8000 
       
  8001         {
       
  8002             identifier_c param_name("IN");
       
  8003             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8004             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8005             
       
  8006             /* Get the value from a foo(<param_value>) style call */
       
  8007             if (IN_param_value == NULL)
       
  8008               IN_param_value = function_call_param_iterator.next();
       
  8009             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8010             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8011             
       
  8012             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  8013             {
       
  8014         
       
  8015                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8016                 s4o.print("(");
       
  8017                 return_type_symbol->accept(*this);
       
  8018                 s4o.print(")__time_to_int(");
       
  8019                 IN_param_value->accept(*this);
       
  8020                 s4o.print(")");
       
  8021                 return NULL;
       
  8022                 
       
  8023             }
       
  8024             
       
  8025             ERROR;
       
  8026         }
       
  8027         
       
  8028     }/*function_time_to_byte*/
       
  8029     break;
       
  8030 
       
  8031 /****
       
  8032  *TIME_TO_WORD
       
  8033  */
       
  8034     case function_time_to_word :
       
  8035     {
       
  8036         symbol_c *last_type_symbol = NULL;
       
  8037 
       
  8038         {
       
  8039             identifier_c param_name("IN");
       
  8040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8042             
       
  8043             /* Get the value from a foo(<param_value>) style call */
       
  8044             if (IN_param_value == NULL)
       
  8045               IN_param_value = function_call_param_iterator.next();
       
  8046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8048             
       
  8049             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  8050             {
       
  8051         
       
  8052                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8053                 s4o.print("(");
       
  8054                 return_type_symbol->accept(*this);
       
  8055                 s4o.print(")__time_to_int(");
       
  8056                 IN_param_value->accept(*this);
       
  8057                 s4o.print(")");
       
  8058                 return NULL;
       
  8059                 
       
  8060             }
       
  8061             
       
  8062             ERROR;
       
  8063         }
       
  8064         
       
  8065     }/*function_time_to_word*/
       
  8066     break;
       
  8067 
       
  8068 /****
       
  8069  *TIME_TO_DWORD
       
  8070  */
       
  8071     case function_time_to_dword :
       
  8072     {
       
  8073         symbol_c *last_type_symbol = NULL;
       
  8074 
       
  8075         {
       
  8076             identifier_c param_name("IN");
       
  8077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8079             
       
  8080             /* Get the value from a foo(<param_value>) style call */
       
  8081             if (IN_param_value == NULL)
       
  8082               IN_param_value = function_call_param_iterator.next();
       
  8083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8084             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8085             
       
  8086             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  8087             {
       
  8088         
       
  8089                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8090                 s4o.print("(");
       
  8091                 return_type_symbol->accept(*this);
       
  8092                 s4o.print(")__time_to_int(");
       
  8093                 IN_param_value->accept(*this);
       
  8094                 s4o.print(")");
       
  8095                 return NULL;
       
  8096                 
       
  8097             }
       
  8098             
       
  8099             ERROR;
       
  8100         }
       
  8101         
       
  8102     }/*function_time_to_dword*/
       
  8103     break;
       
  8104 
       
  8105 /****
       
  8106  *TIME_TO_LWORD
       
  8107  */
       
  8108     case function_time_to_lword :
       
  8109     {
       
  8110         symbol_c *last_type_symbol = NULL;
       
  8111 
       
  8112         {
       
  8113             identifier_c param_name("IN");
       
  8114             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8115             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8116             
       
  8117             /* Get the value from a foo(<param_value>) style call */
       
  8118             if (IN_param_value == NULL)
       
  8119               IN_param_value = function_call_param_iterator.next();
       
  8120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8121             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8122             
       
  8123             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  8124             {
       
  8125         
       
  8126                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8127                 s4o.print("(");
       
  8128                 return_type_symbol->accept(*this);
       
  8129                 s4o.print(")__time_to_int(");
       
  8130                 IN_param_value->accept(*this);
       
  8131                 s4o.print(")");
       
  8132                 return NULL;
       
  8133                 
       
  8134             }
       
  8135             
       
  8136             ERROR;
       
  8137         }
       
  8138         
       
  8139     }/*function_time_to_lword*/
       
  8140     break;
       
  8141 
       
  8142 /****
       
  8143  *DATE_TO_SINT
       
  8144  */
       
  8145     case function_date_to_sint :
       
  8146     {
       
  8147         symbol_c *last_type_symbol = NULL;
       
  8148 
       
  8149         {
       
  8150             identifier_c param_name("IN");
       
  8151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8153             
       
  8154             /* Get the value from a foo(<param_value>) style call */
       
  8155             if (IN_param_value == NULL)
       
  8156               IN_param_value = function_call_param_iterator.next();
       
  8157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8158             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8159             
       
  8160             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8161             {
       
  8162         
       
  8163                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8164                 s4o.print("(");
       
  8165                 return_type_symbol->accept(*this);
       
  8166                 s4o.print(")__time_to_int(");
       
  8167                 IN_param_value->accept(*this);
       
  8168                 s4o.print(")");
       
  8169                 return NULL;
       
  8170                 
       
  8171             }
       
  8172             
       
  8173             ERROR;
       
  8174         }
       
  8175         
       
  8176     }/*function_date_to_sint*/
       
  8177     break;
       
  8178 
       
  8179 /****
       
  8180  *DATE_TO_INT
       
  8181  */
       
  8182     case function_date_to_int :
       
  8183     {
       
  8184         symbol_c *last_type_symbol = NULL;
       
  8185 
       
  8186         {
       
  8187             identifier_c param_name("IN");
       
  8188             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8189             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8190             
       
  8191             /* Get the value from a foo(<param_value>) style call */
       
  8192             if (IN_param_value == NULL)
       
  8193               IN_param_value = function_call_param_iterator.next();
       
  8194             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8195             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8196             
       
  8197             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8198             {
       
  8199         
       
  8200                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8201                 s4o.print("(");
       
  8202                 return_type_symbol->accept(*this);
       
  8203                 s4o.print(")__time_to_int(");
       
  8204                 IN_param_value->accept(*this);
       
  8205                 s4o.print(")");
       
  8206                 return NULL;
       
  8207                 
       
  8208             }
       
  8209             
       
  8210             ERROR;
       
  8211         }
       
  8212         
       
  8213     }/*function_date_to_int*/
       
  8214     break;
       
  8215 
       
  8216 /****
       
  8217  *DATE_TO_DINT
       
  8218  */
       
  8219     case function_date_to_dint :
       
  8220     {
       
  8221         symbol_c *last_type_symbol = NULL;
       
  8222 
       
  8223         {
       
  8224             identifier_c param_name("IN");
       
  8225             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8226             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8227             
       
  8228             /* Get the value from a foo(<param_value>) style call */
       
  8229             if (IN_param_value == NULL)
       
  8230               IN_param_value = function_call_param_iterator.next();
       
  8231             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8232             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8233             
       
  8234             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8235             {
       
  8236         
       
  8237                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8238                 s4o.print("(");
       
  8239                 return_type_symbol->accept(*this);
       
  8240                 s4o.print(")__time_to_int(");
       
  8241                 IN_param_value->accept(*this);
       
  8242                 s4o.print(")");
       
  8243                 return NULL;
       
  8244                 
       
  8245             }
       
  8246             
       
  8247             ERROR;
       
  8248         }
       
  8249         
       
  8250     }/*function_date_to_dint*/
       
  8251     break;
       
  8252 
       
  8253 /****
       
  8254  *DATE_TO_LINT
       
  8255  */
       
  8256     case function_date_to_lint :
       
  8257     {
       
  8258         symbol_c *last_type_symbol = NULL;
       
  8259 
       
  8260         {
       
  8261             identifier_c param_name("IN");
       
  8262             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8263             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8264             
       
  8265             /* Get the value from a foo(<param_value>) style call */
       
  8266             if (IN_param_value == NULL)
       
  8267               IN_param_value = function_call_param_iterator.next();
       
  8268             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8269             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8270             
       
  8271             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8272             {
       
  8273         
       
  8274                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8275                 s4o.print("(");
       
  8276                 return_type_symbol->accept(*this);
       
  8277                 s4o.print(")__time_to_int(");
       
  8278                 IN_param_value->accept(*this);
       
  8279                 s4o.print(")");
       
  8280                 return NULL;
       
  8281                 
       
  8282             }
       
  8283             
       
  8284             ERROR;
       
  8285         }
       
  8286         
       
  8287     }/*function_date_to_lint*/
       
  8288     break;
       
  8289 
       
  8290 /****
       
  8291  *DATE_TO_USINT
       
  8292  */
       
  8293     case function_date_to_usint :
       
  8294     {
       
  8295         symbol_c *last_type_symbol = NULL;
       
  8296 
       
  8297         {
       
  8298             identifier_c param_name("IN");
       
  8299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8301             
       
  8302             /* Get the value from a foo(<param_value>) style call */
       
  8303             if (IN_param_value == NULL)
       
  8304               IN_param_value = function_call_param_iterator.next();
       
  8305             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8306             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8307             
       
  8308             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8309             {
       
  8310         
       
  8311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8312                 s4o.print("(");
       
  8313                 return_type_symbol->accept(*this);
       
  8314                 s4o.print(")__time_to_int(");
       
  8315                 IN_param_value->accept(*this);
       
  8316                 s4o.print(")");
       
  8317                 return NULL;
       
  8318                 
       
  8319             }
       
  8320             
       
  8321             ERROR;
       
  8322         }
       
  8323         
       
  8324     }/*function_date_to_usint*/
       
  8325     break;
       
  8326 
       
  8327 /****
       
  8328  *DATE_TO_UINT
       
  8329  */
       
  8330     case function_date_to_uint :
       
  8331     {
       
  8332         symbol_c *last_type_symbol = NULL;
       
  8333 
       
  8334         {
       
  8335             identifier_c param_name("IN");
       
  8336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8338             
       
  8339             /* Get the value from a foo(<param_value>) style call */
       
  8340             if (IN_param_value == NULL)
       
  8341               IN_param_value = function_call_param_iterator.next();
       
  8342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8344             
       
  8345             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8346             {
       
  8347         
       
  8348                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8349                 s4o.print("(");
       
  8350                 return_type_symbol->accept(*this);
       
  8351                 s4o.print(")__time_to_int(");
       
  8352                 IN_param_value->accept(*this);
       
  8353                 s4o.print(")");
       
  8354                 return NULL;
       
  8355                 
       
  8356             }
       
  8357             
       
  8358             ERROR;
       
  8359         }
       
  8360         
       
  8361     }/*function_date_to_uint*/
       
  8362     break;
       
  8363 
       
  8364 /****
       
  8365  *DATE_TO_UDINT
       
  8366  */
       
  8367     case function_date_to_udint :
       
  8368     {
       
  8369         symbol_c *last_type_symbol = NULL;
       
  8370 
       
  8371         {
       
  8372             identifier_c param_name("IN");
       
  8373             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8374             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8375             
       
  8376             /* Get the value from a foo(<param_value>) style call */
       
  8377             if (IN_param_value == NULL)
       
  8378               IN_param_value = function_call_param_iterator.next();
       
  8379             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8380             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8381             
       
  8382             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8383             {
       
  8384         
       
  8385                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8386                 s4o.print("(");
       
  8387                 return_type_symbol->accept(*this);
       
  8388                 s4o.print(")__time_to_int(");
       
  8389                 IN_param_value->accept(*this);
       
  8390                 s4o.print(")");
       
  8391                 return NULL;
       
  8392                 
       
  8393             }
       
  8394             
       
  8395             ERROR;
       
  8396         }
       
  8397         
       
  8398     }/*function_date_to_udint*/
       
  8399     break;
       
  8400 
       
  8401 /****
       
  8402  *DATE_TO_ULINT
       
  8403  */
       
  8404     case function_date_to_ulint :
       
  8405     {
       
  8406         symbol_c *last_type_symbol = NULL;
       
  8407 
       
  8408         {
       
  8409             identifier_c param_name("IN");
       
  8410             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8411             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8412             
       
  8413             /* Get the value from a foo(<param_value>) style call */
       
  8414             if (IN_param_value == NULL)
       
  8415               IN_param_value = function_call_param_iterator.next();
       
  8416             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8417             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8418             
       
  8419             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8420             {
       
  8421         
       
  8422                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8423                 s4o.print("(");
       
  8424                 return_type_symbol->accept(*this);
       
  8425                 s4o.print(")__time_to_int(");
       
  8426                 IN_param_value->accept(*this);
       
  8427                 s4o.print(")");
       
  8428                 return NULL;
       
  8429                 
       
  8430             }
       
  8431             
       
  8432             ERROR;
       
  8433         }
       
  8434         
       
  8435     }/*function_date_to_ulint*/
       
  8436     break;
       
  8437 
       
  8438 /****
       
  8439  *DATE_TO_REAL
       
  8440  */
       
  8441     case function_date_to_real :
       
  8442     {
       
  8443         symbol_c *last_type_symbol = NULL;
       
  8444 
       
  8445         {
       
  8446             identifier_c param_name("IN");
       
  8447             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8449             
       
  8450             /* Get the value from a foo(<param_value>) style call */
       
  8451             if (IN_param_value == NULL)
       
  8452               IN_param_value = function_call_param_iterator.next();
       
  8453             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8454             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8455             
       
  8456             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8457             {
       
  8458         
       
  8459                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8460                 s4o.print("(");
       
  8461                 return_type_symbol->accept(*this);
       
  8462                 s4o.print(")__time_to_real(");
       
  8463                 IN_param_value->accept(*this);
       
  8464                 s4o.print(")");
       
  8465                 return NULL;
       
  8466                 
       
  8467             }
       
  8468             
       
  8469             ERROR;
       
  8470         }
       
  8471         
       
  8472     }/*function_date_to_real*/
       
  8473     break;
       
  8474 
       
  8475 /****
       
  8476  *DATE_TO_LREAL
       
  8477  */
       
  8478     case function_date_to_lreal :
       
  8479     {
       
  8480         symbol_c *last_type_symbol = NULL;
       
  8481 
       
  8482         {
       
  8483             identifier_c param_name("IN");
       
  8484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8485             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next();
       
  8490             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8491             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8492             
       
  8493             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8494             {
       
  8495         
       
  8496                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8497                 s4o.print("(");
       
  8498                 return_type_symbol->accept(*this);
       
  8499                 s4o.print(")__time_to_real(");
       
  8500                 IN_param_value->accept(*this);
       
  8501                 s4o.print(")");
       
  8502                 return NULL;
       
  8503                 
       
  8504             }
       
  8505             
       
  8506             ERROR;
       
  8507         }
       
  8508         
       
  8509     }/*function_date_to_lreal*/
       
  8510     break;
       
  8511 
       
  8512 /****
       
  8513  *DATE_TO_STRING
       
  8514  */
       
  8515     case function_date_to_string :
       
  8516     {
       
  8517         symbol_c *last_type_symbol = NULL;
       
  8518 
       
  8519         {
       
  8520             identifier_c param_name("IN");
       
  8521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8522             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8523             
       
  8524             /* Get the value from a foo(<param_value>) style call */
       
  8525             if (IN_param_value == NULL)
       
  8526               IN_param_value = function_call_param_iterator.next();
       
  8527             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8528             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8529             
       
  8530             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8531             {
       
  8532         
       
  8533                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8534                 s4o.print("(");
       
  8535                 return_type_symbol->accept(*this);
       
  8536                 s4o.print(")__date_to_string(");
       
  8537                 IN_param_value->accept(*this);
       
  8538                 s4o.print(")");
       
  8539                 return NULL;
       
  8540                 
       
  8541             }
       
  8542             
       
  8543             ERROR;
       
  8544         }
       
  8545         
       
  8546     }/*function_date_to_string*/
       
  8547     break;
       
  8548 
       
  8549 /****
       
  8550  *DATE_TO_BYTE
       
  8551  */
       
  8552     case function_date_to_byte :
       
  8553     {
       
  8554         symbol_c *last_type_symbol = NULL;
       
  8555 
       
  8556         {
       
  8557             identifier_c param_name("IN");
       
  8558             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8560             
       
  8561             /* Get the value from a foo(<param_value>) style call */
       
  8562             if (IN_param_value == NULL)
       
  8563               IN_param_value = function_call_param_iterator.next();
       
  8564             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8566             
       
  8567             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8568             {
       
  8569         
       
  8570                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8571                 s4o.print("(");
       
  8572                 return_type_symbol->accept(*this);
       
  8573                 s4o.print(")__time_to_int(");
       
  8574                 IN_param_value->accept(*this);
       
  8575                 s4o.print(")");
       
  8576                 return NULL;
       
  8577                 
       
  8578             }
       
  8579             
       
  8580             ERROR;
       
  8581         }
       
  8582         
       
  8583     }/*function_date_to_byte*/
       
  8584     break;
       
  8585 
       
  8586 /****
       
  8587  *DATE_TO_WORD
       
  8588  */
       
  8589     case function_date_to_word :
       
  8590     {
       
  8591         symbol_c *last_type_symbol = NULL;
       
  8592 
       
  8593         {
       
  8594             identifier_c param_name("IN");
       
  8595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8597             
       
  8598             /* Get the value from a foo(<param_value>) style call */
       
  8599             if (IN_param_value == NULL)
       
  8600               IN_param_value = function_call_param_iterator.next();
       
  8601             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8603             
       
  8604             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8605             {
       
  8606         
       
  8607                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8608                 s4o.print("(");
       
  8609                 return_type_symbol->accept(*this);
       
  8610                 s4o.print(")__time_to_int(");
       
  8611                 IN_param_value->accept(*this);
       
  8612                 s4o.print(")");
       
  8613                 return NULL;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_date_to_word*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *DATE_TO_DWORD
       
  8625  */
       
  8626     case function_date_to_dword :
       
  8627     {
       
  8628         symbol_c *last_type_symbol = NULL;
       
  8629 
       
  8630         {
       
  8631             identifier_c param_name("IN");
       
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8634             
       
  8635             /* Get the value from a foo(<param_value>) style call */
       
  8636             if (IN_param_value == NULL)
       
  8637               IN_param_value = function_call_param_iterator.next();
       
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8640             
       
  8641             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8645                 s4o.print("(");
       
  8646                 return_type_symbol->accept(*this);
       
  8647                 s4o.print(")__time_to_int(");
       
  8648                 IN_param_value->accept(*this);
       
  8649                 s4o.print(")");
       
  8650                 return NULL;
       
  8651                 
       
  8652             }
       
  8653             
       
  8654             ERROR;
       
  8655         }
       
  8656         
       
  8657     }/*function_date_to_dword*/
       
  8658     break;
       
  8659 
       
  8660 /****
       
  8661  *DATE_TO_LWORD
       
  8662  */
       
  8663     case function_date_to_lword :
       
  8664     {
       
  8665         symbol_c *last_type_symbol = NULL;
       
  8666 
       
  8667         {
       
  8668             identifier_c param_name("IN");
       
  8669             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8670             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8671             
       
  8672             /* Get the value from a foo(<param_value>) style call */
       
  8673             if (IN_param_value == NULL)
       
  8674               IN_param_value = function_call_param_iterator.next();
       
  8675             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8676             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8677             
       
  8678             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  8679             {
       
  8680         
       
  8681                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8682                 s4o.print("(");
       
  8683                 return_type_symbol->accept(*this);
       
  8684                 s4o.print(")__time_to_int(");
       
  8685                 IN_param_value->accept(*this);
       
  8686                 s4o.print(")");
       
  8687                 return NULL;
       
  8688                 
       
  8689             }
       
  8690             
       
  8691             ERROR;
       
  8692         }
       
  8693         
       
  8694     }/*function_date_to_lword*/
       
  8695     break;
       
  8696 
       
  8697 /****
       
  8698  *TOD_TO_SINT
       
  8699  */
       
  8700     case function_tod_to_sint :
       
  8701     {
       
  8702         symbol_c *last_type_symbol = NULL;
       
  8703 
       
  8704         {
       
  8705             identifier_c param_name("IN");
       
  8706             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8707             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8708             
       
  8709             /* Get the value from a foo(<param_value>) style call */
       
  8710             if (IN_param_value == NULL)
       
  8711               IN_param_value = function_call_param_iterator.next();
       
  8712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8713             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8714             
       
  8715             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8716             {
       
  8717         
       
  8718                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8719                 s4o.print("(");
       
  8720                 return_type_symbol->accept(*this);
       
  8721                 s4o.print(")__time_to_int(");
       
  8722                 IN_param_value->accept(*this);
       
  8723                 s4o.print(")");
       
  8724                 return NULL;
       
  8725                 
       
  8726             }
       
  8727             
       
  8728             ERROR;
       
  8729         }
       
  8730         
       
  8731     }/*function_tod_to_sint*/
       
  8732     break;
       
  8733 
       
  8734 /****
       
  8735  *TOD_TO_INT
       
  8736  */
       
  8737     case function_tod_to_int :
       
  8738     {
       
  8739         symbol_c *last_type_symbol = NULL;
       
  8740 
       
  8741         {
       
  8742             identifier_c param_name("IN");
       
  8743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8744             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8745             
       
  8746             /* Get the value from a foo(<param_value>) style call */
       
  8747             if (IN_param_value == NULL)
       
  8748               IN_param_value = function_call_param_iterator.next();
       
  8749             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8750             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8751             
       
  8752             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8753             {
       
  8754         
       
  8755                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8756                 s4o.print("(");
       
  8757                 return_type_symbol->accept(*this);
       
  8758                 s4o.print(")__time_to_int(");
       
  8759                 IN_param_value->accept(*this);
       
  8760                 s4o.print(")");
       
  8761                 return NULL;
       
  8762                 
       
  8763             }
       
  8764             
       
  8765             ERROR;
       
  8766         }
       
  8767         
       
  8768     }/*function_tod_to_int*/
       
  8769     break;
       
  8770 
       
  8771 /****
       
  8772  *TOD_TO_DINT
       
  8773  */
       
  8774     case function_tod_to_dint :
       
  8775     {
       
  8776         symbol_c *last_type_symbol = NULL;
       
  8777 
       
  8778         {
       
  8779             identifier_c param_name("IN");
       
  8780             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8781             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8782             
       
  8783             /* Get the value from a foo(<param_value>) style call */
       
  8784             if (IN_param_value == NULL)
       
  8785               IN_param_value = function_call_param_iterator.next();
       
  8786             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8787             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8788             
       
  8789             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8790             {
       
  8791         
       
  8792                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8793                 s4o.print("(");
       
  8794                 return_type_symbol->accept(*this);
       
  8795                 s4o.print(")__time_to_int(");
       
  8796                 IN_param_value->accept(*this);
       
  8797                 s4o.print(")");
       
  8798                 return NULL;
       
  8799                 
       
  8800             }
       
  8801             
       
  8802             ERROR;
       
  8803         }
       
  8804         
       
  8805     }/*function_tod_to_dint*/
       
  8806     break;
       
  8807 
       
  8808 /****
       
  8809  *TOD_TO_LINT
       
  8810  */
       
  8811     case function_tod_to_lint :
       
  8812     {
       
  8813         symbol_c *last_type_symbol = NULL;
       
  8814 
       
  8815         {
       
  8816             identifier_c param_name("IN");
       
  8817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8819             
       
  8820             /* Get the value from a foo(<param_value>) style call */
       
  8821             if (IN_param_value == NULL)
       
  8822               IN_param_value = function_call_param_iterator.next();
       
  8823             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8824             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8825             
       
  8826             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8827             {
       
  8828         
       
  8829                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8830                 s4o.print("(");
       
  8831                 return_type_symbol->accept(*this);
       
  8832                 s4o.print(")__time_to_int(");
       
  8833                 IN_param_value->accept(*this);
       
  8834                 s4o.print(")");
       
  8835                 return NULL;
       
  8836                 
       
  8837             }
       
  8838             
       
  8839             ERROR;
       
  8840         }
       
  8841         
       
  8842     }/*function_tod_to_lint*/
       
  8843     break;
       
  8844 
       
  8845 /****
       
  8846  *TOD_TO_USINT
       
  8847  */
       
  8848     case function_tod_to_usint :
       
  8849     {
       
  8850         symbol_c *last_type_symbol = NULL;
       
  8851 
       
  8852         {
       
  8853             identifier_c param_name("IN");
       
  8854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8855             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8856             
       
  8857             /* Get the value from a foo(<param_value>) style call */
       
  8858             if (IN_param_value == NULL)
       
  8859               IN_param_value = function_call_param_iterator.next();
       
  8860             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8861             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8862             
       
  8863             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8864             {
       
  8865         
       
  8866                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8867                 s4o.print("(");
       
  8868                 return_type_symbol->accept(*this);
       
  8869                 s4o.print(")__time_to_int(");
       
  8870                 IN_param_value->accept(*this);
       
  8871                 s4o.print(")");
       
  8872                 return NULL;
       
  8873                 
       
  8874             }
       
  8875             
       
  8876             ERROR;
       
  8877         }
       
  8878         
       
  8879     }/*function_tod_to_usint*/
       
  8880     break;
       
  8881 
       
  8882 /****
       
  8883  *TOD_TO_UINT
       
  8884  */
       
  8885     case function_tod_to_uint :
       
  8886     {
       
  8887         symbol_c *last_type_symbol = NULL;
       
  8888 
       
  8889         {
       
  8890             identifier_c param_name("IN");
       
  8891             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8892             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8893             
       
  8894             /* Get the value from a foo(<param_value>) style call */
       
  8895             if (IN_param_value == NULL)
       
  8896               IN_param_value = function_call_param_iterator.next();
       
  8897             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8898             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8899             
       
  8900             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8901             {
       
  8902         
       
  8903                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8904                 s4o.print("(");
       
  8905                 return_type_symbol->accept(*this);
       
  8906                 s4o.print(")__time_to_int(");
       
  8907                 IN_param_value->accept(*this);
       
  8908                 s4o.print(")");
       
  8909                 return NULL;
       
  8910                 
       
  8911             }
       
  8912             
       
  8913             ERROR;
       
  8914         }
       
  8915         
       
  8916     }/*function_tod_to_uint*/
       
  8917     break;
       
  8918 
       
  8919 /****
       
  8920  *TOD_TO_UDINT
       
  8921  */
       
  8922     case function_tod_to_udint :
       
  8923     {
       
  8924         symbol_c *last_type_symbol = NULL;
       
  8925 
       
  8926         {
       
  8927             identifier_c param_name("IN");
       
  8928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8930             
       
  8931             /* Get the value from a foo(<param_value>) style call */
       
  8932             if (IN_param_value == NULL)
       
  8933               IN_param_value = function_call_param_iterator.next();
       
  8934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8936             
       
  8937             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8938             {
       
  8939         
       
  8940                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8941                 s4o.print("(");
       
  8942                 return_type_symbol->accept(*this);
       
  8943                 s4o.print(")__time_to_int(");
       
  8944                 IN_param_value->accept(*this);
       
  8945                 s4o.print(")");
       
  8946                 return NULL;
       
  8947                 
       
  8948             }
       
  8949             
       
  8950             ERROR;
       
  8951         }
       
  8952         
       
  8953     }/*function_tod_to_udint*/
       
  8954     break;
       
  8955 
       
  8956 /****
       
  8957  *TOD_TO_ULINT
       
  8958  */
       
  8959     case function_tod_to_ulint :
       
  8960     {
       
  8961         symbol_c *last_type_symbol = NULL;
       
  8962 
       
  8963         {
       
  8964             identifier_c param_name("IN");
       
  8965             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8966             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8967             
       
  8968             /* Get the value from a foo(<param_value>) style call */
       
  8969             if (IN_param_value == NULL)
       
  8970               IN_param_value = function_call_param_iterator.next();
       
  8971             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8972             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8973             
       
  8974             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8975             {
       
  8976         
       
  8977                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8978                 s4o.print("(");
       
  8979                 return_type_symbol->accept(*this);
       
  8980                 s4o.print(")__time_to_int(");
       
  8981                 IN_param_value->accept(*this);
       
  8982                 s4o.print(")");
       
  8983                 return NULL;
       
  8984                 
       
  8985             }
       
  8986             
       
  8987             ERROR;
       
  8988         }
       
  8989         
       
  8990     }/*function_tod_to_ulint*/
       
  8991     break;
       
  8992 
       
  8993 /****
       
  8994  *TOD_TO_REAL
       
  8995  */
       
  8996     case function_tod_to_real :
       
  8997     {
       
  8998         symbol_c *last_type_symbol = NULL;
       
  8999 
       
  9000         {
       
  9001             identifier_c param_name("IN");
       
  9002             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9003             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9004             
       
  9005             /* Get the value from a foo(<param_value>) style call */
       
  9006             if (IN_param_value == NULL)
       
  9007               IN_param_value = function_call_param_iterator.next();
       
  9008             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9009             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9010             
       
  9011             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9012             {
       
  9013         
       
  9014                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9015                 s4o.print("(");
       
  9016                 return_type_symbol->accept(*this);
       
  9017                 s4o.print(")__time_to_real(");
       
  9018                 IN_param_value->accept(*this);
       
  9019                 s4o.print(")");
       
  9020                 return NULL;
       
  9021                 
       
  9022             }
       
  9023             
       
  9024             ERROR;
       
  9025         }
       
  9026         
       
  9027     }/*function_tod_to_real*/
       
  9028     break;
       
  9029 
       
  9030 /****
       
  9031  *TOD_TO_LREAL
       
  9032  */
       
  9033     case function_tod_to_lreal :
       
  9034     {
       
  9035         symbol_c *last_type_symbol = NULL;
       
  9036 
       
  9037         {
       
  9038             identifier_c param_name("IN");
       
  9039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9040             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9041             
       
  9042             /* Get the value from a foo(<param_value>) style call */
       
  9043             if (IN_param_value == NULL)
       
  9044               IN_param_value = function_call_param_iterator.next();
       
  9045             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9046             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9047             
       
  9048             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9049             {
       
  9050         
       
  9051                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9052                 s4o.print("(");
       
  9053                 return_type_symbol->accept(*this);
       
  9054                 s4o.print(")__time_to_real(");
       
  9055                 IN_param_value->accept(*this);
       
  9056                 s4o.print(")");
       
  9057                 return NULL;
       
  9058                 
       
  9059             }
       
  9060             
       
  9061             ERROR;
       
  9062         }
       
  9063         
       
  9064     }/*function_tod_to_lreal*/
       
  9065     break;
       
  9066 
       
  9067 /****
       
  9068  *TOD_TO_STRING
       
  9069  */
       
  9070     case function_tod_to_string :
       
  9071     {
       
  9072         symbol_c *last_type_symbol = NULL;
       
  9073 
       
  9074         {
       
  9075             identifier_c param_name("IN");
       
  9076             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9077             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9078             
       
  9079             /* Get the value from a foo(<param_value>) style call */
       
  9080             if (IN_param_value == NULL)
       
  9081               IN_param_value = function_call_param_iterator.next();
       
  9082             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9083             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9084             
       
  9085             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9086             {
       
  9087         
       
  9088                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9089                 s4o.print("(");
       
  9090                 return_type_symbol->accept(*this);
       
  9091                 s4o.print(")__tod_to_string(");
       
  9092                 IN_param_value->accept(*this);
       
  9093                 s4o.print(")");
       
  9094                 return NULL;
       
  9095                 
       
  9096             }
       
  9097             
       
  9098             ERROR;
       
  9099         }
       
  9100         
       
  9101     }/*function_tod_to_string*/
       
  9102     break;
       
  9103 
       
  9104 /****
       
  9105  *TOD_TO_BYTE
       
  9106  */
       
  9107     case function_tod_to_byte :
       
  9108     {
       
  9109         symbol_c *last_type_symbol = NULL;
       
  9110 
       
  9111         {
       
  9112             identifier_c param_name("IN");
       
  9113             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9114             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9115             
       
  9116             /* Get the value from a foo(<param_value>) style call */
       
  9117             if (IN_param_value == NULL)
       
  9118               IN_param_value = function_call_param_iterator.next();
       
  9119             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9120             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9121             
       
  9122             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9123             {
       
  9124         
       
  9125                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9126                 s4o.print("(");
       
  9127                 return_type_symbol->accept(*this);
       
  9128                 s4o.print(")__time_to_int(");
       
  9129                 IN_param_value->accept(*this);
       
  9130                 s4o.print(")");
       
  9131                 return NULL;
       
  9132                 
       
  9133             }
       
  9134             
       
  9135             ERROR;
       
  9136         }
       
  9137         
       
  9138     }/*function_tod_to_byte*/
       
  9139     break;
       
  9140 
       
  9141 /****
       
  9142  *TOD_TO_WORD
       
  9143  */
       
  9144     case function_tod_to_word :
       
  9145     {
       
  9146         symbol_c *last_type_symbol = NULL;
       
  9147 
       
  9148         {
       
  9149             identifier_c param_name("IN");
       
  9150             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9151             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9152             
       
  9153             /* Get the value from a foo(<param_value>) style call */
       
  9154             if (IN_param_value == NULL)
       
  9155               IN_param_value = function_call_param_iterator.next();
       
  9156             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9157             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9158             
       
  9159             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9160             {
       
  9161         
       
  9162                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9163                 s4o.print("(");
       
  9164                 return_type_symbol->accept(*this);
       
  9165                 s4o.print(")__time_to_int(");
       
  9166                 IN_param_value->accept(*this);
       
  9167                 s4o.print(")");
       
  9168                 return NULL;
       
  9169                 
       
  9170             }
       
  9171             
       
  9172             ERROR;
       
  9173         }
       
  9174         
       
  9175     }/*function_tod_to_word*/
       
  9176     break;
       
  9177 
       
  9178 /****
       
  9179  *TOD_TO_DWORD
       
  9180  */
       
  9181     case function_tod_to_dword :
       
  9182     {
       
  9183         symbol_c *last_type_symbol = NULL;
       
  9184 
       
  9185         {
       
  9186             identifier_c param_name("IN");
       
  9187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9189             
       
  9190             /* Get the value from a foo(<param_value>) style call */
       
  9191             if (IN_param_value == NULL)
       
  9192               IN_param_value = function_call_param_iterator.next();
       
  9193             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9194             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9195             
       
  9196             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9197             {
       
  9198         
       
  9199                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9200                 s4o.print("(");
       
  9201                 return_type_symbol->accept(*this);
       
  9202                 s4o.print(")__time_to_int(");
       
  9203                 IN_param_value->accept(*this);
       
  9204                 s4o.print(")");
       
  9205                 return NULL;
       
  9206                 
       
  9207             }
       
  9208             
       
  9209             ERROR;
       
  9210         }
       
  9211         
       
  9212     }/*function_tod_to_dword*/
       
  9213     break;
       
  9214 
       
  9215 /****
       
  9216  *TOD_TO_LWORD
       
  9217  */
       
  9218     case function_tod_to_lword :
       
  9219     {
       
  9220         symbol_c *last_type_symbol = NULL;
       
  9221 
       
  9222         {
       
  9223             identifier_c param_name("IN");
       
  9224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9226             
       
  9227             /* Get the value from a foo(<param_value>) style call */
       
  9228             if (IN_param_value == NULL)
       
  9229               IN_param_value = function_call_param_iterator.next();
       
  9230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9232             
       
  9233             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  9234             {
       
  9235         
       
  9236                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9237                 s4o.print("(");
       
  9238                 return_type_symbol->accept(*this);
       
  9239                 s4o.print(")__time_to_int(");
       
  9240                 IN_param_value->accept(*this);
       
  9241                 s4o.print(")");
       
  9242                 return NULL;
       
  9243                 
       
  9244             }
       
  9245             
       
  9246             ERROR;
       
  9247         }
       
  9248         
       
  9249     }/*function_tod_to_lword*/
       
  9250     break;
       
  9251 
       
  9252 /****
       
  9253  *DT_TO_SINT
       
  9254  */
       
  9255     case function_dt_to_sint :
       
  9256     {
       
  9257         symbol_c *last_type_symbol = NULL;
       
  9258 
       
  9259         {
       
  9260             identifier_c param_name("IN");
       
  9261             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9262             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9263             
       
  9264             /* Get the value from a foo(<param_value>) style call */
       
  9265             if (IN_param_value == NULL)
       
  9266               IN_param_value = function_call_param_iterator.next();
       
  9267             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9268             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9269             
       
  9270             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9271             {
       
  9272         
       
  9273                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9274                 s4o.print("(");
       
  9275                 return_type_symbol->accept(*this);
       
  9276                 s4o.print(")__time_to_int(");
       
  9277                 IN_param_value->accept(*this);
       
  9278                 s4o.print(")");
       
  9279                 return NULL;
       
  9280                 
       
  9281             }
       
  9282             
       
  9283             ERROR;
       
  9284         }
       
  9285         
       
  9286     }/*function_dt_to_sint*/
       
  9287     break;
       
  9288 
       
  9289 /****
       
  9290  *DT_TO_INT
       
  9291  */
       
  9292     case function_dt_to_int :
       
  9293     {
       
  9294         symbol_c *last_type_symbol = NULL;
       
  9295 
       
  9296         {
       
  9297             identifier_c param_name("IN");
       
  9298             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9299             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9300             
       
  9301             /* Get the value from a foo(<param_value>) style call */
       
  9302             if (IN_param_value == NULL)
       
  9303               IN_param_value = function_call_param_iterator.next();
       
  9304             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9305             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9306             
       
  9307             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9308             {
       
  9309         
       
  9310                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9311                 s4o.print("(");
       
  9312                 return_type_symbol->accept(*this);
       
  9313                 s4o.print(")__time_to_int(");
       
  9314                 IN_param_value->accept(*this);
       
  9315                 s4o.print(")");
       
  9316                 return NULL;
       
  9317                 
       
  9318             }
       
  9319             
       
  9320             ERROR;
       
  9321         }
       
  9322         
       
  9323     }/*function_dt_to_int*/
       
  9324     break;
       
  9325 
       
  9326 /****
       
  9327  *DT_TO_DINT
       
  9328  */
       
  9329     case function_dt_to_dint :
       
  9330     {
       
  9331         symbol_c *last_type_symbol = NULL;
       
  9332 
       
  9333         {
       
  9334             identifier_c param_name("IN");
       
  9335             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9336             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9337             
       
  9338             /* Get the value from a foo(<param_value>) style call */
       
  9339             if (IN_param_value == NULL)
       
  9340               IN_param_value = function_call_param_iterator.next();
       
  9341             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9342             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9343             
       
  9344             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9345             {
       
  9346         
       
  9347                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9348                 s4o.print("(");
       
  9349                 return_type_symbol->accept(*this);
       
  9350                 s4o.print(")__time_to_int(");
       
  9351                 IN_param_value->accept(*this);
       
  9352                 s4o.print(")");
       
  9353                 return NULL;
       
  9354                 
       
  9355             }
       
  9356             
       
  9357             ERROR;
       
  9358         }
       
  9359         
       
  9360     }/*function_dt_to_dint*/
       
  9361     break;
       
  9362 
       
  9363 /****
       
  9364  *DT_TO_LINT
       
  9365  */
       
  9366     case function_dt_to_lint :
       
  9367     {
       
  9368         symbol_c *last_type_symbol = NULL;
       
  9369 
       
  9370         {
       
  9371             identifier_c param_name("IN");
       
  9372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9374             
       
  9375             /* Get the value from a foo(<param_value>) style call */
       
  9376             if (IN_param_value == NULL)
       
  9377               IN_param_value = function_call_param_iterator.next();
       
  9378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9380             
       
  9381             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9382             {
       
  9383         
       
  9384                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9385                 s4o.print("(");
       
  9386                 return_type_symbol->accept(*this);
       
  9387                 s4o.print(")__time_to_int(");
       
  9388                 IN_param_value->accept(*this);
       
  9389                 s4o.print(")");
       
  9390                 return NULL;
       
  9391                 
       
  9392             }
       
  9393             
       
  9394             ERROR;
       
  9395         }
       
  9396         
       
  9397     }/*function_dt_to_lint*/
       
  9398     break;
       
  9399 
       
  9400 /****
       
  9401  *DT_TO_USINT
       
  9402  */
       
  9403     case function_dt_to_usint :
       
  9404     {
       
  9405         symbol_c *last_type_symbol = NULL;
       
  9406 
       
  9407         {
       
  9408             identifier_c param_name("IN");
       
  9409             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9410             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9411             
       
  9412             /* Get the value from a foo(<param_value>) style call */
       
  9413             if (IN_param_value == NULL)
       
  9414               IN_param_value = function_call_param_iterator.next();
       
  9415             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9416             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9417             
       
  9418             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9419             {
       
  9420         
       
  9421                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9422                 s4o.print("(");
       
  9423                 return_type_symbol->accept(*this);
       
  9424                 s4o.print(")__time_to_int(");
       
  9425                 IN_param_value->accept(*this);
       
  9426                 s4o.print(")");
       
  9427                 return NULL;
       
  9428                 
       
  9429             }
       
  9430             
       
  9431             ERROR;
       
  9432         }
       
  9433         
       
  9434     }/*function_dt_to_usint*/
       
  9435     break;
       
  9436 
       
  9437 /****
       
  9438  *DT_TO_UINT
       
  9439  */
       
  9440     case function_dt_to_uint :
       
  9441     {
       
  9442         symbol_c *last_type_symbol = NULL;
       
  9443 
       
  9444         {
       
  9445             identifier_c param_name("IN");
       
  9446             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9447             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9448             
       
  9449             /* Get the value from a foo(<param_value>) style call */
       
  9450             if (IN_param_value == NULL)
       
  9451               IN_param_value = function_call_param_iterator.next();
       
  9452             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9453             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9454             
       
  9455             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9456             {
       
  9457         
       
  9458                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9459                 s4o.print("(");
       
  9460                 return_type_symbol->accept(*this);
       
  9461                 s4o.print(")__time_to_int(");
       
  9462                 IN_param_value->accept(*this);
       
  9463                 s4o.print(")");
       
  9464                 return NULL;
       
  9465                 
       
  9466             }
       
  9467             
       
  9468             ERROR;
       
  9469         }
       
  9470         
       
  9471     }/*function_dt_to_uint*/
       
  9472     break;
       
  9473 
       
  9474 /****
       
  9475  *DT_TO_UDINT
       
  9476  */
       
  9477     case function_dt_to_udint :
       
  9478     {
       
  9479         symbol_c *last_type_symbol = NULL;
       
  9480 
       
  9481         {
       
  9482             identifier_c param_name("IN");
       
  9483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9484             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9485             
       
  9486             /* Get the value from a foo(<param_value>) style call */
       
  9487             if (IN_param_value == NULL)
       
  9488               IN_param_value = function_call_param_iterator.next();
       
  9489             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9490             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9491             
       
  9492             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9493             {
       
  9494         
       
  9495                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9496                 s4o.print("(");
       
  9497                 return_type_symbol->accept(*this);
       
  9498                 s4o.print(")__time_to_int(");
       
  9499                 IN_param_value->accept(*this);
       
  9500                 s4o.print(")");
       
  9501                 return NULL;
       
  9502                 
       
  9503             }
       
  9504             
       
  9505             ERROR;
       
  9506         }
       
  9507         
       
  9508     }/*function_dt_to_udint*/
       
  9509     break;
       
  9510 
       
  9511 /****
       
  9512  *DT_TO_ULINT
       
  9513  */
       
  9514     case function_dt_to_ulint :
       
  9515     {
       
  9516         symbol_c *last_type_symbol = NULL;
       
  9517 
       
  9518         {
       
  9519             identifier_c param_name("IN");
       
  9520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9522             
       
  9523             /* Get the value from a foo(<param_value>) style call */
       
  9524             if (IN_param_value == NULL)
       
  9525               IN_param_value = function_call_param_iterator.next();
       
  9526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9528             
       
  9529             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9530             {
       
  9531         
       
  9532                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9533                 s4o.print("(");
       
  9534                 return_type_symbol->accept(*this);
       
  9535                 s4o.print(")__time_to_int(");
       
  9536                 IN_param_value->accept(*this);
       
  9537                 s4o.print(")");
       
  9538                 return NULL;
       
  9539                 
       
  9540             }
       
  9541             
       
  9542             ERROR;
       
  9543         }
       
  9544         
       
  9545     }/*function_dt_to_ulint*/
       
  9546     break;
       
  9547 
       
  9548 /****
       
  9549  *DT_TO_REAL
       
  9550  */
       
  9551     case function_dt_to_real :
       
  9552     {
       
  9553         symbol_c *last_type_symbol = NULL;
       
  9554 
       
  9555         {
       
  9556             identifier_c param_name("IN");
       
  9557             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9558             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9559             
       
  9560             /* Get the value from a foo(<param_value>) style call */
       
  9561             if (IN_param_value == NULL)
       
  9562               IN_param_value = function_call_param_iterator.next();
       
  9563             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9564             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9565             
       
  9566             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9567             {
       
  9568         
       
  9569                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9570                 s4o.print("(");
       
  9571                 return_type_symbol->accept(*this);
       
  9572                 s4o.print(")__time_to_real(");
       
  9573                 IN_param_value->accept(*this);
       
  9574                 s4o.print(")");
       
  9575                 return NULL;
       
  9576                 
       
  9577             }
       
  9578             
       
  9579             ERROR;
       
  9580         }
       
  9581         
       
  9582     }/*function_dt_to_real*/
       
  9583     break;
       
  9584 
       
  9585 /****
       
  9586  *DT_TO_LREAL
       
  9587  */
       
  9588     case function_dt_to_lreal :
       
  9589     {
       
  9590         symbol_c *last_type_symbol = NULL;
       
  9591 
       
  9592         {
       
  9593             identifier_c param_name("IN");
       
  9594             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9595             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9596             
       
  9597             /* Get the value from a foo(<param_value>) style call */
       
  9598             if (IN_param_value == NULL)
       
  9599               IN_param_value = function_call_param_iterator.next();
       
  9600             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9601             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9602             
       
  9603             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9604             {
       
  9605         
       
  9606                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9607                 s4o.print("(");
       
  9608                 return_type_symbol->accept(*this);
       
  9609                 s4o.print(")__time_to_real(");
       
  9610                 IN_param_value->accept(*this);
       
  9611                 s4o.print(")");
       
  9612                 return NULL;
       
  9613                 
       
  9614             }
       
  9615             
       
  9616             ERROR;
       
  9617         }
       
  9618         
       
  9619     }/*function_dt_to_lreal*/
       
  9620     break;
       
  9621 
       
  9622 /****
       
  9623  *DT_TO_STRING
       
  9624  */
       
  9625     case function_dt_to_string :
       
  9626     {
       
  9627         symbol_c *last_type_symbol = NULL;
       
  9628 
       
  9629         {
       
  9630             identifier_c param_name("IN");
       
  9631             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9632             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9633             
       
  9634             /* Get the value from a foo(<param_value>) style call */
       
  9635             if (IN_param_value == NULL)
       
  9636               IN_param_value = function_call_param_iterator.next();
       
  9637             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9638             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9639             
       
  9640             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9641             {
       
  9642         
       
  9643                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9644                 s4o.print("(");
       
  9645                 return_type_symbol->accept(*this);
       
  9646                 s4o.print(")__dt_to_string(");
       
  9647                 IN_param_value->accept(*this);
       
  9648                 s4o.print(")");
       
  9649                 return NULL;
       
  9650                 
       
  9651             }
       
  9652             
       
  9653             ERROR;
       
  9654         }
       
  9655         
       
  9656     }/*function_dt_to_string*/
       
  9657     break;
       
  9658 
       
  9659 /****
       
  9660  *DT_TO_BYTE
       
  9661  */
       
  9662     case function_dt_to_byte :
       
  9663     {
       
  9664         symbol_c *last_type_symbol = NULL;
       
  9665 
       
  9666         {
       
  9667             identifier_c param_name("IN");
       
  9668             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9669             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9670             
       
  9671             /* Get the value from a foo(<param_value>) style call */
       
  9672             if (IN_param_value == NULL)
       
  9673               IN_param_value = function_call_param_iterator.next();
       
  9674             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9675             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9676             
       
  9677             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9678             {
       
  9679         
       
  9680                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9681                 s4o.print("(");
       
  9682                 return_type_symbol->accept(*this);
       
  9683                 s4o.print(")__time_to_int(");
       
  9684                 IN_param_value->accept(*this);
       
  9685                 s4o.print(")");
       
  9686                 return NULL;
       
  9687                 
       
  9688             }
       
  9689             
       
  9690             ERROR;
       
  9691         }
       
  9692         
       
  9693     }/*function_dt_to_byte*/
       
  9694     break;
       
  9695 
       
  9696 /****
       
  9697  *DT_TO_WORD
       
  9698  */
       
  9699     case function_dt_to_word :
       
  9700     {
       
  9701         symbol_c *last_type_symbol = NULL;
       
  9702 
       
  9703         {
       
  9704             identifier_c param_name("IN");
       
  9705             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9706             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9707             
       
  9708             /* Get the value from a foo(<param_value>) style call */
       
  9709             if (IN_param_value == NULL)
       
  9710               IN_param_value = function_call_param_iterator.next();
       
  9711             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9712             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9713             
       
  9714             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9715             {
       
  9716         
       
  9717                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9718                 s4o.print("(");
       
  9719                 return_type_symbol->accept(*this);
       
  9720                 s4o.print(")__time_to_int(");
       
  9721                 IN_param_value->accept(*this);
       
  9722                 s4o.print(")");
       
  9723                 return NULL;
       
  9724                 
       
  9725             }
       
  9726             
       
  9727             ERROR;
       
  9728         }
       
  9729         
       
  9730     }/*function_dt_to_word*/
       
  9731     break;
       
  9732 
       
  9733 /****
       
  9734  *DT_TO_DWORD
       
  9735  */
       
  9736     case function_dt_to_dword :
       
  9737     {
       
  9738         symbol_c *last_type_symbol = NULL;
       
  9739 
       
  9740         {
       
  9741             identifier_c param_name("IN");
       
  9742             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9743             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9744             
       
  9745             /* Get the value from a foo(<param_value>) style call */
       
  9746             if (IN_param_value == NULL)
       
  9747               IN_param_value = function_call_param_iterator.next();
       
  9748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9749             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9750             
       
  9751             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9752             {
       
  9753         
       
  9754                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9755                 s4o.print("(");
       
  9756                 return_type_symbol->accept(*this);
       
  9757                 s4o.print(")__time_to_int(");
       
  9758                 IN_param_value->accept(*this);
       
  9759                 s4o.print(")");
       
  9760                 return NULL;
       
  9761                 
       
  9762             }
       
  9763             
       
  9764             ERROR;
       
  9765         }
       
  9766         
       
  9767     }/*function_dt_to_dword*/
       
  9768     break;
       
  9769 
       
  9770 /****
       
  9771  *DT_TO_LWORD
       
  9772  */
       
  9773     case function_dt_to_lword :
       
  9774     {
       
  9775         symbol_c *last_type_symbol = NULL;
       
  9776 
       
  9777         {
       
  9778             identifier_c param_name("IN");
       
  9779             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9780             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9781             
       
  9782             /* Get the value from a foo(<param_value>) style call */
       
  9783             if (IN_param_value == NULL)
       
  9784               IN_param_value = function_call_param_iterator.next();
       
  9785             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9786             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9787             
       
  9788             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  9789             {
       
  9790         
       
  9791                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9792                 s4o.print("(");
       
  9793                 return_type_symbol->accept(*this);
       
  9794                 s4o.print(")__time_to_int(");
       
  9795                 IN_param_value->accept(*this);
       
  9796                 s4o.print(")");
       
  9797                 return NULL;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_dt_to_lword*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *STRING_TO_BOOL
       
  9809  */
       
  9810     case function_string_to_bool :
       
  9811     {
       
  9812         symbol_c *last_type_symbol = NULL;
       
  9813 
       
  9814         {
       
  9815             identifier_c param_name("IN");
       
  9816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9824             
       
  9825             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7606             {
  9826             {
  7607         
  9827         
  7608                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  7609                 s4o.print("(");
  9829                 s4o.print("(");
  7610                 return_type_symbol->accept(*this);
  9830                 return_type_symbol->accept(*this);
  7611                 s4o.print(")__time_to_int(");
  9831                 s4o.print(")__string_to_bool(");
  7612                 IN_param_value->accept(*this);
  9832                 IN_param_value->accept(*this);
  7613                 s4o.print(")");
  9833                 s4o.print(")");
  7614                 return NULL;
  9834                 return NULL;
  7615                 
  9835                 
  7616             }
  9836             }
  7617             
  9837             
  7618             ERROR;
  9838             ERROR;
  7619         }
  9839         }
  7620         
  9840         
  7621     }/*function_time_to_bool*/
  9841     }/*function_string_to_bool*/
  7622     break;
  9842     break;
  7623 
  9843 
  7624 /****
  9844 /****
  7625  *TIME_TO_SINT
  9845  *STRING_TO_SINT
  7626  */
  9846  */
  7627     case function_time_to_sint :
  9847     case function_string_to_sint :
  7628     {
  9848     {
  7629         symbol_c *last_type_symbol = NULL;
  9849         symbol_c *last_type_symbol = NULL;
  7630 
  9850 
  7631         {
  9851         {
  7632             identifier_c param_name("IN");
  9852             identifier_c param_name("IN");
  7633             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9853             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7634             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9854             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7635             
  9855             
  7636             /* Get the value from a foo(<param_value>) style call */
  9856             /* Get the value from a foo(<param_value>) style call */
  7637             if (IN_param_value == NULL)
  9857             if (IN_param_value == NULL)
  7638               IN_param_value = function_call_param_iterator.next();
  9858               IN_param_value = function_call_param_iterator.next();
  7639             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9859             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7640             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9860             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7641             
  9861             
  7642             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  9862             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7643             {
  9863             {
  7644         
  9864         
  7645                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  9865                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  7646                 s4o.print("(");
  9866                 s4o.print("(");
  7647                 return_type_symbol->accept(*this);
  9867                 return_type_symbol->accept(*this);
  7648                 s4o.print(")__time_to_int(");
  9868                 s4o.print(")__string_to_sint(");
  7649                 IN_param_value->accept(*this);
  9869                 IN_param_value->accept(*this);
  7650                 s4o.print(")");
  9870                 s4o.print(")");
  7651                 return NULL;
  9871                 return NULL;
  7652                 
  9872                 
  7653             }
  9873             }
  7654             
  9874             
  7655             ERROR;
  9875             ERROR;
  7656         }
  9876         }
  7657         
  9877         
  7658     }/*function_time_to_sint*/
  9878     }/*function_string_to_sint*/
  7659     break;
  9879     break;
  7660 
  9880 
  7661 /****
  9881 /****
  7662  *TIME_TO_INT
  9882  *STRING_TO_INT
  7663  */
  9883  */
  7664     case function_time_to_int :
  9884     case function_string_to_int :
  7665     {
  9885     {
  7666         symbol_c *last_type_symbol = NULL;
  9886         symbol_c *last_type_symbol = NULL;
  7667 
  9887 
  7668         {
  9888         {
  7669             identifier_c param_name("IN");
  9889             identifier_c param_name("IN");
  7670             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9890             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7671             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9891             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7672             
  9892             
  7673             /* Get the value from a foo(<param_value>) style call */
  9893             /* Get the value from a foo(<param_value>) style call */
  7674             if (IN_param_value == NULL)
  9894             if (IN_param_value == NULL)
  7675               IN_param_value = function_call_param_iterator.next();
  9895               IN_param_value = function_call_param_iterator.next();
  7676             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9896             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7677             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9897             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7678             
  9898             
  7679             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  9899             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7680             {
  9900             {
  7681         
  9901         
  7682                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  9902                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  7683                 s4o.print("(");
  9903                 s4o.print("(");
  7684                 return_type_symbol->accept(*this);
  9904                 return_type_symbol->accept(*this);
  7685                 s4o.print(")__time_to_int(");
  9905                 s4o.print(")__string_to_sint(");
  7686                 IN_param_value->accept(*this);
  9906                 IN_param_value->accept(*this);
  7687                 s4o.print(")");
  9907                 s4o.print(")");
  7688                 return NULL;
  9908                 return NULL;
  7689                 
  9909                 
  7690             }
  9910             }
  7691             
  9911             
  7692             ERROR;
  9912             ERROR;
  7693         }
  9913         }
  7694         
  9914         
  7695     }/*function_time_to_int*/
  9915     }/*function_string_to_int*/
  7696     break;
  9916     break;
  7697 
  9917 
  7698 /****
  9918 /****
  7699  *TIME_TO_DINT
  9919  *STRING_TO_DINT
  7700  */
  9920  */
  7701     case function_time_to_dint :
  9921     case function_string_to_dint :
  7702     {
  9922     {
  7703         symbol_c *last_type_symbol = NULL;
  9923         symbol_c *last_type_symbol = NULL;
  7704 
  9924 
  7705         {
  9925         {
  7706             identifier_c param_name("IN");
  9926             identifier_c param_name("IN");
  7707             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9927             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7708             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9928             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7709             
  9929             
  7710             /* Get the value from a foo(<param_value>) style call */
  9930             /* Get the value from a foo(<param_value>) style call */
  7711             if (IN_param_value == NULL)
  9931             if (IN_param_value == NULL)
  7712               IN_param_value = function_call_param_iterator.next();
  9932               IN_param_value = function_call_param_iterator.next();
  7713             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9933             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7714             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9934             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7715             
  9935             
  7716             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  9936             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7717             {
  9937             {
  7718         
  9938         
  7719                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  9939                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  7720                 s4o.print("(");
  9940                 s4o.print("(");
  7721                 return_type_symbol->accept(*this);
  9941                 return_type_symbol->accept(*this);
  7722                 s4o.print(")__time_to_int(");
  9942                 s4o.print(")__string_to_sint(");
  7723                 IN_param_value->accept(*this);
  9943                 IN_param_value->accept(*this);
  7724                 s4o.print(")");
  9944                 s4o.print(")");
  7725                 return NULL;
  9945                 return NULL;
  7726                 
  9946                 
  7727             }
  9947             }
  7728             
  9948             
  7729             ERROR;
  9949             ERROR;
  7730         }
  9950         }
  7731         
  9951         
  7732     }/*function_time_to_dint*/
  9952     }/*function_string_to_dint*/
  7733     break;
  9953     break;
  7734 
  9954 
  7735 /****
  9955 /****
  7736  *TIME_TO_LINT
  9956  *STRING_TO_LINT
  7737  */
  9957  */
  7738     case function_time_to_lint :
  9958     case function_string_to_lint :
  7739     {
  9959     {
  7740         symbol_c *last_type_symbol = NULL;
  9960         symbol_c *last_type_symbol = NULL;
  7741 
  9961 
  7742         {
  9962         {
  7743             identifier_c param_name("IN");
  9963             identifier_c param_name("IN");
  7744             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9964             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9965             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7746             
  9966             
  7747             /* Get the value from a foo(<param_value>) style call */
  9967             /* Get the value from a foo(<param_value>) style call */
  7748             if (IN_param_value == NULL)
  9968             if (IN_param_value == NULL)
  7749               IN_param_value = function_call_param_iterator.next();
  9969               IN_param_value = function_call_param_iterator.next();
  7750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9970             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9971             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7752             
  9972             
  7753             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  9973             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7754             {
  9974             {
  7755         
  9975         
  7756                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  9976                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  7757                 s4o.print("(");
  9977                 s4o.print("(");
  7758                 return_type_symbol->accept(*this);
  9978                 return_type_symbol->accept(*this);
  7759                 s4o.print(")__time_to_int(");
  9979                 s4o.print(")__string_to_sint(");
  7760                 IN_param_value->accept(*this);
  9980                 IN_param_value->accept(*this);
  7761                 s4o.print(")");
  9981                 s4o.print(")");
  7762                 return NULL;
  9982                 return NULL;
  7763                 
  9983                 
  7764             }
  9984             }
  7765             
  9985             
  7766             ERROR;
  9986             ERROR;
  7767         }
  9987         }
  7768         
  9988         
  7769     }/*function_time_to_lint*/
  9989     }/*function_string_to_lint*/
  7770     break;
  9990     break;
  7771 
  9991 
  7772 /****
  9992 /****
  7773  *TIME_TO_USINT
  9993  *STRING_TO_USINT
  7774  */
  9994  */
  7775     case function_time_to_usint :
  9995     case function_string_to_usint :
  7776     {
  9996     {
  7777         symbol_c *last_type_symbol = NULL;
  9997         symbol_c *last_type_symbol = NULL;
  7778 
  9998 
  7779         {
  9999         {
  7780             identifier_c param_name("IN");
 10000             identifier_c param_name("IN");
  7781             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10001             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7782             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10002             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7783             
 10003             
  7784             /* Get the value from a foo(<param_value>) style call */
 10004             /* Get the value from a foo(<param_value>) style call */
  7785             if (IN_param_value == NULL)
 10005             if (IN_param_value == NULL)
  7786               IN_param_value = function_call_param_iterator.next();
 10006               IN_param_value = function_call_param_iterator.next();
  7787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10007             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7788             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10008             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7789             
 10009             
  7790             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10010             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7791             {
 10011             {
  7792         
 10012         
  7793                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 10013                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  7794                 s4o.print("(");
 10014                 s4o.print("(");
  7795                 return_type_symbol->accept(*this);
 10015                 return_type_symbol->accept(*this);
  7796                 s4o.print(")__time_to_int(");
 10016                 s4o.print(")__string_to_uint(");
  7797                 IN_param_value->accept(*this);
 10017                 IN_param_value->accept(*this);
  7798                 s4o.print(")");
 10018                 s4o.print(")");
  7799                 return NULL;
 10019                 return NULL;
  7800                 
 10020                 
  7801             }
 10021             }
  7802             
 10022             
  7803             ERROR;
 10023             ERROR;
  7804         }
 10024         }
  7805         
 10025         
  7806     }/*function_time_to_usint*/
 10026     }/*function_string_to_usint*/
  7807     break;
 10027     break;
  7808 
 10028 
  7809 /****
 10029 /****
  7810  *TIME_TO_UINT
 10030  *STRING_TO_UINT
  7811  */
 10031  */
  7812     case function_time_to_uint :
 10032     case function_string_to_uint :
  7813     {
 10033     {
  7814         symbol_c *last_type_symbol = NULL;
 10034         symbol_c *last_type_symbol = NULL;
  7815 
 10035 
  7816         {
 10036         {
  7817             identifier_c param_name("IN");
 10037             identifier_c param_name("IN");
  7818             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10038             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7819             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10039             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7820             
 10040             
  7821             /* Get the value from a foo(<param_value>) style call */
 10041             /* Get the value from a foo(<param_value>) style call */
  7822             if (IN_param_value == NULL)
 10042             if (IN_param_value == NULL)
  7823               IN_param_value = function_call_param_iterator.next();
 10043               IN_param_value = function_call_param_iterator.next();
  7824             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10044             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7825             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10045             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7826             
 10046             
  7827             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10047             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7828             {
 10048             {
  7829         
 10049         
  7830                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 10050                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  7831                 s4o.print("(");
 10051                 s4o.print("(");
  7832                 return_type_symbol->accept(*this);
 10052                 return_type_symbol->accept(*this);
  7833                 s4o.print(")__time_to_int(");
 10053                 s4o.print(")__string_to_uint(");
  7834                 IN_param_value->accept(*this);
 10054                 IN_param_value->accept(*this);
  7835                 s4o.print(")");
 10055                 s4o.print(")");
  7836                 return NULL;
 10056                 return NULL;
  7837                 
 10057                 
  7838             }
 10058             }
  7839             
 10059             
  7840             ERROR;
 10060             ERROR;
  7841         }
 10061         }
  7842         
 10062         
  7843     }/*function_time_to_uint*/
 10063     }/*function_string_to_uint*/
  7844     break;
 10064     break;
  7845 
 10065 
  7846 /****
 10066 /****
  7847  *TIME_TO_UDINT
 10067  *STRING_TO_UDINT
  7848  */
 10068  */
  7849     case function_time_to_udint :
 10069     case function_string_to_udint :
  7850     {
 10070     {
  7851         symbol_c *last_type_symbol = NULL;
 10071         symbol_c *last_type_symbol = NULL;
  7852 
 10072 
  7853         {
 10073         {
  7854             identifier_c param_name("IN");
 10074             identifier_c param_name("IN");
  7855             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10075             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7856             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10076             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7857             
 10077             
  7858             /* Get the value from a foo(<param_value>) style call */
 10078             /* Get the value from a foo(<param_value>) style call */
  7859             if (IN_param_value == NULL)
 10079             if (IN_param_value == NULL)
  7860               IN_param_value = function_call_param_iterator.next();
 10080               IN_param_value = function_call_param_iterator.next();
  7861             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10081             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7862             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10082             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7863             
 10083             
  7864             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10084             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7865             {
 10085             {
  7866         
 10086         
  7867                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 10087                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  7868                 s4o.print("(");
 10088                 s4o.print("(");
  7869                 return_type_symbol->accept(*this);
 10089                 return_type_symbol->accept(*this);
  7870                 s4o.print(")__time_to_int(");
 10090                 s4o.print(")__string_to_uint(");
  7871                 IN_param_value->accept(*this);
 10091                 IN_param_value->accept(*this);
  7872                 s4o.print(")");
 10092                 s4o.print(")");
  7873                 return NULL;
 10093                 return NULL;
  7874                 
 10094                 
  7875             }
 10095             }
  7876             
 10096             
  7877             ERROR;
 10097             ERROR;
  7878         }
 10098         }
  7879         
 10099         
  7880     }/*function_time_to_udint*/
 10100     }/*function_string_to_udint*/
  7881     break;
 10101     break;
  7882 
 10102 
  7883 /****
 10103 /****
  7884  *TIME_TO_ULINT
 10104  *STRING_TO_ULINT
  7885  */
 10105  */
  7886     case function_time_to_ulint :
 10106     case function_string_to_ulint :
  7887     {
 10107     {
  7888         symbol_c *last_type_symbol = NULL;
 10108         symbol_c *last_type_symbol = NULL;
  7889 
 10109 
  7890         {
 10110         {
  7891             identifier_c param_name("IN");
 10111             identifier_c param_name("IN");
  7892             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10112             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7893             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7894             
 10114             
  7895             /* Get the value from a foo(<param_value>) style call */
 10115             /* Get the value from a foo(<param_value>) style call */
  7896             if (IN_param_value == NULL)
 10116             if (IN_param_value == NULL)
  7897               IN_param_value = function_call_param_iterator.next();
 10117               IN_param_value = function_call_param_iterator.next();
  7898             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7899             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7900             
 10120             
  7901             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10121             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7902             {
 10122             {
  7903         
 10123         
  7904                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 10124                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  7905                 s4o.print("(");
 10125                 s4o.print("(");
  7906                 return_type_symbol->accept(*this);
 10126                 return_type_symbol->accept(*this);
  7907                 s4o.print(")__time_to_int(");
 10127                 s4o.print(")__string_to_uint(");
  7908                 IN_param_value->accept(*this);
 10128                 IN_param_value->accept(*this);
  7909                 s4o.print(")");
 10129                 s4o.print(")");
  7910                 return NULL;
 10130                 return NULL;
  7911                 
 10131                 
  7912             }
 10132             }
  7913             
 10133             
  7914             ERROR;
 10134             ERROR;
  7915         }
 10135         }
  7916         
 10136         
  7917     }/*function_time_to_ulint*/
 10137     }/*function_string_to_ulint*/
  7918     break;
 10138     break;
  7919 
 10139 
  7920 /****
 10140 /****
  7921  *TIME_TO_REAL
 10141  *STRING_TO_REAL
  7922  */
 10142  */
  7923     case function_time_to_real :
 10143     case function_string_to_real :
  7924     {
 10144     {
  7925         symbol_c *last_type_symbol = NULL;
 10145         symbol_c *last_type_symbol = NULL;
  7926 
 10146 
  7927         {
 10147         {
  7928             identifier_c param_name("IN");
 10148             identifier_c param_name("IN");
  7929             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10149             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7930             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10150             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7931             
 10151             
  7932             /* Get the value from a foo(<param_value>) style call */
 10152             /* Get the value from a foo(<param_value>) style call */
  7933             if (IN_param_value == NULL)
 10153             if (IN_param_value == NULL)
  7934               IN_param_value = function_call_param_iterator.next();
 10154               IN_param_value = function_call_param_iterator.next();
  7935             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10155             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7936             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10156             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7937             
 10157             
  7938             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10158             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7939             {
 10159             {
  7940         
 10160         
  7941                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 10161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  7942                 s4o.print("(");
 10162                 s4o.print("(");
  7943                 return_type_symbol->accept(*this);
 10163                 return_type_symbol->accept(*this);
  7944                 s4o.print(")__time_to_real(");
 10164                 s4o.print(")__string_to_real(");
  7945                 IN_param_value->accept(*this);
 10165                 IN_param_value->accept(*this);
  7946                 s4o.print(")");
 10166                 s4o.print(")");
  7947                 return NULL;
 10167                 return NULL;
  7948                 
 10168                 
  7949             }
 10169             }
  7950             
 10170             
  7951             ERROR;
 10171             ERROR;
  7952         }
 10172         }
  7953         
 10173         
  7954     }/*function_time_to_real*/
 10174     }/*function_string_to_real*/
  7955     break;
 10175     break;
  7956 
 10176 
  7957 /****
 10177 /****
  7958  *TIME_TO_LREAL
 10178  *STRING_TO_LREAL
  7959  */
 10179  */
  7960     case function_time_to_lreal :
 10180     case function_string_to_lreal :
  7961     {
 10181     {
  7962         symbol_c *last_type_symbol = NULL;
 10182         symbol_c *last_type_symbol = NULL;
  7963 
 10183 
  7964         {
 10184         {
  7965             identifier_c param_name("IN");
 10185             identifier_c param_name("IN");
  7966             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10186             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7967             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10187             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7968             
 10188             
  7969             /* Get the value from a foo(<param_value>) style call */
 10189             /* Get the value from a foo(<param_value>) style call */
  7970             if (IN_param_value == NULL)
 10190             if (IN_param_value == NULL)
  7971               IN_param_value = function_call_param_iterator.next();
 10191               IN_param_value = function_call_param_iterator.next();
  7972             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10192             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7973             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10193             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7974             
 10194             
  7975             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10195             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7976             {
 10196             {
  7977         
 10197         
  7978                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 10198                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  7979                 s4o.print("(");
 10199                 s4o.print("(");
  7980                 return_type_symbol->accept(*this);
 10200                 return_type_symbol->accept(*this);
  7981                 s4o.print(")__time_to_real(");
 10201                 s4o.print(")__string_to_real(");
  7982                 IN_param_value->accept(*this);
 10202                 IN_param_value->accept(*this);
  7983                 s4o.print(")");
 10203                 s4o.print(")");
  7984                 return NULL;
 10204                 return NULL;
  7985                 
 10205                 
  7986             }
 10206             }
  7987             
 10207             
  7988             ERROR;
 10208             ERROR;
  7989         }
 10209         }
  7990         
 10210         
  7991     }/*function_time_to_lreal*/
 10211     }/*function_string_to_lreal*/
  7992     break;
 10212     break;
  7993 
 10213 
  7994 /****
 10214 /****
  7995  *TIME_TO_STRING
 10215  *STRING_TO_TIME
  7996  */
 10216  */
  7997     case function_time_to_string :
 10217     case function_string_to_time :
  7998     {
 10218     {
  7999         symbol_c *last_type_symbol = NULL;
 10219         symbol_c *last_type_symbol = NULL;
  8000 
 10220 
  8001         {
 10221         {
  8002             identifier_c param_name("IN");
 10222             identifier_c param_name("IN");
  8003             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10223             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8004             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8005             
 10225             
  8006             /* Get the value from a foo(<param_value>) style call */
 10226             /* Get the value from a foo(<param_value>) style call */
  8007             if (IN_param_value == NULL)
 10227             if (IN_param_value == NULL)
  8008               IN_param_value = function_call_param_iterator.next();
 10228               IN_param_value = function_call_param_iterator.next();
  8009             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10229             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8010             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10230             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8011             
 10231             
  8012             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10232             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10233             {
       
 10234         
       
 10235                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10236                 s4o.print("(");
       
 10237                 return_type_symbol->accept(*this);
       
 10238                 s4o.print(")__string_to_time(");
       
 10239                 IN_param_value->accept(*this);
       
 10240                 s4o.print(")");
       
 10241                 return NULL;
       
 10242                 
       
 10243             }
       
 10244             
       
 10245             ERROR;
       
 10246         }
       
 10247         
       
 10248     }/*function_string_to_time*/
       
 10249     break;
       
 10250 
       
 10251 /****
       
 10252  *STRING_TO_DATE
       
 10253  */
       
 10254     case function_string_to_date :
       
 10255     {
       
 10256         symbol_c *last_type_symbol = NULL;
       
 10257 
       
 10258         {
       
 10259             identifier_c param_name("IN");
       
 10260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10261             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10262             
       
 10263             /* Get the value from a foo(<param_value>) style call */
       
 10264             if (IN_param_value == NULL)
       
 10265               IN_param_value = function_call_param_iterator.next();
       
 10266             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10267             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10268             
       
 10269             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10270             {
       
 10271         
       
 10272                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10273                 s4o.print("(");
       
 10274                 return_type_symbol->accept(*this);
       
 10275                 s4o.print(")__string_to_time(");
       
 10276                 IN_param_value->accept(*this);
       
 10277                 s4o.print(")");
       
 10278                 return NULL;
       
 10279                 
       
 10280             }
       
 10281             
       
 10282             ERROR;
       
 10283         }
       
 10284         
       
 10285     }/*function_string_to_date*/
       
 10286     break;
       
 10287 
       
 10288 /****
       
 10289  *STRING_TO_TOD
       
 10290  */
       
 10291     case function_string_to_tod :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10307             {
       
 10308         
       
 10309                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10310                 s4o.print("(");
       
 10311                 return_type_symbol->accept(*this);
       
 10312                 s4o.print(")__string_to_time(");
       
 10313                 IN_param_value->accept(*this);
       
 10314                 s4o.print(")");
       
 10315                 return NULL;
       
 10316                 
       
 10317             }
       
 10318             
       
 10319             ERROR;
       
 10320         }
       
 10321         
       
 10322     }/*function_string_to_tod*/
       
 10323     break;
       
 10324 
       
 10325 /****
       
 10326  *STRING_TO_DT
       
 10327  */
       
 10328     case function_string_to_dt :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10344             {
       
 10345         
       
 10346                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10347                 s4o.print("(");
       
 10348                 return_type_symbol->accept(*this);
       
 10349                 s4o.print(")__string_to_time(");
       
 10350                 IN_param_value->accept(*this);
       
 10351                 s4o.print(")");
       
 10352                 return NULL;
       
 10353                 
       
 10354             }
       
 10355             
       
 10356             ERROR;
       
 10357         }
       
 10358         
       
 10359     }/*function_string_to_dt*/
       
 10360     break;
       
 10361 
       
 10362 /****
       
 10363  *STRING_TO_BYTE
       
 10364  */
       
 10365     case function_string_to_byte :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10381             {
       
 10382         
       
 10383                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10384                 s4o.print("(");
       
 10385                 return_type_symbol->accept(*this);
       
 10386                 s4o.print(")__string_to_bit(");
       
 10387                 IN_param_value->accept(*this);
       
 10388                 s4o.print(")");
       
 10389                 return NULL;
       
 10390                 
       
 10391             }
       
 10392             
       
 10393             ERROR;
       
 10394         }
       
 10395         
       
 10396     }/*function_string_to_byte*/
       
 10397     break;
       
 10398 
       
 10399 /****
       
 10400  *STRING_TO_WORD
       
 10401  */
       
 10402     case function_string_to_word :
       
 10403     {
       
 10404         symbol_c *last_type_symbol = NULL;
       
 10405 
       
 10406         {
       
 10407             identifier_c param_name("IN");
       
 10408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10410             
       
 10411             /* Get the value from a foo(<param_value>) style call */
       
 10412             if (IN_param_value == NULL)
       
 10413               IN_param_value = function_call_param_iterator.next();
       
 10414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10416             
       
 10417             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10418             {
       
 10419         
       
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10421                 s4o.print("(");
       
 10422                 return_type_symbol->accept(*this);
       
 10423                 s4o.print(")__string_to_bit(");
       
 10424                 IN_param_value->accept(*this);
       
 10425                 s4o.print(")");
       
 10426                 return NULL;
       
 10427                 
       
 10428             }
       
 10429             
       
 10430             ERROR;
       
 10431         }
       
 10432         
       
 10433     }/*function_string_to_word*/
       
 10434     break;
       
 10435 
       
 10436 /****
       
 10437  *STRING_TO_DWORD
       
 10438  */
       
 10439     case function_string_to_dword :
       
 10440     {
       
 10441         symbol_c *last_type_symbol = NULL;
       
 10442 
       
 10443         {
       
 10444             identifier_c param_name("IN");
       
 10445             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10447             
       
 10448             /* Get the value from a foo(<param_value>) style call */
       
 10449             if (IN_param_value == NULL)
       
 10450               IN_param_value = function_call_param_iterator.next();
       
 10451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10452             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10453             
       
 10454             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10455             {
       
 10456         
       
 10457                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10458                 s4o.print("(");
       
 10459                 return_type_symbol->accept(*this);
       
 10460                 s4o.print(")__string_to_bit(");
       
 10461                 IN_param_value->accept(*this);
       
 10462                 s4o.print(")");
       
 10463                 return NULL;
       
 10464                 
       
 10465             }
       
 10466             
       
 10467             ERROR;
       
 10468         }
       
 10469         
       
 10470     }/*function_string_to_dword*/
       
 10471     break;
       
 10472 
       
 10473 /****
       
 10474  *STRING_TO_LWORD
       
 10475  */
       
 10476     case function_string_to_lword :
       
 10477     {
       
 10478         symbol_c *last_type_symbol = NULL;
       
 10479 
       
 10480         {
       
 10481             identifier_c param_name("IN");
       
 10482             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10483             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10484             
       
 10485             /* Get the value from a foo(<param_value>) style call */
       
 10486             if (IN_param_value == NULL)
       
 10487               IN_param_value = function_call_param_iterator.next();
       
 10488             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10489             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10490             
       
 10491             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 10492             {
       
 10493         
       
 10494                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10495                 s4o.print("(");
       
 10496                 return_type_symbol->accept(*this);
       
 10497                 s4o.print(")__string_to_bit(");
       
 10498                 IN_param_value->accept(*this);
       
 10499                 s4o.print(")");
       
 10500                 return NULL;
       
 10501                 
       
 10502             }
       
 10503             
       
 10504             ERROR;
       
 10505         }
       
 10506         
       
 10507     }/*function_string_to_lword*/
       
 10508     break;
       
 10509 
       
 10510 /****
       
 10511  *BYTE_TO_BOOL
       
 10512  */
       
 10513     case function_byte_to_bool :
       
 10514     {
       
 10515         symbol_c *last_type_symbol = NULL;
       
 10516 
       
 10517         {
       
 10518             identifier_c param_name("IN");
       
 10519             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10520             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10521             
       
 10522             /* Get the value from a foo(<param_value>) style call */
       
 10523             if (IN_param_value == NULL)
       
 10524               IN_param_value = function_call_param_iterator.next();
       
 10525             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10526             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10527             
       
 10528             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10529             {
       
 10530         
       
 10531                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10532                 s4o.print("(");
       
 10533                 return_type_symbol->accept(*this);
       
 10534                 s4o.print(")");
       
 10535                 IN_param_value->accept(*this);
       
 10536                 return NULL;
       
 10537                 
       
 10538             }
       
 10539             
       
 10540             ERROR;
       
 10541         }
       
 10542         
       
 10543     }/*function_byte_to_bool*/
       
 10544     break;
       
 10545 
       
 10546 /****
       
 10547  *BYTE_TO_SINT
       
 10548  */
       
 10549     case function_byte_to_sint :
       
 10550     {
       
 10551         symbol_c *last_type_symbol = NULL;
       
 10552 
       
 10553         {
       
 10554             identifier_c param_name("IN");
       
 10555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10556             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10557             
       
 10558             /* Get the value from a foo(<param_value>) style call */
       
 10559             if (IN_param_value == NULL)
       
 10560               IN_param_value = function_call_param_iterator.next();
       
 10561             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10562             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10563             
       
 10564             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10565             {
       
 10566         
       
 10567                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10568                 s4o.print("(");
       
 10569                 return_type_symbol->accept(*this);
       
 10570                 s4o.print(")");
       
 10571                 IN_param_value->accept(*this);
       
 10572                 return NULL;
       
 10573                 
       
 10574             }
       
 10575             
       
 10576             ERROR;
       
 10577         }
       
 10578         
       
 10579     }/*function_byte_to_sint*/
       
 10580     break;
       
 10581 
       
 10582 /****
       
 10583  *BYTE_TO_INT
       
 10584  */
       
 10585     case function_byte_to_int :
       
 10586     {
       
 10587         symbol_c *last_type_symbol = NULL;
       
 10588 
       
 10589         {
       
 10590             identifier_c param_name("IN");
       
 10591             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10592             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10593             
       
 10594             /* Get the value from a foo(<param_value>) style call */
       
 10595             if (IN_param_value == NULL)
       
 10596               IN_param_value = function_call_param_iterator.next();
       
 10597             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10598             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10599             
       
 10600             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10601             {
       
 10602         
       
 10603                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10604                 s4o.print("(");
       
 10605                 return_type_symbol->accept(*this);
       
 10606                 s4o.print(")");
       
 10607                 IN_param_value->accept(*this);
       
 10608                 return NULL;
       
 10609                 
       
 10610             }
       
 10611             
       
 10612             ERROR;
       
 10613         }
       
 10614         
       
 10615     }/*function_byte_to_int*/
       
 10616     break;
       
 10617 
       
 10618 /****
       
 10619  *BYTE_TO_DINT
       
 10620  */
       
 10621     case function_byte_to_dint :
       
 10622     {
       
 10623         symbol_c *last_type_symbol = NULL;
       
 10624 
       
 10625         {
       
 10626             identifier_c param_name("IN");
       
 10627             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10628             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10629             
       
 10630             /* Get the value from a foo(<param_value>) style call */
       
 10631             if (IN_param_value == NULL)
       
 10632               IN_param_value = function_call_param_iterator.next();
       
 10633             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10634             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10635             
       
 10636             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10637             {
       
 10638         
       
 10639                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10640                 s4o.print("(");
       
 10641                 return_type_symbol->accept(*this);
       
 10642                 s4o.print(")");
       
 10643                 IN_param_value->accept(*this);
       
 10644                 return NULL;
       
 10645                 
       
 10646             }
       
 10647             
       
 10648             ERROR;
       
 10649         }
       
 10650         
       
 10651     }/*function_byte_to_dint*/
       
 10652     break;
       
 10653 
       
 10654 /****
       
 10655  *BYTE_TO_LINT
       
 10656  */
       
 10657     case function_byte_to_lint :
       
 10658     {
       
 10659         symbol_c *last_type_symbol = NULL;
       
 10660 
       
 10661         {
       
 10662             identifier_c param_name("IN");
       
 10663             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10664             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10665             
       
 10666             /* Get the value from a foo(<param_value>) style call */
       
 10667             if (IN_param_value == NULL)
       
 10668               IN_param_value = function_call_param_iterator.next();
       
 10669             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10670             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10671             
       
 10672             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10673             {
       
 10674         
       
 10675                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10676                 s4o.print("(");
       
 10677                 return_type_symbol->accept(*this);
       
 10678                 s4o.print(")");
       
 10679                 IN_param_value->accept(*this);
       
 10680                 return NULL;
       
 10681                 
       
 10682             }
       
 10683             
       
 10684             ERROR;
       
 10685         }
       
 10686         
       
 10687     }/*function_byte_to_lint*/
       
 10688     break;
       
 10689 
       
 10690 /****
       
 10691  *BYTE_TO_USINT
       
 10692  */
       
 10693     case function_byte_to_usint :
       
 10694     {
       
 10695         symbol_c *last_type_symbol = NULL;
       
 10696 
       
 10697         {
       
 10698             identifier_c param_name("IN");
       
 10699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10701             
       
 10702             /* Get the value from a foo(<param_value>) style call */
       
 10703             if (IN_param_value == NULL)
       
 10704               IN_param_value = function_call_param_iterator.next();
       
 10705             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10706             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10707             
       
 10708             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10709             {
       
 10710         
       
 10711                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10712                 s4o.print("(");
       
 10713                 return_type_symbol->accept(*this);
       
 10714                 s4o.print(")");
       
 10715                 IN_param_value->accept(*this);
       
 10716                 return NULL;
       
 10717                 
       
 10718             }
       
 10719             
       
 10720             ERROR;
       
 10721         }
       
 10722         
       
 10723     }/*function_byte_to_usint*/
       
 10724     break;
       
 10725 
       
 10726 /****
       
 10727  *BYTE_TO_UINT
       
 10728  */
       
 10729     case function_byte_to_uint :
       
 10730     {
       
 10731         symbol_c *last_type_symbol = NULL;
       
 10732 
       
 10733         {
       
 10734             identifier_c param_name("IN");
       
 10735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10736             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10737             
       
 10738             /* Get the value from a foo(<param_value>) style call */
       
 10739             if (IN_param_value == NULL)
       
 10740               IN_param_value = function_call_param_iterator.next();
       
 10741             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10742             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10743             
       
 10744             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10745             {
       
 10746         
       
 10747                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10748                 s4o.print("(");
       
 10749                 return_type_symbol->accept(*this);
       
 10750                 s4o.print(")");
       
 10751                 IN_param_value->accept(*this);
       
 10752                 return NULL;
       
 10753                 
       
 10754             }
       
 10755             
       
 10756             ERROR;
       
 10757         }
       
 10758         
       
 10759     }/*function_byte_to_uint*/
       
 10760     break;
       
 10761 
       
 10762 /****
       
 10763  *BYTE_TO_UDINT
       
 10764  */
       
 10765     case function_byte_to_udint :
       
 10766     {
       
 10767         symbol_c *last_type_symbol = NULL;
       
 10768 
       
 10769         {
       
 10770             identifier_c param_name("IN");
       
 10771             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10772             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10773             
       
 10774             /* Get the value from a foo(<param_value>) style call */
       
 10775             if (IN_param_value == NULL)
       
 10776               IN_param_value = function_call_param_iterator.next();
       
 10777             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10778             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10779             
       
 10780             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10781             {
       
 10782         
       
 10783                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10784                 s4o.print("(");
       
 10785                 return_type_symbol->accept(*this);
       
 10786                 s4o.print(")");
       
 10787                 IN_param_value->accept(*this);
       
 10788                 return NULL;
       
 10789                 
       
 10790             }
       
 10791             
       
 10792             ERROR;
       
 10793         }
       
 10794         
       
 10795     }/*function_byte_to_udint*/
       
 10796     break;
       
 10797 
       
 10798 /****
       
 10799  *BYTE_TO_ULINT
       
 10800  */
       
 10801     case function_byte_to_ulint :
       
 10802     {
       
 10803         symbol_c *last_type_symbol = NULL;
       
 10804 
       
 10805         {
       
 10806             identifier_c param_name("IN");
       
 10807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10808             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10809             
       
 10810             /* Get the value from a foo(<param_value>) style call */
       
 10811             if (IN_param_value == NULL)
       
 10812               IN_param_value = function_call_param_iterator.next();
       
 10813             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10814             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10815             
       
 10816             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10817             {
       
 10818         
       
 10819                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10820                 s4o.print("(");
       
 10821                 return_type_symbol->accept(*this);
       
 10822                 s4o.print(")");
       
 10823                 IN_param_value->accept(*this);
       
 10824                 return NULL;
       
 10825                 
       
 10826             }
       
 10827             
       
 10828             ERROR;
       
 10829         }
       
 10830         
       
 10831     }/*function_byte_to_ulint*/
       
 10832     break;
       
 10833 
       
 10834 /****
       
 10835  *BYTE_TO_REAL
       
 10836  */
       
 10837     case function_byte_to_real :
       
 10838     {
       
 10839         symbol_c *last_type_symbol = NULL;
       
 10840 
       
 10841         {
       
 10842             identifier_c param_name("IN");
       
 10843             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10844             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10845             
       
 10846             /* Get the value from a foo(<param_value>) style call */
       
 10847             if (IN_param_value == NULL)
       
 10848               IN_param_value = function_call_param_iterator.next();
       
 10849             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10850             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10851             
       
 10852             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10853             {
       
 10854         
       
 10855                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10856                 s4o.print("(");
       
 10857                 return_type_symbol->accept(*this);
       
 10858                 s4o.print(")");
       
 10859                 IN_param_value->accept(*this);
       
 10860                 return NULL;
       
 10861                 
       
 10862             }
       
 10863             
       
 10864             ERROR;
       
 10865         }
       
 10866         
       
 10867     }/*function_byte_to_real*/
       
 10868     break;
       
 10869 
       
 10870 /****
       
 10871  *BYTE_TO_LREAL
       
 10872  */
       
 10873     case function_byte_to_lreal :
       
 10874     {
       
 10875         symbol_c *last_type_symbol = NULL;
       
 10876 
       
 10877         {
       
 10878             identifier_c param_name("IN");
       
 10879             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10880             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10881             
       
 10882             /* Get the value from a foo(<param_value>) style call */
       
 10883             if (IN_param_value == NULL)
       
 10884               IN_param_value = function_call_param_iterator.next();
       
 10885             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10886             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10887             
       
 10888             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10889             {
       
 10890         
       
 10891                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10892                 s4o.print("(");
       
 10893                 return_type_symbol->accept(*this);
       
 10894                 s4o.print(")");
       
 10895                 IN_param_value->accept(*this);
       
 10896                 return NULL;
       
 10897                 
       
 10898             }
       
 10899             
       
 10900             ERROR;
       
 10901         }
       
 10902         
       
 10903     }/*function_byte_to_lreal*/
       
 10904     break;
       
 10905 
       
 10906 /****
       
 10907  *BYTE_TO_TIME
       
 10908  */
       
 10909     case function_byte_to_time :
       
 10910     {
       
 10911         symbol_c *last_type_symbol = NULL;
       
 10912 
       
 10913         {
       
 10914             identifier_c param_name("IN");
       
 10915             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10916             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10917             
       
 10918             /* Get the value from a foo(<param_value>) style call */
       
 10919             if (IN_param_value == NULL)
       
 10920               IN_param_value = function_call_param_iterator.next();
       
 10921             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10922             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10923             
       
 10924             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10925             {
       
 10926         
       
 10927                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10928                 s4o.print("(");
       
 10929                 return_type_symbol->accept(*this);
       
 10930                 s4o.print(")__int_to_time(");
       
 10931                 IN_param_value->accept(*this);
       
 10932                 s4o.print(")");
       
 10933                 return NULL;
       
 10934                 
       
 10935             }
       
 10936             
       
 10937             ERROR;
       
 10938         }
       
 10939         
       
 10940     }/*function_byte_to_time*/
       
 10941     break;
       
 10942 
       
 10943 /****
       
 10944  *BYTE_TO_DATE
       
 10945  */
       
 10946     case function_byte_to_date :
       
 10947     {
       
 10948         symbol_c *last_type_symbol = NULL;
       
 10949 
       
 10950         {
       
 10951             identifier_c param_name("IN");
       
 10952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10954             
       
 10955             /* Get the value from a foo(<param_value>) style call */
       
 10956             if (IN_param_value == NULL)
       
 10957               IN_param_value = function_call_param_iterator.next();
       
 10958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10960             
       
 10961             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10962             {
       
 10963         
       
 10964                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10965                 s4o.print("(");
       
 10966                 return_type_symbol->accept(*this);
       
 10967                 s4o.print(")__int_to_time(");
       
 10968                 IN_param_value->accept(*this);
       
 10969                 s4o.print(")");
       
 10970                 return NULL;
       
 10971                 
       
 10972             }
       
 10973             
       
 10974             ERROR;
       
 10975         }
       
 10976         
       
 10977     }/*function_byte_to_date*/
       
 10978     break;
       
 10979 
       
 10980 /****
       
 10981  *BYTE_TO_TOD
       
 10982  */
       
 10983     case function_byte_to_tod :
       
 10984     {
       
 10985         symbol_c *last_type_symbol = NULL;
       
 10986 
       
 10987         {
       
 10988             identifier_c param_name("IN");
       
 10989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10990             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10991             
       
 10992             /* Get the value from a foo(<param_value>) style call */
       
 10993             if (IN_param_value == NULL)
       
 10994               IN_param_value = function_call_param_iterator.next();
       
 10995             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10996             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10997             
       
 10998             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 10999             {
       
 11000         
       
 11001                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11002                 s4o.print("(");
       
 11003                 return_type_symbol->accept(*this);
       
 11004                 s4o.print(")__int_to_time(");
       
 11005                 IN_param_value->accept(*this);
       
 11006                 s4o.print(")");
       
 11007                 return NULL;
       
 11008                 
       
 11009             }
       
 11010             
       
 11011             ERROR;
       
 11012         }
       
 11013         
       
 11014     }/*function_byte_to_tod*/
       
 11015     break;
       
 11016 
       
 11017 /****
       
 11018  *BYTE_TO_DT
       
 11019  */
       
 11020     case function_byte_to_dt :
       
 11021     {
       
 11022         symbol_c *last_type_symbol = NULL;
       
 11023 
       
 11024         {
       
 11025             identifier_c param_name("IN");
       
 11026             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11027             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11028             
       
 11029             /* Get the value from a foo(<param_value>) style call */
       
 11030             if (IN_param_value == NULL)
       
 11031               IN_param_value = function_call_param_iterator.next();
       
 11032             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11033             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11034             
       
 11035             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11036             {
       
 11037         
       
 11038                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11039                 s4o.print("(");
       
 11040                 return_type_symbol->accept(*this);
       
 11041                 s4o.print(")__int_to_time(");
       
 11042                 IN_param_value->accept(*this);
       
 11043                 s4o.print(")");
       
 11044                 return NULL;
       
 11045                 
       
 11046             }
       
 11047             
       
 11048             ERROR;
       
 11049         }
       
 11050         
       
 11051     }/*function_byte_to_dt*/
       
 11052     break;
       
 11053 
       
 11054 /****
       
 11055  *BYTE_TO_STRING
       
 11056  */
       
 11057     case function_byte_to_string :
       
 11058     {
       
 11059         symbol_c *last_type_symbol = NULL;
       
 11060 
       
 11061         {
       
 11062             identifier_c param_name("IN");
       
 11063             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11064             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11065             
       
 11066             /* Get the value from a foo(<param_value>) style call */
       
 11067             if (IN_param_value == NULL)
       
 11068               IN_param_value = function_call_param_iterator.next();
       
 11069             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11070             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11071             
       
 11072             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
  8013             {
 11073             {
  8014         
 11074         
  8015                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 11075                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  8016                 s4o.print("(");
 11076                 s4o.print("(");
  8017                 return_type_symbol->accept(*this);
 11077                 return_type_symbol->accept(*this);
  8018                 s4o.print(")__time_to_string(");
 11078                 s4o.print(")__bit_to_string(");
  8019                 IN_param_value->accept(*this);
 11079                 IN_param_value->accept(*this);
  8020                 s4o.print(")");
 11080                 s4o.print(")");
  8021                 return NULL;
 11081                 return NULL;
  8022                 
 11082                 
  8023             }
 11083             }
  8024             
 11084             
  8025             ERROR;
 11085             ERROR;
  8026         }
 11086         }
  8027         
 11087         
  8028     }/*function_time_to_string*/
 11088     }/*function_byte_to_string*/
  8029     break;
 11089     break;
  8030 
 11090 
  8031 /****
 11091 /****
  8032  *TIME_TO_BYTE
 11092  *BYTE_TO_WORD
  8033  */
 11093  */
  8034     case function_time_to_byte :
 11094     case function_byte_to_word :
  8035     {
 11095     {
  8036         symbol_c *last_type_symbol = NULL;
 11096         symbol_c *last_type_symbol = NULL;
  8037 
 11097 
  8038         {
 11098         {
  8039             identifier_c param_name("IN");
 11099             identifier_c param_name("IN");
  8040             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11100             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11101             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8042             
 11102             
  8043             /* Get the value from a foo(<param_value>) style call */
 11103             /* Get the value from a foo(<param_value>) style call */
  8044             if (IN_param_value == NULL)
 11104             if (IN_param_value == NULL)
  8045               IN_param_value = function_call_param_iterator.next();
 11105               IN_param_value = function_call_param_iterator.next();
  8046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11106             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11107             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8048             
 11108             
  8049             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 11109             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11110             {
       
 11111         
       
 11112                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11113                 s4o.print("(");
       
 11114                 return_type_symbol->accept(*this);
       
 11115                 s4o.print(")");
       
 11116                 IN_param_value->accept(*this);
       
 11117                 return NULL;
       
 11118                 
       
 11119             }
       
 11120             
       
 11121             ERROR;
       
 11122         }
       
 11123         
       
 11124     }/*function_byte_to_word*/
       
 11125     break;
       
 11126 
       
 11127 /****
       
 11128  *BYTE_TO_DWORD
       
 11129  */
       
 11130     case function_byte_to_dword :
       
 11131     {
       
 11132         symbol_c *last_type_symbol = NULL;
       
 11133 
       
 11134         {
       
 11135             identifier_c param_name("IN");
       
 11136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11138             
       
 11139             /* Get the value from a foo(<param_value>) style call */
       
 11140             if (IN_param_value == NULL)
       
 11141               IN_param_value = function_call_param_iterator.next();
       
 11142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11144             
       
 11145             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11146             {
       
 11147         
       
 11148                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11149                 s4o.print("(");
       
 11150                 return_type_symbol->accept(*this);
       
 11151                 s4o.print(")");
       
 11152                 IN_param_value->accept(*this);
       
 11153                 return NULL;
       
 11154                 
       
 11155             }
       
 11156             
       
 11157             ERROR;
       
 11158         }
       
 11159         
       
 11160     }/*function_byte_to_dword*/
       
 11161     break;
       
 11162 
       
 11163 /****
       
 11164  *BYTE_TO_LWORD
       
 11165  */
       
 11166     case function_byte_to_lword :
       
 11167     {
       
 11168         symbol_c *last_type_symbol = NULL;
       
 11169 
       
 11170         {
       
 11171             identifier_c param_name("IN");
       
 11172             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11173             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11174             
       
 11175             /* Get the value from a foo(<param_value>) style call */
       
 11176             if (IN_param_value == NULL)
       
 11177               IN_param_value = function_call_param_iterator.next();
       
 11178             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11179             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11180             
       
 11181             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11182             {
       
 11183         
       
 11184                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11185                 s4o.print("(");
       
 11186                 return_type_symbol->accept(*this);
       
 11187                 s4o.print(")");
       
 11188                 IN_param_value->accept(*this);
       
 11189                 return NULL;
       
 11190                 
       
 11191             }
       
 11192             
       
 11193             ERROR;
       
 11194         }
       
 11195         
       
 11196     }/*function_byte_to_lword*/
       
 11197     break;
       
 11198 
       
 11199 /****
       
 11200  *WORD_TO_BOOL
       
 11201  */
       
 11202     case function_word_to_bool :
       
 11203     {
       
 11204         symbol_c *last_type_symbol = NULL;
       
 11205 
       
 11206         {
       
 11207             identifier_c param_name("IN");
       
 11208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11210             
       
 11211             /* Get the value from a foo(<param_value>) style call */
       
 11212             if (IN_param_value == NULL)
       
 11213               IN_param_value = function_call_param_iterator.next();
       
 11214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11216             
       
 11217             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11218             {
       
 11219         
       
 11220                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11221                 s4o.print("(");
       
 11222                 return_type_symbol->accept(*this);
       
 11223                 s4o.print(")");
       
 11224                 IN_param_value->accept(*this);
       
 11225                 return NULL;
       
 11226                 
       
 11227             }
       
 11228             
       
 11229             ERROR;
       
 11230         }
       
 11231         
       
 11232     }/*function_word_to_bool*/
       
 11233     break;
       
 11234 
       
 11235 /****
       
 11236  *WORD_TO_SINT
       
 11237  */
       
 11238     case function_word_to_sint :
       
 11239     {
       
 11240         symbol_c *last_type_symbol = NULL;
       
 11241 
       
 11242         {
       
 11243             identifier_c param_name("IN");
       
 11244             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11245             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11246             
       
 11247             /* Get the value from a foo(<param_value>) style call */
       
 11248             if (IN_param_value == NULL)
       
 11249               IN_param_value = function_call_param_iterator.next();
       
 11250             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11251             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11252             
       
 11253             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11254             {
       
 11255         
       
 11256                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11257                 s4o.print("(");
       
 11258                 return_type_symbol->accept(*this);
       
 11259                 s4o.print(")");
       
 11260                 IN_param_value->accept(*this);
       
 11261                 return NULL;
       
 11262                 
       
 11263             }
       
 11264             
       
 11265             ERROR;
       
 11266         }
       
 11267         
       
 11268     }/*function_word_to_sint*/
       
 11269     break;
       
 11270 
       
 11271 /****
       
 11272  *WORD_TO_INT
       
 11273  */
       
 11274     case function_word_to_int :
       
 11275     {
       
 11276         symbol_c *last_type_symbol = NULL;
       
 11277 
       
 11278         {
       
 11279             identifier_c param_name("IN");
       
 11280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11282             
       
 11283             /* Get the value from a foo(<param_value>) style call */
       
 11284             if (IN_param_value == NULL)
       
 11285               IN_param_value = function_call_param_iterator.next();
       
 11286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11288             
       
 11289             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11290             {
       
 11291         
       
 11292                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11293                 s4o.print("(");
       
 11294                 return_type_symbol->accept(*this);
       
 11295                 s4o.print(")");
       
 11296                 IN_param_value->accept(*this);
       
 11297                 return NULL;
       
 11298                 
       
 11299             }
       
 11300             
       
 11301             ERROR;
       
 11302         }
       
 11303         
       
 11304     }/*function_word_to_int*/
       
 11305     break;
       
 11306 
       
 11307 /****
       
 11308  *WORD_TO_DINT
       
 11309  */
       
 11310     case function_word_to_dint :
       
 11311     {
       
 11312         symbol_c *last_type_symbol = NULL;
       
 11313 
       
 11314         {
       
 11315             identifier_c param_name("IN");
       
 11316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11317             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11318             
       
 11319             /* Get the value from a foo(<param_value>) style call */
       
 11320             if (IN_param_value == NULL)
       
 11321               IN_param_value = function_call_param_iterator.next();
       
 11322             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11323             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11324             
       
 11325             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11326             {
       
 11327         
       
 11328                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11329                 s4o.print("(");
       
 11330                 return_type_symbol->accept(*this);
       
 11331                 s4o.print(")");
       
 11332                 IN_param_value->accept(*this);
       
 11333                 return NULL;
       
 11334                 
       
 11335             }
       
 11336             
       
 11337             ERROR;
       
 11338         }
       
 11339         
       
 11340     }/*function_word_to_dint*/
       
 11341     break;
       
 11342 
       
 11343 /****
       
 11344  *WORD_TO_LINT
       
 11345  */
       
 11346     case function_word_to_lint :
       
 11347     {
       
 11348         symbol_c *last_type_symbol = NULL;
       
 11349 
       
 11350         {
       
 11351             identifier_c param_name("IN");
       
 11352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11354             
       
 11355             /* Get the value from a foo(<param_value>) style call */
       
 11356             if (IN_param_value == NULL)
       
 11357               IN_param_value = function_call_param_iterator.next();
       
 11358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11360             
       
 11361             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11362             {
       
 11363         
       
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11365                 s4o.print("(");
       
 11366                 return_type_symbol->accept(*this);
       
 11367                 s4o.print(")");
       
 11368                 IN_param_value->accept(*this);
       
 11369                 return NULL;
       
 11370                 
       
 11371             }
       
 11372             
       
 11373             ERROR;
       
 11374         }
       
 11375         
       
 11376     }/*function_word_to_lint*/
       
 11377     break;
       
 11378 
       
 11379 /****
       
 11380  *WORD_TO_USINT
       
 11381  */
       
 11382     case function_word_to_usint :
       
 11383     {
       
 11384         symbol_c *last_type_symbol = NULL;
       
 11385 
       
 11386         {
       
 11387             identifier_c param_name("IN");
       
 11388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11390             
       
 11391             /* Get the value from a foo(<param_value>) style call */
       
 11392             if (IN_param_value == NULL)
       
 11393               IN_param_value = function_call_param_iterator.next();
       
 11394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11396             
       
 11397             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11398             {
       
 11399         
       
 11400                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11401                 s4o.print("(");
       
 11402                 return_type_symbol->accept(*this);
       
 11403                 s4o.print(")");
       
 11404                 IN_param_value->accept(*this);
       
 11405                 return NULL;
       
 11406                 
       
 11407             }
       
 11408             
       
 11409             ERROR;
       
 11410         }
       
 11411         
       
 11412     }/*function_word_to_usint*/
       
 11413     break;
       
 11414 
       
 11415 /****
       
 11416  *WORD_TO_UINT
       
 11417  */
       
 11418     case function_word_to_uint :
       
 11419     {
       
 11420         symbol_c *last_type_symbol = NULL;
       
 11421 
       
 11422         {
       
 11423             identifier_c param_name("IN");
       
 11424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11426             
       
 11427             /* Get the value from a foo(<param_value>) style call */
       
 11428             if (IN_param_value == NULL)
       
 11429               IN_param_value = function_call_param_iterator.next();
       
 11430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11432             
       
 11433             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11434             {
       
 11435         
       
 11436                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11437                 s4o.print("(");
       
 11438                 return_type_symbol->accept(*this);
       
 11439                 s4o.print(")");
       
 11440                 IN_param_value->accept(*this);
       
 11441                 return NULL;
       
 11442                 
       
 11443             }
       
 11444             
       
 11445             ERROR;
       
 11446         }
       
 11447         
       
 11448     }/*function_word_to_uint*/
       
 11449     break;
       
 11450 
       
 11451 /****
       
 11452  *WORD_TO_UDINT
       
 11453  */
       
 11454     case function_word_to_udint :
       
 11455     {
       
 11456         symbol_c *last_type_symbol = NULL;
       
 11457 
       
 11458         {
       
 11459             identifier_c param_name("IN");
       
 11460             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11461             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11462             
       
 11463             /* Get the value from a foo(<param_value>) style call */
       
 11464             if (IN_param_value == NULL)
       
 11465               IN_param_value = function_call_param_iterator.next();
       
 11466             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11467             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11468             
       
 11469             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11470             {
       
 11471         
       
 11472                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11473                 s4o.print("(");
       
 11474                 return_type_symbol->accept(*this);
       
 11475                 s4o.print(")");
       
 11476                 IN_param_value->accept(*this);
       
 11477                 return NULL;
       
 11478                 
       
 11479             }
       
 11480             
       
 11481             ERROR;
       
 11482         }
       
 11483         
       
 11484     }/*function_word_to_udint*/
       
 11485     break;
       
 11486 
       
 11487 /****
       
 11488  *WORD_TO_ULINT
       
 11489  */
       
 11490     case function_word_to_ulint :
       
 11491     {
       
 11492         symbol_c *last_type_symbol = NULL;
       
 11493 
       
 11494         {
       
 11495             identifier_c param_name("IN");
       
 11496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11498             
       
 11499             /* Get the value from a foo(<param_value>) style call */
       
 11500             if (IN_param_value == NULL)
       
 11501               IN_param_value = function_call_param_iterator.next();
       
 11502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11504             
       
 11505             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11506             {
       
 11507         
       
 11508                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11509                 s4o.print("(");
       
 11510                 return_type_symbol->accept(*this);
       
 11511                 s4o.print(")");
       
 11512                 IN_param_value->accept(*this);
       
 11513                 return NULL;
       
 11514                 
       
 11515             }
       
 11516             
       
 11517             ERROR;
       
 11518         }
       
 11519         
       
 11520     }/*function_word_to_ulint*/
       
 11521     break;
       
 11522 
       
 11523 /****
       
 11524  *WORD_TO_REAL
       
 11525  */
       
 11526     case function_word_to_real :
       
 11527     {
       
 11528         symbol_c *last_type_symbol = NULL;
       
 11529 
       
 11530         {
       
 11531             identifier_c param_name("IN");
       
 11532             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11533             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11534             
       
 11535             /* Get the value from a foo(<param_value>) style call */
       
 11536             if (IN_param_value == NULL)
       
 11537               IN_param_value = function_call_param_iterator.next();
       
 11538             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11539             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11540             
       
 11541             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11542             {
       
 11543         
       
 11544                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11545                 s4o.print("(");
       
 11546                 return_type_symbol->accept(*this);
       
 11547                 s4o.print(")");
       
 11548                 IN_param_value->accept(*this);
       
 11549                 return NULL;
       
 11550                 
       
 11551             }
       
 11552             
       
 11553             ERROR;
       
 11554         }
       
 11555         
       
 11556     }/*function_word_to_real*/
       
 11557     break;
       
 11558 
       
 11559 /****
       
 11560  *WORD_TO_LREAL
       
 11561  */
       
 11562     case function_word_to_lreal :
       
 11563     {
       
 11564         symbol_c *last_type_symbol = NULL;
       
 11565 
       
 11566         {
       
 11567             identifier_c param_name("IN");
       
 11568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11570             
       
 11571             /* Get the value from a foo(<param_value>) style call */
       
 11572             if (IN_param_value == NULL)
       
 11573               IN_param_value = function_call_param_iterator.next();
       
 11574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11576             
       
 11577             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11578             {
       
 11579         
       
 11580                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11581                 s4o.print("(");
       
 11582                 return_type_symbol->accept(*this);
       
 11583                 s4o.print(")");
       
 11584                 IN_param_value->accept(*this);
       
 11585                 return NULL;
       
 11586                 
       
 11587             }
       
 11588             
       
 11589             ERROR;
       
 11590         }
       
 11591         
       
 11592     }/*function_word_to_lreal*/
       
 11593     break;
       
 11594 
       
 11595 /****
       
 11596  *WORD_TO_TIME
       
 11597  */
       
 11598     case function_word_to_time :
       
 11599     {
       
 11600         symbol_c *last_type_symbol = NULL;
       
 11601 
       
 11602         {
       
 11603             identifier_c param_name("IN");
       
 11604             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11605             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11606             
       
 11607             /* Get the value from a foo(<param_value>) style call */
       
 11608             if (IN_param_value == NULL)
       
 11609               IN_param_value = function_call_param_iterator.next();
       
 11610             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11611             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11612             
       
 11613             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11614             {
       
 11615         
       
 11616                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11617                 s4o.print("(");
       
 11618                 return_type_symbol->accept(*this);
       
 11619                 s4o.print(")__int_to_time(");
       
 11620                 IN_param_value->accept(*this);
       
 11621                 s4o.print(")");
       
 11622                 return NULL;
       
 11623                 
       
 11624             }
       
 11625             
       
 11626             ERROR;
       
 11627         }
       
 11628         
       
 11629     }/*function_word_to_time*/
       
 11630     break;
       
 11631 
       
 11632 /****
       
 11633  *WORD_TO_DATE
       
 11634  */
       
 11635     case function_word_to_date :
       
 11636     {
       
 11637         symbol_c *last_type_symbol = NULL;
       
 11638 
       
 11639         {
       
 11640             identifier_c param_name("IN");
       
 11641             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11642             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11643             
       
 11644             /* Get the value from a foo(<param_value>) style call */
       
 11645             if (IN_param_value == NULL)
       
 11646               IN_param_value = function_call_param_iterator.next();
       
 11647             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11648             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11649             
       
 11650             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11651             {
       
 11652         
       
 11653                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11654                 s4o.print("(");
       
 11655                 return_type_symbol->accept(*this);
       
 11656                 s4o.print(")__int_to_time(");
       
 11657                 IN_param_value->accept(*this);
       
 11658                 s4o.print(")");
       
 11659                 return NULL;
       
 11660                 
       
 11661             }
       
 11662             
       
 11663             ERROR;
       
 11664         }
       
 11665         
       
 11666     }/*function_word_to_date*/
       
 11667     break;
       
 11668 
       
 11669 /****
       
 11670  *WORD_TO_TOD
       
 11671  */
       
 11672     case function_word_to_tod :
       
 11673     {
       
 11674         symbol_c *last_type_symbol = NULL;
       
 11675 
       
 11676         {
       
 11677             identifier_c param_name("IN");
       
 11678             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11679             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11680             
       
 11681             /* Get the value from a foo(<param_value>) style call */
       
 11682             if (IN_param_value == NULL)
       
 11683               IN_param_value = function_call_param_iterator.next();
       
 11684             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11685             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11686             
       
 11687             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11688             {
       
 11689         
       
 11690                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11691                 s4o.print("(");
       
 11692                 return_type_symbol->accept(*this);
       
 11693                 s4o.print(")__int_to_time(");
       
 11694                 IN_param_value->accept(*this);
       
 11695                 s4o.print(")");
       
 11696                 return NULL;
       
 11697                 
       
 11698             }
       
 11699             
       
 11700             ERROR;
       
 11701         }
       
 11702         
       
 11703     }/*function_word_to_tod*/
       
 11704     break;
       
 11705 
       
 11706 /****
       
 11707  *WORD_TO_DT
       
 11708  */
       
 11709     case function_word_to_dt :
       
 11710     {
       
 11711         symbol_c *last_type_symbol = NULL;
       
 11712 
       
 11713         {
       
 11714             identifier_c param_name("IN");
       
 11715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11716             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11717             
       
 11718             /* Get the value from a foo(<param_value>) style call */
       
 11719             if (IN_param_value == NULL)
       
 11720               IN_param_value = function_call_param_iterator.next();
       
 11721             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11722             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11723             
       
 11724             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11725             {
       
 11726         
       
 11727                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11728                 s4o.print("(");
       
 11729                 return_type_symbol->accept(*this);
       
 11730                 s4o.print(")__int_to_time(");
       
 11731                 IN_param_value->accept(*this);
       
 11732                 s4o.print(")");
       
 11733                 return NULL;
       
 11734                 
       
 11735             }
       
 11736             
       
 11737             ERROR;
       
 11738         }
       
 11739         
       
 11740     }/*function_word_to_dt*/
       
 11741     break;
       
 11742 
       
 11743 /****
       
 11744  *WORD_TO_STRING
       
 11745  */
       
 11746     case function_word_to_string :
       
 11747     {
       
 11748         symbol_c *last_type_symbol = NULL;
       
 11749 
       
 11750         {
       
 11751             identifier_c param_name("IN");
       
 11752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11754             
       
 11755             /* Get the value from a foo(<param_value>) style call */
       
 11756             if (IN_param_value == NULL)
       
 11757               IN_param_value = function_call_param_iterator.next();
       
 11758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11760             
       
 11761             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11762             {
       
 11763         
       
 11764                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11765                 s4o.print("(");
       
 11766                 return_type_symbol->accept(*this);
       
 11767                 s4o.print(")__bit_to_string(");
       
 11768                 IN_param_value->accept(*this);
       
 11769                 s4o.print(")");
       
 11770                 return NULL;
       
 11771                 
       
 11772             }
       
 11773             
       
 11774             ERROR;
       
 11775         }
       
 11776         
       
 11777     }/*function_word_to_string*/
       
 11778     break;
       
 11779 
       
 11780 /****
       
 11781  *WORD_TO_BYTE
       
 11782  */
       
 11783     case function_word_to_byte :
       
 11784     {
       
 11785         symbol_c *last_type_symbol = NULL;
       
 11786 
       
 11787         {
       
 11788             identifier_c param_name("IN");
       
 11789             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11790             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11791             
       
 11792             /* Get the value from a foo(<param_value>) style call */
       
 11793             if (IN_param_value == NULL)
       
 11794               IN_param_value = function_call_param_iterator.next();
       
 11795             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11796             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11797             
       
 11798             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
  8050             {
 11799             {
  8051         
 11800         
  8052                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 11801                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  8053                 s4o.print("(");
 11802                 s4o.print("(");
  8054                 return_type_symbol->accept(*this);
 11803                 return_type_symbol->accept(*this);
  8055                 s4o.print(")__time_to_int(");
 11804                 s4o.print(")");
  8056                 IN_param_value->accept(*this);
 11805                 IN_param_value->accept(*this);
  8057                 s4o.print(")");
 11806                 return NULL;
  8058                 return NULL;
 11807                 
  8059                 
 11808             }
  8060             }
 11809             
  8061             
 11810             ERROR;
  8062             ERROR;
 11811         }
  8063         }
 11812         
  8064         
 11813     }/*function_word_to_byte*/
  8065     }/*function_time_to_byte*/
 11814     break;
  8066     break;
 11815 
  8067 
 11816 /****
  8068 /****
 11817  *WORD_TO_DWORD
  8069  *TIME_TO_WORD
 11818  */
  8070  */
 11819     case function_word_to_dword :
  8071     case function_time_to_word :
 11820     {
  8072     {
 11821         symbol_c *last_type_symbol = NULL;
  8073         symbol_c *last_type_symbol = NULL;
 11822 
  8074 
 11823         {
  8075         {
 11824             identifier_c param_name("IN");
  8076             identifier_c param_name("IN");
 11825             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8077             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11826             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11827             
  8079             
 11828             /* Get the value from a foo(<param_value>) style call */
  8080             /* Get the value from a foo(<param_value>) style call */
 11829             if (IN_param_value == NULL)
  8081             if (IN_param_value == NULL)
 11830               IN_param_value = function_call_param_iterator.next();
  8082               IN_param_value = function_call_param_iterator.next();
 11831             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11832             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8084             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11833             
  8085             
 11834             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
  8086             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 11835             {
       
 11836         
       
 11837                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11838                 s4o.print("(");
       
 11839                 return_type_symbol->accept(*this);
       
 11840                 s4o.print(")");
       
 11841                 IN_param_value->accept(*this);
       
 11842                 return NULL;
       
 11843                 
       
 11844             }
       
 11845             
       
 11846             ERROR;
       
 11847         }
       
 11848         
       
 11849     }/*function_word_to_dword*/
       
 11850     break;
       
 11851 
       
 11852 /****
       
 11853  *WORD_TO_LWORD
       
 11854  */
       
 11855     case function_word_to_lword :
       
 11856     {
       
 11857         symbol_c *last_type_symbol = NULL;
       
 11858 
       
 11859         {
       
 11860             identifier_c param_name("IN");
       
 11861             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11862             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11863             
       
 11864             /* Get the value from a foo(<param_value>) style call */
       
 11865             if (IN_param_value == NULL)
       
 11866               IN_param_value = function_call_param_iterator.next();
       
 11867             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11868             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11869             
       
 11870             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11871             {
       
 11872         
       
 11873                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11874                 s4o.print("(");
       
 11875                 return_type_symbol->accept(*this);
       
 11876                 s4o.print(")");
       
 11877                 IN_param_value->accept(*this);
       
 11878                 return NULL;
       
 11879                 
       
 11880             }
       
 11881             
       
 11882             ERROR;
       
 11883         }
       
 11884         
       
 11885     }/*function_word_to_lword*/
       
 11886     break;
       
 11887 
       
 11888 /****
       
 11889  *DWORD_TO_BOOL
       
 11890  */
       
 11891     case function_dword_to_bool :
       
 11892     {
       
 11893         symbol_c *last_type_symbol = NULL;
       
 11894 
       
 11895         {
       
 11896             identifier_c param_name("IN");
       
 11897             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11898             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11899             
       
 11900             /* Get the value from a foo(<param_value>) style call */
       
 11901             if (IN_param_value == NULL)
       
 11902               IN_param_value = function_call_param_iterator.next();
       
 11903             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11904             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11905             
       
 11906             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11907             {
       
 11908         
       
 11909                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11910                 s4o.print("(");
       
 11911                 return_type_symbol->accept(*this);
       
 11912                 s4o.print(")");
       
 11913                 IN_param_value->accept(*this);
       
 11914                 return NULL;
       
 11915                 
       
 11916             }
       
 11917             
       
 11918             ERROR;
       
 11919         }
       
 11920         
       
 11921     }/*function_dword_to_bool*/
       
 11922     break;
       
 11923 
       
 11924 /****
       
 11925  *DWORD_TO_SINT
       
 11926  */
       
 11927     case function_dword_to_sint :
       
 11928     {
       
 11929         symbol_c *last_type_symbol = NULL;
       
 11930 
       
 11931         {
       
 11932             identifier_c param_name("IN");
       
 11933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11934             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11935             
       
 11936             /* Get the value from a foo(<param_value>) style call */
       
 11937             if (IN_param_value == NULL)
       
 11938               IN_param_value = function_call_param_iterator.next();
       
 11939             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11940             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11941             
       
 11942             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11943             {
       
 11944         
       
 11945                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11946                 s4o.print("(");
       
 11947                 return_type_symbol->accept(*this);
       
 11948                 s4o.print(")");
       
 11949                 IN_param_value->accept(*this);
       
 11950                 return NULL;
       
 11951                 
       
 11952             }
       
 11953             
       
 11954             ERROR;
       
 11955         }
       
 11956         
       
 11957     }/*function_dword_to_sint*/
       
 11958     break;
       
 11959 
       
 11960 /****
       
 11961  *DWORD_TO_INT
       
 11962  */
       
 11963     case function_dword_to_int :
       
 11964     {
       
 11965         symbol_c *last_type_symbol = NULL;
       
 11966 
       
 11967         {
       
 11968             identifier_c param_name("IN");
       
 11969             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11970             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11971             
       
 11972             /* Get the value from a foo(<param_value>) style call */
       
 11973             if (IN_param_value == NULL)
       
 11974               IN_param_value = function_call_param_iterator.next();
       
 11975             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11976             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11977             
       
 11978             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11979             {
       
 11980         
       
 11981                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11982                 s4o.print("(");
       
 11983                 return_type_symbol->accept(*this);
       
 11984                 s4o.print(")");
       
 11985                 IN_param_value->accept(*this);
       
 11986                 return NULL;
       
 11987                 
       
 11988             }
       
 11989             
       
 11990             ERROR;
       
 11991         }
       
 11992         
       
 11993     }/*function_dword_to_int*/
       
 11994     break;
       
 11995 
       
 11996 /****
       
 11997  *DWORD_TO_DINT
       
 11998  */
       
 11999     case function_dword_to_dint :
       
 12000     {
       
 12001         symbol_c *last_type_symbol = NULL;
       
 12002 
       
 12003         {
       
 12004             identifier_c param_name("IN");
       
 12005             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12006             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12007             
       
 12008             /* Get the value from a foo(<param_value>) style call */
       
 12009             if (IN_param_value == NULL)
       
 12010               IN_param_value = function_call_param_iterator.next();
       
 12011             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12012             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12013             
       
 12014             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12015             {
       
 12016         
       
 12017                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12018                 s4o.print("(");
       
 12019                 return_type_symbol->accept(*this);
       
 12020                 s4o.print(")");
       
 12021                 IN_param_value->accept(*this);
       
 12022                 return NULL;
       
 12023                 
       
 12024             }
       
 12025             
       
 12026             ERROR;
       
 12027         }
       
 12028         
       
 12029     }/*function_dword_to_dint*/
       
 12030     break;
       
 12031 
       
 12032 /****
       
 12033  *DWORD_TO_LINT
       
 12034  */
       
 12035     case function_dword_to_lint :
       
 12036     {
       
 12037         symbol_c *last_type_symbol = NULL;
       
 12038 
       
 12039         {
       
 12040             identifier_c param_name("IN");
       
 12041             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12042             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12043             
       
 12044             /* Get the value from a foo(<param_value>) style call */
       
 12045             if (IN_param_value == NULL)
       
 12046               IN_param_value = function_call_param_iterator.next();
       
 12047             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12048             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12049             
       
 12050             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12051             {
       
 12052         
       
 12053                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12054                 s4o.print("(");
       
 12055                 return_type_symbol->accept(*this);
       
 12056                 s4o.print(")");
       
 12057                 IN_param_value->accept(*this);
       
 12058                 return NULL;
       
 12059                 
       
 12060             }
       
 12061             
       
 12062             ERROR;
       
 12063         }
       
 12064         
       
 12065     }/*function_dword_to_lint*/
       
 12066     break;
       
 12067 
       
 12068 /****
       
 12069  *DWORD_TO_USINT
       
 12070  */
       
 12071     case function_dword_to_usint :
       
 12072     {
       
 12073         symbol_c *last_type_symbol = NULL;
       
 12074 
       
 12075         {
       
 12076             identifier_c param_name("IN");
       
 12077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12079             
       
 12080             /* Get the value from a foo(<param_value>) style call */
       
 12081             if (IN_param_value == NULL)
       
 12082               IN_param_value = function_call_param_iterator.next();
       
 12083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12084             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12085             
       
 12086             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12087             {
       
 12088         
       
 12089                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12090                 s4o.print("(");
       
 12091                 return_type_symbol->accept(*this);
       
 12092                 s4o.print(")");
       
 12093                 IN_param_value->accept(*this);
       
 12094                 return NULL;
       
 12095                 
       
 12096             }
       
 12097             
       
 12098             ERROR;
       
 12099         }
       
 12100         
       
 12101     }/*function_dword_to_usint*/
       
 12102     break;
       
 12103 
       
 12104 /****
       
 12105  *DWORD_TO_UINT
       
 12106  */
       
 12107     case function_dword_to_uint :
       
 12108     {
       
 12109         symbol_c *last_type_symbol = NULL;
       
 12110 
       
 12111         {
       
 12112             identifier_c param_name("IN");
       
 12113             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12114             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12115             
       
 12116             /* Get the value from a foo(<param_value>) style call */
       
 12117             if (IN_param_value == NULL)
       
 12118               IN_param_value = function_call_param_iterator.next();
       
 12119             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12120             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12121             
       
 12122             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12123             {
       
 12124         
       
 12125                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12126                 s4o.print("(");
       
 12127                 return_type_symbol->accept(*this);
       
 12128                 s4o.print(")");
       
 12129                 IN_param_value->accept(*this);
       
 12130                 return NULL;
       
 12131                 
       
 12132             }
       
 12133             
       
 12134             ERROR;
       
 12135         }
       
 12136         
       
 12137     }/*function_dword_to_uint*/
       
 12138     break;
       
 12139 
       
 12140 /****
       
 12141  *DWORD_TO_UDINT
       
 12142  */
       
 12143     case function_dword_to_udint :
       
 12144     {
       
 12145         symbol_c *last_type_symbol = NULL;
       
 12146 
       
 12147         {
       
 12148             identifier_c param_name("IN");
       
 12149             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12150             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12151             
       
 12152             /* Get the value from a foo(<param_value>) style call */
       
 12153             if (IN_param_value == NULL)
       
 12154               IN_param_value = function_call_param_iterator.next();
       
 12155             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12156             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12157             
       
 12158             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12159             {
       
 12160         
       
 12161                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12162                 s4o.print("(");
       
 12163                 return_type_symbol->accept(*this);
       
 12164                 s4o.print(")");
       
 12165                 IN_param_value->accept(*this);
       
 12166                 return NULL;
       
 12167                 
       
 12168             }
       
 12169             
       
 12170             ERROR;
       
 12171         }
       
 12172         
       
 12173     }/*function_dword_to_udint*/
       
 12174     break;
       
 12175 
       
 12176 /****
       
 12177  *DWORD_TO_ULINT
       
 12178  */
       
 12179     case function_dword_to_ulint :
       
 12180     {
       
 12181         symbol_c *last_type_symbol = NULL;
       
 12182 
       
 12183         {
       
 12184             identifier_c param_name("IN");
       
 12185             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12186             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12187             
       
 12188             /* Get the value from a foo(<param_value>) style call */
       
 12189             if (IN_param_value == NULL)
       
 12190               IN_param_value = function_call_param_iterator.next();
       
 12191             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12192             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12193             
       
 12194             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12195             {
       
 12196         
       
 12197                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12198                 s4o.print("(");
       
 12199                 return_type_symbol->accept(*this);
       
 12200                 s4o.print(")");
       
 12201                 IN_param_value->accept(*this);
       
 12202                 return NULL;
       
 12203                 
       
 12204             }
       
 12205             
       
 12206             ERROR;
       
 12207         }
       
 12208         
       
 12209     }/*function_dword_to_ulint*/
       
 12210     break;
       
 12211 
       
 12212 /****
       
 12213  *DWORD_TO_REAL
       
 12214  */
       
 12215     case function_dword_to_real :
       
 12216     {
       
 12217         symbol_c *last_type_symbol = NULL;
       
 12218 
       
 12219         {
       
 12220             identifier_c param_name("IN");
       
 12221             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12222             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12223             
       
 12224             /* Get the value from a foo(<param_value>) style call */
       
 12225             if (IN_param_value == NULL)
       
 12226               IN_param_value = function_call_param_iterator.next();
       
 12227             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12228             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12229             
       
 12230             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12231             {
       
 12232         
       
 12233                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12234                 s4o.print("(");
       
 12235                 return_type_symbol->accept(*this);
       
 12236                 s4o.print(")");
       
 12237                 IN_param_value->accept(*this);
       
 12238                 return NULL;
       
 12239                 
       
 12240             }
       
 12241             
       
 12242             ERROR;
       
 12243         }
       
 12244         
       
 12245     }/*function_dword_to_real*/
       
 12246     break;
       
 12247 
       
 12248 /****
       
 12249  *DWORD_TO_LREAL
       
 12250  */
       
 12251     case function_dword_to_lreal :
       
 12252     {
       
 12253         symbol_c *last_type_symbol = NULL;
       
 12254 
       
 12255         {
       
 12256             identifier_c param_name("IN");
       
 12257             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12258             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12259             
       
 12260             /* Get the value from a foo(<param_value>) style call */
       
 12261             if (IN_param_value == NULL)
       
 12262               IN_param_value = function_call_param_iterator.next();
       
 12263             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12264             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12265             
       
 12266             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12267             {
       
 12268         
       
 12269                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12270                 s4o.print("(");
       
 12271                 return_type_symbol->accept(*this);
       
 12272                 s4o.print(")");
       
 12273                 IN_param_value->accept(*this);
       
 12274                 return NULL;
       
 12275                 
       
 12276             }
       
 12277             
       
 12278             ERROR;
       
 12279         }
       
 12280         
       
 12281     }/*function_dword_to_lreal*/
       
 12282     break;
       
 12283 
       
 12284 /****
       
 12285  *DWORD_TO_TIME
       
 12286  */
       
 12287     case function_dword_to_time :
       
 12288     {
       
 12289         symbol_c *last_type_symbol = NULL;
       
 12290 
       
 12291         {
       
 12292             identifier_c param_name("IN");
       
 12293             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12294             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12295             
       
 12296             /* Get the value from a foo(<param_value>) style call */
       
 12297             if (IN_param_value == NULL)
       
 12298               IN_param_value = function_call_param_iterator.next();
       
 12299             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12300             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12301             
       
 12302             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12303             {
       
 12304         
       
 12305                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12306                 s4o.print("(");
       
 12307                 return_type_symbol->accept(*this);
       
 12308                 s4o.print(")__int_to_time(");
       
 12309                 IN_param_value->accept(*this);
       
 12310                 s4o.print(")");
       
 12311                 return NULL;
       
 12312                 
       
 12313             }
       
 12314             
       
 12315             ERROR;
       
 12316         }
       
 12317         
       
 12318     }/*function_dword_to_time*/
       
 12319     break;
       
 12320 
       
 12321 /****
       
 12322  *DWORD_TO_DATE
       
 12323  */
       
 12324     case function_dword_to_date :
       
 12325     {
       
 12326         symbol_c *last_type_symbol = NULL;
       
 12327 
       
 12328         {
       
 12329             identifier_c param_name("IN");
       
 12330             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12331             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12332             
       
 12333             /* Get the value from a foo(<param_value>) style call */
       
 12334             if (IN_param_value == NULL)
       
 12335               IN_param_value = function_call_param_iterator.next();
       
 12336             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12337             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12338             
       
 12339             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12340             {
       
 12341         
       
 12342                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12343                 s4o.print("(");
       
 12344                 return_type_symbol->accept(*this);
       
 12345                 s4o.print(")__int_to_time(");
       
 12346                 IN_param_value->accept(*this);
       
 12347                 s4o.print(")");
       
 12348                 return NULL;
       
 12349                 
       
 12350             }
       
 12351             
       
 12352             ERROR;
       
 12353         }
       
 12354         
       
 12355     }/*function_dword_to_date*/
       
 12356     break;
       
 12357 
       
 12358 /****
       
 12359  *DWORD_TO_TOD
       
 12360  */
       
 12361     case function_dword_to_tod :
       
 12362     {
       
 12363         symbol_c *last_type_symbol = NULL;
       
 12364 
       
 12365         {
       
 12366             identifier_c param_name("IN");
       
 12367             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12368             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12369             
       
 12370             /* Get the value from a foo(<param_value>) style call */
       
 12371             if (IN_param_value == NULL)
       
 12372               IN_param_value = function_call_param_iterator.next();
       
 12373             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12374             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12375             
       
 12376             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12377             {
       
 12378         
       
 12379                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12380                 s4o.print("(");
       
 12381                 return_type_symbol->accept(*this);
       
 12382                 s4o.print(")__int_to_time(");
       
 12383                 IN_param_value->accept(*this);
       
 12384                 s4o.print(")");
       
 12385                 return NULL;
       
 12386                 
       
 12387             }
       
 12388             
       
 12389             ERROR;
       
 12390         }
       
 12391         
       
 12392     }/*function_dword_to_tod*/
       
 12393     break;
       
 12394 
       
 12395 /****
       
 12396  *DWORD_TO_DT
       
 12397  */
       
 12398     case function_dword_to_dt :
       
 12399     {
       
 12400         symbol_c *last_type_symbol = NULL;
       
 12401 
       
 12402         {
       
 12403             identifier_c param_name("IN");
       
 12404             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12405             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12406             
       
 12407             /* Get the value from a foo(<param_value>) style call */
       
 12408             if (IN_param_value == NULL)
       
 12409               IN_param_value = function_call_param_iterator.next();
       
 12410             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12411             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12412             
       
 12413             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12414             {
       
 12415         
       
 12416                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12417                 s4o.print("(");
       
 12418                 return_type_symbol->accept(*this);
       
 12419                 s4o.print(")__int_to_time(");
       
 12420                 IN_param_value->accept(*this);
       
 12421                 s4o.print(")");
       
 12422                 return NULL;
       
 12423                 
       
 12424             }
       
 12425             
       
 12426             ERROR;
       
 12427         }
       
 12428         
       
 12429     }/*function_dword_to_dt*/
       
 12430     break;
       
 12431 
       
 12432 /****
       
 12433  *DWORD_TO_STRING
       
 12434  */
       
 12435     case function_dword_to_string :
       
 12436     {
       
 12437         symbol_c *last_type_symbol = NULL;
       
 12438 
       
 12439         {
       
 12440             identifier_c param_name("IN");
       
 12441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12442             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12443             
       
 12444             /* Get the value from a foo(<param_value>) style call */
       
 12445             if (IN_param_value == NULL)
       
 12446               IN_param_value = function_call_param_iterator.next();
       
 12447             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12448             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12449             
       
 12450             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12451             {
       
 12452         
       
 12453                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12454                 s4o.print("(");
       
 12455                 return_type_symbol->accept(*this);
       
 12456                 s4o.print(")__bit_to_string(");
       
 12457                 IN_param_value->accept(*this);
       
 12458                 s4o.print(")");
       
 12459                 return NULL;
       
 12460                 
       
 12461             }
       
 12462             
       
 12463             ERROR;
       
 12464         }
       
 12465         
       
 12466     }/*function_dword_to_string*/
       
 12467     break;
       
 12468 
       
 12469 /****
       
 12470  *DWORD_TO_BYTE
       
 12471  */
       
 12472     case function_dword_to_byte :
       
 12473     {
       
 12474         symbol_c *last_type_symbol = NULL;
       
 12475 
       
 12476         {
       
 12477             identifier_c param_name("IN");
       
 12478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12479             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12480             
       
 12481             /* Get the value from a foo(<param_value>) style call */
       
 12482             if (IN_param_value == NULL)
       
 12483               IN_param_value = function_call_param_iterator.next();
       
 12484             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12485             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12486             
       
 12487             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12488             {
       
 12489         
       
 12490                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12491                 s4o.print("(");
       
 12492                 return_type_symbol->accept(*this);
       
 12493                 s4o.print(")");
       
 12494                 IN_param_value->accept(*this);
       
 12495                 return NULL;
       
 12496                 
       
 12497             }
       
 12498             
       
 12499             ERROR;
       
 12500         }
       
 12501         
       
 12502     }/*function_dword_to_byte*/
       
 12503     break;
       
 12504 
       
 12505 /****
       
 12506  *DWORD_TO_WORD
       
 12507  */
       
 12508     case function_dword_to_word :
       
 12509     {
       
 12510         symbol_c *last_type_symbol = NULL;
       
 12511 
       
 12512         {
       
 12513             identifier_c param_name("IN");
       
 12514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12515             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12516             
       
 12517             /* Get the value from a foo(<param_value>) style call */
       
 12518             if (IN_param_value == NULL)
       
 12519               IN_param_value = function_call_param_iterator.next();
       
 12520             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12521             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12522             
       
 12523             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
  8087             {
 12524             {
  8088         
 12525         
  8089                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 12526                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  8090                 s4o.print("(");
 12527                 s4o.print("(");
  8091                 return_type_symbol->accept(*this);
 12528                 return_type_symbol->accept(*this);
  8092                 s4o.print(")__time_to_int(");
 12529                 s4o.print(")");
  8093                 IN_param_value->accept(*this);
 12530                 IN_param_value->accept(*this);
  8094                 s4o.print(")");
 12531                 return NULL;
  8095                 return NULL;
 12532                 
  8096                 
 12533             }
  8097             }
 12534             
  8098             
 12535             ERROR;
  8099             ERROR;
 12536         }
  8100         }
 12537         
  8101         
 12538     }/*function_dword_to_word*/
  8102     }/*function_time_to_word*/
 12539     break;
  8103     break;
 12540 
  8104 
 12541 /****
  8105 /****
 12542  *DWORD_TO_LWORD
  8106  *TIME_TO_DWORD
 12543  */
  8107  */
 12544     case function_dword_to_lword :
  8108     case function_time_to_dword :
 12545     {
  8109     {
 12546         symbol_c *last_type_symbol = NULL;
  8110         symbol_c *last_type_symbol = NULL;
 12547 
  8111 
 12548         {
  8112         {
 12549             identifier_c param_name("IN");
  8113             identifier_c param_name("IN");
 12550             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8114             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12551             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8115             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12552             
  8116             
 12553             /* Get the value from a foo(<param_value>) style call */
  8117             /* Get the value from a foo(<param_value>) style call */
 12554             if (IN_param_value == NULL)
  8118             if (IN_param_value == NULL)
 12555               IN_param_value = function_call_param_iterator.next();
  8119               IN_param_value = function_call_param_iterator.next();
 12556             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12557             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8121             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12558             
  8122             
 12559             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
  8123             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  8124             {
       
  8125         
       
  8126                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8127                 s4o.print("(");
       
  8128                 return_type_symbol->accept(*this);
       
  8129                 s4o.print(")__time_to_int(");
       
  8130                 IN_param_value->accept(*this);
       
  8131                 s4o.print(")");
       
  8132                 return NULL;
       
  8133                 
       
  8134             }
       
  8135             
       
  8136             ERROR;
       
  8137         }
       
  8138         
       
  8139     }/*function_time_to_dword*/
       
  8140     break;
       
  8141 
       
  8142 /****
       
  8143  *TIME_TO_LWORD
       
  8144  */
       
  8145     case function_time_to_lword :
       
  8146     {
       
  8147         symbol_c *last_type_symbol = NULL;
       
  8148 
       
  8149         {
       
  8150             identifier_c param_name("IN");
       
  8151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8153             
       
  8154             /* Get the value from a foo(<param_value>) style call */
       
  8155             if (IN_param_value == NULL)
       
  8156               IN_param_value = function_call_param_iterator.next();
       
  8157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8158             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8159             
       
  8160             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  8161             {
 12560             {
  8162         
 12561         
  8163                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 12562                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  8164                 s4o.print("(");
 12563                 s4o.print("(");
  8165                 return_type_symbol->accept(*this);
 12564                 return_type_symbol->accept(*this);
  8166                 s4o.print(")__time_to_int(");
 12565                 s4o.print(")");
  8167                 IN_param_value->accept(*this);
 12566                 IN_param_value->accept(*this);
  8168                 s4o.print(")");
 12567                 return NULL;
  8169                 return NULL;
 12568                 
  8170                 
 12569             }
  8171             }
 12570             
  8172             
 12571             ERROR;
  8173             ERROR;
 12572         }
  8174         }
 12573         
  8175         
 12574     }/*function_dword_to_lword*/
  8176     }/*function_time_to_lword*/
 12575     break;
  8177     break;
 12576 
  8178 
 12577 /****
  8179 /****
 12578  *LWORD_TO_BOOL
  8180  *DATE_TO_BOOL
 12579  */
  8181  */
 12580     case function_lword_to_bool :
  8182     case function_date_to_bool :
 12581     {
  8183     {
 12582         symbol_c *last_type_symbol = NULL;
  8184         symbol_c *last_type_symbol = NULL;
 12583 
  8185 
 12584         {
  8186         {
 12585             identifier_c param_name("IN");
  8187             identifier_c param_name("IN");
 12586             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8188             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12587             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8189             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12588             
  8190             
 12589             /* Get the value from a foo(<param_value>) style call */
  8191             /* Get the value from a foo(<param_value>) style call */
 12590             if (IN_param_value == NULL)
  8192             if (IN_param_value == NULL)
 12591               IN_param_value = function_call_param_iterator.next();
  8193               IN_param_value = function_call_param_iterator.next();
 12592             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8194             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12593             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8195             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12594             
  8196             
 12595             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8197             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8198             {
 12596             {
  8199         
 12597         
  8200                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 12598                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  8201                 s4o.print("(");
 12599                 s4o.print("(");
  8202                 return_type_symbol->accept(*this);
 12600                 return_type_symbol->accept(*this);
  8203                 s4o.print(")__time_to_int(");
 12601                 s4o.print(")");
  8204                 IN_param_value->accept(*this);
 12602                 IN_param_value->accept(*this);
  8205                 s4o.print(")");
 12603                 return NULL;
  8206                 return NULL;
 12604                 
  8207                 
 12605             }
  8208             }
 12606             
  8209             
 12607             ERROR;
  8210             ERROR;
 12608         }
  8211         }
 12609         
  8212         
 12610     }/*function_lword_to_bool*/
  8213     }/*function_date_to_bool*/
 12611     break;
  8214     break;
 12612 
  8215 
 12613 /****
  8216 /****
 12614  *LWORD_TO_SINT
  8217  *DATE_TO_SINT
 12615  */
  8218  */
 12616     case function_lword_to_sint :
  8219     case function_date_to_sint :
 12617     {
  8220     {
 12618         symbol_c *last_type_symbol = NULL;
  8221         symbol_c *last_type_symbol = NULL;
 12619 
  8222 
 12620         {
  8223         {
 12621             identifier_c param_name("IN");
  8224             identifier_c param_name("IN");
 12622             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8225             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12623             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8226             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12624             
  8227             
 12625             /* Get the value from a foo(<param_value>) style call */
  8228             /* Get the value from a foo(<param_value>) style call */
 12626             if (IN_param_value == NULL)
  8229             if (IN_param_value == NULL)
 12627               IN_param_value = function_call_param_iterator.next();
  8230               IN_param_value = function_call_param_iterator.next();
 12628             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8231             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12629             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8232             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12630             
  8233             
 12631             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8234             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8235             {
 12632             {
  8236         
 12633         
  8237                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 12634                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  8238                 s4o.print("(");
 12635                 s4o.print("(");
  8239                 return_type_symbol->accept(*this);
 12636                 return_type_symbol->accept(*this);
  8240                 s4o.print(")__time_to_int(");
 12637                 s4o.print(")");
  8241                 IN_param_value->accept(*this);
 12638                 IN_param_value->accept(*this);
  8242                 s4o.print(")");
 12639                 return NULL;
  8243                 return NULL;
 12640                 
  8244                 
 12641             }
  8245             }
 12642             
  8246             
 12643             ERROR;
  8247             ERROR;
 12644         }
  8248         }
 12645         
  8249         
 12646     }/*function_lword_to_sint*/
  8250     }/*function_date_to_sint*/
 12647     break;
  8251     break;
 12648 
  8252 
 12649 /****
  8253 /****
 12650  *LWORD_TO_INT
  8254  *DATE_TO_INT
 12651  */
  8255  */
 12652     case function_lword_to_int :
  8256     case function_date_to_int :
 12653     {
  8257     {
 12654         symbol_c *last_type_symbol = NULL;
  8258         symbol_c *last_type_symbol = NULL;
 12655 
  8259 
 12656         {
  8260         {
 12657             identifier_c param_name("IN");
  8261             identifier_c param_name("IN");
 12658             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8262             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12659             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8263             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12660             
  8264             
 12661             /* Get the value from a foo(<param_value>) style call */
  8265             /* Get the value from a foo(<param_value>) style call */
 12662             if (IN_param_value == NULL)
  8266             if (IN_param_value == NULL)
 12663               IN_param_value = function_call_param_iterator.next();
  8267               IN_param_value = function_call_param_iterator.next();
 12664             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8268             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12665             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8269             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12666             
  8270             
 12667             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8271             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8272             {
 12668             {
  8273         
 12669         
  8274                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 12670                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  8275                 s4o.print("(");
 12671                 s4o.print("(");
  8276                 return_type_symbol->accept(*this);
 12672                 return_type_symbol->accept(*this);
  8277                 s4o.print(")__time_to_int(");
 12673                 s4o.print(")");
  8278                 IN_param_value->accept(*this);
 12674                 IN_param_value->accept(*this);
  8279                 s4o.print(")");
 12675                 return NULL;
  8280                 return NULL;
 12676                 
  8281                 
 12677             }
  8282             }
 12678             
  8283             
 12679             ERROR;
  8284             ERROR;
 12680         }
  8285         }
 12681         
  8286         
 12682     }/*function_lword_to_int*/
  8287     }/*function_date_to_int*/
 12683     break;
  8288     break;
 12684 
  8289 
 12685 /****
  8290 /****
 12686  *LWORD_TO_DINT
  8291  *DATE_TO_DINT
 12687  */
  8292  */
 12688     case function_lword_to_dint :
  8293     case function_date_to_dint :
 12689     {
  8294     {
 12690         symbol_c *last_type_symbol = NULL;
  8295         symbol_c *last_type_symbol = NULL;
 12691 
  8296 
 12692         {
  8297         {
 12693             identifier_c param_name("IN");
  8298             identifier_c param_name("IN");
 12694             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8299             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12695             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12696             
  8301             
 12697             /* Get the value from a foo(<param_value>) style call */
  8302             /* Get the value from a foo(<param_value>) style call */
 12698             if (IN_param_value == NULL)
  8303             if (IN_param_value == NULL)
 12699               IN_param_value = function_call_param_iterator.next();
  8304               IN_param_value = function_call_param_iterator.next();
 12700             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8305             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12701             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8306             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12702             
  8307             
 12703             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8308             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8309             {
 12704             {
  8310         
 12705         
  8311                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 12706                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  8312                 s4o.print("(");
 12707                 s4o.print("(");
  8313                 return_type_symbol->accept(*this);
 12708                 return_type_symbol->accept(*this);
  8314                 s4o.print(")__time_to_int(");
 12709                 s4o.print(")");
  8315                 IN_param_value->accept(*this);
 12710                 IN_param_value->accept(*this);
  8316                 s4o.print(")");
 12711                 return NULL;
  8317                 return NULL;
 12712                 
  8318                 
 12713             }
  8319             }
 12714             
  8320             
 12715             ERROR;
  8321             ERROR;
 12716         }
  8322         }
 12717         
  8323         
 12718     }/*function_lword_to_dint*/
  8324     }/*function_date_to_dint*/
 12719     break;
  8325     break;
 12720 
  8326 
 12721 /****
  8327 /****
 12722  *LWORD_TO_LINT
  8328  *DATE_TO_LINT
 12723  */
  8329  */
 12724     case function_lword_to_lint :
  8330     case function_date_to_lint :
 12725     {
  8331     {
 12726         symbol_c *last_type_symbol = NULL;
  8332         symbol_c *last_type_symbol = NULL;
 12727 
  8333 
 12728         {
  8334         {
 12729             identifier_c param_name("IN");
  8335             identifier_c param_name("IN");
 12730             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8336             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12731             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12732             
  8338             
 12733             /* Get the value from a foo(<param_value>) style call */
  8339             /* Get the value from a foo(<param_value>) style call */
 12734             if (IN_param_value == NULL)
  8340             if (IN_param_value == NULL)
 12735               IN_param_value = function_call_param_iterator.next();
  8341               IN_param_value = function_call_param_iterator.next();
 12736             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12737             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12738             
  8344             
 12739             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8345             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8346             {
 12740             {
  8347         
 12741         
  8348                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 12742                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  8349                 s4o.print("(");
 12743                 s4o.print("(");
  8350                 return_type_symbol->accept(*this);
 12744                 return_type_symbol->accept(*this);
  8351                 s4o.print(")__time_to_int(");
 12745                 s4o.print(")");
  8352                 IN_param_value->accept(*this);
 12746                 IN_param_value->accept(*this);
  8353                 s4o.print(")");
 12747                 return NULL;
  8354                 return NULL;
 12748                 
  8355                 
 12749             }
  8356             }
 12750             
  8357             
 12751             ERROR;
  8358             ERROR;
 12752         }
  8359         }
 12753         
  8360         
 12754     }/*function_lword_to_lint*/
  8361     }/*function_date_to_lint*/
 12755     break;
  8362     break;
 12756 
  8363 
 12757 /****
  8364 /****
 12758  *LWORD_TO_USINT
  8365  *DATE_TO_USINT
 12759  */
  8366  */
 12760     case function_lword_to_usint :
  8367     case function_date_to_usint :
 12761     {
  8368     {
 12762         symbol_c *last_type_symbol = NULL;
  8369         symbol_c *last_type_symbol = NULL;
 12763 
  8370 
 12764         {
  8371         {
 12765             identifier_c param_name("IN");
  8372             identifier_c param_name("IN");
 12766             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8373             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12767             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8374             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12768             
  8375             
 12769             /* Get the value from a foo(<param_value>) style call */
  8376             /* Get the value from a foo(<param_value>) style call */
 12770             if (IN_param_value == NULL)
  8377             if (IN_param_value == NULL)
 12771               IN_param_value = function_call_param_iterator.next();
  8378               IN_param_value = function_call_param_iterator.next();
 12772             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8379             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12773             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8380             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12774             
  8381             
 12775             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8382             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8383             {
 12776             {
  8384         
 12777         
  8385                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 12778                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  8386                 s4o.print("(");
 12779                 s4o.print("(");
  8387                 return_type_symbol->accept(*this);
 12780                 return_type_symbol->accept(*this);
  8388                 s4o.print(")__time_to_int(");
 12781                 s4o.print(")");
  8389                 IN_param_value->accept(*this);
 12782                 IN_param_value->accept(*this);
  8390                 s4o.print(")");
 12783                 return NULL;
  8391                 return NULL;
 12784                 
  8392                 
 12785             }
  8393             }
 12786             
  8394             
 12787             ERROR;
  8395             ERROR;
 12788         }
  8396         }
 12789         
  8397         
 12790     }/*function_lword_to_usint*/
  8398     }/*function_date_to_usint*/
 12791     break;
  8399     break;
 12792 
  8400 
 12793 /****
  8401 /****
 12794  *LWORD_TO_UINT
  8402  *DATE_TO_UINT
 12795  */
  8403  */
 12796     case function_lword_to_uint :
  8404     case function_date_to_uint :
 12797     {
  8405     {
 12798         symbol_c *last_type_symbol = NULL;
  8406         symbol_c *last_type_symbol = NULL;
 12799 
  8407 
 12800         {
  8408         {
 12801             identifier_c param_name("IN");
  8409             identifier_c param_name("IN");
 12802             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8410             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12803             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8411             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12804             
  8412             
 12805             /* Get the value from a foo(<param_value>) style call */
  8413             /* Get the value from a foo(<param_value>) style call */
 12806             if (IN_param_value == NULL)
  8414             if (IN_param_value == NULL)
 12807               IN_param_value = function_call_param_iterator.next();
  8415               IN_param_value = function_call_param_iterator.next();
 12808             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8416             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12809             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8417             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12810             
  8418             
 12811             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8419             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8420             {
 12812             {
  8421         
 12813         
  8422                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 12814                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  8423                 s4o.print("(");
 12815                 s4o.print("(");
  8424                 return_type_symbol->accept(*this);
 12816                 return_type_symbol->accept(*this);
  8425                 s4o.print(")__time_to_int(");
 12817                 s4o.print(")");
  8426                 IN_param_value->accept(*this);
 12818                 IN_param_value->accept(*this);
  8427                 s4o.print(")");
 12819                 return NULL;
  8428                 return NULL;
 12820                 
  8429                 
 12821             }
  8430             }
 12822             
  8431             
 12823             ERROR;
  8432             ERROR;
 12824         }
  8433         }
 12825         
  8434         
 12826     }/*function_lword_to_uint*/
  8435     }/*function_date_to_uint*/
 12827     break;
  8436     break;
 12828 
  8437 
 12829 /****
  8438 /****
 12830  *LWORD_TO_UDINT
  8439  *DATE_TO_UDINT
 12831  */
  8440  */
 12832     case function_lword_to_udint :
  8441     case function_date_to_udint :
 12833     {
  8442     {
 12834         symbol_c *last_type_symbol = NULL;
  8443         symbol_c *last_type_symbol = NULL;
 12835 
  8444 
 12836         {
  8445         {
 12837             identifier_c param_name("IN");
  8446             identifier_c param_name("IN");
 12838             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8447             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12839             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12840             
  8449             
 12841             /* Get the value from a foo(<param_value>) style call */
  8450             /* Get the value from a foo(<param_value>) style call */
 12842             if (IN_param_value == NULL)
  8451             if (IN_param_value == NULL)
 12843               IN_param_value = function_call_param_iterator.next();
  8452               IN_param_value = function_call_param_iterator.next();
 12844             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8453             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12845             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8454             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12846             
  8455             
 12847             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8456             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8457             {
 12848             {
  8458         
 12849         
  8459                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 12850                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  8460                 s4o.print("(");
 12851                 s4o.print("(");
  8461                 return_type_symbol->accept(*this);
 12852                 return_type_symbol->accept(*this);
  8462                 s4o.print(")__time_to_int(");
 12853                 s4o.print(")");
  8463                 IN_param_value->accept(*this);
 12854                 IN_param_value->accept(*this);
  8464                 s4o.print(")");
 12855                 return NULL;
  8465                 return NULL;
 12856                 
  8466                 
 12857             }
  8467             }
 12858             
  8468             
 12859             ERROR;
  8469             ERROR;
 12860         }
  8470         }
 12861         
  8471         
 12862     }/*function_lword_to_udint*/
  8472     }/*function_date_to_udint*/
 12863     break;
  8473     break;
 12864 
  8474 
 12865 /****
  8475 /****
 12866  *LWORD_TO_ULINT
  8476  *DATE_TO_ULINT
 12867  */
  8477  */
 12868     case function_lword_to_ulint :
  8478     case function_date_to_ulint :
 12869     {
  8479     {
 12870         symbol_c *last_type_symbol = NULL;
  8480         symbol_c *last_type_symbol = NULL;
 12871 
  8481 
 12872         {
  8482         {
 12873             identifier_c param_name("IN");
  8483             identifier_c param_name("IN");
 12874             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8484             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12875             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8485             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12876             
  8486             
 12877             /* Get the value from a foo(<param_value>) style call */
  8487             /* Get the value from a foo(<param_value>) style call */
 12878             if (IN_param_value == NULL)
  8488             if (IN_param_value == NULL)
 12879               IN_param_value = function_call_param_iterator.next();
  8489               IN_param_value = function_call_param_iterator.next();
 12880             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8490             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12881             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8491             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12882             
  8492             
 12883             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8493             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8494             {
 12884             {
  8495         
 12885         
  8496                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 12886                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  8497                 s4o.print("(");
 12887                 s4o.print("(");
  8498                 return_type_symbol->accept(*this);
 12888                 return_type_symbol->accept(*this);
  8499                 s4o.print(")__time_to_int(");
 12889                 s4o.print(")");
  8500                 IN_param_value->accept(*this);
 12890                 IN_param_value->accept(*this);
  8501                 s4o.print(")");
 12891                 return NULL;
  8502                 return NULL;
 12892                 
  8503                 
 12893             }
  8504             }
 12894             
  8505             
 12895             ERROR;
  8506             ERROR;
 12896         }
  8507         }
 12897         
  8508         
 12898     }/*function_lword_to_ulint*/
  8509     }/*function_date_to_ulint*/
 12899     break;
  8510     break;
 12900 
  8511 
 12901 /****
  8512 /****
 12902  *LWORD_TO_REAL
  8513  *DATE_TO_REAL
 12903  */
  8514  */
 12904     case function_lword_to_real :
  8515     case function_date_to_real :
 12905     {
  8516     {
 12906         symbol_c *last_type_symbol = NULL;
  8517         symbol_c *last_type_symbol = NULL;
 12907 
  8518 
 12908         {
  8519         {
 12909             identifier_c param_name("IN");
  8520             identifier_c param_name("IN");
 12910             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8521             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12911             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8522             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12912             
  8523             
 12913             /* Get the value from a foo(<param_value>) style call */
  8524             /* Get the value from a foo(<param_value>) style call */
 12914             if (IN_param_value == NULL)
  8525             if (IN_param_value == NULL)
 12915               IN_param_value = function_call_param_iterator.next();
  8526               IN_param_value = function_call_param_iterator.next();
 12916             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8527             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12917             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8528             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12918             
  8529             
 12919             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8530             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8531             {
 12920             {
  8532         
 12921         
  8533                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 12922                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  8534                 s4o.print("(");
 12923                 s4o.print("(");
  8535                 return_type_symbol->accept(*this);
 12924                 return_type_symbol->accept(*this);
  8536                 s4o.print(")__time_to_real(");
 12925                 s4o.print(")");
  8537                 IN_param_value->accept(*this);
 12926                 IN_param_value->accept(*this);
  8538                 s4o.print(")");
 12927                 return NULL;
  8539                 return NULL;
 12928                 
  8540                 
 12929             }
  8541             }
 12930             
  8542             
 12931             ERROR;
  8543             ERROR;
 12932         }
  8544         }
 12933         
  8545         
 12934     }/*function_lword_to_real*/
  8546     }/*function_date_to_real*/
 12935     break;
  8547     break;
 12936 
  8548 
 12937 /****
  8549 /****
 12938  *LWORD_TO_LREAL
  8550  *DATE_TO_LREAL
 12939  */
  8551  */
 12940     case function_lword_to_lreal :
  8552     case function_date_to_lreal :
 12941     {
  8553     {
 12942         symbol_c *last_type_symbol = NULL;
  8554         symbol_c *last_type_symbol = NULL;
 12943 
  8555 
 12944         {
  8556         {
 12945             identifier_c param_name("IN");
  8557             identifier_c param_name("IN");
 12946             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8558             /* 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);
  8559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12948             
  8560             
 12949             /* Get the value from a foo(<param_value>) style call */
  8561             /* Get the value from a foo(<param_value>) style call */
 12950             if (IN_param_value == NULL)
  8562             if (IN_param_value == NULL)
 12951               IN_param_value = function_call_param_iterator.next();
  8563               IN_param_value = function_call_param_iterator.next();
 12952             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8564             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 ;
  8565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12954             
  8566             
 12955             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8567             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8568             {
 12956             {
  8569         
 12957         
  8570                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 12958                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  8571                 s4o.print("(");
 12959                 s4o.print("(");
  8572                 return_type_symbol->accept(*this);
 12960                 return_type_symbol->accept(*this);
  8573                 s4o.print(")__time_to_real(");
 12961                 s4o.print(")");
  8574                 IN_param_value->accept(*this);
 12962                 IN_param_value->accept(*this);
  8575                 s4o.print(")");
 12963                 return NULL;
  8576                 return NULL;
 12964                 
  8577                 
 12965             }
  8578             }
 12966             
  8579             
 12967             ERROR;
  8580             ERROR;
 12968         }
  8581         }
 12969         
  8582         
 12970     }/*function_lword_to_lreal*/
  8583     }/*function_date_to_lreal*/
 12971     break;
  8584     break;
 12972 
  8585 
 12973 /****
  8586 /****
 12974  *LWORD_TO_TIME
  8587  *DATE_TO_STRING
 12975  */
  8588  */
 12976     case function_lword_to_time :
  8589     case function_date_to_string :
 12977     {
  8590     {
 12978         symbol_c *last_type_symbol = NULL;
  8591         symbol_c *last_type_symbol = NULL;
 12979 
  8592 
 12980         {
  8593         {
 12981             identifier_c param_name("IN");
  8594             identifier_c param_name("IN");
 12982             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8595             /* 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);
  8596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12984             
  8597             
 12985             /* Get the value from a foo(<param_value>) style call */
  8598             /* Get the value from a foo(<param_value>) style call */
 12986             if (IN_param_value == NULL)
  8599             if (IN_param_value == NULL)
 12987               IN_param_value = function_call_param_iterator.next();
  8600               IN_param_value = function_call_param_iterator.next();
 12988             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8601             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 ;
  8602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12990             
  8603             
 12991             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8604             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 12992             {
       
 12993         
       
 12994                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12995                 s4o.print("(");
       
 12996                 return_type_symbol->accept(*this);
       
 12997                 s4o.print(")__int_to_time(");
       
 12998                 IN_param_value->accept(*this);
       
 12999                 s4o.print(")");
       
 13000                 return NULL;
       
 13001                 
       
 13002             }
       
 13003             
       
 13004             ERROR;
       
 13005         }
       
 13006         
       
 13007     }/*function_lword_to_time*/
       
 13008     break;
       
 13009 
       
 13010 /****
       
 13011  *LWORD_TO_DATE
       
 13012  */
       
 13013     case function_lword_to_date :
       
 13014     {
       
 13015         symbol_c *last_type_symbol = NULL;
       
 13016 
       
 13017         {
       
 13018             identifier_c param_name("IN");
       
 13019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13020             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13021             
       
 13022             /* Get the value from a foo(<param_value>) style call */
       
 13023             if (IN_param_value == NULL)
       
 13024               IN_param_value = function_call_param_iterator.next();
       
 13025             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13026             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13027             
       
 13028             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 13029             {
       
 13030         
       
 13031                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13032                 s4o.print("(");
       
 13033                 return_type_symbol->accept(*this);
       
 13034                 s4o.print(")__int_to_time(");
       
 13035                 IN_param_value->accept(*this);
       
 13036                 s4o.print(")");
       
 13037                 return NULL;
       
 13038                 
       
 13039             }
       
 13040             
       
 13041             ERROR;
       
 13042         }
       
 13043         
       
 13044     }/*function_lword_to_date*/
       
 13045     break;
       
 13046 
       
 13047 /****
       
 13048  *LWORD_TO_TOD
       
 13049  */
       
 13050     case function_lword_to_tod :
       
 13051     {
       
 13052         symbol_c *last_type_symbol = NULL;
       
 13053 
       
 13054         {
       
 13055             identifier_c param_name("IN");
       
 13056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13058             
       
 13059             /* Get the value from a foo(<param_value>) style call */
       
 13060             if (IN_param_value == NULL)
       
 13061               IN_param_value = function_call_param_iterator.next();
       
 13062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13064             
       
 13065             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 13066             {
       
 13067         
       
 13068                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13069                 s4o.print("(");
       
 13070                 return_type_symbol->accept(*this);
       
 13071                 s4o.print(")__int_to_time(");
       
 13072                 IN_param_value->accept(*this);
       
 13073                 s4o.print(")");
       
 13074                 return NULL;
       
 13075                 
       
 13076             }
       
 13077             
       
 13078             ERROR;
       
 13079         }
       
 13080         
       
 13081     }/*function_lword_to_tod*/
       
 13082     break;
       
 13083 
       
 13084 /****
       
 13085  *LWORD_TO_DT
       
 13086  */
       
 13087     case function_lword_to_dt :
       
 13088     {
       
 13089         symbol_c *last_type_symbol = NULL;
       
 13090 
       
 13091         {
       
 13092             identifier_c param_name("IN");
       
 13093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13094             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13095             
       
 13096             /* Get the value from a foo(<param_value>) style call */
       
 13097             if (IN_param_value == NULL)
       
 13098               IN_param_value = function_call_param_iterator.next();
       
 13099             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13100             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13101             
       
 13102             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 13103             {
       
 13104         
       
 13105                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13106                 s4o.print("(");
       
 13107                 return_type_symbol->accept(*this);
       
 13108                 s4o.print(")__int_to_time(");
       
 13109                 IN_param_value->accept(*this);
       
 13110                 s4o.print(")");
       
 13111                 return NULL;
       
 13112                 
       
 13113             }
       
 13114             
       
 13115             ERROR;
       
 13116         }
       
 13117         
       
 13118     }/*function_lword_to_dt*/
       
 13119     break;
       
 13120 
       
 13121 /****
       
 13122  *LWORD_TO_STRING
       
 13123  */
       
 13124     case function_lword_to_string :
       
 13125     {
       
 13126         symbol_c *last_type_symbol = NULL;
       
 13127 
       
 13128         {
       
 13129             identifier_c param_name("IN");
       
 13130             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13131             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13132             
       
 13133             /* Get the value from a foo(<param_value>) style call */
       
 13134             if (IN_param_value == NULL)
       
 13135               IN_param_value = function_call_param_iterator.next();
       
 13136             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13137             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13138             
       
 13139             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8605             {
 13140             {
  8606         
 13141         
  8607                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 13142                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  8608                 s4o.print("(");
 13143                 s4o.print("(");
  8609                 return_type_symbol->accept(*this);
 13144                 return_type_symbol->accept(*this);
  8610                 s4o.print(")__date_to_string(");
 13145                 s4o.print(")__bit_to_string(");
  8611                 IN_param_value->accept(*this);
 13146                 IN_param_value->accept(*this);
  8612                 s4o.print(")");
 13147                 s4o.print(")");
  8613                 return NULL;
 13148                 return NULL;
  8614                 
 13149                 
  8615             }
 13150             }
  8616             
 13151             
  8617             ERROR;
 13152             ERROR;
  8618         }
 13153         }
  8619         
 13154         
  8620     }/*function_date_to_string*/
 13155     }/*function_lword_to_string*/
  8621     break;
 13156     break;
  8622 
 13157 
  8623 /****
 13158 /****
  8624  *DATE_TO_BYTE
 13159  *LWORD_TO_BYTE
  8625  */
 13160  */
  8626     case function_date_to_byte :
 13161     case function_lword_to_byte :
  8627     {
 13162     {
  8628         symbol_c *last_type_symbol = NULL;
 13163         symbol_c *last_type_symbol = NULL;
  8629 
 13164 
  8630         {
 13165         {
  8631             identifier_c param_name("IN");
 13166             identifier_c param_name("IN");
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
 13167             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13168             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8634             
 13169             
  8635             /* Get the value from a foo(<param_value>) style call */
 13170             /* Get the value from a foo(<param_value>) style call */
  8636             if (IN_param_value == NULL)
 13171             if (IN_param_value == NULL)
  8637               IN_param_value = function_call_param_iterator.next();
 13172               IN_param_value = function_call_param_iterator.next();
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13173             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13174             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8640             
 13175             
  8641             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 13176             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8642             {
 13177             {
  8643         
 13178         
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 13179                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  8645                 s4o.print("(");
 13180                 s4o.print("(");
  8646                 return_type_symbol->accept(*this);
 13181                 return_type_symbol->accept(*this);
  8647                 s4o.print(")__time_to_int(");
 13182                 s4o.print(")");
  8648                 IN_param_value->accept(*this);
 13183                 IN_param_value->accept(*this);
  8649                 s4o.print(")");
 13184                 return NULL;
  8650                 return NULL;
 13185                 
  8651                 
 13186             }
  8652             }
 13187             
  8653             
 13188             ERROR;
  8654             ERROR;
 13189         }
  8655         }
 13190         
  8656         
 13191     }/*function_lword_to_byte*/
  8657     }/*function_date_to_byte*/
 13192     break;
  8658     break;
 13193 
  8659 
 13194 /****
  8660 /****
 13195  *LWORD_TO_WORD
  8661  *DATE_TO_WORD
 13196  */
  8662  */
 13197     case function_lword_to_word :
  8663     case function_date_to_word :
 13198     {
  8664     {
 13199         symbol_c *last_type_symbol = NULL;
  8665         symbol_c *last_type_symbol = NULL;
 13200 
  8666 
 13201         {
  8667         {
 13202             identifier_c param_name("IN");
  8668             identifier_c param_name("IN");
 13203             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8669             /* Get the value from a foo(<param_name> = <param_value>) style call */
 13204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8670             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 13205             
  8671             
 13206             /* Get the value from a foo(<param_value>) style call */
  8672             /* Get the value from a foo(<param_value>) style call */
 13207             if (IN_param_value == NULL)
  8673             if (IN_param_value == NULL)
 13208               IN_param_value = function_call_param_iterator.next();
  8674               IN_param_value = function_call_param_iterator.next();
 13209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8675             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8676             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13211             
  8677             
 13212             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  8678             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8679             {
 13213             {
  8680         
 13214         
  8681                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 13215                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  8682                 s4o.print("(");
 13216                 s4o.print("(");
  8683                 return_type_symbol->accept(*this);
 13217                 return_type_symbol->accept(*this);
  8684                 s4o.print(")__time_to_int(");
       
  8685                 IN_param_value->accept(*this);
       
  8686                 s4o.print(")");
       
  8687                 return NULL;
       
  8688                 
       
  8689             }
       
  8690             
       
  8691             ERROR;
       
  8692         }
       
  8693         
       
  8694     }/*function_date_to_word*/
       
  8695     break;
       
  8696 
       
  8697 /****
       
  8698  *DATE_TO_DWORD
       
  8699  */
       
  8700     case function_date_to_dword :
       
  8701     {
       
  8702         symbol_c *last_type_symbol = NULL;
       
  8703 
       
  8704         {
       
  8705             identifier_c param_name("IN");
       
  8706             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8707             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8708             
       
  8709             /* Get the value from a foo(<param_value>) style call */
       
  8710             if (IN_param_value == NULL)
       
  8711               IN_param_value = function_call_param_iterator.next();
       
  8712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8713             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8714             
       
  8715             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8716             {
       
  8717         
       
  8718                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8719                 s4o.print("(");
       
  8720                 return_type_symbol->accept(*this);
       
  8721                 s4o.print(")__time_to_int(");
       
  8722                 IN_param_value->accept(*this);
       
  8723                 s4o.print(")");
       
  8724                 return NULL;
       
  8725                 
       
  8726             }
       
  8727             
       
  8728             ERROR;
       
  8729         }
       
  8730         
       
  8731     }/*function_date_to_dword*/
       
  8732     break;
       
  8733 
       
  8734 /****
       
  8735  *DATE_TO_LWORD
       
  8736  */
       
  8737     case function_date_to_lword :
       
  8738     {
       
  8739         symbol_c *last_type_symbol = NULL;
       
  8740 
       
  8741         {
       
  8742             identifier_c param_name("IN");
       
  8743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8744             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8745             
       
  8746             /* Get the value from a foo(<param_value>) style call */
       
  8747             if (IN_param_value == NULL)
       
  8748               IN_param_value = function_call_param_iterator.next();
       
  8749             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8750             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8751             
       
  8752             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8753             {
       
  8754         
       
  8755                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8756                 s4o.print("(");
       
  8757                 return_type_symbol->accept(*this);
       
  8758                 s4o.print(")__time_to_int(");
       
  8759                 IN_param_value->accept(*this);
       
  8760                 s4o.print(")");
       
  8761                 return NULL;
       
  8762                 
       
  8763             }
       
  8764             
       
  8765             ERROR;
       
  8766         }
       
  8767         
       
  8768     }/*function_date_to_lword*/
       
  8769     break;
       
  8770 
       
  8771 /****
       
  8772  *TOD_TO_BOOL
       
  8773  */
       
  8774     case function_tod_to_bool :
       
  8775     {
       
  8776         symbol_c *last_type_symbol = NULL;
       
  8777 
       
  8778         {
       
  8779             identifier_c param_name("IN");
       
  8780             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8781             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8782             
       
  8783             /* Get the value from a foo(<param_value>) style call */
       
  8784             if (IN_param_value == NULL)
       
  8785               IN_param_value = function_call_param_iterator.next();
       
  8786             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8787             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8788             
       
  8789             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8790             {
       
  8791         
       
  8792                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8793                 s4o.print("(");
       
  8794                 return_type_symbol->accept(*this);
       
  8795                 s4o.print(")__time_to_int(");
       
  8796                 IN_param_value->accept(*this);
       
  8797                 s4o.print(")");
       
  8798                 return NULL;
       
  8799                 
       
  8800             }
       
  8801             
       
  8802             ERROR;
       
  8803         }
       
  8804         
       
  8805     }/*function_tod_to_bool*/
       
  8806     break;
       
  8807 
       
  8808 /****
       
  8809  *TOD_TO_SINT
       
  8810  */
       
  8811     case function_tod_to_sint :
       
  8812     {
       
  8813         symbol_c *last_type_symbol = NULL;
       
  8814 
       
  8815         {
       
  8816             identifier_c param_name("IN");
       
  8817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8819             
       
  8820             /* Get the value from a foo(<param_value>) style call */
       
  8821             if (IN_param_value == NULL)
       
  8822               IN_param_value = function_call_param_iterator.next();
       
  8823             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8824             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8825             
       
  8826             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8827             {
       
  8828         
       
  8829                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8830                 s4o.print("(");
       
  8831                 return_type_symbol->accept(*this);
       
  8832                 s4o.print(")__time_to_int(");
       
  8833                 IN_param_value->accept(*this);
       
  8834                 s4o.print(")");
       
  8835                 return NULL;
       
  8836                 
       
  8837             }
       
  8838             
       
  8839             ERROR;
       
  8840         }
       
  8841         
       
  8842     }/*function_tod_to_sint*/
       
  8843     break;
       
  8844 
       
  8845 /****
       
  8846  *TOD_TO_INT
       
  8847  */
       
  8848     case function_tod_to_int :
       
  8849     {
       
  8850         symbol_c *last_type_symbol = NULL;
       
  8851 
       
  8852         {
       
  8853             identifier_c param_name("IN");
       
  8854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8855             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8856             
       
  8857             /* Get the value from a foo(<param_value>) style call */
       
  8858             if (IN_param_value == NULL)
       
  8859               IN_param_value = function_call_param_iterator.next();
       
  8860             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8861             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8862             
       
  8863             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8864             {
       
  8865         
       
  8866                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8867                 s4o.print("(");
       
  8868                 return_type_symbol->accept(*this);
       
  8869                 s4o.print(")__time_to_int(");
       
  8870                 IN_param_value->accept(*this);
       
  8871                 s4o.print(")");
       
  8872                 return NULL;
       
  8873                 
       
  8874             }
       
  8875             
       
  8876             ERROR;
       
  8877         }
       
  8878         
       
  8879     }/*function_tod_to_int*/
       
  8880     break;
       
  8881 
       
  8882 /****
       
  8883  *TOD_TO_DINT
       
  8884  */
       
  8885     case function_tod_to_dint :
       
  8886     {
       
  8887         symbol_c *last_type_symbol = NULL;
       
  8888 
       
  8889         {
       
  8890             identifier_c param_name("IN");
       
  8891             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8892             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8893             
       
  8894             /* Get the value from a foo(<param_value>) style call */
       
  8895             if (IN_param_value == NULL)
       
  8896               IN_param_value = function_call_param_iterator.next();
       
  8897             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8898             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8899             
       
  8900             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8901             {
       
  8902         
       
  8903                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8904                 s4o.print("(");
       
  8905                 return_type_symbol->accept(*this);
       
  8906                 s4o.print(")__time_to_int(");
       
  8907                 IN_param_value->accept(*this);
       
  8908                 s4o.print(")");
       
  8909                 return NULL;
       
  8910                 
       
  8911             }
       
  8912             
       
  8913             ERROR;
       
  8914         }
       
  8915         
       
  8916     }/*function_tod_to_dint*/
       
  8917     break;
       
  8918 
       
  8919 /****
       
  8920  *TOD_TO_LINT
       
  8921  */
       
  8922     case function_tod_to_lint :
       
  8923     {
       
  8924         symbol_c *last_type_symbol = NULL;
       
  8925 
       
  8926         {
       
  8927             identifier_c param_name("IN");
       
  8928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8930             
       
  8931             /* Get the value from a foo(<param_value>) style call */
       
  8932             if (IN_param_value == NULL)
       
  8933               IN_param_value = function_call_param_iterator.next();
       
  8934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8936             
       
  8937             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8938             {
       
  8939         
       
  8940                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8941                 s4o.print("(");
       
  8942                 return_type_symbol->accept(*this);
       
  8943                 s4o.print(")__time_to_int(");
       
  8944                 IN_param_value->accept(*this);
       
  8945                 s4o.print(")");
       
  8946                 return NULL;
       
  8947                 
       
  8948             }
       
  8949             
       
  8950             ERROR;
       
  8951         }
       
  8952         
       
  8953     }/*function_tod_to_lint*/
       
  8954     break;
       
  8955 
       
  8956 /****
       
  8957  *TOD_TO_USINT
       
  8958  */
       
  8959     case function_tod_to_usint :
       
  8960     {
       
  8961         symbol_c *last_type_symbol = NULL;
       
  8962 
       
  8963         {
       
  8964             identifier_c param_name("IN");
       
  8965             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8966             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8967             
       
  8968             /* Get the value from a foo(<param_value>) style call */
       
  8969             if (IN_param_value == NULL)
       
  8970               IN_param_value = function_call_param_iterator.next();
       
  8971             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8972             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8973             
       
  8974             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8975             {
       
  8976         
       
  8977                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8978                 s4o.print("(");
       
  8979                 return_type_symbol->accept(*this);
       
  8980                 s4o.print(")__time_to_int(");
       
  8981                 IN_param_value->accept(*this);
       
  8982                 s4o.print(")");
       
  8983                 return NULL;
       
  8984                 
       
  8985             }
       
  8986             
       
  8987             ERROR;
       
  8988         }
       
  8989         
       
  8990     }/*function_tod_to_usint*/
       
  8991     break;
       
  8992 
       
  8993 /****
       
  8994  *TOD_TO_UINT
       
  8995  */
       
  8996     case function_tod_to_uint :
       
  8997     {
       
  8998         symbol_c *last_type_symbol = NULL;
       
  8999 
       
  9000         {
       
  9001             identifier_c param_name("IN");
       
  9002             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9003             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9004             
       
  9005             /* Get the value from a foo(<param_value>) style call */
       
  9006             if (IN_param_value == NULL)
       
  9007               IN_param_value = function_call_param_iterator.next();
       
  9008             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9009             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9010             
       
  9011             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9012             {
       
  9013         
       
  9014                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9015                 s4o.print("(");
       
  9016                 return_type_symbol->accept(*this);
       
  9017                 s4o.print(")__time_to_int(");
       
  9018                 IN_param_value->accept(*this);
       
  9019                 s4o.print(")");
       
  9020                 return NULL;
       
  9021                 
       
  9022             }
       
  9023             
       
  9024             ERROR;
       
  9025         }
       
  9026         
       
  9027     }/*function_tod_to_uint*/
       
  9028     break;
       
  9029 
       
  9030 /****
       
  9031  *TOD_TO_UDINT
       
  9032  */
       
  9033     case function_tod_to_udint :
       
  9034     {
       
  9035         symbol_c *last_type_symbol = NULL;
       
  9036 
       
  9037         {
       
  9038             identifier_c param_name("IN");
       
  9039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9040             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9041             
       
  9042             /* Get the value from a foo(<param_value>) style call */
       
  9043             if (IN_param_value == NULL)
       
  9044               IN_param_value = function_call_param_iterator.next();
       
  9045             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9046             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9047             
       
  9048             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9049             {
       
  9050         
       
  9051                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9052                 s4o.print("(");
       
  9053                 return_type_symbol->accept(*this);
       
  9054                 s4o.print(")__time_to_int(");
       
  9055                 IN_param_value->accept(*this);
       
  9056                 s4o.print(")");
       
  9057                 return NULL;
       
  9058                 
       
  9059             }
       
  9060             
       
  9061             ERROR;
       
  9062         }
       
  9063         
       
  9064     }/*function_tod_to_udint*/
       
  9065     break;
       
  9066 
       
  9067 /****
       
  9068  *TOD_TO_ULINT
       
  9069  */
       
  9070     case function_tod_to_ulint :
       
  9071     {
       
  9072         symbol_c *last_type_symbol = NULL;
       
  9073 
       
  9074         {
       
  9075             identifier_c param_name("IN");
       
  9076             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9077             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9078             
       
  9079             /* Get the value from a foo(<param_value>) style call */
       
  9080             if (IN_param_value == NULL)
       
  9081               IN_param_value = function_call_param_iterator.next();
       
  9082             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9083             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9084             
       
  9085             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9086             {
       
  9087         
       
  9088                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9089                 s4o.print("(");
       
  9090                 return_type_symbol->accept(*this);
       
  9091                 s4o.print(")__time_to_int(");
       
  9092                 IN_param_value->accept(*this);
       
  9093                 s4o.print(")");
       
  9094                 return NULL;
       
  9095                 
       
  9096             }
       
  9097             
       
  9098             ERROR;
       
  9099         }
       
  9100         
       
  9101     }/*function_tod_to_ulint*/
       
  9102     break;
       
  9103 
       
  9104 /****
       
  9105  *TOD_TO_REAL
       
  9106  */
       
  9107     case function_tod_to_real :
       
  9108     {
       
  9109         symbol_c *last_type_symbol = NULL;
       
  9110 
       
  9111         {
       
  9112             identifier_c param_name("IN");
       
  9113             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9114             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9115             
       
  9116             /* Get the value from a foo(<param_value>) style call */
       
  9117             if (IN_param_value == NULL)
       
  9118               IN_param_value = function_call_param_iterator.next();
       
  9119             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9120             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9121             
       
  9122             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9123             {
       
  9124         
       
  9125                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9126                 s4o.print("(");
       
  9127                 return_type_symbol->accept(*this);
       
  9128                 s4o.print(")__time_to_real(");
       
  9129                 IN_param_value->accept(*this);
       
  9130                 s4o.print(")");
       
  9131                 return NULL;
       
  9132                 
       
  9133             }
       
  9134             
       
  9135             ERROR;
       
  9136         }
       
  9137         
       
  9138     }/*function_tod_to_real*/
       
  9139     break;
       
  9140 
       
  9141 /****
       
  9142  *TOD_TO_LREAL
       
  9143  */
       
  9144     case function_tod_to_lreal :
       
  9145     {
       
  9146         symbol_c *last_type_symbol = NULL;
       
  9147 
       
  9148         {
       
  9149             identifier_c param_name("IN");
       
  9150             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9151             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9152             
       
  9153             /* Get the value from a foo(<param_value>) style call */
       
  9154             if (IN_param_value == NULL)
       
  9155               IN_param_value = function_call_param_iterator.next();
       
  9156             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9157             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9158             
       
  9159             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9160             {
       
  9161         
       
  9162                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9163                 s4o.print("(");
       
  9164                 return_type_symbol->accept(*this);
       
  9165                 s4o.print(")__time_to_real(");
       
  9166                 IN_param_value->accept(*this);
       
  9167                 s4o.print(")");
       
  9168                 return NULL;
       
  9169                 
       
  9170             }
       
  9171             
       
  9172             ERROR;
       
  9173         }
       
  9174         
       
  9175     }/*function_tod_to_lreal*/
       
  9176     break;
       
  9177 
       
  9178 /****
       
  9179  *TOD_TO_STRING
       
  9180  */
       
  9181     case function_tod_to_string :
       
  9182     {
       
  9183         symbol_c *last_type_symbol = NULL;
       
  9184 
       
  9185         {
       
  9186             identifier_c param_name("IN");
       
  9187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9189             
       
  9190             /* Get the value from a foo(<param_value>) style call */
       
  9191             if (IN_param_value == NULL)
       
  9192               IN_param_value = function_call_param_iterator.next();
       
  9193             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9194             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9195             
       
  9196             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9197             {
       
  9198         
       
  9199                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9200                 s4o.print("(");
       
  9201                 return_type_symbol->accept(*this);
       
  9202                 s4o.print(")__tod_to_string(");
       
  9203                 IN_param_value->accept(*this);
       
  9204                 s4o.print(")");
       
  9205                 return NULL;
       
  9206                 
       
  9207             }
       
  9208             
       
  9209             ERROR;
       
  9210         }
       
  9211         
       
  9212     }/*function_tod_to_string*/
       
  9213     break;
       
  9214 
       
  9215 /****
       
  9216  *TOD_TO_BYTE
       
  9217  */
       
  9218     case function_tod_to_byte :
       
  9219     {
       
  9220         symbol_c *last_type_symbol = NULL;
       
  9221 
       
  9222         {
       
  9223             identifier_c param_name("IN");
       
  9224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9226             
       
  9227             /* Get the value from a foo(<param_value>) style call */
       
  9228             if (IN_param_value == NULL)
       
  9229               IN_param_value = function_call_param_iterator.next();
       
  9230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9232             
       
  9233             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9234             {
       
  9235         
       
  9236                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9237                 s4o.print("(");
       
  9238                 return_type_symbol->accept(*this);
       
  9239                 s4o.print(")__time_to_int(");
       
  9240                 IN_param_value->accept(*this);
       
  9241                 s4o.print(")");
       
  9242                 return NULL;
       
  9243                 
       
  9244             }
       
  9245             
       
  9246             ERROR;
       
  9247         }
       
  9248         
       
  9249     }/*function_tod_to_byte*/
       
  9250     break;
       
  9251 
       
  9252 /****
       
  9253  *TOD_TO_WORD
       
  9254  */
       
  9255     case function_tod_to_word :
       
  9256     {
       
  9257         symbol_c *last_type_symbol = NULL;
       
  9258 
       
  9259         {
       
  9260             identifier_c param_name("IN");
       
  9261             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9262             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9263             
       
  9264             /* Get the value from a foo(<param_value>) style call */
       
  9265             if (IN_param_value == NULL)
       
  9266               IN_param_value = function_call_param_iterator.next();
       
  9267             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9268             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9269             
       
  9270             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9271             {
       
  9272         
       
  9273                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9274                 s4o.print("(");
       
  9275                 return_type_symbol->accept(*this);
       
  9276                 s4o.print(")__time_to_int(");
       
  9277                 IN_param_value->accept(*this);
       
  9278                 s4o.print(")");
       
  9279                 return NULL;
       
  9280                 
       
  9281             }
       
  9282             
       
  9283             ERROR;
       
  9284         }
       
  9285         
       
  9286     }/*function_tod_to_word*/
       
  9287     break;
       
  9288 
       
  9289 /****
       
  9290  *TOD_TO_DWORD
       
  9291  */
       
  9292     case function_tod_to_dword :
       
  9293     {
       
  9294         symbol_c *last_type_symbol = NULL;
       
  9295 
       
  9296         {
       
  9297             identifier_c param_name("IN");
       
  9298             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9299             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9300             
       
  9301             /* Get the value from a foo(<param_value>) style call */
       
  9302             if (IN_param_value == NULL)
       
  9303               IN_param_value = function_call_param_iterator.next();
       
  9304             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9305             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9306             
       
  9307             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9308             {
       
  9309         
       
  9310                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9311                 s4o.print("(");
       
  9312                 return_type_symbol->accept(*this);
       
  9313                 s4o.print(")__time_to_int(");
       
  9314                 IN_param_value->accept(*this);
       
  9315                 s4o.print(")");
       
  9316                 return NULL;
       
  9317                 
       
  9318             }
       
  9319             
       
  9320             ERROR;
       
  9321         }
       
  9322         
       
  9323     }/*function_tod_to_dword*/
       
  9324     break;
       
  9325 
       
  9326 /****
       
  9327  *TOD_TO_LWORD
       
  9328  */
       
  9329     case function_tod_to_lword :
       
  9330     {
       
  9331         symbol_c *last_type_symbol = NULL;
       
  9332 
       
  9333         {
       
  9334             identifier_c param_name("IN");
       
  9335             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9336             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9337             
       
  9338             /* Get the value from a foo(<param_value>) style call */
       
  9339             if (IN_param_value == NULL)
       
  9340               IN_param_value = function_call_param_iterator.next();
       
  9341             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9342             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9343             
       
  9344             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  9345             {
       
  9346         
       
  9347                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9348                 s4o.print("(");
       
  9349                 return_type_symbol->accept(*this);
       
  9350                 s4o.print(")__time_to_int(");
       
  9351                 IN_param_value->accept(*this);
       
  9352                 s4o.print(")");
       
  9353                 return NULL;
       
  9354                 
       
  9355             }
       
  9356             
       
  9357             ERROR;
       
  9358         }
       
  9359         
       
  9360     }/*function_tod_to_lword*/
       
  9361     break;
       
  9362 
       
  9363 /****
       
  9364  *DT_TO_BOOL
       
  9365  */
       
  9366     case function_dt_to_bool :
       
  9367     {
       
  9368         symbol_c *last_type_symbol = NULL;
       
  9369 
       
  9370         {
       
  9371             identifier_c param_name("IN");
       
  9372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9374             
       
  9375             /* Get the value from a foo(<param_value>) style call */
       
  9376             if (IN_param_value == NULL)
       
  9377               IN_param_value = function_call_param_iterator.next();
       
  9378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9380             
       
  9381             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9382             {
       
  9383         
       
  9384                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9385                 s4o.print("(");
       
  9386                 return_type_symbol->accept(*this);
       
  9387                 s4o.print(")__time_to_int(");
       
  9388                 IN_param_value->accept(*this);
       
  9389                 s4o.print(")");
       
  9390                 return NULL;
       
  9391                 
       
  9392             }
       
  9393             
       
  9394             ERROR;
       
  9395         }
       
  9396         
       
  9397     }/*function_dt_to_bool*/
       
  9398     break;
       
  9399 
       
  9400 /****
       
  9401  *DT_TO_SINT
       
  9402  */
       
  9403     case function_dt_to_sint :
       
  9404     {
       
  9405         symbol_c *last_type_symbol = NULL;
       
  9406 
       
  9407         {
       
  9408             identifier_c param_name("IN");
       
  9409             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9410             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9411             
       
  9412             /* Get the value from a foo(<param_value>) style call */
       
  9413             if (IN_param_value == NULL)
       
  9414               IN_param_value = function_call_param_iterator.next();
       
  9415             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9416             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9417             
       
  9418             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9419             {
       
  9420         
       
  9421                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9422                 s4o.print("(");
       
  9423                 return_type_symbol->accept(*this);
       
  9424                 s4o.print(")__time_to_int(");
       
  9425                 IN_param_value->accept(*this);
       
  9426                 s4o.print(")");
       
  9427                 return NULL;
       
  9428                 
       
  9429             }
       
  9430             
       
  9431             ERROR;
       
  9432         }
       
  9433         
       
  9434     }/*function_dt_to_sint*/
       
  9435     break;
       
  9436 
       
  9437 /****
       
  9438  *DT_TO_INT
       
  9439  */
       
  9440     case function_dt_to_int :
       
  9441     {
       
  9442         symbol_c *last_type_symbol = NULL;
       
  9443 
       
  9444         {
       
  9445             identifier_c param_name("IN");
       
  9446             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9447             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9448             
       
  9449             /* Get the value from a foo(<param_value>) style call */
       
  9450             if (IN_param_value == NULL)
       
  9451               IN_param_value = function_call_param_iterator.next();
       
  9452             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9453             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9454             
       
  9455             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9456             {
       
  9457         
       
  9458                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9459                 s4o.print("(");
       
  9460                 return_type_symbol->accept(*this);
       
  9461                 s4o.print(")__time_to_int(");
       
  9462                 IN_param_value->accept(*this);
       
  9463                 s4o.print(")");
       
  9464                 return NULL;
       
  9465                 
       
  9466             }
       
  9467             
       
  9468             ERROR;
       
  9469         }
       
  9470         
       
  9471     }/*function_dt_to_int*/
       
  9472     break;
       
  9473 
       
  9474 /****
       
  9475  *DT_TO_DINT
       
  9476  */
       
  9477     case function_dt_to_dint :
       
  9478     {
       
  9479         symbol_c *last_type_symbol = NULL;
       
  9480 
       
  9481         {
       
  9482             identifier_c param_name("IN");
       
  9483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9484             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9485             
       
  9486             /* Get the value from a foo(<param_value>) style call */
       
  9487             if (IN_param_value == NULL)
       
  9488               IN_param_value = function_call_param_iterator.next();
       
  9489             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9490             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9491             
       
  9492             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9493             {
       
  9494         
       
  9495                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9496                 s4o.print("(");
       
  9497                 return_type_symbol->accept(*this);
       
  9498                 s4o.print(")__time_to_int(");
       
  9499                 IN_param_value->accept(*this);
       
  9500                 s4o.print(")");
       
  9501                 return NULL;
       
  9502                 
       
  9503             }
       
  9504             
       
  9505             ERROR;
       
  9506         }
       
  9507         
       
  9508     }/*function_dt_to_dint*/
       
  9509     break;
       
  9510 
       
  9511 /****
       
  9512  *DT_TO_LINT
       
  9513  */
       
  9514     case function_dt_to_lint :
       
  9515     {
       
  9516         symbol_c *last_type_symbol = NULL;
       
  9517 
       
  9518         {
       
  9519             identifier_c param_name("IN");
       
  9520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9522             
       
  9523             /* Get the value from a foo(<param_value>) style call */
       
  9524             if (IN_param_value == NULL)
       
  9525               IN_param_value = function_call_param_iterator.next();
       
  9526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9528             
       
  9529             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9530             {
       
  9531         
       
  9532                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9533                 s4o.print("(");
       
  9534                 return_type_symbol->accept(*this);
       
  9535                 s4o.print(")__time_to_int(");
       
  9536                 IN_param_value->accept(*this);
       
  9537                 s4o.print(")");
       
  9538                 return NULL;
       
  9539                 
       
  9540             }
       
  9541             
       
  9542             ERROR;
       
  9543         }
       
  9544         
       
  9545     }/*function_dt_to_lint*/
       
  9546     break;
       
  9547 
       
  9548 /****
       
  9549  *DT_TO_USINT
       
  9550  */
       
  9551     case function_dt_to_usint :
       
  9552     {
       
  9553         symbol_c *last_type_symbol = NULL;
       
  9554 
       
  9555         {
       
  9556             identifier_c param_name("IN");
       
  9557             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9558             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9559             
       
  9560             /* Get the value from a foo(<param_value>) style call */
       
  9561             if (IN_param_value == NULL)
       
  9562               IN_param_value = function_call_param_iterator.next();
       
  9563             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9564             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9565             
       
  9566             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9567             {
       
  9568         
       
  9569                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9570                 s4o.print("(");
       
  9571                 return_type_symbol->accept(*this);
       
  9572                 s4o.print(")__time_to_int(");
       
  9573                 IN_param_value->accept(*this);
       
  9574                 s4o.print(")");
       
  9575                 return NULL;
       
  9576                 
       
  9577             }
       
  9578             
       
  9579             ERROR;
       
  9580         }
       
  9581         
       
  9582     }/*function_dt_to_usint*/
       
  9583     break;
       
  9584 
       
  9585 /****
       
  9586  *DT_TO_UINT
       
  9587  */
       
  9588     case function_dt_to_uint :
       
  9589     {
       
  9590         symbol_c *last_type_symbol = NULL;
       
  9591 
       
  9592         {
       
  9593             identifier_c param_name("IN");
       
  9594             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9595             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9596             
       
  9597             /* Get the value from a foo(<param_value>) style call */
       
  9598             if (IN_param_value == NULL)
       
  9599               IN_param_value = function_call_param_iterator.next();
       
  9600             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9601             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9602             
       
  9603             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9604             {
       
  9605         
       
  9606                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9607                 s4o.print("(");
       
  9608                 return_type_symbol->accept(*this);
       
  9609                 s4o.print(")__time_to_int(");
       
  9610                 IN_param_value->accept(*this);
       
  9611                 s4o.print(")");
       
  9612                 return NULL;
       
  9613                 
       
  9614             }
       
  9615             
       
  9616             ERROR;
       
  9617         }
       
  9618         
       
  9619     }/*function_dt_to_uint*/
       
  9620     break;
       
  9621 
       
  9622 /****
       
  9623  *DT_TO_UDINT
       
  9624  */
       
  9625     case function_dt_to_udint :
       
  9626     {
       
  9627         symbol_c *last_type_symbol = NULL;
       
  9628 
       
  9629         {
       
  9630             identifier_c param_name("IN");
       
  9631             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9632             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9633             
       
  9634             /* Get the value from a foo(<param_value>) style call */
       
  9635             if (IN_param_value == NULL)
       
  9636               IN_param_value = function_call_param_iterator.next();
       
  9637             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9638             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9639             
       
  9640             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9641             {
       
  9642         
       
  9643                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9644                 s4o.print("(");
       
  9645                 return_type_symbol->accept(*this);
       
  9646                 s4o.print(")__time_to_int(");
       
  9647                 IN_param_value->accept(*this);
       
  9648                 s4o.print(")");
       
  9649                 return NULL;
       
  9650                 
       
  9651             }
       
  9652             
       
  9653             ERROR;
       
  9654         }
       
  9655         
       
  9656     }/*function_dt_to_udint*/
       
  9657     break;
       
  9658 
       
  9659 /****
       
  9660  *DT_TO_ULINT
       
  9661  */
       
  9662     case function_dt_to_ulint :
       
  9663     {
       
  9664         symbol_c *last_type_symbol = NULL;
       
  9665 
       
  9666         {
       
  9667             identifier_c param_name("IN");
       
  9668             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9669             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9670             
       
  9671             /* Get the value from a foo(<param_value>) style call */
       
  9672             if (IN_param_value == NULL)
       
  9673               IN_param_value = function_call_param_iterator.next();
       
  9674             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9675             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9676             
       
  9677             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9678             {
       
  9679         
       
  9680                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9681                 s4o.print("(");
       
  9682                 return_type_symbol->accept(*this);
       
  9683                 s4o.print(")__time_to_int(");
       
  9684                 IN_param_value->accept(*this);
       
  9685                 s4o.print(")");
       
  9686                 return NULL;
       
  9687                 
       
  9688             }
       
  9689             
       
  9690             ERROR;
       
  9691         }
       
  9692         
       
  9693     }/*function_dt_to_ulint*/
       
  9694     break;
       
  9695 
       
  9696 /****
       
  9697  *DT_TO_REAL
       
  9698  */
       
  9699     case function_dt_to_real :
       
  9700     {
       
  9701         symbol_c *last_type_symbol = NULL;
       
  9702 
       
  9703         {
       
  9704             identifier_c param_name("IN");
       
  9705             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9706             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9707             
       
  9708             /* Get the value from a foo(<param_value>) style call */
       
  9709             if (IN_param_value == NULL)
       
  9710               IN_param_value = function_call_param_iterator.next();
       
  9711             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9712             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9713             
       
  9714             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9715             {
       
  9716         
       
  9717                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9718                 s4o.print("(");
       
  9719                 return_type_symbol->accept(*this);
       
  9720                 s4o.print(")__time_to_real(");
       
  9721                 IN_param_value->accept(*this);
       
  9722                 s4o.print(")");
       
  9723                 return NULL;
       
  9724                 
       
  9725             }
       
  9726             
       
  9727             ERROR;
       
  9728         }
       
  9729         
       
  9730     }/*function_dt_to_real*/
       
  9731     break;
       
  9732 
       
  9733 /****
       
  9734  *DT_TO_LREAL
       
  9735  */
       
  9736     case function_dt_to_lreal :
       
  9737     {
       
  9738         symbol_c *last_type_symbol = NULL;
       
  9739 
       
  9740         {
       
  9741             identifier_c param_name("IN");
       
  9742             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9743             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9744             
       
  9745             /* Get the value from a foo(<param_value>) style call */
       
  9746             if (IN_param_value == NULL)
       
  9747               IN_param_value = function_call_param_iterator.next();
       
  9748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9749             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9750             
       
  9751             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9752             {
       
  9753         
       
  9754                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9755                 s4o.print("(");
       
  9756                 return_type_symbol->accept(*this);
       
  9757                 s4o.print(")__time_to_real(");
       
  9758                 IN_param_value->accept(*this);
       
  9759                 s4o.print(")");
       
  9760                 return NULL;
       
  9761                 
       
  9762             }
       
  9763             
       
  9764             ERROR;
       
  9765         }
       
  9766         
       
  9767     }/*function_dt_to_lreal*/
       
  9768     break;
       
  9769 
       
  9770 /****
       
  9771  *DT_TO_STRING
       
  9772  */
       
  9773     case function_dt_to_string :
       
  9774     {
       
  9775         symbol_c *last_type_symbol = NULL;
       
  9776 
       
  9777         {
       
  9778             identifier_c param_name("IN");
       
  9779             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9780             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9781             
       
  9782             /* Get the value from a foo(<param_value>) style call */
       
  9783             if (IN_param_value == NULL)
       
  9784               IN_param_value = function_call_param_iterator.next();
       
  9785             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9786             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9787             
       
  9788             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9789             {
       
  9790         
       
  9791                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9792                 s4o.print("(");
       
  9793                 return_type_symbol->accept(*this);
       
  9794                 s4o.print(")__dt_to_string(");
       
  9795                 IN_param_value->accept(*this);
       
  9796                 s4o.print(")");
       
  9797                 return NULL;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_dt_to_string*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *DT_TO_BYTE
       
  9809  */
       
  9810     case function_dt_to_byte :
       
  9811     {
       
  9812         symbol_c *last_type_symbol = NULL;
       
  9813 
       
  9814         {
       
  9815             identifier_c param_name("IN");
       
  9816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9824             
       
  9825             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9829                 s4o.print("(");
       
  9830                 return_type_symbol->accept(*this);
       
  9831                 s4o.print(")__time_to_int(");
       
  9832                 IN_param_value->accept(*this);
       
  9833                 s4o.print(")");
       
  9834                 return NULL;
       
  9835                 
       
  9836             }
       
  9837             
       
  9838             ERROR;
       
  9839         }
       
  9840         
       
  9841     }/*function_dt_to_byte*/
       
  9842     break;
       
  9843 
       
  9844 /****
       
  9845  *DT_TO_WORD
       
  9846  */
       
  9847     case function_dt_to_word :
       
  9848     {
       
  9849         symbol_c *last_type_symbol = NULL;
       
  9850 
       
  9851         {
       
  9852             identifier_c param_name("IN");
       
  9853             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9854             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9855             
       
  9856             /* Get the value from a foo(<param_value>) style call */
       
  9857             if (IN_param_value == NULL)
       
  9858               IN_param_value = function_call_param_iterator.next();
       
  9859             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9860             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9861             
       
  9862             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9863             {
       
  9864         
       
  9865                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9866                 s4o.print("(");
       
  9867                 return_type_symbol->accept(*this);
       
  9868                 s4o.print(")__time_to_int(");
       
  9869                 IN_param_value->accept(*this);
       
  9870                 s4o.print(")");
       
  9871                 return NULL;
       
  9872                 
       
  9873             }
       
  9874             
       
  9875             ERROR;
       
  9876         }
       
  9877         
       
  9878     }/*function_dt_to_word*/
       
  9879     break;
       
  9880 
       
  9881 /****
       
  9882  *DT_TO_DWORD
       
  9883  */
       
  9884     case function_dt_to_dword :
       
  9885     {
       
  9886         symbol_c *last_type_symbol = NULL;
       
  9887 
       
  9888         {
       
  9889             identifier_c param_name("IN");
       
  9890             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9891             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9892             
       
  9893             /* Get the value from a foo(<param_value>) style call */
       
  9894             if (IN_param_value == NULL)
       
  9895               IN_param_value = function_call_param_iterator.next();
       
  9896             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9897             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9898             
       
  9899             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9900             {
       
  9901         
       
  9902                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9903                 s4o.print("(");
       
  9904                 return_type_symbol->accept(*this);
       
  9905                 s4o.print(")__time_to_int(");
       
  9906                 IN_param_value->accept(*this);
       
  9907                 s4o.print(")");
       
  9908                 return NULL;
       
  9909                 
       
  9910             }
       
  9911             
       
  9912             ERROR;
       
  9913         }
       
  9914         
       
  9915     }/*function_dt_to_dword*/
       
  9916     break;
       
  9917 
       
  9918 /****
       
  9919  *DT_TO_LWORD
       
  9920  */
       
  9921     case function_dt_to_lword :
       
  9922     {
       
  9923         symbol_c *last_type_symbol = NULL;
       
  9924 
       
  9925         {
       
  9926             identifier_c param_name("IN");
       
  9927             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9928             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9929             
       
  9930             /* Get the value from a foo(<param_value>) style call */
       
  9931             if (IN_param_value == NULL)
       
  9932               IN_param_value = function_call_param_iterator.next();
       
  9933             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9934             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9935             
       
  9936             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  9937             {
       
  9938         
       
  9939                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9940                 s4o.print("(");
       
  9941                 return_type_symbol->accept(*this);
       
  9942                 s4o.print(")__time_to_int(");
       
  9943                 IN_param_value->accept(*this);
       
  9944                 s4o.print(")");
       
  9945                 return NULL;
       
  9946                 
       
  9947             }
       
  9948             
       
  9949             ERROR;
       
  9950         }
       
  9951         
       
  9952     }/*function_dt_to_lword*/
       
  9953     break;
       
  9954 
       
  9955 /****
       
  9956  *STRING_TO_BOOL
       
  9957  */
       
  9958     case function_string_to_bool :
       
  9959     {
       
  9960         symbol_c *last_type_symbol = NULL;
       
  9961 
       
  9962         {
       
  9963             identifier_c param_name("IN");
       
  9964             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9965             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9966             
       
  9967             /* Get the value from a foo(<param_value>) style call */
       
  9968             if (IN_param_value == NULL)
       
  9969               IN_param_value = function_call_param_iterator.next();
       
  9970             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9971             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9972             
       
  9973             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9974             {
       
  9975         
       
  9976                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9977                 s4o.print("(");
       
  9978                 return_type_symbol->accept(*this);
       
  9979                 s4o.print(")__string_to_bool(");
       
  9980                 IN_param_value->accept(*this);
       
  9981                 s4o.print(")");
       
  9982                 return NULL;
       
  9983                 
       
  9984             }
       
  9985             
       
  9986             ERROR;
       
  9987         }
       
  9988         
       
  9989     }/*function_string_to_bool*/
       
  9990     break;
       
  9991 
       
  9992 /****
       
  9993  *STRING_TO_SINT
       
  9994  */
       
  9995     case function_string_to_sint :
       
  9996     {
       
  9997         symbol_c *last_type_symbol = NULL;
       
  9998 
       
  9999         {
       
 10000             identifier_c param_name("IN");
       
 10001             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10002             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10003             
       
 10004             /* Get the value from a foo(<param_value>) style call */
       
 10005             if (IN_param_value == NULL)
       
 10006               IN_param_value = function_call_param_iterator.next();
       
 10007             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10008             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10009             
       
 10010             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10011             {
       
 10012         
       
 10013                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10014                 s4o.print("(");
       
 10015                 return_type_symbol->accept(*this);
       
 10016                 s4o.print(")__string_to_sint(");
       
 10017                 IN_param_value->accept(*this);
       
 10018                 s4o.print(")");
       
 10019                 return NULL;
       
 10020                 
       
 10021             }
       
 10022             
       
 10023             ERROR;
       
 10024         }
       
 10025         
       
 10026     }/*function_string_to_sint*/
       
 10027     break;
       
 10028 
       
 10029 /****
       
 10030  *STRING_TO_INT
       
 10031  */
       
 10032     case function_string_to_int :
       
 10033     {
       
 10034         symbol_c *last_type_symbol = NULL;
       
 10035 
       
 10036         {
       
 10037             identifier_c param_name("IN");
       
 10038             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10039             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10040             
       
 10041             /* Get the value from a foo(<param_value>) style call */
       
 10042             if (IN_param_value == NULL)
       
 10043               IN_param_value = function_call_param_iterator.next();
       
 10044             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10045             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10046             
       
 10047             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10048             {
       
 10049         
       
 10050                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10051                 s4o.print("(");
       
 10052                 return_type_symbol->accept(*this);
       
 10053                 s4o.print(")__string_to_sint(");
       
 10054                 IN_param_value->accept(*this);
       
 10055                 s4o.print(")");
       
 10056                 return NULL;
       
 10057                 
       
 10058             }
       
 10059             
       
 10060             ERROR;
       
 10061         }
       
 10062         
       
 10063     }/*function_string_to_int*/
       
 10064     break;
       
 10065 
       
 10066 /****
       
 10067  *STRING_TO_DINT
       
 10068  */
       
 10069     case function_string_to_dint :
       
 10070     {
       
 10071         symbol_c *last_type_symbol = NULL;
       
 10072 
       
 10073         {
       
 10074             identifier_c param_name("IN");
       
 10075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10076             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10077             
       
 10078             /* Get the value from a foo(<param_value>) style call */
       
 10079             if (IN_param_value == NULL)
       
 10080               IN_param_value = function_call_param_iterator.next();
       
 10081             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10082             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10083             
       
 10084             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10085             {
       
 10086         
       
 10087                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10088                 s4o.print("(");
       
 10089                 return_type_symbol->accept(*this);
       
 10090                 s4o.print(")__string_to_sint(");
       
 10091                 IN_param_value->accept(*this);
       
 10092                 s4o.print(")");
       
 10093                 return NULL;
       
 10094                 
       
 10095             }
       
 10096             
       
 10097             ERROR;
       
 10098         }
       
 10099         
       
 10100     }/*function_string_to_dint*/
       
 10101     break;
       
 10102 
       
 10103 /****
       
 10104  *STRING_TO_LINT
       
 10105  */
       
 10106     case function_string_to_lint :
       
 10107     {
       
 10108         symbol_c *last_type_symbol = NULL;
       
 10109 
       
 10110         {
       
 10111             identifier_c param_name("IN");
       
 10112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10114             
       
 10115             /* Get the value from a foo(<param_value>) style call */
       
 10116             if (IN_param_value == NULL)
       
 10117               IN_param_value = function_call_param_iterator.next();
       
 10118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10120             
       
 10121             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10122             {
       
 10123         
       
 10124                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10125                 s4o.print("(");
       
 10126                 return_type_symbol->accept(*this);
       
 10127                 s4o.print(")__string_to_sint(");
       
 10128                 IN_param_value->accept(*this);
       
 10129                 s4o.print(")");
       
 10130                 return NULL;
       
 10131                 
       
 10132             }
       
 10133             
       
 10134             ERROR;
       
 10135         }
       
 10136         
       
 10137     }/*function_string_to_lint*/
       
 10138     break;
       
 10139 
       
 10140 /****
       
 10141  *STRING_TO_USINT
       
 10142  */
       
 10143     case function_string_to_usint :
       
 10144     {
       
 10145         symbol_c *last_type_symbol = NULL;
       
 10146 
       
 10147         {
       
 10148             identifier_c param_name("IN");
       
 10149             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10150             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10151             
       
 10152             /* Get the value from a foo(<param_value>) style call */
       
 10153             if (IN_param_value == NULL)
       
 10154               IN_param_value = function_call_param_iterator.next();
       
 10155             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10156             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10157             
       
 10158             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10159             {
       
 10160         
       
 10161                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10162                 s4o.print("(");
       
 10163                 return_type_symbol->accept(*this);
       
 10164                 s4o.print(")__string_to_uint(");
       
 10165                 IN_param_value->accept(*this);
       
 10166                 s4o.print(")");
       
 10167                 return NULL;
       
 10168                 
       
 10169             }
       
 10170             
       
 10171             ERROR;
       
 10172         }
       
 10173         
       
 10174     }/*function_string_to_usint*/
       
 10175     break;
       
 10176 
       
 10177 /****
       
 10178  *STRING_TO_UINT
       
 10179  */
       
 10180     case function_string_to_uint :
       
 10181     {
       
 10182         symbol_c *last_type_symbol = NULL;
       
 10183 
       
 10184         {
       
 10185             identifier_c param_name("IN");
       
 10186             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10187             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10188             
       
 10189             /* Get the value from a foo(<param_value>) style call */
       
 10190             if (IN_param_value == NULL)
       
 10191               IN_param_value = function_call_param_iterator.next();
       
 10192             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10193             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10194             
       
 10195             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10196             {
       
 10197         
       
 10198                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10199                 s4o.print("(");
       
 10200                 return_type_symbol->accept(*this);
       
 10201                 s4o.print(")__string_to_uint(");
       
 10202                 IN_param_value->accept(*this);
       
 10203                 s4o.print(")");
       
 10204                 return NULL;
       
 10205                 
       
 10206             }
       
 10207             
       
 10208             ERROR;
       
 10209         }
       
 10210         
       
 10211     }/*function_string_to_uint*/
       
 10212     break;
       
 10213 
       
 10214 /****
       
 10215  *STRING_TO_UDINT
       
 10216  */
       
 10217     case function_string_to_udint :
       
 10218     {
       
 10219         symbol_c *last_type_symbol = NULL;
       
 10220 
       
 10221         {
       
 10222             identifier_c param_name("IN");
       
 10223             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10225             
       
 10226             /* Get the value from a foo(<param_value>) style call */
       
 10227             if (IN_param_value == NULL)
       
 10228               IN_param_value = function_call_param_iterator.next();
       
 10229             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10230             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10231             
       
 10232             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10233             {
       
 10234         
       
 10235                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10236                 s4o.print("(");
       
 10237                 return_type_symbol->accept(*this);
       
 10238                 s4o.print(")__string_to_uint(");
       
 10239                 IN_param_value->accept(*this);
       
 10240                 s4o.print(")");
       
 10241                 return NULL;
       
 10242                 
       
 10243             }
       
 10244             
       
 10245             ERROR;
       
 10246         }
       
 10247         
       
 10248     }/*function_string_to_udint*/
       
 10249     break;
       
 10250 
       
 10251 /****
       
 10252  *STRING_TO_ULINT
       
 10253  */
       
 10254     case function_string_to_ulint :
       
 10255     {
       
 10256         symbol_c *last_type_symbol = NULL;
       
 10257 
       
 10258         {
       
 10259             identifier_c param_name("IN");
       
 10260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10261             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10262             
       
 10263             /* Get the value from a foo(<param_value>) style call */
       
 10264             if (IN_param_value == NULL)
       
 10265               IN_param_value = function_call_param_iterator.next();
       
 10266             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10267             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10268             
       
 10269             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10270             {
       
 10271         
       
 10272                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10273                 s4o.print("(");
       
 10274                 return_type_symbol->accept(*this);
       
 10275                 s4o.print(")__string_to_uint(");
       
 10276                 IN_param_value->accept(*this);
       
 10277                 s4o.print(")");
       
 10278                 return NULL;
       
 10279                 
       
 10280             }
       
 10281             
       
 10282             ERROR;
       
 10283         }
       
 10284         
       
 10285     }/*function_string_to_ulint*/
       
 10286     break;
       
 10287 
       
 10288 /****
       
 10289  *STRING_TO_REAL
       
 10290  */
       
 10291     case function_string_to_real :
       
 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(string_type_name_c))
       
 10307             {
       
 10308         
       
 10309                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10310                 s4o.print("(");
       
 10311                 return_type_symbol->accept(*this);
       
 10312                 s4o.print(")__string_to_real(");
       
 10313                 IN_param_value->accept(*this);
       
 10314                 s4o.print(")");
       
 10315                 return NULL;
       
 10316                 
       
 10317             }
       
 10318             
       
 10319             ERROR;
       
 10320         }
       
 10321         
       
 10322     }/*function_string_to_real*/
       
 10323     break;
       
 10324 
       
 10325 /****
       
 10326  *STRING_TO_LREAL
       
 10327  */
       
 10328     case function_string_to_lreal :
       
 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(string_type_name_c))
       
 10344             {
       
 10345         
       
 10346                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10347                 s4o.print("(");
       
 10348                 return_type_symbol->accept(*this);
       
 10349                 s4o.print(")__string_to_real(");
       
 10350                 IN_param_value->accept(*this);
       
 10351                 s4o.print(")");
       
 10352                 return NULL;
       
 10353                 
       
 10354             }
       
 10355             
       
 10356             ERROR;
       
 10357         }
       
 10358         
       
 10359     }/*function_string_to_lreal*/
       
 10360     break;
       
 10361 
       
 10362 /****
       
 10363  *STRING_TO_TIME
       
 10364  */
       
 10365     case function_string_to_time :
       
 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(string_type_name_c))
       
 10381             {
       
 10382         
       
 10383                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10384                 s4o.print("(");
       
 10385                 return_type_symbol->accept(*this);
       
 10386                 s4o.print(")__string_to_time(");
       
 10387                 IN_param_value->accept(*this);
       
 10388                 s4o.print(")");
       
 10389                 return NULL;
       
 10390                 
       
 10391             }
       
 10392             
       
 10393             ERROR;
       
 10394         }
       
 10395         
       
 10396     }/*function_string_to_time*/
       
 10397     break;
       
 10398 
       
 10399 /****
       
 10400  *STRING_TO_DATE
       
 10401  */
       
 10402     case function_string_to_date :
       
 10403     {
       
 10404         symbol_c *last_type_symbol = NULL;
       
 10405 
       
 10406         {
       
 10407             identifier_c param_name("IN");
       
 10408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10410             
       
 10411             /* Get the value from a foo(<param_value>) style call */
       
 10412             if (IN_param_value == NULL)
       
 10413               IN_param_value = function_call_param_iterator.next();
       
 10414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10416             
       
 10417             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10418             {
       
 10419         
       
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10421                 s4o.print("(");
       
 10422                 return_type_symbol->accept(*this);
       
 10423                 s4o.print(")__string_to_time(");
       
 10424                 IN_param_value->accept(*this);
       
 10425                 s4o.print(")");
       
 10426                 return NULL;
       
 10427                 
       
 10428             }
       
 10429             
       
 10430             ERROR;
       
 10431         }
       
 10432         
       
 10433     }/*function_string_to_date*/
       
 10434     break;
       
 10435 
       
 10436 /****
       
 10437  *STRING_TO_TOD
       
 10438  */
       
 10439     case function_string_to_tod :
       
 10440     {
       
 10441         symbol_c *last_type_symbol = NULL;
       
 10442 
       
 10443         {
       
 10444             identifier_c param_name("IN");
       
 10445             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10447             
       
 10448             /* Get the value from a foo(<param_value>) style call */
       
 10449             if (IN_param_value == NULL)
       
 10450               IN_param_value = function_call_param_iterator.next();
       
 10451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10452             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10453             
       
 10454             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10455             {
       
 10456         
       
 10457                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10458                 s4o.print("(");
       
 10459                 return_type_symbol->accept(*this);
       
 10460                 s4o.print(")__string_to_time(");
       
 10461                 IN_param_value->accept(*this);
       
 10462                 s4o.print(")");
       
 10463                 return NULL;
       
 10464                 
       
 10465             }
       
 10466             
       
 10467             ERROR;
       
 10468         }
       
 10469         
       
 10470     }/*function_string_to_tod*/
       
 10471     break;
       
 10472 
       
 10473 /****
       
 10474  *STRING_TO_DT
       
 10475  */
       
 10476     case function_string_to_dt :
       
 10477     {
       
 10478         symbol_c *last_type_symbol = NULL;
       
 10479 
       
 10480         {
       
 10481             identifier_c param_name("IN");
       
 10482             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10483             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10484             
       
 10485             /* Get the value from a foo(<param_value>) style call */
       
 10486             if (IN_param_value == NULL)
       
 10487               IN_param_value = function_call_param_iterator.next();
       
 10488             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10489             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10490             
       
 10491             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10492             {
       
 10493         
       
 10494                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10495                 s4o.print("(");
       
 10496                 return_type_symbol->accept(*this);
       
 10497                 s4o.print(")__string_to_time(");
       
 10498                 IN_param_value->accept(*this);
       
 10499                 s4o.print(")");
       
 10500                 return NULL;
       
 10501                 
       
 10502             }
       
 10503             
       
 10504             ERROR;
       
 10505         }
       
 10506         
       
 10507     }/*function_string_to_dt*/
       
 10508     break;
       
 10509 
       
 10510 /****
       
 10511  *STRING_TO_BYTE
       
 10512  */
       
 10513     case function_string_to_byte :
       
 10514     {
       
 10515         symbol_c *last_type_symbol = NULL;
       
 10516 
       
 10517         {
       
 10518             identifier_c param_name("IN");
       
 10519             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10520             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10521             
       
 10522             /* Get the value from a foo(<param_value>) style call */
       
 10523             if (IN_param_value == NULL)
       
 10524               IN_param_value = function_call_param_iterator.next();
       
 10525             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10526             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10527             
       
 10528             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10529             {
       
 10530         
       
 10531                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10532                 s4o.print("(");
       
 10533                 return_type_symbol->accept(*this);
       
 10534                 s4o.print(")__string_to_bit(");
       
 10535                 IN_param_value->accept(*this);
       
 10536                 s4o.print(")");
       
 10537                 return NULL;
       
 10538                 
       
 10539             }
       
 10540             
       
 10541             ERROR;
       
 10542         }
       
 10543         
       
 10544     }/*function_string_to_byte*/
       
 10545     break;
       
 10546 
       
 10547 /****
       
 10548  *STRING_TO_WORD
       
 10549  */
       
 10550     case function_string_to_word :
       
 10551     {
       
 10552         symbol_c *last_type_symbol = NULL;
       
 10553 
       
 10554         {
       
 10555             identifier_c param_name("IN");
       
 10556             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10557             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10558             
       
 10559             /* Get the value from a foo(<param_value>) style call */
       
 10560             if (IN_param_value == NULL)
       
 10561               IN_param_value = function_call_param_iterator.next();
       
 10562             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10563             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10564             
       
 10565             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10566             {
       
 10567         
       
 10568                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10569                 s4o.print("(");
       
 10570                 return_type_symbol->accept(*this);
       
 10571                 s4o.print(")__string_to_bit(");
       
 10572                 IN_param_value->accept(*this);
       
 10573                 s4o.print(")");
       
 10574                 return NULL;
       
 10575                 
       
 10576             }
       
 10577             
       
 10578             ERROR;
       
 10579         }
       
 10580         
       
 10581     }/*function_string_to_word*/
       
 10582     break;
       
 10583 
       
 10584 /****
       
 10585  *STRING_TO_DWORD
       
 10586  */
       
 10587     case function_string_to_dword :
       
 10588     {
       
 10589         symbol_c *last_type_symbol = NULL;
       
 10590 
       
 10591         {
       
 10592             identifier_c param_name("IN");
       
 10593             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10594             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10595             
       
 10596             /* Get the value from a foo(<param_value>) style call */
       
 10597             if (IN_param_value == NULL)
       
 10598               IN_param_value = function_call_param_iterator.next();
       
 10599             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10600             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10601             
       
 10602             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10603             {
       
 10604         
       
 10605                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10606                 s4o.print("(");
       
 10607                 return_type_symbol->accept(*this);
       
 10608                 s4o.print(")__string_to_bit(");
       
 10609                 IN_param_value->accept(*this);
       
 10610                 s4o.print(")");
       
 10611                 return NULL;
       
 10612                 
       
 10613             }
       
 10614             
       
 10615             ERROR;
       
 10616         }
       
 10617         
       
 10618     }/*function_string_to_dword*/
       
 10619     break;
       
 10620 
       
 10621 /****
       
 10622  *STRING_TO_LWORD
       
 10623  */
       
 10624     case function_string_to_lword :
       
 10625     {
       
 10626         symbol_c *last_type_symbol = NULL;
       
 10627 
       
 10628         {
       
 10629             identifier_c param_name("IN");
       
 10630             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10631             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10632             
       
 10633             /* Get the value from a foo(<param_value>) style call */
       
 10634             if (IN_param_value == NULL)
       
 10635               IN_param_value = function_call_param_iterator.next();
       
 10636             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10637             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10638             
       
 10639             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10640             {
       
 10641         
       
 10642                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10643                 s4o.print("(");
       
 10644                 return_type_symbol->accept(*this);
       
 10645                 s4o.print(")__string_to_bit(");
       
 10646                 IN_param_value->accept(*this);
       
 10647                 s4o.print(")");
       
 10648                 return NULL;
       
 10649                 
       
 10650             }
       
 10651             
       
 10652             ERROR;
       
 10653         }
       
 10654         
       
 10655     }/*function_string_to_lword*/
       
 10656     break;
       
 10657 
       
 10658 /****
       
 10659  *BYTE_TO_BOOL
       
 10660  */
       
 10661     case function_byte_to_bool :
       
 10662     {
       
 10663         symbol_c *last_type_symbol = NULL;
       
 10664 
       
 10665         {
       
 10666             identifier_c param_name("IN");
       
 10667             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10668             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10669             
       
 10670             /* Get the value from a foo(<param_value>) style call */
       
 10671             if (IN_param_value == NULL)
       
 10672               IN_param_value = function_call_param_iterator.next();
       
 10673             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10674             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10675             
       
 10676             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10677             {
       
 10678         
       
 10679                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10680                 s4o.print("(");
       
 10681                 return_type_symbol->accept(*this);
       
 10682                 s4o.print(")");
       
 10683                 IN_param_value->accept(*this);
       
 10684                 return NULL;
       
 10685                 
       
 10686             }
       
 10687             
       
 10688             ERROR;
       
 10689         }
       
 10690         
       
 10691     }/*function_byte_to_bool*/
       
 10692     break;
       
 10693 
       
 10694 /****
       
 10695  *BYTE_TO_SINT
       
 10696  */
       
 10697     case function_byte_to_sint :
       
 10698     {
       
 10699         symbol_c *last_type_symbol = NULL;
       
 10700 
       
 10701         {
       
 10702             identifier_c param_name("IN");
       
 10703             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10704             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10705             
       
 10706             /* Get the value from a foo(<param_value>) style call */
       
 10707             if (IN_param_value == NULL)
       
 10708               IN_param_value = function_call_param_iterator.next();
       
 10709             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10710             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10711             
       
 10712             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10713             {
       
 10714         
       
 10715                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10716                 s4o.print("(");
       
 10717                 return_type_symbol->accept(*this);
       
 10718                 s4o.print(")");
       
 10719                 IN_param_value->accept(*this);
       
 10720                 return NULL;
       
 10721                 
       
 10722             }
       
 10723             
       
 10724             ERROR;
       
 10725         }
       
 10726         
       
 10727     }/*function_byte_to_sint*/
       
 10728     break;
       
 10729 
       
 10730 /****
       
 10731  *BYTE_TO_INT
       
 10732  */
       
 10733     case function_byte_to_int :
       
 10734     {
       
 10735         symbol_c *last_type_symbol = NULL;
       
 10736 
       
 10737         {
       
 10738             identifier_c param_name("IN");
       
 10739             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10740             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10741             
       
 10742             /* Get the value from a foo(<param_value>) style call */
       
 10743             if (IN_param_value == NULL)
       
 10744               IN_param_value = function_call_param_iterator.next();
       
 10745             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10746             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10747             
       
 10748             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10749             {
       
 10750         
       
 10751                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10752                 s4o.print("(");
       
 10753                 return_type_symbol->accept(*this);
       
 10754                 s4o.print(")");
       
 10755                 IN_param_value->accept(*this);
       
 10756                 return NULL;
       
 10757                 
       
 10758             }
       
 10759             
       
 10760             ERROR;
       
 10761         }
       
 10762         
       
 10763     }/*function_byte_to_int*/
       
 10764     break;
       
 10765 
       
 10766 /****
       
 10767  *BYTE_TO_DINT
       
 10768  */
       
 10769     case function_byte_to_dint :
       
 10770     {
       
 10771         symbol_c *last_type_symbol = NULL;
       
 10772 
       
 10773         {
       
 10774             identifier_c param_name("IN");
       
 10775             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10776             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10777             
       
 10778             /* Get the value from a foo(<param_value>) style call */
       
 10779             if (IN_param_value == NULL)
       
 10780               IN_param_value = function_call_param_iterator.next();
       
 10781             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10782             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10783             
       
 10784             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10785             {
       
 10786         
       
 10787                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10788                 s4o.print("(");
       
 10789                 return_type_symbol->accept(*this);
       
 10790                 s4o.print(")");
       
 10791                 IN_param_value->accept(*this);
       
 10792                 return NULL;
       
 10793                 
       
 10794             }
       
 10795             
       
 10796             ERROR;
       
 10797         }
       
 10798         
       
 10799     }/*function_byte_to_dint*/
       
 10800     break;
       
 10801 
       
 10802 /****
       
 10803  *BYTE_TO_LINT
       
 10804  */
       
 10805     case function_byte_to_lint :
       
 10806     {
       
 10807         symbol_c *last_type_symbol = NULL;
       
 10808 
       
 10809         {
       
 10810             identifier_c param_name("IN");
       
 10811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10812             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10813             
       
 10814             /* Get the value from a foo(<param_value>) style call */
       
 10815             if (IN_param_value == NULL)
       
 10816               IN_param_value = function_call_param_iterator.next();
       
 10817             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10818             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10819             
       
 10820             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10821             {
       
 10822         
       
 10823                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10824                 s4o.print("(");
       
 10825                 return_type_symbol->accept(*this);
       
 10826                 s4o.print(")");
       
 10827                 IN_param_value->accept(*this);
       
 10828                 return NULL;
       
 10829                 
       
 10830             }
       
 10831             
       
 10832             ERROR;
       
 10833         }
       
 10834         
       
 10835     }/*function_byte_to_lint*/
       
 10836     break;
       
 10837 
       
 10838 /****
       
 10839  *BYTE_TO_USINT
       
 10840  */
       
 10841     case function_byte_to_usint :
       
 10842     {
       
 10843         symbol_c *last_type_symbol = NULL;
       
 10844 
       
 10845         {
       
 10846             identifier_c param_name("IN");
       
 10847             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10848             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10849             
       
 10850             /* Get the value from a foo(<param_value>) style call */
       
 10851             if (IN_param_value == NULL)
       
 10852               IN_param_value = function_call_param_iterator.next();
       
 10853             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10854             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10855             
       
 10856             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10857             {
       
 10858         
       
 10859                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10860                 s4o.print("(");
       
 10861                 return_type_symbol->accept(*this);
       
 10862                 s4o.print(")");
       
 10863                 IN_param_value->accept(*this);
       
 10864                 return NULL;
       
 10865                 
       
 10866             }
       
 10867             
       
 10868             ERROR;
       
 10869         }
       
 10870         
       
 10871     }/*function_byte_to_usint*/
       
 10872     break;
       
 10873 
       
 10874 /****
       
 10875  *BYTE_TO_UINT
       
 10876  */
       
 10877     case function_byte_to_uint :
       
 10878     {
       
 10879         symbol_c *last_type_symbol = NULL;
       
 10880 
       
 10881         {
       
 10882             identifier_c param_name("IN");
       
 10883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10884             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10885             
       
 10886             /* Get the value from a foo(<param_value>) style call */
       
 10887             if (IN_param_value == NULL)
       
 10888               IN_param_value = function_call_param_iterator.next();
       
 10889             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10890             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10891             
       
 10892             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10893             {
       
 10894         
       
 10895                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10896                 s4o.print("(");
       
 10897                 return_type_symbol->accept(*this);
       
 10898                 s4o.print(")");
       
 10899                 IN_param_value->accept(*this);
       
 10900                 return NULL;
       
 10901                 
       
 10902             }
       
 10903             
       
 10904             ERROR;
       
 10905         }
       
 10906         
       
 10907     }/*function_byte_to_uint*/
       
 10908     break;
       
 10909 
       
 10910 /****
       
 10911  *BYTE_TO_UDINT
       
 10912  */
       
 10913     case function_byte_to_udint :
       
 10914     {
       
 10915         symbol_c *last_type_symbol = NULL;
       
 10916 
       
 10917         {
       
 10918             identifier_c param_name("IN");
       
 10919             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10920             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10921             
       
 10922             /* Get the value from a foo(<param_value>) style call */
       
 10923             if (IN_param_value == NULL)
       
 10924               IN_param_value = function_call_param_iterator.next();
       
 10925             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10926             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10927             
       
 10928             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10929             {
       
 10930         
       
 10931                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10932                 s4o.print("(");
       
 10933                 return_type_symbol->accept(*this);
       
 10934                 s4o.print(")");
       
 10935                 IN_param_value->accept(*this);
       
 10936                 return NULL;
       
 10937                 
       
 10938             }
       
 10939             
       
 10940             ERROR;
       
 10941         }
       
 10942         
       
 10943     }/*function_byte_to_udint*/
       
 10944     break;
       
 10945 
       
 10946 /****
       
 10947  *BYTE_TO_ULINT
       
 10948  */
       
 10949     case function_byte_to_ulint :
       
 10950     {
       
 10951         symbol_c *last_type_symbol = NULL;
       
 10952 
       
 10953         {
       
 10954             identifier_c param_name("IN");
       
 10955             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10956             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10957             
       
 10958             /* Get the value from a foo(<param_value>) style call */
       
 10959             if (IN_param_value == NULL)
       
 10960               IN_param_value = function_call_param_iterator.next();
       
 10961             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10962             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10963             
       
 10964             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 10965             {
       
 10966         
       
 10967                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10968                 s4o.print("(");
       
 10969                 return_type_symbol->accept(*this);
       
 10970                 s4o.print(")");
       
 10971                 IN_param_value->accept(*this);
       
 10972                 return NULL;
       
 10973                 
       
 10974             }
       
 10975             
       
 10976             ERROR;
       
 10977         }
       
 10978         
       
 10979     }/*function_byte_to_ulint*/
       
 10980     break;
       
 10981 
       
 10982 /****
       
 10983  *BYTE_TO_REAL
       
 10984  */
       
 10985     case function_byte_to_real :
       
 10986     {
       
 10987         symbol_c *last_type_symbol = NULL;
       
 10988 
       
 10989         {
       
 10990             identifier_c param_name("IN");
       
 10991             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10992             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10993             
       
 10994             /* Get the value from a foo(<param_value>) style call */
       
 10995             if (IN_param_value == NULL)
       
 10996               IN_param_value = function_call_param_iterator.next();
       
 10997             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10998             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10999             
       
 11000             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11001             {
       
 11002         
       
 11003                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11004                 s4o.print("(");
       
 11005                 return_type_symbol->accept(*this);
       
 11006                 s4o.print(")");
       
 11007                 IN_param_value->accept(*this);
       
 11008                 return NULL;
       
 11009                 
       
 11010             }
       
 11011             
       
 11012             ERROR;
       
 11013         }
       
 11014         
       
 11015     }/*function_byte_to_real*/
       
 11016     break;
       
 11017 
       
 11018 /****
       
 11019  *BYTE_TO_LREAL
       
 11020  */
       
 11021     case function_byte_to_lreal :
       
 11022     {
       
 11023         symbol_c *last_type_symbol = NULL;
       
 11024 
       
 11025         {
       
 11026             identifier_c param_name("IN");
       
 11027             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11028             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11029             
       
 11030             /* Get the value from a foo(<param_value>) style call */
       
 11031             if (IN_param_value == NULL)
       
 11032               IN_param_value = function_call_param_iterator.next();
       
 11033             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11034             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11035             
       
 11036             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11037             {
       
 11038         
       
 11039                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11040                 s4o.print("(");
       
 11041                 return_type_symbol->accept(*this);
       
 11042                 s4o.print(")");
       
 11043                 IN_param_value->accept(*this);
       
 11044                 return NULL;
       
 11045                 
       
 11046             }
       
 11047             
       
 11048             ERROR;
       
 11049         }
       
 11050         
       
 11051     }/*function_byte_to_lreal*/
       
 11052     break;
       
 11053 
       
 11054 /****
       
 11055  *BYTE_TO_TIME
       
 11056  */
       
 11057     case function_byte_to_time :
       
 11058     {
       
 11059         symbol_c *last_type_symbol = NULL;
       
 11060 
       
 11061         {
       
 11062             identifier_c param_name("IN");
       
 11063             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11064             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11065             
       
 11066             /* Get the value from a foo(<param_value>) style call */
       
 11067             if (IN_param_value == NULL)
       
 11068               IN_param_value = function_call_param_iterator.next();
       
 11069             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11070             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11071             
       
 11072             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11073             {
       
 11074         
       
 11075                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11076                 s4o.print("(");
       
 11077                 return_type_symbol->accept(*this);
       
 11078                 s4o.print(")__int_to_time(");
       
 11079                 IN_param_value->accept(*this);
       
 11080                 s4o.print(")");
       
 11081                 return NULL;
       
 11082                 
       
 11083             }
       
 11084             
       
 11085             ERROR;
       
 11086         }
       
 11087         
       
 11088     }/*function_byte_to_time*/
       
 11089     break;
       
 11090 
       
 11091 /****
       
 11092  *BYTE_TO_DATE
       
 11093  */
       
 11094     case function_byte_to_date :
       
 11095     {
       
 11096         symbol_c *last_type_symbol = NULL;
       
 11097 
       
 11098         {
       
 11099             identifier_c param_name("IN");
       
 11100             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11101             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11102             
       
 11103             /* Get the value from a foo(<param_value>) style call */
       
 11104             if (IN_param_value == NULL)
       
 11105               IN_param_value = function_call_param_iterator.next();
       
 11106             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11107             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11108             
       
 11109             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11110             {
       
 11111         
       
 11112                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11113                 s4o.print("(");
       
 11114                 return_type_symbol->accept(*this);
       
 11115                 s4o.print(")__int_to_time(");
       
 11116                 IN_param_value->accept(*this);
       
 11117                 s4o.print(")");
       
 11118                 return NULL;
       
 11119                 
       
 11120             }
       
 11121             
       
 11122             ERROR;
       
 11123         }
       
 11124         
       
 11125     }/*function_byte_to_date*/
       
 11126     break;
       
 11127 
       
 11128 /****
       
 11129  *BYTE_TO_TOD
       
 11130  */
       
 11131     case function_byte_to_tod :
       
 11132     {
       
 11133         symbol_c *last_type_symbol = NULL;
       
 11134 
       
 11135         {
       
 11136             identifier_c param_name("IN");
       
 11137             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11138             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11139             
       
 11140             /* Get the value from a foo(<param_value>) style call */
       
 11141             if (IN_param_value == NULL)
       
 11142               IN_param_value = function_call_param_iterator.next();
       
 11143             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11144             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11145             
       
 11146             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11147             {
       
 11148         
       
 11149                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11150                 s4o.print("(");
       
 11151                 return_type_symbol->accept(*this);
       
 11152                 s4o.print(")__int_to_time(");
       
 11153                 IN_param_value->accept(*this);
       
 11154                 s4o.print(")");
       
 11155                 return NULL;
       
 11156                 
       
 11157             }
       
 11158             
       
 11159             ERROR;
       
 11160         }
       
 11161         
       
 11162     }/*function_byte_to_tod*/
       
 11163     break;
       
 11164 
       
 11165 /****
       
 11166  *BYTE_TO_DT
       
 11167  */
       
 11168     case function_byte_to_dt :
       
 11169     {
       
 11170         symbol_c *last_type_symbol = NULL;
       
 11171 
       
 11172         {
       
 11173             identifier_c param_name("IN");
       
 11174             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11175             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11176             
       
 11177             /* Get the value from a foo(<param_value>) style call */
       
 11178             if (IN_param_value == NULL)
       
 11179               IN_param_value = function_call_param_iterator.next();
       
 11180             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11181             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11182             
       
 11183             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11184             {
       
 11185         
       
 11186                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11187                 s4o.print("(");
       
 11188                 return_type_symbol->accept(*this);
       
 11189                 s4o.print(")__int_to_time(");
       
 11190                 IN_param_value->accept(*this);
       
 11191                 s4o.print(")");
       
 11192                 return NULL;
       
 11193                 
       
 11194             }
       
 11195             
       
 11196             ERROR;
       
 11197         }
       
 11198         
       
 11199     }/*function_byte_to_dt*/
       
 11200     break;
       
 11201 
       
 11202 /****
       
 11203  *BYTE_TO_STRING
       
 11204  */
       
 11205     case function_byte_to_string :
       
 11206     {
       
 11207         symbol_c *last_type_symbol = NULL;
       
 11208 
       
 11209         {
       
 11210             identifier_c param_name("IN");
       
 11211             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11212             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11213             
       
 11214             /* Get the value from a foo(<param_value>) style call */
       
 11215             if (IN_param_value == NULL)
       
 11216               IN_param_value = function_call_param_iterator.next();
       
 11217             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11218             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11219             
       
 11220             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11221             {
       
 11222         
       
 11223                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11224                 s4o.print("(");
       
 11225                 return_type_symbol->accept(*this);
       
 11226                 s4o.print(")__bit_to_string(");
       
 11227                 IN_param_value->accept(*this);
       
 11228                 s4o.print(")");
       
 11229                 return NULL;
       
 11230                 
       
 11231             }
       
 11232             
       
 11233             ERROR;
       
 11234         }
       
 11235         
       
 11236     }/*function_byte_to_string*/
       
 11237     break;
       
 11238 
       
 11239 /****
       
 11240  *BYTE_TO_WORD
       
 11241  */
       
 11242     case function_byte_to_word :
       
 11243     {
       
 11244         symbol_c *last_type_symbol = NULL;
       
 11245 
       
 11246         {
       
 11247             identifier_c param_name("IN");
       
 11248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11250             
       
 11251             /* Get the value from a foo(<param_value>) style call */
       
 11252             if (IN_param_value == NULL)
       
 11253               IN_param_value = function_call_param_iterator.next();
       
 11254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11256             
       
 11257             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11258             {
       
 11259         
       
 11260                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11261                 s4o.print("(");
       
 11262                 return_type_symbol->accept(*this);
       
 11263                 s4o.print(")");
       
 11264                 IN_param_value->accept(*this);
       
 11265                 return NULL;
       
 11266                 
       
 11267             }
       
 11268             
       
 11269             ERROR;
       
 11270         }
       
 11271         
       
 11272     }/*function_byte_to_word*/
       
 11273     break;
       
 11274 
       
 11275 /****
       
 11276  *BYTE_TO_DWORD
       
 11277  */
       
 11278     case function_byte_to_dword :
       
 11279     {
       
 11280         symbol_c *last_type_symbol = NULL;
       
 11281 
       
 11282         {
       
 11283             identifier_c param_name("IN");
       
 11284             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11285             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11286             
       
 11287             /* Get the value from a foo(<param_value>) style call */
       
 11288             if (IN_param_value == NULL)
       
 11289               IN_param_value = function_call_param_iterator.next();
       
 11290             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11291             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11292             
       
 11293             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11294             {
       
 11295         
       
 11296                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11297                 s4o.print("(");
       
 11298                 return_type_symbol->accept(*this);
       
 11299                 s4o.print(")");
       
 11300                 IN_param_value->accept(*this);
       
 11301                 return NULL;
       
 11302                 
       
 11303             }
       
 11304             
       
 11305             ERROR;
       
 11306         }
       
 11307         
       
 11308     }/*function_byte_to_dword*/
       
 11309     break;
       
 11310 
       
 11311 /****
       
 11312  *BYTE_TO_LWORD
       
 11313  */
       
 11314     case function_byte_to_lword :
       
 11315     {
       
 11316         symbol_c *last_type_symbol = NULL;
       
 11317 
       
 11318         {
       
 11319             identifier_c param_name("IN");
       
 11320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11322             
       
 11323             /* Get the value from a foo(<param_value>) style call */
       
 11324             if (IN_param_value == NULL)
       
 11325               IN_param_value = function_call_param_iterator.next();
       
 11326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11328             
       
 11329             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11330             {
       
 11331         
       
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11333                 s4o.print("(");
       
 11334                 return_type_symbol->accept(*this);
       
 11335                 s4o.print(")");
       
 11336                 IN_param_value->accept(*this);
       
 11337                 return NULL;
       
 11338                 
       
 11339             }
       
 11340             
       
 11341             ERROR;
       
 11342         }
       
 11343         
       
 11344     }/*function_byte_to_lword*/
       
 11345     break;
       
 11346 
       
 11347 /****
       
 11348  *WORD_TO_BOOL
       
 11349  */
       
 11350     case function_word_to_bool :
       
 11351     {
       
 11352         symbol_c *last_type_symbol = NULL;
       
 11353 
       
 11354         {
       
 11355             identifier_c param_name("IN");
       
 11356             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11357             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11358             
       
 11359             /* Get the value from a foo(<param_value>) style call */
       
 11360             if (IN_param_value == NULL)
       
 11361               IN_param_value = function_call_param_iterator.next();
       
 11362             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11363             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11364             
       
 11365             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11366             {
       
 11367         
       
 11368                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11369                 s4o.print("(");
       
 11370                 return_type_symbol->accept(*this);
       
 11371                 s4o.print(")");
       
 11372                 IN_param_value->accept(*this);
       
 11373                 return NULL;
       
 11374                 
       
 11375             }
       
 11376             
       
 11377             ERROR;
       
 11378         }
       
 11379         
       
 11380     }/*function_word_to_bool*/
       
 11381     break;
       
 11382 
       
 11383 /****
       
 11384  *WORD_TO_SINT
       
 11385  */
       
 11386     case function_word_to_sint :
       
 11387     {
       
 11388         symbol_c *last_type_symbol = NULL;
       
 11389 
       
 11390         {
       
 11391             identifier_c param_name("IN");
       
 11392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11394             
       
 11395             /* Get the value from a foo(<param_value>) style call */
       
 11396             if (IN_param_value == NULL)
       
 11397               IN_param_value = function_call_param_iterator.next();
       
 11398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11400             
       
 11401             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11402             {
       
 11403         
       
 11404                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11405                 s4o.print("(");
       
 11406                 return_type_symbol->accept(*this);
       
 11407                 s4o.print(")");
       
 11408                 IN_param_value->accept(*this);
       
 11409                 return NULL;
       
 11410                 
       
 11411             }
       
 11412             
       
 11413             ERROR;
       
 11414         }
       
 11415         
       
 11416     }/*function_word_to_sint*/
       
 11417     break;
       
 11418 
       
 11419 /****
       
 11420  *WORD_TO_INT
       
 11421  */
       
 11422     case function_word_to_int :
       
 11423     {
       
 11424         symbol_c *last_type_symbol = NULL;
       
 11425 
       
 11426         {
       
 11427             identifier_c param_name("IN");
       
 11428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11429             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11430             
       
 11431             /* Get the value from a foo(<param_value>) style call */
       
 11432             if (IN_param_value == NULL)
       
 11433               IN_param_value = function_call_param_iterator.next();
       
 11434             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11435             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11436             
       
 11437             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11438             {
       
 11439         
       
 11440                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11441                 s4o.print("(");
       
 11442                 return_type_symbol->accept(*this);
       
 11443                 s4o.print(")");
       
 11444                 IN_param_value->accept(*this);
       
 11445                 return NULL;
       
 11446                 
       
 11447             }
       
 11448             
       
 11449             ERROR;
       
 11450         }
       
 11451         
       
 11452     }/*function_word_to_int*/
       
 11453     break;
       
 11454 
       
 11455 /****
       
 11456  *WORD_TO_DINT
       
 11457  */
       
 11458     case function_word_to_dint :
       
 11459     {
       
 11460         symbol_c *last_type_symbol = NULL;
       
 11461 
       
 11462         {
       
 11463             identifier_c param_name("IN");
       
 11464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11466             
       
 11467             /* Get the value from a foo(<param_value>) style call */
       
 11468             if (IN_param_value == NULL)
       
 11469               IN_param_value = function_call_param_iterator.next();
       
 11470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11472             
       
 11473             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11474             {
       
 11475         
       
 11476                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11477                 s4o.print("(");
       
 11478                 return_type_symbol->accept(*this);
       
 11479                 s4o.print(")");
       
 11480                 IN_param_value->accept(*this);
       
 11481                 return NULL;
       
 11482                 
       
 11483             }
       
 11484             
       
 11485             ERROR;
       
 11486         }
       
 11487         
       
 11488     }/*function_word_to_dint*/
       
 11489     break;
       
 11490 
       
 11491 /****
       
 11492  *WORD_TO_LINT
       
 11493  */
       
 11494     case function_word_to_lint :
       
 11495     {
       
 11496         symbol_c *last_type_symbol = NULL;
       
 11497 
       
 11498         {
       
 11499             identifier_c param_name("IN");
       
 11500             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11501             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11502             
       
 11503             /* Get the value from a foo(<param_value>) style call */
       
 11504             if (IN_param_value == NULL)
       
 11505               IN_param_value = function_call_param_iterator.next();
       
 11506             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11507             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11508             
       
 11509             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11510             {
       
 11511         
       
 11512                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11513                 s4o.print("(");
       
 11514                 return_type_symbol->accept(*this);
       
 11515                 s4o.print(")");
       
 11516                 IN_param_value->accept(*this);
       
 11517                 return NULL;
       
 11518                 
       
 11519             }
       
 11520             
       
 11521             ERROR;
       
 11522         }
       
 11523         
       
 11524     }/*function_word_to_lint*/
       
 11525     break;
       
 11526 
       
 11527 /****
       
 11528  *WORD_TO_USINT
       
 11529  */
       
 11530     case function_word_to_usint :
       
 11531     {
       
 11532         symbol_c *last_type_symbol = NULL;
       
 11533 
       
 11534         {
       
 11535             identifier_c param_name("IN");
       
 11536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11538             
       
 11539             /* Get the value from a foo(<param_value>) style call */
       
 11540             if (IN_param_value == NULL)
       
 11541               IN_param_value = function_call_param_iterator.next();
       
 11542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11544             
       
 11545             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11546             {
       
 11547         
       
 11548                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11549                 s4o.print("(");
       
 11550                 return_type_symbol->accept(*this);
       
 11551                 s4o.print(")");
       
 11552                 IN_param_value->accept(*this);
       
 11553                 return NULL;
       
 11554                 
       
 11555             }
       
 11556             
       
 11557             ERROR;
       
 11558         }
       
 11559         
       
 11560     }/*function_word_to_usint*/
       
 11561     break;
       
 11562 
       
 11563 /****
       
 11564  *WORD_TO_UINT
       
 11565  */
       
 11566     case function_word_to_uint :
       
 11567     {
       
 11568         symbol_c *last_type_symbol = NULL;
       
 11569 
       
 11570         {
       
 11571             identifier_c param_name("IN");
       
 11572             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11573             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11574             
       
 11575             /* Get the value from a foo(<param_value>) style call */
       
 11576             if (IN_param_value == NULL)
       
 11577               IN_param_value = function_call_param_iterator.next();
       
 11578             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11579             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11580             
       
 11581             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11582             {
       
 11583         
       
 11584                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11585                 s4o.print("(");
       
 11586                 return_type_symbol->accept(*this);
       
 11587                 s4o.print(")");
       
 11588                 IN_param_value->accept(*this);
       
 11589                 return NULL;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             ERROR;
       
 11594         }
       
 11595         
       
 11596     }/*function_word_to_uint*/
       
 11597     break;
       
 11598 
       
 11599 /****
       
 11600  *WORD_TO_UDINT
       
 11601  */
       
 11602     case function_word_to_udint :
       
 11603     {
       
 11604         symbol_c *last_type_symbol = NULL;
       
 11605 
       
 11606         {
       
 11607             identifier_c param_name("IN");
       
 11608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11610             
       
 11611             /* Get the value from a foo(<param_value>) style call */
       
 11612             if (IN_param_value == NULL)
       
 11613               IN_param_value = function_call_param_iterator.next();
       
 11614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11616             
       
 11617             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11618             {
       
 11619         
       
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11621                 s4o.print("(");
       
 11622                 return_type_symbol->accept(*this);
       
 11623                 s4o.print(")");
       
 11624                 IN_param_value->accept(*this);
       
 11625                 return NULL;
       
 11626                 
       
 11627             }
       
 11628             
       
 11629             ERROR;
       
 11630         }
       
 11631         
       
 11632     }/*function_word_to_udint*/
       
 11633     break;
       
 11634 
       
 11635 /****
       
 11636  *WORD_TO_ULINT
       
 11637  */
       
 11638     case function_word_to_ulint :
       
 11639     {
       
 11640         symbol_c *last_type_symbol = NULL;
       
 11641 
       
 11642         {
       
 11643             identifier_c param_name("IN");
       
 11644             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11645             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11646             
       
 11647             /* Get the value from a foo(<param_value>) style call */
       
 11648             if (IN_param_value == NULL)
       
 11649               IN_param_value = function_call_param_iterator.next();
       
 11650             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11651             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11652             
       
 11653             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11654             {
       
 11655         
       
 11656                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11657                 s4o.print("(");
       
 11658                 return_type_symbol->accept(*this);
       
 11659                 s4o.print(")");
       
 11660                 IN_param_value->accept(*this);
       
 11661                 return NULL;
       
 11662                 
       
 11663             }
       
 11664             
       
 11665             ERROR;
       
 11666         }
       
 11667         
       
 11668     }/*function_word_to_ulint*/
       
 11669     break;
       
 11670 
       
 11671 /****
       
 11672  *WORD_TO_REAL
       
 11673  */
       
 11674     case function_word_to_real :
       
 11675     {
       
 11676         symbol_c *last_type_symbol = NULL;
       
 11677 
       
 11678         {
       
 11679             identifier_c param_name("IN");
       
 11680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11682             
       
 11683             /* Get the value from a foo(<param_value>) style call */
       
 11684             if (IN_param_value == NULL)
       
 11685               IN_param_value = function_call_param_iterator.next();
       
 11686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11688             
       
 11689             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11690             {
       
 11691         
       
 11692                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11693                 s4o.print("(");
       
 11694                 return_type_symbol->accept(*this);
       
 11695                 s4o.print(")");
       
 11696                 IN_param_value->accept(*this);
       
 11697                 return NULL;
       
 11698                 
       
 11699             }
       
 11700             
       
 11701             ERROR;
       
 11702         }
       
 11703         
       
 11704     }/*function_word_to_real*/
       
 11705     break;
       
 11706 
       
 11707 /****
       
 11708  *WORD_TO_LREAL
       
 11709  */
       
 11710     case function_word_to_lreal :
       
 11711     {
       
 11712         symbol_c *last_type_symbol = NULL;
       
 11713 
       
 11714         {
       
 11715             identifier_c param_name("IN");
       
 11716             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11717             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11718             
       
 11719             /* Get the value from a foo(<param_value>) style call */
       
 11720             if (IN_param_value == NULL)
       
 11721               IN_param_value = function_call_param_iterator.next();
       
 11722             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11723             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11724             
       
 11725             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11726             {
       
 11727         
       
 11728                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11729                 s4o.print("(");
       
 11730                 return_type_symbol->accept(*this);
       
 11731                 s4o.print(")");
       
 11732                 IN_param_value->accept(*this);
       
 11733                 return NULL;
       
 11734                 
       
 11735             }
       
 11736             
       
 11737             ERROR;
       
 11738         }
       
 11739         
       
 11740     }/*function_word_to_lreal*/
       
 11741     break;
       
 11742 
       
 11743 /****
       
 11744  *WORD_TO_TIME
       
 11745  */
       
 11746     case function_word_to_time :
       
 11747     {
       
 11748         symbol_c *last_type_symbol = NULL;
       
 11749 
       
 11750         {
       
 11751             identifier_c param_name("IN");
       
 11752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11754             
       
 11755             /* Get the value from a foo(<param_value>) style call */
       
 11756             if (IN_param_value == NULL)
       
 11757               IN_param_value = function_call_param_iterator.next();
       
 11758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11760             
       
 11761             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11762             {
       
 11763         
       
 11764                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11765                 s4o.print("(");
       
 11766                 return_type_symbol->accept(*this);
       
 11767                 s4o.print(")__int_to_time(");
       
 11768                 IN_param_value->accept(*this);
       
 11769                 s4o.print(")");
       
 11770                 return NULL;
       
 11771                 
       
 11772             }
       
 11773             
       
 11774             ERROR;
       
 11775         }
       
 11776         
       
 11777     }/*function_word_to_time*/
       
 11778     break;
       
 11779 
       
 11780 /****
       
 11781  *WORD_TO_DATE
       
 11782  */
       
 11783     case function_word_to_date :
       
 11784     {
       
 11785         symbol_c *last_type_symbol = NULL;
       
 11786 
       
 11787         {
       
 11788             identifier_c param_name("IN");
       
 11789             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11790             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11791             
       
 11792             /* Get the value from a foo(<param_value>) style call */
       
 11793             if (IN_param_value == NULL)
       
 11794               IN_param_value = function_call_param_iterator.next();
       
 11795             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11796             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11797             
       
 11798             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11799             {
       
 11800         
       
 11801                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11802                 s4o.print("(");
       
 11803                 return_type_symbol->accept(*this);
       
 11804                 s4o.print(")__int_to_time(");
       
 11805                 IN_param_value->accept(*this);
       
 11806                 s4o.print(")");
       
 11807                 return NULL;
       
 11808                 
       
 11809             }
       
 11810             
       
 11811             ERROR;
       
 11812         }
       
 11813         
       
 11814     }/*function_word_to_date*/
       
 11815     break;
       
 11816 
       
 11817 /****
       
 11818  *WORD_TO_TOD
       
 11819  */
       
 11820     case function_word_to_tod :
       
 11821     {
       
 11822         symbol_c *last_type_symbol = NULL;
       
 11823 
       
 11824         {
       
 11825             identifier_c param_name("IN");
       
 11826             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11827             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11828             
       
 11829             /* Get the value from a foo(<param_value>) style call */
       
 11830             if (IN_param_value == NULL)
       
 11831               IN_param_value = function_call_param_iterator.next();
       
 11832             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11833             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11834             
       
 11835             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11836             {
       
 11837         
       
 11838                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11839                 s4o.print("(");
       
 11840                 return_type_symbol->accept(*this);
       
 11841                 s4o.print(")__int_to_time(");
       
 11842                 IN_param_value->accept(*this);
       
 11843                 s4o.print(")");
       
 11844                 return NULL;
       
 11845                 
       
 11846             }
       
 11847             
       
 11848             ERROR;
       
 11849         }
       
 11850         
       
 11851     }/*function_word_to_tod*/
       
 11852     break;
       
 11853 
       
 11854 /****
       
 11855  *WORD_TO_DT
       
 11856  */
       
 11857     case function_word_to_dt :
       
 11858     {
       
 11859         symbol_c *last_type_symbol = NULL;
       
 11860 
       
 11861         {
       
 11862             identifier_c param_name("IN");
       
 11863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11864             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11865             
       
 11866             /* Get the value from a foo(<param_value>) style call */
       
 11867             if (IN_param_value == NULL)
       
 11868               IN_param_value = function_call_param_iterator.next();
       
 11869             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11870             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11871             
       
 11872             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11873             {
       
 11874         
       
 11875                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11876                 s4o.print("(");
       
 11877                 return_type_symbol->accept(*this);
       
 11878                 s4o.print(")__int_to_time(");
       
 11879                 IN_param_value->accept(*this);
       
 11880                 s4o.print(")");
       
 11881                 return NULL;
       
 11882                 
       
 11883             }
       
 11884             
       
 11885             ERROR;
       
 11886         }
       
 11887         
       
 11888     }/*function_word_to_dt*/
       
 11889     break;
       
 11890 
       
 11891 /****
       
 11892  *WORD_TO_STRING
       
 11893  */
       
 11894     case function_word_to_string :
       
 11895     {
       
 11896         symbol_c *last_type_symbol = NULL;
       
 11897 
       
 11898         {
       
 11899             identifier_c param_name("IN");
       
 11900             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11901             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11902             
       
 11903             /* Get the value from a foo(<param_value>) style call */
       
 11904             if (IN_param_value == NULL)
       
 11905               IN_param_value = function_call_param_iterator.next();
       
 11906             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11907             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11908             
       
 11909             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11910             {
       
 11911         
       
 11912                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11913                 s4o.print("(");
       
 11914                 return_type_symbol->accept(*this);
       
 11915                 s4o.print(")__bit_to_string(");
       
 11916                 IN_param_value->accept(*this);
       
 11917                 s4o.print(")");
       
 11918                 return NULL;
       
 11919                 
       
 11920             }
       
 11921             
       
 11922             ERROR;
       
 11923         }
       
 11924         
       
 11925     }/*function_word_to_string*/
       
 11926     break;
       
 11927 
       
 11928 /****
       
 11929  *WORD_TO_BYTE
       
 11930  */
       
 11931     case function_word_to_byte :
       
 11932     {
       
 11933         symbol_c *last_type_symbol = NULL;
       
 11934 
       
 11935         {
       
 11936             identifier_c param_name("IN");
       
 11937             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11938             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11939             
       
 11940             /* Get the value from a foo(<param_value>) style call */
       
 11941             if (IN_param_value == NULL)
       
 11942               IN_param_value = function_call_param_iterator.next();
       
 11943             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11944             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11945             
       
 11946             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11947             {
       
 11948         
       
 11949                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11950                 s4o.print("(");
       
 11951                 return_type_symbol->accept(*this);
       
 11952                 s4o.print(")");
       
 11953                 IN_param_value->accept(*this);
       
 11954                 return NULL;
       
 11955                 
       
 11956             }
       
 11957             
       
 11958             ERROR;
       
 11959         }
       
 11960         
       
 11961     }/*function_word_to_byte*/
       
 11962     break;
       
 11963 
       
 11964 /****
       
 11965  *WORD_TO_DWORD
       
 11966  */
       
 11967     case function_word_to_dword :
       
 11968     {
       
 11969         symbol_c *last_type_symbol = NULL;
       
 11970 
       
 11971         {
       
 11972             identifier_c param_name("IN");
       
 11973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11974             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11975             
       
 11976             /* Get the value from a foo(<param_value>) style call */
       
 11977             if (IN_param_value == NULL)
       
 11978               IN_param_value = function_call_param_iterator.next();
       
 11979             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11980             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11981             
       
 11982             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11983             {
       
 11984         
       
 11985                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11986                 s4o.print("(");
       
 11987                 return_type_symbol->accept(*this);
       
 11988                 s4o.print(")");
       
 11989                 IN_param_value->accept(*this);
       
 11990                 return NULL;
       
 11991                 
       
 11992             }
       
 11993             
       
 11994             ERROR;
       
 11995         }
       
 11996         
       
 11997     }/*function_word_to_dword*/
       
 11998     break;
       
 11999 
       
 12000 /****
       
 12001  *WORD_TO_LWORD
       
 12002  */
       
 12003     case function_word_to_lword :
       
 12004     {
       
 12005         symbol_c *last_type_symbol = NULL;
       
 12006 
       
 12007         {
       
 12008             identifier_c param_name("IN");
       
 12009             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12010             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12011             
       
 12012             /* Get the value from a foo(<param_value>) style call */
       
 12013             if (IN_param_value == NULL)
       
 12014               IN_param_value = function_call_param_iterator.next();
       
 12015             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12016             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12017             
       
 12018             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 12019             {
       
 12020         
       
 12021                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12022                 s4o.print("(");
       
 12023                 return_type_symbol->accept(*this);
       
 12024                 s4o.print(")");
       
 12025                 IN_param_value->accept(*this);
       
 12026                 return NULL;
       
 12027                 
       
 12028             }
       
 12029             
       
 12030             ERROR;
       
 12031         }
       
 12032         
       
 12033     }/*function_word_to_lword*/
       
 12034     break;
       
 12035 
       
 12036 /****
       
 12037  *DWORD_TO_BOOL
       
 12038  */
       
 12039     case function_dword_to_bool :
       
 12040     {
       
 12041         symbol_c *last_type_symbol = NULL;
       
 12042 
       
 12043         {
       
 12044             identifier_c param_name("IN");
       
 12045             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12046             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12047             
       
 12048             /* Get the value from a foo(<param_value>) style call */
       
 12049             if (IN_param_value == NULL)
       
 12050               IN_param_value = function_call_param_iterator.next();
       
 12051             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12052             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12053             
       
 12054             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12055             {
       
 12056         
       
 12057                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12058                 s4o.print("(");
       
 12059                 return_type_symbol->accept(*this);
       
 12060                 s4o.print(")");
       
 12061                 IN_param_value->accept(*this);
       
 12062                 return NULL;
       
 12063                 
       
 12064             }
       
 12065             
       
 12066             ERROR;
       
 12067         }
       
 12068         
       
 12069     }/*function_dword_to_bool*/
       
 12070     break;
       
 12071 
       
 12072 /****
       
 12073  *DWORD_TO_SINT
       
 12074  */
       
 12075     case function_dword_to_sint :
       
 12076     {
       
 12077         symbol_c *last_type_symbol = NULL;
       
 12078 
       
 12079         {
       
 12080             identifier_c param_name("IN");
       
 12081             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12082             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12083             
       
 12084             /* Get the value from a foo(<param_value>) style call */
       
 12085             if (IN_param_value == NULL)
       
 12086               IN_param_value = function_call_param_iterator.next();
       
 12087             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12088             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12089             
       
 12090             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12091             {
       
 12092         
       
 12093                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12094                 s4o.print("(");
       
 12095                 return_type_symbol->accept(*this);
       
 12096                 s4o.print(")");
       
 12097                 IN_param_value->accept(*this);
       
 12098                 return NULL;
       
 12099                 
       
 12100             }
       
 12101             
       
 12102             ERROR;
       
 12103         }
       
 12104         
       
 12105     }/*function_dword_to_sint*/
       
 12106     break;
       
 12107 
       
 12108 /****
       
 12109  *DWORD_TO_INT
       
 12110  */
       
 12111     case function_dword_to_int :
       
 12112     {
       
 12113         symbol_c *last_type_symbol = NULL;
       
 12114 
       
 12115         {
       
 12116             identifier_c param_name("IN");
       
 12117             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12118             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12119             
       
 12120             /* Get the value from a foo(<param_value>) style call */
       
 12121             if (IN_param_value == NULL)
       
 12122               IN_param_value = function_call_param_iterator.next();
       
 12123             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12124             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12125             
       
 12126             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12127             {
       
 12128         
       
 12129                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12130                 s4o.print("(");
       
 12131                 return_type_symbol->accept(*this);
       
 12132                 s4o.print(")");
       
 12133                 IN_param_value->accept(*this);
       
 12134                 return NULL;
       
 12135                 
       
 12136             }
       
 12137             
       
 12138             ERROR;
       
 12139         }
       
 12140         
       
 12141     }/*function_dword_to_int*/
       
 12142     break;
       
 12143 
       
 12144 /****
       
 12145  *DWORD_TO_DINT
       
 12146  */
       
 12147     case function_dword_to_dint :
       
 12148     {
       
 12149         symbol_c *last_type_symbol = NULL;
       
 12150 
       
 12151         {
       
 12152             identifier_c param_name("IN");
       
 12153             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12154             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12155             
       
 12156             /* Get the value from a foo(<param_value>) style call */
       
 12157             if (IN_param_value == NULL)
       
 12158               IN_param_value = function_call_param_iterator.next();
       
 12159             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12160             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12161             
       
 12162             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12163             {
       
 12164         
       
 12165                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12166                 s4o.print("(");
       
 12167                 return_type_symbol->accept(*this);
       
 12168                 s4o.print(")");
       
 12169                 IN_param_value->accept(*this);
       
 12170                 return NULL;
       
 12171                 
       
 12172             }
       
 12173             
       
 12174             ERROR;
       
 12175         }
       
 12176         
       
 12177     }/*function_dword_to_dint*/
       
 12178     break;
       
 12179 
       
 12180 /****
       
 12181  *DWORD_TO_LINT
       
 12182  */
       
 12183     case function_dword_to_lint :
       
 12184     {
       
 12185         symbol_c *last_type_symbol = NULL;
       
 12186 
       
 12187         {
       
 12188             identifier_c param_name("IN");
       
 12189             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12190             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12191             
       
 12192             /* Get the value from a foo(<param_value>) style call */
       
 12193             if (IN_param_value == NULL)
       
 12194               IN_param_value = function_call_param_iterator.next();
       
 12195             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12196             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12197             
       
 12198             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12199             {
       
 12200         
       
 12201                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12202                 s4o.print("(");
       
 12203                 return_type_symbol->accept(*this);
       
 12204                 s4o.print(")");
       
 12205                 IN_param_value->accept(*this);
       
 12206                 return NULL;
       
 12207                 
       
 12208             }
       
 12209             
       
 12210             ERROR;
       
 12211         }
       
 12212         
       
 12213     }/*function_dword_to_lint*/
       
 12214     break;
       
 12215 
       
 12216 /****
       
 12217  *DWORD_TO_USINT
       
 12218  */
       
 12219     case function_dword_to_usint :
       
 12220     {
       
 12221         symbol_c *last_type_symbol = NULL;
       
 12222 
       
 12223         {
       
 12224             identifier_c param_name("IN");
       
 12225             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12226             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12227             
       
 12228             /* Get the value from a foo(<param_value>) style call */
       
 12229             if (IN_param_value == NULL)
       
 12230               IN_param_value = function_call_param_iterator.next();
       
 12231             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12232             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12233             
       
 12234             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12235             {
       
 12236         
       
 12237                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12238                 s4o.print("(");
       
 12239                 return_type_symbol->accept(*this);
       
 12240                 s4o.print(")");
       
 12241                 IN_param_value->accept(*this);
       
 12242                 return NULL;
       
 12243                 
       
 12244             }
       
 12245             
       
 12246             ERROR;
       
 12247         }
       
 12248         
       
 12249     }/*function_dword_to_usint*/
       
 12250     break;
       
 12251 
       
 12252 /****
       
 12253  *DWORD_TO_UINT
       
 12254  */
       
 12255     case function_dword_to_uint :
       
 12256     {
       
 12257         symbol_c *last_type_symbol = NULL;
       
 12258 
       
 12259         {
       
 12260             identifier_c param_name("IN");
       
 12261             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12262             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12263             
       
 12264             /* Get the value from a foo(<param_value>) style call */
       
 12265             if (IN_param_value == NULL)
       
 12266               IN_param_value = function_call_param_iterator.next();
       
 12267             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12268             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12269             
       
 12270             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12271             {
       
 12272         
       
 12273                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12274                 s4o.print("(");
       
 12275                 return_type_symbol->accept(*this);
       
 12276                 s4o.print(")");
       
 12277                 IN_param_value->accept(*this);
       
 12278                 return NULL;
       
 12279                 
       
 12280             }
       
 12281             
       
 12282             ERROR;
       
 12283         }
       
 12284         
       
 12285     }/*function_dword_to_uint*/
       
 12286     break;
       
 12287 
       
 12288 /****
       
 12289  *DWORD_TO_UDINT
       
 12290  */
       
 12291     case function_dword_to_udint :
       
 12292     {
       
 12293         symbol_c *last_type_symbol = NULL;
       
 12294 
       
 12295         {
       
 12296             identifier_c param_name("IN");
       
 12297             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12298             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12299             
       
 12300             /* Get the value from a foo(<param_value>) style call */
       
 12301             if (IN_param_value == NULL)
       
 12302               IN_param_value = function_call_param_iterator.next();
       
 12303             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12304             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12305             
       
 12306             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12307             {
       
 12308         
       
 12309                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12310                 s4o.print("(");
       
 12311                 return_type_symbol->accept(*this);
       
 12312                 s4o.print(")");
       
 12313                 IN_param_value->accept(*this);
       
 12314                 return NULL;
       
 12315                 
       
 12316             }
       
 12317             
       
 12318             ERROR;
       
 12319         }
       
 12320         
       
 12321     }/*function_dword_to_udint*/
       
 12322     break;
       
 12323 
       
 12324 /****
       
 12325  *DWORD_TO_ULINT
       
 12326  */
       
 12327     case function_dword_to_ulint :
       
 12328     {
       
 12329         symbol_c *last_type_symbol = NULL;
       
 12330 
       
 12331         {
       
 12332             identifier_c param_name("IN");
       
 12333             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12334             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12335             
       
 12336             /* Get the value from a foo(<param_value>) style call */
       
 12337             if (IN_param_value == NULL)
       
 12338               IN_param_value = function_call_param_iterator.next();
       
 12339             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12340             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12341             
       
 12342             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12343             {
       
 12344         
       
 12345                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12346                 s4o.print("(");
       
 12347                 return_type_symbol->accept(*this);
       
 12348                 s4o.print(")");
       
 12349                 IN_param_value->accept(*this);
       
 12350                 return NULL;
       
 12351                 
       
 12352             }
       
 12353             
       
 12354             ERROR;
       
 12355         }
       
 12356         
       
 12357     }/*function_dword_to_ulint*/
       
 12358     break;
       
 12359 
       
 12360 /****
       
 12361  *DWORD_TO_REAL
       
 12362  */
       
 12363     case function_dword_to_real :
       
 12364     {
       
 12365         symbol_c *last_type_symbol = NULL;
       
 12366 
       
 12367         {
       
 12368             identifier_c param_name("IN");
       
 12369             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12370             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12371             
       
 12372             /* Get the value from a foo(<param_value>) style call */
       
 12373             if (IN_param_value == NULL)
       
 12374               IN_param_value = function_call_param_iterator.next();
       
 12375             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12376             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12377             
       
 12378             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12379             {
       
 12380         
       
 12381                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12382                 s4o.print("(");
       
 12383                 return_type_symbol->accept(*this);
       
 12384                 s4o.print(")");
       
 12385                 IN_param_value->accept(*this);
       
 12386                 return NULL;
       
 12387                 
       
 12388             }
       
 12389             
       
 12390             ERROR;
       
 12391         }
       
 12392         
       
 12393     }/*function_dword_to_real*/
       
 12394     break;
       
 12395 
       
 12396 /****
       
 12397  *DWORD_TO_LREAL
       
 12398  */
       
 12399     case function_dword_to_lreal :
       
 12400     {
       
 12401         symbol_c *last_type_symbol = NULL;
       
 12402 
       
 12403         {
       
 12404             identifier_c param_name("IN");
       
 12405             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12406             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12407             
       
 12408             /* Get the value from a foo(<param_value>) style call */
       
 12409             if (IN_param_value == NULL)
       
 12410               IN_param_value = function_call_param_iterator.next();
       
 12411             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12412             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12413             
       
 12414             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12415             {
       
 12416         
       
 12417                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12418                 s4o.print("(");
       
 12419                 return_type_symbol->accept(*this);
       
 12420                 s4o.print(")");
       
 12421                 IN_param_value->accept(*this);
       
 12422                 return NULL;
       
 12423                 
       
 12424             }
       
 12425             
       
 12426             ERROR;
       
 12427         }
       
 12428         
       
 12429     }/*function_dword_to_lreal*/
       
 12430     break;
       
 12431 
       
 12432 /****
       
 12433  *DWORD_TO_TIME
       
 12434  */
       
 12435     case function_dword_to_time :
       
 12436     {
       
 12437         symbol_c *last_type_symbol = NULL;
       
 12438 
       
 12439         {
       
 12440             identifier_c param_name("IN");
       
 12441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12442             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12443             
       
 12444             /* Get the value from a foo(<param_value>) style call */
       
 12445             if (IN_param_value == NULL)
       
 12446               IN_param_value = function_call_param_iterator.next();
       
 12447             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12448             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12449             
       
 12450             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12451             {
       
 12452         
       
 12453                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12454                 s4o.print("(");
       
 12455                 return_type_symbol->accept(*this);
       
 12456                 s4o.print(")__int_to_time(");
       
 12457                 IN_param_value->accept(*this);
       
 12458                 s4o.print(")");
       
 12459                 return NULL;
       
 12460                 
       
 12461             }
       
 12462             
       
 12463             ERROR;
       
 12464         }
       
 12465         
       
 12466     }/*function_dword_to_time*/
       
 12467     break;
       
 12468 
       
 12469 /****
       
 12470  *DWORD_TO_DATE
       
 12471  */
       
 12472     case function_dword_to_date :
       
 12473     {
       
 12474         symbol_c *last_type_symbol = NULL;
       
 12475 
       
 12476         {
       
 12477             identifier_c param_name("IN");
       
 12478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12479             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12480             
       
 12481             /* Get the value from a foo(<param_value>) style call */
       
 12482             if (IN_param_value == NULL)
       
 12483               IN_param_value = function_call_param_iterator.next();
       
 12484             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12485             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12486             
       
 12487             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12488             {
       
 12489         
       
 12490                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12491                 s4o.print("(");
       
 12492                 return_type_symbol->accept(*this);
       
 12493                 s4o.print(")__int_to_time(");
       
 12494                 IN_param_value->accept(*this);
       
 12495                 s4o.print(")");
       
 12496                 return NULL;
       
 12497                 
       
 12498             }
       
 12499             
       
 12500             ERROR;
       
 12501         }
       
 12502         
       
 12503     }/*function_dword_to_date*/
       
 12504     break;
       
 12505 
       
 12506 /****
       
 12507  *DWORD_TO_TOD
       
 12508  */
       
 12509     case function_dword_to_tod :
       
 12510     {
       
 12511         symbol_c *last_type_symbol = NULL;
       
 12512 
       
 12513         {
       
 12514             identifier_c param_name("IN");
       
 12515             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12516             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12517             
       
 12518             /* Get the value from a foo(<param_value>) style call */
       
 12519             if (IN_param_value == NULL)
       
 12520               IN_param_value = function_call_param_iterator.next();
       
 12521             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12522             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12523             
       
 12524             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12525             {
       
 12526         
       
 12527                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12528                 s4o.print("(");
       
 12529                 return_type_symbol->accept(*this);
       
 12530                 s4o.print(")__int_to_time(");
       
 12531                 IN_param_value->accept(*this);
       
 12532                 s4o.print(")");
       
 12533                 return NULL;
       
 12534                 
       
 12535             }
       
 12536             
       
 12537             ERROR;
       
 12538         }
       
 12539         
       
 12540     }/*function_dword_to_tod*/
       
 12541     break;
       
 12542 
       
 12543 /****
       
 12544  *DWORD_TO_DT
       
 12545  */
       
 12546     case function_dword_to_dt :
       
 12547     {
       
 12548         symbol_c *last_type_symbol = NULL;
       
 12549 
       
 12550         {
       
 12551             identifier_c param_name("IN");
       
 12552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12554             
       
 12555             /* Get the value from a foo(<param_value>) style call */
       
 12556             if (IN_param_value == NULL)
       
 12557               IN_param_value = function_call_param_iterator.next();
       
 12558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12560             
       
 12561             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12562             {
       
 12563         
       
 12564                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12565                 s4o.print("(");
       
 12566                 return_type_symbol->accept(*this);
       
 12567                 s4o.print(")__int_to_time(");
       
 12568                 IN_param_value->accept(*this);
       
 12569                 s4o.print(")");
       
 12570                 return NULL;
       
 12571                 
       
 12572             }
       
 12573             
       
 12574             ERROR;
       
 12575         }
       
 12576         
       
 12577     }/*function_dword_to_dt*/
       
 12578     break;
       
 12579 
       
 12580 /****
       
 12581  *DWORD_TO_STRING
       
 12582  */
       
 12583     case function_dword_to_string :
       
 12584     {
       
 12585         symbol_c *last_type_symbol = NULL;
       
 12586 
       
 12587         {
       
 12588             identifier_c param_name("IN");
       
 12589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12590             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12591             
       
 12592             /* Get the value from a foo(<param_value>) style call */
       
 12593             if (IN_param_value == NULL)
       
 12594               IN_param_value = function_call_param_iterator.next();
       
 12595             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12596             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12597             
       
 12598             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12599             {
       
 12600         
       
 12601                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12602                 s4o.print("(");
       
 12603                 return_type_symbol->accept(*this);
       
 12604                 s4o.print(")__bit_to_string(");
       
 12605                 IN_param_value->accept(*this);
       
 12606                 s4o.print(")");
       
 12607                 return NULL;
       
 12608                 
       
 12609             }
       
 12610             
       
 12611             ERROR;
       
 12612         }
       
 12613         
       
 12614     }/*function_dword_to_string*/
       
 12615     break;
       
 12616 
       
 12617 /****
       
 12618  *DWORD_TO_BYTE
       
 12619  */
       
 12620     case function_dword_to_byte :
       
 12621     {
       
 12622         symbol_c *last_type_symbol = NULL;
       
 12623 
       
 12624         {
       
 12625             identifier_c param_name("IN");
       
 12626             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12627             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12628             
       
 12629             /* Get the value from a foo(<param_value>) style call */
       
 12630             if (IN_param_value == NULL)
       
 12631               IN_param_value = function_call_param_iterator.next();
       
 12632             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12633             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12634             
       
 12635             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12636             {
       
 12637         
       
 12638                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12639                 s4o.print("(");
       
 12640                 return_type_symbol->accept(*this);
       
 12641                 s4o.print(")");
       
 12642                 IN_param_value->accept(*this);
       
 12643                 return NULL;
       
 12644                 
       
 12645             }
       
 12646             
       
 12647             ERROR;
       
 12648         }
       
 12649         
       
 12650     }/*function_dword_to_byte*/
       
 12651     break;
       
 12652 
       
 12653 /****
       
 12654  *DWORD_TO_WORD
       
 12655  */
       
 12656     case function_dword_to_word :
       
 12657     {
       
 12658         symbol_c *last_type_symbol = NULL;
       
 12659 
       
 12660         {
       
 12661             identifier_c param_name("IN");
       
 12662             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12663             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12664             
       
 12665             /* Get the value from a foo(<param_value>) style call */
       
 12666             if (IN_param_value == NULL)
       
 12667               IN_param_value = function_call_param_iterator.next();
       
 12668             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12669             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12670             
       
 12671             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12672             {
       
 12673         
       
 12674                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12675                 s4o.print("(");
       
 12676                 return_type_symbol->accept(*this);
       
 12677                 s4o.print(")");
       
 12678                 IN_param_value->accept(*this);
       
 12679                 return NULL;
       
 12680                 
       
 12681             }
       
 12682             
       
 12683             ERROR;
       
 12684         }
       
 12685         
       
 12686     }/*function_dword_to_word*/
       
 12687     break;
       
 12688 
       
 12689 /****
       
 12690  *DWORD_TO_LWORD
       
 12691  */
       
 12692     case function_dword_to_lword :
       
 12693     {
       
 12694         symbol_c *last_type_symbol = NULL;
       
 12695 
       
 12696         {
       
 12697             identifier_c param_name("IN");
       
 12698             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12699             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12700             
       
 12701             /* Get the value from a foo(<param_value>) style call */
       
 12702             if (IN_param_value == NULL)
       
 12703               IN_param_value = function_call_param_iterator.next();
       
 12704             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12705             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12706             
       
 12707             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 12708             {
       
 12709         
       
 12710                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12711                 s4o.print("(");
       
 12712                 return_type_symbol->accept(*this);
       
 12713                 s4o.print(")");
       
 12714                 IN_param_value->accept(*this);
       
 12715                 return NULL;
       
 12716                 
       
 12717             }
       
 12718             
       
 12719             ERROR;
       
 12720         }
       
 12721         
       
 12722     }/*function_dword_to_lword*/
       
 12723     break;
       
 12724 
       
 12725 /****
       
 12726  *LWORD_TO_BOOL
       
 12727  */
       
 12728     case function_lword_to_bool :
       
 12729     {
       
 12730         symbol_c *last_type_symbol = NULL;
       
 12731 
       
 12732         {
       
 12733             identifier_c param_name("IN");
       
 12734             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12735             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12736             
       
 12737             /* Get the value from a foo(<param_value>) style call */
       
 12738             if (IN_param_value == NULL)
       
 12739               IN_param_value = function_call_param_iterator.next();
       
 12740             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12741             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12742             
       
 12743             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12744             {
       
 12745         
       
 12746                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12747                 s4o.print("(");
       
 12748                 return_type_symbol->accept(*this);
       
 12749                 s4o.print(")");
       
 12750                 IN_param_value->accept(*this);
       
 12751                 return NULL;
       
 12752                 
       
 12753             }
       
 12754             
       
 12755             ERROR;
       
 12756         }
       
 12757         
       
 12758     }/*function_lword_to_bool*/
       
 12759     break;
       
 12760 
       
 12761 /****
       
 12762  *LWORD_TO_SINT
       
 12763  */
       
 12764     case function_lword_to_sint :
       
 12765     {
       
 12766         symbol_c *last_type_symbol = NULL;
       
 12767 
       
 12768         {
       
 12769             identifier_c param_name("IN");
       
 12770             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12771             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12772             
       
 12773             /* Get the value from a foo(<param_value>) style call */
       
 12774             if (IN_param_value == NULL)
       
 12775               IN_param_value = function_call_param_iterator.next();
       
 12776             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12777             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12778             
       
 12779             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12780             {
       
 12781         
       
 12782                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12783                 s4o.print("(");
       
 12784                 return_type_symbol->accept(*this);
       
 12785                 s4o.print(")");
       
 12786                 IN_param_value->accept(*this);
       
 12787                 return NULL;
       
 12788                 
       
 12789             }
       
 12790             
       
 12791             ERROR;
       
 12792         }
       
 12793         
       
 12794     }/*function_lword_to_sint*/
       
 12795     break;
       
 12796 
       
 12797 /****
       
 12798  *LWORD_TO_INT
       
 12799  */
       
 12800     case function_lword_to_int :
       
 12801     {
       
 12802         symbol_c *last_type_symbol = NULL;
       
 12803 
       
 12804         {
       
 12805             identifier_c param_name("IN");
       
 12806             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12807             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12808             
       
 12809             /* Get the value from a foo(<param_value>) style call */
       
 12810             if (IN_param_value == NULL)
       
 12811               IN_param_value = function_call_param_iterator.next();
       
 12812             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12813             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12814             
       
 12815             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12816             {
       
 12817         
       
 12818                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12819                 s4o.print("(");
       
 12820                 return_type_symbol->accept(*this);
       
 12821                 s4o.print(")");
       
 12822                 IN_param_value->accept(*this);
       
 12823                 return NULL;
       
 12824                 
       
 12825             }
       
 12826             
       
 12827             ERROR;
       
 12828         }
       
 12829         
       
 12830     }/*function_lword_to_int*/
       
 12831     break;
       
 12832 
       
 12833 /****
       
 12834  *LWORD_TO_DINT
       
 12835  */
       
 12836     case function_lword_to_dint :
       
 12837     {
       
 12838         symbol_c *last_type_symbol = NULL;
       
 12839 
       
 12840         {
       
 12841             identifier_c param_name("IN");
       
 12842             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12843             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12844             
       
 12845             /* Get the value from a foo(<param_value>) style call */
       
 12846             if (IN_param_value == NULL)
       
 12847               IN_param_value = function_call_param_iterator.next();
       
 12848             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12849             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12850             
       
 12851             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12852             {
       
 12853         
       
 12854                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12855                 s4o.print("(");
       
 12856                 return_type_symbol->accept(*this);
       
 12857                 s4o.print(")");
       
 12858                 IN_param_value->accept(*this);
       
 12859                 return NULL;
       
 12860                 
       
 12861             }
       
 12862             
       
 12863             ERROR;
       
 12864         }
       
 12865         
       
 12866     }/*function_lword_to_dint*/
       
 12867     break;
       
 12868 
       
 12869 /****
       
 12870  *LWORD_TO_LINT
       
 12871  */
       
 12872     case function_lword_to_lint :
       
 12873     {
       
 12874         symbol_c *last_type_symbol = NULL;
       
 12875 
       
 12876         {
       
 12877             identifier_c param_name("IN");
       
 12878             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12879             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12880             
       
 12881             /* Get the value from a foo(<param_value>) style call */
       
 12882             if (IN_param_value == NULL)
       
 12883               IN_param_value = function_call_param_iterator.next();
       
 12884             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12885             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12886             
       
 12887             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12888             {
       
 12889         
       
 12890                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12891                 s4o.print("(");
       
 12892                 return_type_symbol->accept(*this);
       
 12893                 s4o.print(")");
       
 12894                 IN_param_value->accept(*this);
       
 12895                 return NULL;
       
 12896                 
       
 12897             }
       
 12898             
       
 12899             ERROR;
       
 12900         }
       
 12901         
       
 12902     }/*function_lword_to_lint*/
       
 12903     break;
       
 12904 
       
 12905 /****
       
 12906  *LWORD_TO_USINT
       
 12907  */
       
 12908     case function_lword_to_usint :
       
 12909     {
       
 12910         symbol_c *last_type_symbol = NULL;
       
 12911 
       
 12912         {
       
 12913             identifier_c param_name("IN");
       
 12914             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12915             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12916             
       
 12917             /* Get the value from a foo(<param_value>) style call */
       
 12918             if (IN_param_value == NULL)
       
 12919               IN_param_value = function_call_param_iterator.next();
       
 12920             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12921             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12922             
       
 12923             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12924             {
       
 12925         
       
 12926                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12927                 s4o.print("(");
       
 12928                 return_type_symbol->accept(*this);
       
 12929                 s4o.print(")");
       
 12930                 IN_param_value->accept(*this);
       
 12931                 return NULL;
       
 12932                 
       
 12933             }
       
 12934             
       
 12935             ERROR;
       
 12936         }
       
 12937         
       
 12938     }/*function_lword_to_usint*/
       
 12939     break;
       
 12940 
       
 12941 /****
       
 12942  *LWORD_TO_UINT
       
 12943  */
       
 12944     case function_lword_to_uint :
       
 12945     {
       
 12946         symbol_c *last_type_symbol = NULL;
       
 12947 
       
 12948         {
       
 12949             identifier_c param_name("IN");
       
 12950             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12951             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12952             
       
 12953             /* Get the value from a foo(<param_value>) style call */
       
 12954             if (IN_param_value == NULL)
       
 12955               IN_param_value = function_call_param_iterator.next();
       
 12956             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12957             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12958             
       
 12959             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12960             {
       
 12961         
       
 12962                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12963                 s4o.print("(");
       
 12964                 return_type_symbol->accept(*this);
       
 12965                 s4o.print(")");
       
 12966                 IN_param_value->accept(*this);
       
 12967                 return NULL;
       
 12968                 
       
 12969             }
       
 12970             
       
 12971             ERROR;
       
 12972         }
       
 12973         
       
 12974     }/*function_lword_to_uint*/
       
 12975     break;
       
 12976 
       
 12977 /****
       
 12978  *LWORD_TO_UDINT
       
 12979  */
       
 12980     case function_lword_to_udint :
       
 12981     {
       
 12982         symbol_c *last_type_symbol = NULL;
       
 12983 
       
 12984         {
       
 12985             identifier_c param_name("IN");
       
 12986             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12987             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12988             
       
 12989             /* Get the value from a foo(<param_value>) style call */
       
 12990             if (IN_param_value == NULL)
       
 12991               IN_param_value = function_call_param_iterator.next();
       
 12992             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12993             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12994             
       
 12995             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 12996             {
       
 12997         
       
 12998                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12999                 s4o.print("(");
       
 13000                 return_type_symbol->accept(*this);
       
 13001                 s4o.print(")");
       
 13002                 IN_param_value->accept(*this);
       
 13003                 return NULL;
       
 13004                 
       
 13005             }
       
 13006             
       
 13007             ERROR;
       
 13008         }
       
 13009         
       
 13010     }/*function_lword_to_udint*/
       
 13011     break;
       
 13012 
       
 13013 /****
       
 13014  *LWORD_TO_ULINT
       
 13015  */
       
 13016     case function_lword_to_ulint :
       
 13017     {
       
 13018         symbol_c *last_type_symbol = NULL;
       
 13019 
       
 13020         {
       
 13021             identifier_c param_name("IN");
       
 13022             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13023             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13024             
       
 13025             /* Get the value from a foo(<param_value>) style call */
       
 13026             if (IN_param_value == NULL)
       
 13027               IN_param_value = function_call_param_iterator.next();
       
 13028             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13029             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13030             
       
 13031             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13032             {
       
 13033         
       
 13034                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13035                 s4o.print("(");
       
 13036                 return_type_symbol->accept(*this);
       
 13037                 s4o.print(")");
       
 13038                 IN_param_value->accept(*this);
       
 13039                 return NULL;
       
 13040                 
       
 13041             }
       
 13042             
       
 13043             ERROR;
       
 13044         }
       
 13045         
       
 13046     }/*function_lword_to_ulint*/
       
 13047     break;
       
 13048 
       
 13049 /****
       
 13050  *LWORD_TO_REAL
       
 13051  */
       
 13052     case function_lword_to_real :
       
 13053     {
       
 13054         symbol_c *last_type_symbol = NULL;
       
 13055 
       
 13056         {
       
 13057             identifier_c param_name("IN");
       
 13058             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13059             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13060             
       
 13061             /* Get the value from a foo(<param_value>) style call */
       
 13062             if (IN_param_value == NULL)
       
 13063               IN_param_value = function_call_param_iterator.next();
       
 13064             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13065             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13066             
       
 13067             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13068             {
       
 13069         
       
 13070                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 13071                 s4o.print("(");
       
 13072                 return_type_symbol->accept(*this);
       
 13073                 s4o.print(")");
       
 13074                 IN_param_value->accept(*this);
       
 13075                 return NULL;
       
 13076                 
       
 13077             }
       
 13078             
       
 13079             ERROR;
       
 13080         }
       
 13081         
       
 13082     }/*function_lword_to_real*/
       
 13083     break;
       
 13084 
       
 13085 /****
       
 13086  *LWORD_TO_LREAL
       
 13087  */
       
 13088     case function_lword_to_lreal :
       
 13089     {
       
 13090         symbol_c *last_type_symbol = NULL;
       
 13091 
       
 13092         {
       
 13093             identifier_c param_name("IN");
       
 13094             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13095             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13096             
       
 13097             /* Get the value from a foo(<param_value>) style call */
       
 13098             if (IN_param_value == NULL)
       
 13099               IN_param_value = function_call_param_iterator.next();
       
 13100             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13101             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13102             
       
 13103             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13104             {
       
 13105         
       
 13106                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13107                 s4o.print("(");
       
 13108                 return_type_symbol->accept(*this);
       
 13109                 s4o.print(")");
       
 13110                 IN_param_value->accept(*this);
       
 13111                 return NULL;
       
 13112                 
       
 13113             }
       
 13114             
       
 13115             ERROR;
       
 13116         }
       
 13117         
       
 13118     }/*function_lword_to_lreal*/
       
 13119     break;
       
 13120 
       
 13121 /****
       
 13122  *LWORD_TO_TIME
       
 13123  */
       
 13124     case function_lword_to_time :
       
 13125     {
       
 13126         symbol_c *last_type_symbol = NULL;
       
 13127 
       
 13128         {
       
 13129             identifier_c param_name("IN");
       
 13130             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13131             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13132             
       
 13133             /* Get the value from a foo(<param_value>) style call */
       
 13134             if (IN_param_value == NULL)
       
 13135               IN_param_value = function_call_param_iterator.next();
       
 13136             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13137             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13138             
       
 13139             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13140             {
       
 13141         
       
 13142                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13143                 s4o.print("(");
       
 13144                 return_type_symbol->accept(*this);
       
 13145                 s4o.print(")__int_to_time(");
       
 13146                 IN_param_value->accept(*this);
       
 13147                 s4o.print(")");
       
 13148                 return NULL;
       
 13149                 
       
 13150             }
       
 13151             
       
 13152             ERROR;
       
 13153         }
       
 13154         
       
 13155     }/*function_lword_to_time*/
       
 13156     break;
       
 13157 
       
 13158 /****
       
 13159  *LWORD_TO_DATE
       
 13160  */
       
 13161     case function_lword_to_date :
       
 13162     {
       
 13163         symbol_c *last_type_symbol = NULL;
       
 13164 
       
 13165         {
       
 13166             identifier_c param_name("IN");
       
 13167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13168             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13169             
       
 13170             /* Get the value from a foo(<param_value>) style call */
       
 13171             if (IN_param_value == NULL)
       
 13172               IN_param_value = function_call_param_iterator.next();
       
 13173             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13174             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13175             
       
 13176             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13177             {
       
 13178         
       
 13179                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13180                 s4o.print("(");
       
 13181                 return_type_symbol->accept(*this);
       
 13182                 s4o.print(")__int_to_time(");
       
 13183                 IN_param_value->accept(*this);
       
 13184                 s4o.print(")");
       
 13185                 return NULL;
       
 13186                 
       
 13187             }
       
 13188             
       
 13189             ERROR;
       
 13190         }
       
 13191         
       
 13192     }/*function_lword_to_date*/
       
 13193     break;
       
 13194 
       
 13195 /****
       
 13196  *LWORD_TO_TOD
       
 13197  */
       
 13198     case function_lword_to_tod :
       
 13199     {
       
 13200         symbol_c *last_type_symbol = NULL;
       
 13201 
       
 13202         {
       
 13203             identifier_c param_name("IN");
       
 13204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13205             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13206             
       
 13207             /* Get the value from a foo(<param_value>) style call */
       
 13208             if (IN_param_value == NULL)
       
 13209               IN_param_value = function_call_param_iterator.next();
       
 13210             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13211             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13212             
       
 13213             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13214             {
       
 13215         
       
 13216                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13217                 s4o.print("(");
       
 13218                 return_type_symbol->accept(*this);
       
 13219                 s4o.print(")__int_to_time(");
       
 13220                 IN_param_value->accept(*this);
       
 13221                 s4o.print(")");
       
 13222                 return NULL;
       
 13223                 
       
 13224             }
       
 13225             
       
 13226             ERROR;
       
 13227         }
       
 13228         
       
 13229     }/*function_lword_to_tod*/
       
 13230     break;
       
 13231 
       
 13232 /****
       
 13233  *LWORD_TO_DT
       
 13234  */
       
 13235     case function_lword_to_dt :
       
 13236     {
       
 13237         symbol_c *last_type_symbol = NULL;
       
 13238 
       
 13239         {
       
 13240             identifier_c param_name("IN");
       
 13241             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13242             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13243             
       
 13244             /* Get the value from a foo(<param_value>) style call */
       
 13245             if (IN_param_value == NULL)
       
 13246               IN_param_value = function_call_param_iterator.next();
       
 13247             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13248             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13249             
       
 13250             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13251             {
       
 13252         
       
 13253                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 13254                 s4o.print("(");
       
 13255                 return_type_symbol->accept(*this);
       
 13256                 s4o.print(")__int_to_time(");
       
 13257                 IN_param_value->accept(*this);
       
 13258                 s4o.print(")");
       
 13259                 return NULL;
       
 13260                 
       
 13261             }
       
 13262             
       
 13263             ERROR;
       
 13264         }
       
 13265         
       
 13266     }/*function_lword_to_dt*/
       
 13267     break;
       
 13268 
       
 13269 /****
       
 13270  *LWORD_TO_STRING
       
 13271  */
       
 13272     case function_lword_to_string :
       
 13273     {
       
 13274         symbol_c *last_type_symbol = NULL;
       
 13275 
       
 13276         {
       
 13277             identifier_c param_name("IN");
       
 13278             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13279             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13280             
       
 13281             /* Get the value from a foo(<param_value>) style call */
       
 13282             if (IN_param_value == NULL)
       
 13283               IN_param_value = function_call_param_iterator.next();
       
 13284             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13285             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13286             
       
 13287             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13288             {
       
 13289         
       
 13290                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13291                 s4o.print("(");
       
 13292                 return_type_symbol->accept(*this);
       
 13293                 s4o.print(")__bit_to_string(");
       
 13294                 IN_param_value->accept(*this);
       
 13295                 s4o.print(")");
       
 13296                 return NULL;
       
 13297                 
       
 13298             }
       
 13299             
       
 13300             ERROR;
       
 13301         }
       
 13302         
       
 13303     }/*function_lword_to_string*/
       
 13304     break;
       
 13305 
       
 13306 /****
       
 13307  *LWORD_TO_BYTE
       
 13308  */
       
 13309     case function_lword_to_byte :
       
 13310     {
       
 13311         symbol_c *last_type_symbol = NULL;
       
 13312 
       
 13313         {
       
 13314             identifier_c param_name("IN");
       
 13315             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13316             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13317             
       
 13318             /* Get the value from a foo(<param_value>) style call */
       
 13319             if (IN_param_value == NULL)
       
 13320               IN_param_value = function_call_param_iterator.next();
       
 13321             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13322             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13323             
       
 13324             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13325             {
       
 13326         
       
 13327                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13328                 s4o.print("(");
       
 13329                 return_type_symbol->accept(*this);
       
 13330                 s4o.print(")");
       
 13331                 IN_param_value->accept(*this);
       
 13332                 return NULL;
       
 13333                 
       
 13334             }
       
 13335             
       
 13336             ERROR;
       
 13337         }
       
 13338         
       
 13339     }/*function_lword_to_byte*/
       
 13340     break;
       
 13341 
       
 13342 /****
       
 13343  *LWORD_TO_WORD
       
 13344  */
       
 13345     case function_lword_to_word :
       
 13346     {
       
 13347         symbol_c *last_type_symbol = NULL;
       
 13348 
       
 13349         {
       
 13350             identifier_c param_name("IN");
       
 13351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13353             
       
 13354             /* Get the value from a foo(<param_value>) style call */
       
 13355             if (IN_param_value == NULL)
       
 13356               IN_param_value = function_call_param_iterator.next();
       
 13357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13359             
       
 13360             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 13361             {
       
 13362         
       
 13363                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13364                 s4o.print("(");
       
 13365                 return_type_symbol->accept(*this);
       
 13366                 s4o.print(")");
 13218                 s4o.print(")");
 13367                 IN_param_value->accept(*this);
 13219                 IN_param_value->accept(*this);
 13368                 return NULL;
 13220                 return NULL;
 13369                 
 13221                 
 13370             }
 13222             }
 13391             if (IN_param_value == NULL)
 13243             if (IN_param_value == NULL)
 13392               IN_param_value = function_call_param_iterator.next();
 13244               IN_param_value = function_call_param_iterator.next();
 13393             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13245             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13394             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13246             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13395             
 13247             
 13396             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
 13248             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
 13397             {
 13249             {
 13398         
 13250         
 13399                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 13251                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 13400                 s4o.print("(");
 13252                 s4o.print("(");
 13401                 return_type_symbol->accept(*this);
 13253                 return_type_symbol->accept(*this);
 13461             if (IN_param_value == NULL)
 13313             if (IN_param_value == NULL)
 13462               IN_param_value = function_call_param_iterator.next();
 13314               IN_param_value = function_call_param_iterator.next();
 13463             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13315             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13464             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
 13465             
 13317             
 13466             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
 13318             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
 13467             {
 13319             {
 13468         
 13320         
 13469                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 13321                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 13470                 s4o.print("(");
 13322                 s4o.print("(");
 13471                 return_type_symbol->accept(*this);
 13323                 return_type_symbol->accept(*this);
 13498             if (IN_param_value == NULL)
 13350             if (IN_param_value == NULL)
 13499               IN_param_value = function_call_param_iterator.next();
 13351               IN_param_value = function_call_param_iterator.next();
 13500             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13352             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13501             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13502             
 13354             
 13503             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
 13355             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
 13504             {
 13356             {
 13505         
 13357         
 13506                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 13358                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 13507                 s4o.print("(");
 13359                 s4o.print("(");
 13508                 return_type_symbol->accept(*this);
 13360                 return_type_symbol->accept(*this);
 13535             if (IN_param_value == NULL)
 13387             if (IN_param_value == NULL)
 13536               IN_param_value = function_call_param_iterator.next();
 13388               IN_param_value = function_call_param_iterator.next();
 13537             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13389             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13538             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13539             
 13391             
 13540             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 13392             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
 13541             {
 13393             {
 13542         
 13394         
 13543                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 13395                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 13544                 s4o.print("(");
 13396                 s4o.print("(");
 13545                 return_type_symbol->accept(*this);
 13397                 return_type_symbol->accept(*this);
 13572             if (IN_param_value == NULL)
 13424             if (IN_param_value == NULL)
 13573               IN_param_value = function_call_param_iterator.next();
 13425               IN_param_value = function_call_param_iterator.next();
 13574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13426             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13575             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13576             
 13428             
 13577             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
 13429             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
 13578             {
 13430             {
 13579         
 13431         
 13580                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 13432                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 13581                 s4o.print("(");
 13433                 s4o.print("(");
 13582                 return_type_symbol->accept(*this);
 13434                 return_type_symbol->accept(*this);
 13609             if (IN_param_value == NULL)
 13461             if (IN_param_value == NULL)
 13610               IN_param_value = function_call_param_iterator.next();
 13462               IN_param_value = function_call_param_iterator.next();
 13611             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13463             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13612             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13464             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13613             
 13465             
 13614             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 13466             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 13615             {
 13467             {
 13616         
 13468         
 13617                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13469                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13618                 s4o.print("(");
 13470                 s4o.print("(");
 13619                 return_type_symbol->accept(*this);
 13471                 return_type_symbol->accept(*this);
 13646             if (IN_param_value == NULL)
 13498             if (IN_param_value == NULL)
 13647               IN_param_value = function_call_param_iterator.next();
 13499               IN_param_value = function_call_param_iterator.next();
 13648             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13500             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13649             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13501             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13650             
 13502             
 13651             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 13503             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 13652             {
 13504             {
 13653         
 13505         
 13654                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13506                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13655                 s4o.print("(");
 13507                 s4o.print("(");
 13656                 return_type_symbol->accept(*this);
 13508                 return_type_symbol->accept(*this);
 13683             if (IN_param_value == NULL)
 13535             if (IN_param_value == NULL)
 13684               IN_param_value = function_call_param_iterator.next();
 13536               IN_param_value = function_call_param_iterator.next();
 13685             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13537             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13686             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13538             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13687             
 13539             
 13688             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 13540             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 13689             {
 13541             {
 13690         
 13542         
 13691                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13543                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13692                 s4o.print("(");
 13544                 s4o.print("(");
 13693                 return_type_symbol->accept(*this);
 13545                 return_type_symbol->accept(*this);
 13720             if (IN_param_value == NULL)
 13572             if (IN_param_value == NULL)
 13721               IN_param_value = function_call_param_iterator.next();
 13573               IN_param_value = function_call_param_iterator.next();
 13722             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13723             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13724             
 13576             
 13725             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 13577             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 13726             {
 13578             {
 13727         
 13579         
 13728                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13580                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 13729                 s4o.print("(");
 13581                 s4o.print("(");
 13730                 return_type_symbol->accept(*this);
 13582                 return_type_symbol->accept(*this);
 13757             if (IN_param_value == NULL)
 13609             if (IN_param_value == NULL)
 13758               IN_param_value = function_call_param_iterator.next();
 13610               IN_param_value = function_call_param_iterator.next();
 13759             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13611             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13760             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13612             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13761             
 13613             
 13762             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 13614             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 13763             {
 13615             {
 13764         
 13616         
 13765                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 13617                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 13766                 s4o.print("__date_and_time_to_time_of_day(");
 13618                 s4o.print("__date_and_time_to_time_of_day(");
 13767                 IN_param_value->accept(*this);
 13619                 IN_param_value->accept(*this);
 13792             if (IN_param_value == NULL)
 13644             if (IN_param_value == NULL)
 13793               IN_param_value = function_call_param_iterator.next();
 13645               IN_param_value = function_call_param_iterator.next();
 13794             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13795             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13796             
 13648             
 13797             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 13649             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 13798             {
 13650             {
 13799         
 13651         
 13800                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 13652                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 13801                 s4o.print("__date_and_time_to_date(");
 13653                 s4o.print("__date_and_time_to_date(");
 13802                 IN_param_value->accept(*this);
 13654                 IN_param_value->accept(*this);
 14232                     
 14084                     
 14233                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14085                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14234                     {
 14086                     {
 14235                 
 14087                 
 14236                         symbol_c * return_type_symbol = last_type_symbol;
 14088                         symbol_c * return_type_symbol = last_type_symbol;
 14237                         s4o.print("(");
 14089                         s4o.indent_right();
       
 14090                         s4o.print("(\n" + s4o.indent_spaces);
 14238                         IN1_param_value->accept(*this);
 14091                         IN1_param_value->accept(*this);
 14239                         s4o.print("+");
 14092                         s4o.print("+\n" + s4o.indent_spaces);
 14240                         IN2_param_value->accept(*this);
 14093                         IN2_param_value->accept(*this);
 14241                         
 14094                         
 14242                         int base_num = 3;
 14095                         int base_num = 3;
 14243                         symbol_c *param_value = NULL;
 14096                         symbol_c *param_value = NULL;
 14244                         do{
 14097                         do{
 14255                             if (param_value != NULL){
 14108                             if (param_value != NULL){
 14256                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 14109                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 14257                                 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 ;
 14110                                 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 ;
 14258                             
 14111                             
 14259                                 /*Function specific CODE */
 14112                                 /*Function specific CODE */
 14260                                 s4o.print("+");
 14113                                 s4o.print("+\n" + s4o.indent_spaces);
 14261                                 param_value->accept(*this);
 14114                                 param_value->accept(*this);
 14262                                 
 14115                                 
 14263                             }
 14116                             }
 14264                             
 14117                             
 14265                         }while(param_value != NULL);
 14118                         }while(param_value != NULL);
 14266                         s4o.print(")");
 14119                         s4o.print(")");
       
 14120                         s4o.indent_left();
 14267                         return NULL;
 14121                         return NULL;
 14268                         
 14122                         
 14269                         
 14123                         
 14270                     }
 14124                     }
 14271                     
 14125                     
 14272                     ERROR;
 14126                     ERROR;
 14273                 }
 14127                 }
 14274                 
 14128                 
 14275             }
 14129             }
 14276             
 14130             
 14277             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14131             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14278             {
 14132             {
 14279         
 14133         
 14280                 {
 14134                 {
 14281                     identifier_c param_name("IN2");
 14135                     identifier_c param_name("IN2");
 14282                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14136                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14286                     if (IN2_param_value == NULL)
 14140                     if (IN2_param_value == NULL)
 14287                       IN2_param_value = function_call_param_iterator.next();
 14141                       IN2_param_value = function_call_param_iterator.next();
 14288                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14142                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14289                     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 ;
 14143                     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 ;
 14290                     
 14144                     
 14291                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14145                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14292                     {
 14146                     {
 14293                 
 14147                 
 14294                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14148                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14295                         s4o.print("__time_add(");
 14149                         s4o.print("__time_add(");
 14296                         IN1_param_value->accept(*this);
 14150                         IN1_param_value->accept(*this);
 14304                     ERROR;
 14158                     ERROR;
 14305                 }
 14159                 }
 14306                 
 14160                 
 14307             }
 14161             }
 14308             
 14162             
 14309             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 14163             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14310             {
 14164             {
 14311         
 14165         
 14312                 {
 14166                 {
 14313                     identifier_c param_name("IN2");
 14167                     identifier_c param_name("IN2");
 14314                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14168                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14318                     if (IN2_param_value == NULL)
 14172                     if (IN2_param_value == NULL)
 14319                       IN2_param_value = function_call_param_iterator.next();
 14173                       IN2_param_value = function_call_param_iterator.next();
 14320                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14174                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14321                     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 ;
 14175                     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 ;
 14322                     
 14176                     
 14323                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14177                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14324                     {
 14178                     {
 14325                 
 14179                 
 14326                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14180                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14327                         s4o.print("__time_add(");
 14181                         s4o.print("__time_add(");
 14328                         IN1_param_value->accept(*this);
 14182                         IN1_param_value->accept(*this);
 14336                     ERROR;
 14190                     ERROR;
 14337                 }
 14191                 }
 14338                 
 14192                 
 14339             }
 14193             }
 14340             
 14194             
 14341             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14195             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14342             {
 14196             {
 14343         
 14197         
 14344                 {
 14198                 {
 14345                     identifier_c param_name("IN2");
 14199                     identifier_c param_name("IN2");
 14346                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14200                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14350                     if (IN2_param_value == NULL)
 14204                     if (IN2_param_value == NULL)
 14351                       IN2_param_value = function_call_param_iterator.next();
 14205                       IN2_param_value = function_call_param_iterator.next();
 14352                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14206                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14353                     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 ;
 14207                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14354                     
 14208                     
 14355                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14209                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14356                     {
 14210                     {
 14357                 
 14211                 
 14358                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14212                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14359                         s4o.print("__time_add(");
 14213                         s4o.print("__time_add(");
 14360                         IN1_param_value->accept(*this);
 14214                         IN1_param_value->accept(*this);
 14410                     
 14264                     
 14411                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14265                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14412                     {
 14266                     {
 14413                 
 14267                 
 14414                         symbol_c * return_type_symbol = last_type_symbol;
 14268                         symbol_c * return_type_symbol = last_type_symbol;
 14415                         s4o.print("(");
 14269                         s4o.indent_right();
       
 14270                         s4o.print("(\n" + s4o.indent_spaces);
 14416                         IN1_param_value->accept(*this);
 14271                         IN1_param_value->accept(*this);
 14417                         s4o.print("*");
 14272                         s4o.print("*\n" + s4o.indent_spaces);
 14418                         IN2_param_value->accept(*this);
 14273                         IN2_param_value->accept(*this);
 14419                         
 14274                         
 14420                         int base_num = 3;
 14275                         int base_num = 3;
 14421                         symbol_c *param_value = NULL;
 14276                         symbol_c *param_value = NULL;
 14422                         do{
 14277                         do{
 14433                             if (param_value != NULL){
 14288                             if (param_value != NULL){
 14434                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 14289                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 14435                                 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 ;
 14290                                 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 ;
 14436                             
 14291                             
 14437                                 /*Function specific CODE */
 14292                                 /*Function specific CODE */
 14438                                 s4o.print("*");
 14293                                 s4o.print("*\n" + s4o.indent_spaces);
 14439                                 param_value->accept(*this);
 14294                                 param_value->accept(*this);
 14440                                 
 14295                                 
 14441                             }
 14296                             }
 14442                             
 14297                             
 14443                         }while(param_value != NULL);
 14298                         }while(param_value != NULL);
 14444                         s4o.print(")");
 14299                         s4o.print(")");
       
 14300                         s4o.indent_left();
 14445                         return NULL;
 14301                         return NULL;
 14446                         
 14302                         
 14447                         
 14303                         
 14448                     }
 14304                     }
 14449                     
 14305                     
 14450                     ERROR;
 14306                     ERROR;
 14451                 }
 14307                 }
 14452                 
 14308                 
 14453             }
 14309             }
 14454             
 14310             
 14455             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14311             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14456             {
 14312             {
 14457         
 14313         
 14458                 {
 14314                 {
 14459                     identifier_c param_name("IN2");
 14315                     identifier_c param_name("IN2");
 14460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14316                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14524                     
 14380                     
 14525                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14381                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14526                     {
 14382                     {
 14527                 
 14383                 
 14528                         symbol_c * return_type_symbol = last_type_symbol;
 14384                         symbol_c * return_type_symbol = last_type_symbol;
 14529                         s4o.print("(");
 14385                         s4o.indent_right();
       
 14386                         s4o.print("(\n" + s4o.indent_spaces);
 14530                         IN1_param_value->accept(*this);
 14387                         IN1_param_value->accept(*this);
 14531                         s4o.print("-");
 14388                         s4o.print("-\n" + s4o.indent_spaces);
 14532                         IN2_param_value->accept(*this);
 14389                         IN2_param_value->accept(*this);
 14533                         s4o.print(")");
 14390                         s4o.print(")");
       
 14391                         s4o.indent_left();
 14534                         return NULL;
 14392                         return NULL;
 14535                         
 14393                         
 14536                     }
 14394                     }
 14537                     
 14395                     
 14538                     ERROR;
 14396                     ERROR;
 14539                 }
 14397                 }
 14540                 
 14398                 
 14541             }
 14399             }
 14542             
 14400             
 14543             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 14401             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14544             {
 14402             {
 14545         
 14403         
 14546                 {
 14404                 {
 14547                     identifier_c param_name("IN2");
 14405                     identifier_c param_name("IN2");
 14548                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14406                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14552                     if (IN2_param_value == NULL)
 14410                     if (IN2_param_value == NULL)
 14553                       IN2_param_value = function_call_param_iterator.next();
 14411                       IN2_param_value = function_call_param_iterator.next();
 14554                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14412                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14555                     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 ;
 14413                     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 ;
 14556                     
 14414                     
 14557                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 14415                     if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14558                     {
 14416                     {
 14559                 
 14417                 
 14560                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14418                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14561                         s4o.print("__time_sub(");
 14419                         s4o.print("__time_sub(");
 14562                         IN1_param_value->accept(*this);
 14420                         IN1_param_value->accept(*this);
 14570                     ERROR;
 14428                     ERROR;
 14571                 }
 14429                 }
 14572                 
 14430                 
 14573             }
 14431             }
 14574             
 14432             
 14575             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14433             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14576             {
 14434             {
 14577         
 14435         
 14578                 {
 14436                 {
 14579                     identifier_c param_name("IN2");
 14437                     identifier_c param_name("IN2");
 14580                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14438                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14584                     if (IN2_param_value == NULL)
 14442                     if (IN2_param_value == NULL)
 14585                       IN2_param_value = function_call_param_iterator.next();
 14443                       IN2_param_value = function_call_param_iterator.next();
 14586                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14444                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14587                     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 ;
 14445                     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 ;
 14588                     
 14446                     
 14589                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 14447                     if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14590                     {
 14448                     {
 14591                 
 14449                 
 14592                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14450                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14593                         s4o.print("__time_sub(");
 14451                         s4o.print("__time_sub(");
 14594                         IN1_param_value->accept(*this);
 14452                         IN1_param_value->accept(*this);
 14597                         s4o.print(")");
 14455                         s4o.print(")");
 14598                         return NULL;
 14456                         return NULL;
 14599                         
 14457                         
 14600                     }
 14458                     }
 14601                     
 14459                     
 14602                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14460                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14603                     {
 14461                     {
 14604                 
 14462                 
 14605                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14463                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14606                         s4o.print("__time_sub(");
 14464                         s4o.print("__time_sub(");
 14607                         IN1_param_value->accept(*this);
 14465                         IN1_param_value->accept(*this);
 14615                     ERROR;
 14473                     ERROR;
 14616                 }
 14474                 }
 14617                 
 14475                 
 14618             }
 14476             }
 14619             
 14477             
 14620             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 14478             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14621             {
 14479             {
 14622         
 14480         
 14623                 {
 14481                 {
 14624                     identifier_c param_name("IN2");
 14482                     identifier_c param_name("IN2");
 14625                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14483                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14629                     if (IN2_param_value == NULL)
 14487                     if (IN2_param_value == NULL)
 14630                       IN2_param_value = function_call_param_iterator.next();
 14488                       IN2_param_value = function_call_param_iterator.next();
 14631                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14489                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14632                     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 ;
 14490                     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 ;
 14633                     
 14491                     
 14634                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 14492                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14635                     {
 14493                     {
 14636                 
 14494                 
 14637                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14495                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14638                         s4o.print("__time_sub(");
 14496                         s4o.print("__time_sub(");
 14639                         IN1_param_value->accept(*this);
 14497                         IN1_param_value->accept(*this);
 14642                         s4o.print(")");
 14500                         s4o.print(")");
 14643                         return NULL;
 14501                         return NULL;
 14644                         
 14502                         
 14645                     }
 14503                     }
 14646                     
 14504                     
 14647                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14505                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14648                     {
 14506                     {
 14649                 
 14507                 
 14650                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14508                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14651                         s4o.print("__time_sub(");
 14509                         s4o.print("__time_sub(");
 14652                         IN1_param_value->accept(*this);
 14510                         IN1_param_value->accept(*this);
 14660                     ERROR;
 14518                     ERROR;
 14661                 }
 14519                 }
 14662                 
 14520                 
 14663             }
 14521             }
 14664             
 14522             
 14665             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14523             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14666             {
 14524             {
 14667         
 14525         
 14668                 {
 14526                 {
 14669                     identifier_c param_name("IN2");
 14527                     identifier_c param_name("IN2");
 14670                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14528                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14674                     if (IN2_param_value == NULL)
 14532                     if (IN2_param_value == NULL)
 14675                       IN2_param_value = function_call_param_iterator.next();
 14533                       IN2_param_value = function_call_param_iterator.next();
 14676                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14534                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14677                     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 ;
 14535                     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 ;
 14678                     
 14536                     
 14679                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14537                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14680                     {
 14538                     {
 14681                 
 14539                 
 14682                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14540                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14683                         s4o.print("__time_sub(");
 14541                         s4o.print("__time_sub(");
 14684                         IN1_param_value->accept(*this);
 14542                         IN1_param_value->accept(*this);
 14734                     
 14592                     
 14735                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14593                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14736                     {
 14594                     {
 14737                 
 14595                 
 14738                         symbol_c * return_type_symbol = last_type_symbol;
 14596                         symbol_c * return_type_symbol = last_type_symbol;
 14739                         s4o.print("(");
 14597                         s4o.indent_right();
       
 14598                         s4o.print("(\n" + s4o.indent_spaces);
 14740                         IN1_param_value->accept(*this);
 14599                         IN1_param_value->accept(*this);
 14741                         s4o.print("/");
 14600                         s4o.print("/\n" + s4o.indent_spaces);
 14742                         IN2_param_value->accept(*this);
 14601                         IN2_param_value->accept(*this);
 14743                         s4o.print(")");
 14602                         s4o.print(")");
       
 14603                         s4o.indent_left();
 14744                         return NULL;
 14604                         return NULL;
 14745                         
 14605                         
 14746                     }
 14606                     }
 14747                     
 14607                     
 14748                     ERROR;
 14608                     ERROR;
 14749                 }
 14609                 }
 14750                 
 14610                 
 14751             }
 14611             }
 14752             
 14612             
 14753             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 14613             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14754             {
 14614             {
 14755         
 14615         
 14756                 {
 14616                 {
 14757                     identifier_c param_name("IN2");
 14617                     identifier_c param_name("IN2");
 14758                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14618                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14822                     
 14682                     
 14823                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14683                     if(search_expression_type->is_num_type(IN2_type_symbol))
 14824                     {
 14684                     {
 14825                 
 14685                 
 14826                         symbol_c * return_type_symbol = last_type_symbol;
 14686                         symbol_c * return_type_symbol = last_type_symbol;
 14827                         s4o.print("(");
 14687                         s4o.indent_right();
       
 14688                         s4o.print("(\n" + s4o.indent_spaces);
 14828                         IN1_param_value->accept(*this);
 14689                         IN1_param_value->accept(*this);
 14829                         s4o.print("%");
 14690                         s4o.print("%\n" + s4o.indent_spaces);
 14830                         IN2_param_value->accept(*this);
 14691                         IN2_param_value->accept(*this);
 14831                         s4o.print(")");
 14692                         s4o.print(")");
       
 14693                         s4o.indent_left();
 14832                         return NULL;
 14694                         return NULL;
 14833                         
 14695                         
 14834                     }
 14696                     }
 14835                     
 14697                     
 14836                     ERROR;
 14698                     ERROR;
 15191                     
 15053                     
 15192                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15054                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15193                     {
 15055                     {
 15194                 
 15056                 
 15195                         symbol_c * return_type_symbol = last_type_symbol;
 15057                         symbol_c * return_type_symbol = last_type_symbol;
       
 15058                         s4o.indent_right();
 15196                         s4o.print("(");
 15059                         s4o.print("(");
 15197                         if (search_expression_type->is_bool_type(last_type_symbol))
 15060                         if (search_expression_type->is_bool_type(last_type_symbol))
 15198                           s4o.print("(");
 15061                           s4o.print("(\n" + s4o.indent_spaces);
 15199                         IN1_param_value->accept(*this);
 15062                         IN1_param_value->accept(*this);
 15200                         s4o.print("&");
 15063                         s4o.print("&\n" + s4o.indent_spaces);
 15201                         IN2_param_value->accept(*this);
 15064                         IN2_param_value->accept(*this);
 15202                         
 15065                         
 15203                         int base_num = 3;
 15066                         int base_num = 3;
 15204                         symbol_c *param_value = NULL;
 15067                         symbol_c *param_value = NULL;
 15205                         do{
 15068                         do{
 15216                             if (param_value != NULL){
 15079                             if (param_value != NULL){
 15217                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15080                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15218                                 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 ;
 15081                                 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 ;
 15219                             
 15082                             
 15220                                 /*Function specific CODE */
 15083                                 /*Function specific CODE */
 15221                                 s4o.print("&");
 15084                                 s4o.print("&\n" + s4o.indent_spaces);
 15222                                 param_value->accept(*this);
 15085                                 param_value->accept(*this);
 15223                                 
 15086                                 
 15224                             }
 15087                             }
 15225                             
 15088                             
 15226                         }while(param_value != NULL);
 15089                         }while(param_value != NULL);
 15228                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15091                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15229                           s4o.print("&1");
 15092                           s4o.print("&1");
 15230                           s4o.print(")");
 15093                           s4o.print(")");
 15231                         }
 15094                         }
 15232                         s4o.print("");
 15095                         s4o.print("");
       
 15096                         s4o.indent_left();
 15233                         return NULL;
 15097                         return NULL;
 15234                         
 15098                         
 15235                         
 15099                         
 15236                     }
 15100                     }
 15237                     
 15101                     
 15280                     
 15144                     
 15281                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15145                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15282                     {
 15146                     {
 15283                 
 15147                 
 15284                         symbol_c * return_type_symbol = last_type_symbol;
 15148                         symbol_c * return_type_symbol = last_type_symbol;
       
 15149                         s4o.indent_right();
 15285                         s4o.print("(");
 15150                         s4o.print("(");
 15286                         if (search_expression_type->is_bool_type(last_type_symbol))
 15151                         if (search_expression_type->is_bool_type(last_type_symbol))
 15287                           s4o.print("(");
 15152                           s4o.print("(\n" + s4o.indent_spaces);
 15288                         IN1_param_value->accept(*this);
 15153                         IN1_param_value->accept(*this);
 15289                         s4o.print("|");
 15154                         s4o.print("|\n" + s4o.indent_spaces);
 15290                         IN2_param_value->accept(*this);
 15155                         IN2_param_value->accept(*this);
 15291                         
 15156                         
 15292                         int base_num = 3;
 15157                         int base_num = 3;
 15293                         symbol_c *param_value = NULL;
 15158                         symbol_c *param_value = NULL;
 15294                         do{
 15159                         do{
 15305                             if (param_value != NULL){
 15170                             if (param_value != NULL){
 15306                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15171                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15307                                 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 ;
 15172                                 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 ;
 15308                             
 15173                             
 15309                                 /*Function specific CODE */
 15174                                 /*Function specific CODE */
 15310                                 s4o.print("|");
 15175                                 s4o.print("|\n" + s4o.indent_spaces);
 15311                                 param_value->accept(*this);
 15176                                 param_value->accept(*this);
 15312                                 
 15177                                 
 15313                             }
 15178                             }
 15314                             
 15179                             
 15315                         }while(param_value != NULL);
 15180                         }while(param_value != NULL);
 15317                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15182                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15318                           s4o.print("&1");
 15183                           s4o.print("&1");
 15319                           s4o.print(")");
 15184                           s4o.print(")");
 15320                         }
 15185                         }
 15321                         s4o.print("");
 15186                         s4o.print("");
       
 15187                         s4o.indent_left();
 15322                         return NULL;
 15188                         return NULL;
 15323                         
 15189                         
 15324                         
 15190                         
 15325                     }
 15191                     }
 15326                     
 15192                     
 15369                     
 15235                     
 15370                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15236                     if(search_expression_type->is_binary_type(IN2_type_symbol))
 15371                     {
 15237                     {
 15372                 
 15238                 
 15373                         symbol_c * return_type_symbol = last_type_symbol;
 15239                         symbol_c * return_type_symbol = last_type_symbol;
       
 15240                         s4o.indent_right();
 15374                         s4o.print("(");
 15241                         s4o.print("(");
 15375                         if (search_expression_type->is_bool_type(last_type_symbol))
 15242                         if (search_expression_type->is_bool_type(last_type_symbol))
 15376                           s4o.print("(");
 15243                           s4o.print("(\n" + s4o.indent_spaces);
 15377                         IN1_param_value->accept(*this);
 15244                         IN1_param_value->accept(*this);
 15378                         s4o.print("^");
 15245                         s4o.print("^\n" + s4o.indent_spaces);
 15379                         IN2_param_value->accept(*this);
 15246                         IN2_param_value->accept(*this);
 15380                         
 15247                         
 15381                         int base_num = 3;
 15248                         int base_num = 3;
 15382                         symbol_c *param_value = NULL;
 15249                         symbol_c *param_value = NULL;
 15383                         do{
 15250                         do{
 15394                             if (param_value != NULL){
 15261                             if (param_value != NULL){
 15395                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15262                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15396                                 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 ;
 15263                                 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 ;
 15397                             
 15264                             
 15398                                 /*Function specific CODE */
 15265                                 /*Function specific CODE */
 15399                                 s4o.print("^");
 15266                                 s4o.print("^\n" + s4o.indent_spaces);
 15400                                 param_value->accept(*this);
 15267                                 param_value->accept(*this);
 15401                                 
 15268                                 
 15402                             }
 15269                             }
 15403                             
 15270                             
 15404                         }while(param_value != NULL);
 15271                         }while(param_value != NULL);
 15406                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15273                         if (search_expression_type->is_bool_type(last_type_symbol)) {
 15407                           s4o.print("&1");
 15274                           s4o.print("&1");
 15408                           s4o.print(")");
 15275                           s4o.print(")");
 15409                         }
 15276                         }
 15410                         s4o.print("");
 15277                         s4o.print("");
       
 15278                         s4o.indent_left();
 15411                         return NULL;
 15279                         return NULL;
 15412                         
 15280                         
 15413                         
 15281                         
 15414                     }
 15282                     }
 15415                     
 15283                     
 15474             if (G_param_value == NULL)
 15342             if (G_param_value == NULL)
 15475               G_param_value = function_call_param_iterator.next();
 15343               G_param_value = function_call_param_iterator.next();
 15476             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 15344             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 15477             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 ;
 15345             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 ;
 15478             
 15346             
 15479             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 15347             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15480             {
 15348             {
 15481         
 15349         
 15482                 {
 15350                 {
 15483                     identifier_c param_name("IN0");
 15351                     identifier_c param_name("IN0");
 15484                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15352                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15567                     
 15435                     
 15568                     
 15436                     
 15569                     {
 15437                     {
 15570                 
 15438                 
 15571                         symbol_c * return_type_symbol = last_type_symbol;
 15439                         symbol_c * return_type_symbol = last_type_symbol;
       
 15440                         s4o.indent_right();
 15572                         s4o.print("__max_");
 15441                         s4o.print("__max_");
 15573                         return_type_symbol->accept(*this);
 15442                         return_type_symbol->accept(*this);
 15574                         s4o.print("(");
 15443                         s4o.print("(");
 15575                         s4o.print_integer(nb_param);
 15444                         s4o.print_integer(nb_param);
 15576                         s4o.print(",");
 15445                         s4o.print(",\n" + s4o.indent_spaces);
 15577                         IN1_param_value->accept(*this);
 15446                         IN1_param_value->accept(*this);
 15578                         s4o.print(",");
 15447                         s4o.print(",\n" + s4o.indent_spaces);
 15579                         IN2_param_value->accept(*this);
 15448                         IN2_param_value->accept(*this);
 15580                         
 15449                         
 15581                         int base_num = 3;
 15450                         int base_num = 3;
 15582                         symbol_c *param_value = NULL;
 15451                         symbol_c *param_value = NULL;
 15583                         do{
 15452                         do{
 15594                             if (param_value != NULL){
 15463                             if (param_value != NULL){
 15595                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15464                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15596                                 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 ;
 15465                                 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 ;
 15597                             
 15466                             
 15598                                 /*Function specific CODE */
 15467                                 /*Function specific CODE */
 15599                                 s4o.print(",");
 15468                                 s4o.print(",\n" + s4o.indent_spaces);
 15600                                 param_value->accept(*this);
 15469                                 param_value->accept(*this);
 15601                                 
 15470                                 
 15602                             }
 15471                             }
 15603                             
 15472                             
 15604                         }while(param_value != NULL);
 15473                         }while(param_value != NULL);
 15605                         s4o.print(")");
 15474                         s4o.print(")");
       
 15475                         s4o.indent_left();
 15606                         return NULL;
 15476                         return NULL;
 15607                         
 15477                         
 15608                         
 15478                         
 15609                     }
 15479                     }
 15610                     
 15480                     
 15653                     
 15523                     
 15654                     
 15524                     
 15655                     {
 15525                     {
 15656                 
 15526                 
 15657                         symbol_c * return_type_symbol = last_type_symbol;
 15527                         symbol_c * return_type_symbol = last_type_symbol;
       
 15528                         s4o.indent_right();
 15658                         s4o.print("__min_");
 15529                         s4o.print("__min_");
 15659                         return_type_symbol->accept(*this);
 15530                         return_type_symbol->accept(*this);
 15660                         s4o.print("(");
 15531                         s4o.print("(");
 15661                         s4o.print_integer(nb_param);
 15532                         s4o.print_integer(nb_param);
 15662                         s4o.print(",");
 15533                         s4o.print(",\n" + s4o.indent_spaces);
 15663                         IN1_param_value->accept(*this);
 15534                         IN1_param_value->accept(*this);
 15664                         s4o.print(",");
 15535                         s4o.print(",\n" + s4o.indent_spaces);
 15665                         IN2_param_value->accept(*this);
 15536                         IN2_param_value->accept(*this);
 15666                         
 15537                         
 15667                         int base_num = 3;
 15538                         int base_num = 3;
 15668                         symbol_c *param_value = NULL;
 15539                         symbol_c *param_value = NULL;
 15669                         do{
 15540                         do{
 15680                             if (param_value != NULL){
 15551                             if (param_value != NULL){
 15681                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15552                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15682                                 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 ;
 15553                                 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 ;
 15683                             
 15554                             
 15684                                 /*Function specific CODE */
 15555                                 /*Function specific CODE */
 15685                                 s4o.print(",");
 15556                                 s4o.print(",\n" + s4o.indent_spaces);
 15686                                 param_value->accept(*this);
 15557                                 param_value->accept(*this);
 15687                                 
 15558                                 
 15688                             }
 15559                             }
 15689                             
 15560                             
 15690                         }while(param_value != NULL);
 15561                         }while(param_value != NULL);
 15691                         s4o.print(")");
 15562                         s4o.print(")");
       
 15563                         s4o.indent_left();
 15692                         return NULL;
 15564                         return NULL;
 15693                         
 15565                         
 15694                         
 15566                         
 15695                     }
 15567                     }
 15696                     
 15568                     
 15832                             
 15704                             
 15833                             
 15705                             
 15834                             {
 15706                             {
 15835                         
 15707                         
 15836                                 symbol_c * return_type_symbol = last_type_symbol;
 15708                                 symbol_c * return_type_symbol = last_type_symbol;
       
 15709                                 s4o.indent_right();
 15837                                 s4o.print("__mux_");
 15710                                 s4o.print("__mux_");
 15838                                 return_type_symbol->accept(*this);
 15711                                 return_type_symbol->accept(*this);
 15839                                 s4o.print("(");
 15712                                 s4o.print("(");
 15840                                 s4o.print_integer(nb_param);
 15713                                 s4o.print_integer(nb_param);
 15841                                 s4o.print(",");
 15714                                 s4o.print(",\n" + s4o.indent_spaces);
 15842                                 K_param_value->accept(*this);
 15715                                 K_param_value->accept(*this);
 15843                                 s4o.print(",");
 15716                                 s4o.print(",\n" + s4o.indent_spaces);
 15844                                 IN0_param_value->accept(*this);
 15717                                 IN0_param_value->accept(*this);
 15845                                 s4o.print(",");
 15718                                 s4o.print(",\n" + s4o.indent_spaces);
 15846                                 IN1_param_value->accept(*this);
 15719                                 IN1_param_value->accept(*this);
 15847                                 
 15720                                 
 15848                                 int base_num = 2;
 15721                                 int base_num = 2;
 15849                                 symbol_c *param_value = NULL;
 15722                                 symbol_c *param_value = NULL;
 15850                                 do{
 15723                                 do{
 15861                                     if (param_value != NULL){
 15734                                     if (param_value != NULL){
 15862                                         symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15735                                         symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15863                                         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 ;
 15736                                         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 ;
 15864                                     
 15737                                     
 15865                                         /*Function specific CODE */
 15738                                         /*Function specific CODE */
 15866                                         s4o.print(",");
 15739                                         s4o.print(",\n" + s4o.indent_spaces);
 15867                                         param_value->accept(*this);
 15740                                         param_value->accept(*this);
 15868                                         
 15741                                         
 15869                                     }
 15742                                     }
 15870                                     
 15743                                     
 15871                                 }while(param_value != NULL);
 15744                                 }while(param_value != NULL);
 15872                                 s4o.print(")");
 15745                                 s4o.print(")");
       
 15746                                 s4o.indent_left();
 15873                                 return NULL;
 15747                                 return NULL;
 15874                                 
 15748                                 
 15875                                 
 15749                                 
 15876                             }
 15750                             }
 15877                             
 15751                             
 15925                     
 15799                     
 15926                     
 15800                     
 15927                     {
 15801                     {
 15928                 
 15802                 
 15929                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15803                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15804                         s4o.indent_right();
 15930                         s4o.print("__gt_");
 15805                         s4o.print("__gt_");
 15931                         return_type_symbol->accept(*this);
 15806                         return_type_symbol->accept(*this);
 15932                         s4o.print("(");
 15807                         s4o.print("(");
 15933                         s4o.print_integer(nb_param);
 15808                         s4o.print_integer(nb_param);
 15934                         s4o.print(",");
 15809                         s4o.print(",\n" + s4o.indent_spaces);
 15935                         IN1_param_value->accept(*this);
 15810                         IN1_param_value->accept(*this);
 15936                         s4o.print(",");
 15811                         s4o.print(",\n" + s4o.indent_spaces);
 15937                         IN2_param_value->accept(*this);
 15812                         IN2_param_value->accept(*this);
 15938                         
 15813                         
 15939                         int base_num = 3;
 15814                         int base_num = 3;
 15940                         symbol_c *param_value = NULL;
 15815                         symbol_c *param_value = NULL;
 15941                         do{
 15816                         do{
 15952                             if (param_value != NULL){
 15827                             if (param_value != NULL){
 15953                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15828                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15954                                 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 ;
 15829                                 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 ;
 15955                             
 15830                             
 15956                                 /*Function specific CODE */
 15831                                 /*Function specific CODE */
 15957                                 s4o.print(",");
 15832                                 s4o.print(",\n" + s4o.indent_spaces);
 15958                                 param_value->accept(*this);
 15833                                 param_value->accept(*this);
 15959                                 
 15834                                 
 15960                             }
 15835                             }
 15961                             
 15836                             
 15962                         }while(param_value != NULL);
 15837                         }while(param_value != NULL);
 15963                         s4o.print(")");
 15838                         s4o.print(")");
       
 15839                         s4o.indent_left();
 15964                         return NULL;
 15840                         return NULL;
 15965                         
 15841                         
 15966                         
 15842                         
 15967                     }
 15843                     }
 15968                     
 15844                     
 16011                     
 15887                     
 16012                     
 15888                     
 16013                     {
 15889                     {
 16014                 
 15890                 
 16015                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15891                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15892                         s4o.indent_right();
 16016                         s4o.print("__ge_");
 15893                         s4o.print("__ge_");
 16017                         return_type_symbol->accept(*this);
 15894                         return_type_symbol->accept(*this);
 16018                         s4o.print("(");
 15895                         s4o.print("(");
 16019                         s4o.print_integer(nb_param);
 15896                         s4o.print_integer(nb_param);
 16020                         s4o.print(",");
 15897                         s4o.print(",\n" + s4o.indent_spaces);
 16021                         IN1_param_value->accept(*this);
 15898                         IN1_param_value->accept(*this);
 16022                         s4o.print(",");
 15899                         s4o.print(",\n" + s4o.indent_spaces);
 16023                         IN2_param_value->accept(*this);
 15900                         IN2_param_value->accept(*this);
 16024                         
 15901                         
 16025                         int base_num = 3;
 15902                         int base_num = 3;
 16026                         symbol_c *param_value = NULL;
 15903                         symbol_c *param_value = NULL;
 16027                         do{
 15904                         do{
 16038                             if (param_value != NULL){
 15915                             if (param_value != NULL){
 16039                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 15916                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16040                                 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 ;
 15917                                 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 ;
 16041                             
 15918                             
 16042                                 /*Function specific CODE */
 15919                                 /*Function specific CODE */
 16043                                 s4o.print(",");
 15920                                 s4o.print(",\n" + s4o.indent_spaces);
 16044                                 param_value->accept(*this);
 15921                                 param_value->accept(*this);
 16045                                 
 15922                                 
 16046                             }
 15923                             }
 16047                             
 15924                             
 16048                         }while(param_value != NULL);
 15925                         }while(param_value != NULL);
 16049                         s4o.print(")");
 15926                         s4o.print(")");
       
 15927                         s4o.indent_left();
 16050                         return NULL;
 15928                         return NULL;
 16051                         
 15929                         
 16052                         
 15930                         
 16053                     }
 15931                     }
 16054                     
 15932                     
 16097                     
 15975                     
 16098                     
 15976                     
 16099                     {
 15977                     {
 16100                 
 15978                 
 16101                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15979                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15980                         s4o.indent_right();
 16102                         s4o.print("__eq_");
 15981                         s4o.print("__eq_");
 16103                         return_type_symbol->accept(*this);
 15982                         return_type_symbol->accept(*this);
 16104                         s4o.print("(");
 15983                         s4o.print("(");
 16105                         s4o.print_integer(nb_param);
 15984                         s4o.print_integer(nb_param);
 16106                         s4o.print(",");
 15985                         s4o.print(",\n" + s4o.indent_spaces);
 16107                         IN1_param_value->accept(*this);
 15986                         IN1_param_value->accept(*this);
 16108                         s4o.print(",");
 15987                         s4o.print(",\n" + s4o.indent_spaces);
 16109                         IN2_param_value->accept(*this);
 15988                         IN2_param_value->accept(*this);
 16110                         
 15989                         
 16111                         int base_num = 3;
 15990                         int base_num = 3;
 16112                         symbol_c *param_value = NULL;
 15991                         symbol_c *param_value = NULL;
 16113                         do{
 15992                         do{
 16124                             if (param_value != NULL){
 16003                             if (param_value != NULL){
 16125                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16004                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16126                                 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 ;
 16005                                 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 ;
 16127                             
 16006                             
 16128                                 /*Function specific CODE */
 16007                                 /*Function specific CODE */
 16129                                 s4o.print(",");
 16008                                 s4o.print(",\n" + s4o.indent_spaces);
 16130                                 param_value->accept(*this);
 16009                                 param_value->accept(*this);
 16131                                 
 16010                                 
 16132                             }
 16011                             }
 16133                             
 16012                             
 16134                         }while(param_value != NULL);
 16013                         }while(param_value != NULL);
 16135                         s4o.print(")");
 16014                         s4o.print(")");
       
 16015                         s4o.indent_left();
 16136                         return NULL;
 16016                         return NULL;
 16137                         
 16017                         
 16138                         
 16018                         
 16139                     }
 16019                     }
 16140                     
 16020                     
 16183                     
 16063                     
 16184                     
 16064                     
 16185                     {
 16065                     {
 16186                 
 16066                 
 16187                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16067                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16068                         s4o.indent_right();
 16188                         s4o.print("__lt_");
 16069                         s4o.print("__lt_");
 16189                         return_type_symbol->accept(*this);
 16070                         return_type_symbol->accept(*this);
 16190                         s4o.print("(");
 16071                         s4o.print("(");
 16191                         s4o.print_integer(nb_param);
 16072                         s4o.print_integer(nb_param);
 16192                         s4o.print(",");
 16073                         s4o.print(",\n" + s4o.indent_spaces);
 16193                         IN1_param_value->accept(*this);
 16074                         IN1_param_value->accept(*this);
 16194                         s4o.print(",");
 16075                         s4o.print(",\n" + s4o.indent_spaces);
 16195                         IN2_param_value->accept(*this);
 16076                         IN2_param_value->accept(*this);
 16196                         
 16077                         
 16197                         int base_num = 3;
 16078                         int base_num = 3;
 16198                         symbol_c *param_value = NULL;
 16079                         symbol_c *param_value = NULL;
 16199                         do{
 16080                         do{
 16210                             if (param_value != NULL){
 16091                             if (param_value != NULL){
 16211                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16092                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16212                                 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 ;
 16093                                 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 ;
 16213                             
 16094                             
 16214                                 /*Function specific CODE */
 16095                                 /*Function specific CODE */
 16215                                 s4o.print(",");
 16096                                 s4o.print(",\n" + s4o.indent_spaces);
 16216                                 param_value->accept(*this);
 16097                                 param_value->accept(*this);
 16217                                 
 16098                                 
 16218                             }
 16099                             }
 16219                             
 16100                             
 16220                         }while(param_value != NULL);
 16101                         }while(param_value != NULL);
 16221                         s4o.print(")");
 16102                         s4o.print(")");
       
 16103                         s4o.indent_left();
 16222                         return NULL;
 16104                         return NULL;
 16223                         
 16105                         
 16224                         
 16106                         
 16225                     }
 16107                     }
 16226                     
 16108                     
 16269                     
 16151                     
 16270                     
 16152                     
 16271                     {
 16153                     {
 16272                 
 16154                 
 16273                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16155                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16156                         s4o.indent_right();
 16274                         s4o.print("__le_");
 16157                         s4o.print("__le_");
 16275                         return_type_symbol->accept(*this);
 16158                         return_type_symbol->accept(*this);
 16276                         s4o.print("(");
 16159                         s4o.print("(");
 16277                         s4o.print_integer(nb_param);
 16160                         s4o.print_integer(nb_param);
 16278                         s4o.print(",");
 16161                         s4o.print(",\n" + s4o.indent_spaces);
 16279                         IN1_param_value->accept(*this);
 16162                         IN1_param_value->accept(*this);
 16280                         s4o.print(",");
 16163                         s4o.print(",\n" + s4o.indent_spaces);
 16281                         IN2_param_value->accept(*this);
 16164                         IN2_param_value->accept(*this);
 16282                         
 16165                         
 16283                         int base_num = 3;
 16166                         int base_num = 3;
 16284                         symbol_c *param_value = NULL;
 16167                         symbol_c *param_value = NULL;
 16285                         do{
 16168                         do{
 16296                             if (param_value != NULL){
 16179                             if (param_value != NULL){
 16297                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16180                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16298                                 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 ;
 16181                                 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 ;
 16299                             
 16182                             
 16300                                 /*Function specific CODE */
 16183                                 /*Function specific CODE */
 16301                                 s4o.print(",");
 16184                                 s4o.print(",\n" + s4o.indent_spaces);
 16302                                 param_value->accept(*this);
 16185                                 param_value->accept(*this);
 16303                                 
 16186                                 
 16304                             }
 16187                             }
 16305                             
 16188                             
 16306                         }while(param_value != NULL);
 16189                         }while(param_value != NULL);
 16307                         s4o.print(")");
 16190                         s4o.print(")");
       
 16191                         s4o.indent_left();
 16308                         return NULL;
 16192                         return NULL;
 16309                         
 16193                         
 16310                         
 16194                         
 16311                     }
 16195                     }
 16312                     
 16196                     
 16355                     
 16239                     
 16356                     
 16240                     
 16357                     {
 16241                     {
 16358                 
 16242                 
 16359                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16243                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16244                         s4o.indent_right();
 16360                         s4o.print("__ne_");
 16245                         s4o.print("__ne_");
 16361                         return_type_symbol->accept(*this);
 16246                         return_type_symbol->accept(*this);
 16362                         s4o.print("(");
 16247                         s4o.print("(");
 16363                         s4o.print_integer(nb_param);
 16248                         s4o.print_integer(nb_param);
 16364                         s4o.print(",");
 16249                         s4o.print(",\n" + s4o.indent_spaces);
 16365                         IN1_param_value->accept(*this);
 16250                         IN1_param_value->accept(*this);
 16366                         s4o.print(",");
 16251                         s4o.print(",\n" + s4o.indent_spaces);
 16367                         IN2_param_value->accept(*this);
 16252                         IN2_param_value->accept(*this);
 16368                         
 16253                         
 16369                         int base_num = 3;
 16254                         int base_num = 3;
 16370                         symbol_c *param_value = NULL;
 16255                         symbol_c *param_value = NULL;
 16371                         do{
 16256                         do{
 16382                             if (param_value != NULL){
 16267                             if (param_value != NULL){
 16383                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16268                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16384                                 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 ;
 16269                                 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 ;
 16385                             
 16270                             
 16386                                 /*Function specific CODE */
 16271                                 /*Function specific CODE */
 16387                                 s4o.print(",");
 16272                                 s4o.print(",\n" + s4o.indent_spaces);
 16388                                 param_value->accept(*this);
 16273                                 param_value->accept(*this);
 16389                                 
 16274                                 
 16390                             }
 16275                             }
 16391                             
 16276                             
 16392                         }while(param_value != NULL);
 16277                         }while(param_value != NULL);
 16393                         s4o.print(")");
 16278                         s4o.print(")");
       
 16279                         s4o.indent_left();
 16394                         return NULL;
 16280                         return NULL;
 16395                         
 16281                         
 16396                         
 16282                         
 16397                     }
 16283                     }
 16398                     
 16284                     
 16423             if (IN_param_value == NULL)
 16309             if (IN_param_value == NULL)
 16424               IN_param_value = function_call_param_iterator.next();
 16310               IN_param_value = function_call_param_iterator.next();
 16425             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16311             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16426             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16312             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16427             
 16313             
 16428             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16314             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16429             {
 16315             {
 16430         
 16316         
 16431                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16317                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16432                 s4o.print("__len(");
 16318                 s4o.print("__len(");
 16433                 IN_param_value->accept(*this);
 16319                 IN_param_value->accept(*this);
 16458             if (IN_param_value == NULL)
 16344             if (IN_param_value == NULL)
 16459               IN_param_value = function_call_param_iterator.next();
 16345               IN_param_value = function_call_param_iterator.next();
 16460             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16346             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16461             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16347             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16462             
 16348             
 16463             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16349             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16464             {
 16350             {
 16465         
 16351         
 16466                 {
 16352                 {
 16467                     identifier_c param_name("L");
 16353                     identifier_c param_name("L");
 16468                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16354                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16514             if (IN_param_value == NULL)
 16400             if (IN_param_value == NULL)
 16515               IN_param_value = function_call_param_iterator.next();
 16401               IN_param_value = function_call_param_iterator.next();
 16516             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16402             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16517             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
 16518             
 16404             
 16519             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16405             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16520             {
 16406             {
 16521         
 16407         
 16522                 {
 16408                 {
 16523                     identifier_c param_name("L");
 16409                     identifier_c param_name("L");
 16524                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16410                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16570             if (IN_param_value == NULL)
 16456             if (IN_param_value == NULL)
 16571               IN_param_value = function_call_param_iterator.next();
 16457               IN_param_value = function_call_param_iterator.next();
 16572             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16458             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16573             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16459             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16574             
 16460             
 16575             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16461             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16576             {
 16462             {
 16577         
 16463         
 16578                 {
 16464                 {
 16579                     identifier_c param_name("L");
 16465                     identifier_c param_name("L");
 16580                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16466                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16647             if (IN1_param_value == NULL)
 16533             if (IN1_param_value == NULL)
 16648               IN1_param_value = function_call_param_iterator.next();
 16534               IN1_param_value = function_call_param_iterator.next();
 16649             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16535             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16650             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 ;
 16536             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 ;
 16651             
 16537             
 16652             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 16538             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 16653             {
 16539             {
 16654         
 16540         
 16655                 {
 16541                 {
 16656                     identifier_c param_name("IN2");
 16542                     identifier_c param_name("IN2");
 16657                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16543                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16661                     if (IN2_param_value == NULL)
 16547                     if (IN2_param_value == NULL)
 16662                       IN2_param_value = function_call_param_iterator.next();
 16548                       IN2_param_value = function_call_param_iterator.next();
 16663                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16549                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16664                     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 ;
 16550                     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 ;
 16665                     
 16551                     
 16666                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 16552                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 16667                     {
 16553                     {
 16668                 
 16554                 
 16669                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16555                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16670                         s4o.print("__time_add(");
 16556                         s4o.print("__time_add(");
 16671                         IN1_param_value->accept(*this);
 16557                         IN1_param_value->accept(*this);
 16679                     ERROR;
 16565                     ERROR;
 16680                 }
 16566                 }
 16681                 
 16567                 
 16682             }
 16568             }
 16683             
 16569             
 16684             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16570             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16685             {
 16571             {
 16686         
 16572         
 16687                 {
 16573                 {
 16688                     identifier_c param_name("IN2");
 16574                     identifier_c param_name("IN2");
 16689                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16575                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16693                     if (IN2_param_value == NULL)
 16579                     if (IN2_param_value == NULL)
 16694                       IN2_param_value = function_call_param_iterator.next();
 16580                       IN2_param_value = function_call_param_iterator.next();
 16695                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16581                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16696                     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 ;
 16582                     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 ;
 16697                     
 16583                     
 16698                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16584                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16699                     {
 16585                     {
 16700                 
 16586                 
 16701                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16587                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16588                         s4o.indent_right();
 16702                         s4o.print("__concat(");
 16589                         s4o.print("__concat(");
 16703                         s4o.print_integer(nb_param);
 16590                         s4o.print_integer(nb_param);
 16704                         s4o.print(",");
 16591                         s4o.print(",\n" + s4o.indent_spaces);
 16705                         IN1_param_value->accept(*this);
 16592                         IN1_param_value->accept(*this);
 16706                         s4o.print(",");
 16593                         s4o.print(",\n" + s4o.indent_spaces);
 16707                         IN2_param_value->accept(*this);
 16594                         IN2_param_value->accept(*this);
 16708                         
 16595                         
 16709                         int base_num = 3;
 16596                         int base_num = 3;
 16710                         symbol_c *param_value = NULL;
 16597                         symbol_c *param_value = NULL;
 16711                         do{
 16598                         do{
 16722                             if (param_value != NULL){
 16609                             if (param_value != NULL){
 16723                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16610                                 symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
 16724                                 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 ;
 16611                                 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 ;
 16725                             
 16612                             
 16726                                 /*Function specific CODE */
 16613                                 /*Function specific CODE */
 16727                                 s4o.print(",");
 16614                                 s4o.print(",\n" + s4o.indent_spaces);
 16728                                 param_value->accept(*this);
 16615                                 param_value->accept(*this);
 16729                                 
 16616                                 
 16730                             }
 16617                             }
 16731                             
 16618                             
 16732                         }while(param_value != NULL);
 16619                         }while(param_value != NULL);
 16733                         s4o.print(")");
 16620                         s4o.print(")");
       
 16621                         s4o.indent_left();
 16734                         return NULL;
 16622                         return NULL;
 16735                         
 16623                         
 16736                         
 16624                         
 16737                     }
 16625                     }
 16738                     
 16626                     
 16763             if (IN1_param_value == NULL)
 16651             if (IN1_param_value == NULL)
 16764               IN1_param_value = function_call_param_iterator.next();
 16652               IN1_param_value = function_call_param_iterator.next();
 16765             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16653             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16766             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 ;
 16654             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 ;
 16767             
 16655             
 16768             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16656             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16769             {
 16657             {
 16770         
 16658         
 16771                 {
 16659                 {
 16772                     identifier_c param_name("IN2");
 16660                     identifier_c param_name("IN2");
 16773                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16661                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16777                     if (IN2_param_value == NULL)
 16665                     if (IN2_param_value == NULL)
 16778                       IN2_param_value = function_call_param_iterator.next();
 16666                       IN2_param_value = function_call_param_iterator.next();
 16779                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16667                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16780                     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 ;
 16668                     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 ;
 16781                     
 16669                     
 16782                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16670                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16783                     {
 16671                     {
 16784                 
 16672                 
 16785                         {
 16673                         {
 16786                             identifier_c param_name("P");
 16674                             identifier_c param_name("P");
 16787                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16675                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16840             if (IN_param_value == NULL)
 16728             if (IN_param_value == NULL)
 16841               IN_param_value = function_call_param_iterator.next();
 16729               IN_param_value = function_call_param_iterator.next();
 16842             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16730             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 16843             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16731             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 16844             
 16732             
 16845             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16733             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16846             {
 16734             {
 16847         
 16735         
 16848                 {
 16736                 {
 16849                     identifier_c param_name("L");
 16737                     identifier_c param_name("L");
 16850                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16738                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16917             if (IN1_param_value == NULL)
 16805             if (IN1_param_value == NULL)
 16918               IN1_param_value = function_call_param_iterator.next();
 16806               IN1_param_value = function_call_param_iterator.next();
 16919             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16807             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16920             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 ;
 16808             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 ;
 16921             
 16809             
 16922             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16810             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16923             {
 16811             {
 16924         
 16812         
 16925                 {
 16813                 {
 16926                     identifier_c param_name("IN2");
 16814                     identifier_c param_name("IN2");
 16927                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16815                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16931                     if (IN2_param_value == NULL)
 16819                     if (IN2_param_value == NULL)
 16932                       IN2_param_value = function_call_param_iterator.next();
 16820                       IN2_param_value = function_call_param_iterator.next();
 16933                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16821                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16934                     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 ;
 16822                     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 ;
 16935                     
 16823                     
 16936                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16824                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16937                     {
 16825                     {
 16938                 
 16826                 
 16939                         {
 16827                         {
 16940                             identifier_c param_name("L");
 16828                             identifier_c param_name("L");
 16941                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16829                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 17015             if (IN1_param_value == NULL)
 16903             if (IN1_param_value == NULL)
 17016               IN1_param_value = function_call_param_iterator.next();
 16904               IN1_param_value = function_call_param_iterator.next();
 17017             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16905             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 17018             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 ;
 16906             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 ;
 17019             
 16907             
 17020             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16908             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 17021             {
 16909             {
 17022         
 16910         
 17023                 {
 16911                 {
 17024                     identifier_c param_name("IN2");
 16912                     identifier_c param_name("IN2");
 17025                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16913                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 17029                     if (IN2_param_value == NULL)
 16917                     if (IN2_param_value == NULL)
 17030                       IN2_param_value = function_call_param_iterator.next();
 16918                       IN2_param_value = function_call_param_iterator.next();
 17031                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16919                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 17032                     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 ;
 16920                     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 ;
 17033                     
 16921                     
 17034                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 16922                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 17035                     {
 16923                     {
 17036                 
 16924                 
 17037                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16925                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17038                         s4o.print("__find(");
 16926                         s4o.print("__find(");
 17039                         IN1_param_value->accept(*this);
 16927                         IN1_param_value->accept(*this);