stage4/generate_cc/st_code_gen.c
changeset 40 873a5b60a7ea
parent 38 6cce7d14647e
child 41 8998c8b24b60
equal deleted inserted replaced
39:e08c65e27557 40:873a5b60a7ea
     4  * generated code, do not edit by hand
     4  * generated code, do not edit by hand
     5  */
     5  */
     6 switch(current_function_type){
     6 switch(current_function_type){
     7 
     7 
     8 /****
     8 /****
       
     9  *BOOL_TO_SINT
       
    10  */
       
    11     case function_bool_to_sint :
       
    12     {
       
    13         symbol_c *last_type_symbol = NULL;
       
    14 
       
    15         {
       
    16             identifier_c param_name("IN");
       
    17             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    18             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    19             
       
    20             /* Get the value from a foo(<param_value>) style call */
       
    21             if (IN_param_value == NULL)
       
    22               IN_param_value = function_call_param_iterator.next();
       
    23             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    24             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    25             
       
    26             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
    27             {
       
    28         
       
    29                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    30                 s4o.print("(");
       
    31                 return_type_symbol->accept(*this);
       
    32                 s4o.print(")");
       
    33                 IN_param_value->accept(*this);
       
    34                 return NULL;
       
    35                 
       
    36             }
       
    37             
       
    38             ERROR;
       
    39         }
       
    40         
       
    41     }/*function_bool_to_sint*/
       
    42     break;
       
    43 
       
    44 /****
       
    45  *BOOL_TO_INT
       
    46  */
       
    47     case function_bool_to_int :
       
    48     {
       
    49         symbol_c *last_type_symbol = NULL;
       
    50 
       
    51         {
       
    52             identifier_c param_name("IN");
       
    53             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    54             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    55             
       
    56             /* Get the value from a foo(<param_value>) style call */
       
    57             if (IN_param_value == NULL)
       
    58               IN_param_value = function_call_param_iterator.next();
       
    59             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    60             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    61             
       
    62             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
    63             {
       
    64         
       
    65                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
    66                 s4o.print("(");
       
    67                 return_type_symbol->accept(*this);
       
    68                 s4o.print(")");
       
    69                 IN_param_value->accept(*this);
       
    70                 return NULL;
       
    71                 
       
    72             }
       
    73             
       
    74             ERROR;
       
    75         }
       
    76         
       
    77     }/*function_bool_to_int*/
       
    78     break;
       
    79 
       
    80 /****
       
    81  *BOOL_TO_DINT
       
    82  */
       
    83     case function_bool_to_dint :
       
    84     {
       
    85         symbol_c *last_type_symbol = NULL;
       
    86 
       
    87         {
       
    88             identifier_c param_name("IN");
       
    89             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    90             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    91             
       
    92             /* Get the value from a foo(<param_value>) style call */
       
    93             if (IN_param_value == NULL)
       
    94               IN_param_value = function_call_param_iterator.next();
       
    95             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    96             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    97             
       
    98             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
    99             {
       
   100         
       
   101                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   102                 s4o.print("(");
       
   103                 return_type_symbol->accept(*this);
       
   104                 s4o.print(")");
       
   105                 IN_param_value->accept(*this);
       
   106                 return NULL;
       
   107                 
       
   108             }
       
   109             
       
   110             ERROR;
       
   111         }
       
   112         
       
   113     }/*function_bool_to_dint*/
       
   114     break;
       
   115 
       
   116 /****
       
   117  *BOOL_TO_LINT
       
   118  */
       
   119     case function_bool_to_lint :
       
   120     {
       
   121         symbol_c *last_type_symbol = NULL;
       
   122 
       
   123         {
       
   124             identifier_c param_name("IN");
       
   125             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   126             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   127             
       
   128             /* Get the value from a foo(<param_value>) style call */
       
   129             if (IN_param_value == NULL)
       
   130               IN_param_value = function_call_param_iterator.next();
       
   131             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   132             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   133             
       
   134             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   135             {
       
   136         
       
   137                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   138                 s4o.print("(");
       
   139                 return_type_symbol->accept(*this);
       
   140                 s4o.print(")");
       
   141                 IN_param_value->accept(*this);
       
   142                 return NULL;
       
   143                 
       
   144             }
       
   145             
       
   146             ERROR;
       
   147         }
       
   148         
       
   149     }/*function_bool_to_lint*/
       
   150     break;
       
   151 
       
   152 /****
       
   153  *BOOL_TO_USINT
       
   154  */
       
   155     case function_bool_to_usint :
       
   156     {
       
   157         symbol_c *last_type_symbol = NULL;
       
   158 
       
   159         {
       
   160             identifier_c param_name("IN");
       
   161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   162             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   163             
       
   164             /* Get the value from a foo(<param_value>) style call */
       
   165             if (IN_param_value == NULL)
       
   166               IN_param_value = function_call_param_iterator.next();
       
   167             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   168             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   169             
       
   170             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   171             {
       
   172         
       
   173                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   174                 s4o.print("(");
       
   175                 return_type_symbol->accept(*this);
       
   176                 s4o.print(")");
       
   177                 IN_param_value->accept(*this);
       
   178                 return NULL;
       
   179                 
       
   180             }
       
   181             
       
   182             ERROR;
       
   183         }
       
   184         
       
   185     }/*function_bool_to_usint*/
       
   186     break;
       
   187 
       
   188 /****
       
   189  *BOOL_TO_UINT
       
   190  */
       
   191     case function_bool_to_uint :
       
   192     {
       
   193         symbol_c *last_type_symbol = NULL;
       
   194 
       
   195         {
       
   196             identifier_c param_name("IN");
       
   197             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   198             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   199             
       
   200             /* Get the value from a foo(<param_value>) style call */
       
   201             if (IN_param_value == NULL)
       
   202               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   205             
       
   206             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   207             {
       
   208         
       
   209                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   210                 s4o.print("(");
       
   211                 return_type_symbol->accept(*this);
       
   212                 s4o.print(")");
       
   213                 IN_param_value->accept(*this);
       
   214                 return NULL;
       
   215                 
       
   216             }
       
   217             
       
   218             ERROR;
       
   219         }
       
   220         
       
   221     }/*function_bool_to_uint*/
       
   222     break;
       
   223 
       
   224 /****
       
   225  *BOOL_TO_UDINT
       
   226  */
       
   227     case function_bool_to_udint :
       
   228     {
       
   229         symbol_c *last_type_symbol = NULL;
       
   230 
       
   231         {
       
   232             identifier_c param_name("IN");
       
   233             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   234             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   235             
       
   236             /* Get the value from a foo(<param_value>) style call */
       
   237             if (IN_param_value == NULL)
       
   238               IN_param_value = function_call_param_iterator.next();
       
   239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   241             
       
   242             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   243             {
       
   244         
       
   245                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   246                 s4o.print("(");
       
   247                 return_type_symbol->accept(*this);
       
   248                 s4o.print(")");
       
   249                 IN_param_value->accept(*this);
       
   250                 return NULL;
       
   251                 
       
   252             }
       
   253             
       
   254             ERROR;
       
   255         }
       
   256         
       
   257     }/*function_bool_to_udint*/
       
   258     break;
       
   259 
       
   260 /****
       
   261  *BOOL_TO_ULINT
       
   262  */
       
   263     case function_bool_to_ulint :
       
   264     {
       
   265         symbol_c *last_type_symbol = NULL;
       
   266 
       
   267         {
       
   268             identifier_c param_name("IN");
       
   269             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   270             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   271             
       
   272             /* Get the value from a foo(<param_value>) style call */
       
   273             if (IN_param_value == NULL)
       
   274               IN_param_value = function_call_param_iterator.next();
       
   275             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   276             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   277             
       
   278             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   279             {
       
   280         
       
   281                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   282                 s4o.print("(");
       
   283                 return_type_symbol->accept(*this);
       
   284                 s4o.print(")");
       
   285                 IN_param_value->accept(*this);
       
   286                 return NULL;
       
   287                 
       
   288             }
       
   289             
       
   290             ERROR;
       
   291         }
       
   292         
       
   293     }/*function_bool_to_ulint*/
       
   294     break;
       
   295 
       
   296 /****
       
   297  *BOOL_TO_REAL
       
   298  */
       
   299     case function_bool_to_real :
       
   300     {
       
   301         symbol_c *last_type_symbol = NULL;
       
   302 
       
   303         {
       
   304             identifier_c param_name("IN");
       
   305             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   306             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   307             
       
   308             /* Get the value from a foo(<param_value>) style call */
       
   309             if (IN_param_value == NULL)
       
   310               IN_param_value = function_call_param_iterator.next();
       
   311             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   312             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   313             
       
   314             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   315             {
       
   316         
       
   317                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   318                 s4o.print("(");
       
   319                 return_type_symbol->accept(*this);
       
   320                 s4o.print(")");
       
   321                 IN_param_value->accept(*this);
       
   322                 return NULL;
       
   323                 
       
   324             }
       
   325             
       
   326             ERROR;
       
   327         }
       
   328         
       
   329     }/*function_bool_to_real*/
       
   330     break;
       
   331 
       
   332 /****
       
   333  *BOOL_TO_LREAL
       
   334  */
       
   335     case function_bool_to_lreal :
       
   336     {
       
   337         symbol_c *last_type_symbol = NULL;
       
   338 
       
   339         {
       
   340             identifier_c param_name("IN");
       
   341             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   342             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   343             
       
   344             /* Get the value from a foo(<param_value>) style call */
       
   345             if (IN_param_value == NULL)
       
   346               IN_param_value = function_call_param_iterator.next();
       
   347             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   348             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   349             
       
   350             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   351             {
       
   352         
       
   353                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   354                 s4o.print("(");
       
   355                 return_type_symbol->accept(*this);
       
   356                 s4o.print(")");
       
   357                 IN_param_value->accept(*this);
       
   358                 return NULL;
       
   359                 
       
   360             }
       
   361             
       
   362             ERROR;
       
   363         }
       
   364         
       
   365     }/*function_bool_to_lreal*/
       
   366     break;
       
   367 
       
   368 /****
       
   369  *BOOL_TO_TIME
       
   370  */
       
   371     case function_bool_to_time :
       
   372     {
       
   373         symbol_c *last_type_symbol = NULL;
       
   374 
       
   375         {
       
   376             identifier_c param_name("IN");
       
   377             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   378             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   379             
       
   380             /* Get the value from a foo(<param_value>) style call */
       
   381             if (IN_param_value == NULL)
       
   382               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   385             
       
   386             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   387             {
       
   388         
       
   389                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   390                 s4o.print("(");
       
   391                 return_type_symbol->accept(*this);
       
   392                 s4o.print(")__int_to_time(");
       
   393                 IN_param_value->accept(*this);
       
   394                 s4o.print(")");
       
   395                 return NULL;
       
   396                 
       
   397             }
       
   398             
       
   399             ERROR;
       
   400         }
       
   401         
       
   402     }/*function_bool_to_time*/
       
   403     break;
       
   404 
       
   405 /****
       
   406  *BOOL_TO_DATE
       
   407  */
       
   408     case function_bool_to_date :
       
   409     {
       
   410         symbol_c *last_type_symbol = NULL;
       
   411 
       
   412         {
       
   413             identifier_c param_name("IN");
       
   414             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   415             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   416             
       
   417             /* Get the value from a foo(<param_value>) style call */
       
   418             if (IN_param_value == NULL)
       
   419               IN_param_value = function_call_param_iterator.next();
       
   420             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   421             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   422             
       
   423             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   424             {
       
   425         
       
   426                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   427                 s4o.print("(");
       
   428                 return_type_symbol->accept(*this);
       
   429                 s4o.print(")__int_to_time(");
       
   430                 IN_param_value->accept(*this);
       
   431                 s4o.print(")");
       
   432                 return NULL;
       
   433                 
       
   434             }
       
   435             
       
   436             ERROR;
       
   437         }
       
   438         
       
   439     }/*function_bool_to_date*/
       
   440     break;
       
   441 
       
   442 /****
       
   443  *BOOL_TO_TOD
       
   444  */
       
   445     case function_bool_to_tod :
       
   446     {
       
   447         symbol_c *last_type_symbol = NULL;
       
   448 
       
   449         {
       
   450             identifier_c param_name("IN");
       
   451             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   452             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   453             
       
   454             /* Get the value from a foo(<param_value>) style call */
       
   455             if (IN_param_value == NULL)
       
   456               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   459             
       
   460             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   461             {
       
   462         
       
   463                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   464                 s4o.print("(");
       
   465                 return_type_symbol->accept(*this);
       
   466                 s4o.print(")__int_to_time(");
       
   467                 IN_param_value->accept(*this);
       
   468                 s4o.print(")");
       
   469                 return NULL;
       
   470                 
       
   471             }
       
   472             
       
   473             ERROR;
       
   474         }
       
   475         
       
   476     }/*function_bool_to_tod*/
       
   477     break;
       
   478 
       
   479 /****
       
   480  *BOOL_TO_DT
       
   481  */
       
   482     case function_bool_to_dt :
       
   483     {
       
   484         symbol_c *last_type_symbol = NULL;
       
   485 
       
   486         {
       
   487             identifier_c param_name("IN");
       
   488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   490             
       
   491             /* Get the value from a foo(<param_value>) style call */
       
   492             if (IN_param_value == NULL)
       
   493               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   496             
       
   497             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   498             {
       
   499         
       
   500                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   501                 s4o.print("(");
       
   502                 return_type_symbol->accept(*this);
       
   503                 s4o.print(")__int_to_time(");
       
   504                 IN_param_value->accept(*this);
       
   505                 s4o.print(")");
       
   506                 return NULL;
       
   507                 
       
   508             }
       
   509             
       
   510             ERROR;
       
   511         }
       
   512         
       
   513     }/*function_bool_to_dt*/
       
   514     break;
       
   515 
       
   516 /****
       
   517  *BOOL_TO_STRING
       
   518  */
       
   519     case function_bool_to_string :
       
   520     {
       
   521         symbol_c *last_type_symbol = NULL;
       
   522 
       
   523         {
       
   524             identifier_c param_name("IN");
       
   525             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   526             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   527             
       
   528             /* Get the value from a foo(<param_value>) style call */
       
   529             if (IN_param_value == NULL)
       
   530               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   533             
       
   534             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   535             {
       
   536         
       
   537                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   538                 s4o.print("(");
       
   539                 return_type_symbol->accept(*this);
       
   540                 s4o.print(")__bool_to_string(");
       
   541                 IN_param_value->accept(*this);
       
   542                 s4o.print(")");
       
   543                 return NULL;
       
   544                 
       
   545             }
       
   546             
       
   547             ERROR;
       
   548         }
       
   549         
       
   550     }/*function_bool_to_string*/
       
   551     break;
       
   552 
       
   553 /****
       
   554  *BOOL_TO_BYTE
       
   555  */
       
   556     case function_bool_to_byte :
       
   557     {
       
   558         symbol_c *last_type_symbol = NULL;
       
   559 
       
   560         {
       
   561             identifier_c param_name("IN");
       
   562             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   563             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   564             
       
   565             /* Get the value from a foo(<param_value>) style call */
       
   566             if (IN_param_value == NULL)
       
   567               IN_param_value = function_call_param_iterator.next();
       
   568             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   569             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   570             
       
   571             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   572             {
       
   573         
       
   574                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   575                 s4o.print("(");
       
   576                 return_type_symbol->accept(*this);
       
   577                 s4o.print(")");
       
   578                 IN_param_value->accept(*this);
       
   579                 return NULL;
       
   580                 
       
   581             }
       
   582             
       
   583             ERROR;
       
   584         }
       
   585         
       
   586     }/*function_bool_to_byte*/
       
   587     break;
       
   588 
       
   589 /****
       
   590  *BOOL_TO_WORD
       
   591  */
       
   592     case function_bool_to_word :
       
   593     {
       
   594         symbol_c *last_type_symbol = NULL;
       
   595 
       
   596         {
       
   597             identifier_c param_name("IN");
       
   598             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   599             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   600             
       
   601             /* Get the value from a foo(<param_value>) style call */
       
   602             if (IN_param_value == NULL)
       
   603               IN_param_value = function_call_param_iterator.next();
       
   604             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   605             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   606             
       
   607             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   608             {
       
   609         
       
   610                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   611                 s4o.print("(");
       
   612                 return_type_symbol->accept(*this);
       
   613                 s4o.print(")");
       
   614                 IN_param_value->accept(*this);
       
   615                 return NULL;
       
   616                 
       
   617             }
       
   618             
       
   619             ERROR;
       
   620         }
       
   621         
       
   622     }/*function_bool_to_word*/
       
   623     break;
       
   624 
       
   625 /****
       
   626  *BOOL_TO_DWORD
       
   627  */
       
   628     case function_bool_to_dword :
       
   629     {
       
   630         symbol_c *last_type_symbol = NULL;
       
   631 
       
   632         {
       
   633             identifier_c param_name("IN");
       
   634             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   635             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   636             
       
   637             /* Get the value from a foo(<param_value>) style call */
       
   638             if (IN_param_value == NULL)
       
   639               IN_param_value = function_call_param_iterator.next();
       
   640             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   641             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   642             
       
   643             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   644             {
       
   645         
       
   646                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   647                 s4o.print("(");
       
   648                 return_type_symbol->accept(*this);
       
   649                 s4o.print(")");
       
   650                 IN_param_value->accept(*this);
       
   651                 return NULL;
       
   652                 
       
   653             }
       
   654             
       
   655             ERROR;
       
   656         }
       
   657         
       
   658     }/*function_bool_to_dword*/
       
   659     break;
       
   660 
       
   661 /****
       
   662  *BOOL_TO_LWORD
       
   663  */
       
   664     case function_bool_to_lword :
       
   665     {
       
   666         symbol_c *last_type_symbol = NULL;
       
   667 
       
   668         {
       
   669             identifier_c param_name("IN");
       
   670             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   671             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   672             
       
   673             /* Get the value from a foo(<param_value>) style call */
       
   674             if (IN_param_value == NULL)
       
   675               IN_param_value = function_call_param_iterator.next();
       
   676             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   677             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   678             
       
   679             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
   680             {
       
   681         
       
   682                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   683                 s4o.print("(");
       
   684                 return_type_symbol->accept(*this);
       
   685                 s4o.print(")");
       
   686                 IN_param_value->accept(*this);
       
   687                 return NULL;
       
   688                 
       
   689             }
       
   690             
       
   691             ERROR;
       
   692         }
       
   693         
       
   694     }/*function_bool_to_lword*/
       
   695     break;
       
   696 
       
   697 /****
       
   698  *SINT_TO_BOOL
       
   699  */
       
   700     case function_sint_to_bool :
       
   701     {
       
   702         symbol_c *last_type_symbol = NULL;
       
   703 
       
   704         {
       
   705             identifier_c param_name("IN");
       
   706             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   707             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   708             
       
   709             /* Get the value from a foo(<param_value>) style call */
       
   710             if (IN_param_value == NULL)
       
   711               IN_param_value = function_call_param_iterator.next();
       
   712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   713             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   714             
       
   715             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   716             {
       
   717         
       
   718                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   719                 s4o.print("(");
       
   720                 return_type_symbol->accept(*this);
       
   721                 s4o.print(")");
       
   722                 IN_param_value->accept(*this);
       
   723                 return NULL;
       
   724                 
       
   725             }
       
   726             
       
   727             ERROR;
       
   728         }
       
   729         
       
   730     }/*function_sint_to_bool*/
       
   731     break;
       
   732 
       
   733 /****
       
   734  *SINT_TO_INT
       
   735  */
       
   736     case function_sint_to_int :
       
   737     {
       
   738         symbol_c *last_type_symbol = NULL;
       
   739 
       
   740         {
       
   741             identifier_c param_name("IN");
       
   742             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   743             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   744             
       
   745             /* Get the value from a foo(<param_value>) style call */
       
   746             if (IN_param_value == NULL)
       
   747               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   750             
       
   751             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   752             {
       
   753         
       
   754                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   755                 s4o.print("(");
       
   756                 return_type_symbol->accept(*this);
       
   757                 s4o.print(")");
       
   758                 IN_param_value->accept(*this);
       
   759                 return NULL;
       
   760                 
       
   761             }
       
   762             
       
   763             ERROR;
       
   764         }
       
   765         
       
   766     }/*function_sint_to_int*/
       
   767     break;
       
   768 
       
   769 /****
       
   770  *SINT_TO_DINT
       
   771  */
       
   772     case function_sint_to_dint :
       
   773     {
       
   774         symbol_c *last_type_symbol = NULL;
       
   775 
       
   776         {
       
   777             identifier_c param_name("IN");
       
   778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   779             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   780             
       
   781             /* Get the value from a foo(<param_value>) style call */
       
   782             if (IN_param_value == NULL)
       
   783               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   786             
       
   787             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   788             {
       
   789         
       
   790                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   791                 s4o.print("(");
       
   792                 return_type_symbol->accept(*this);
       
   793                 s4o.print(")");
       
   794                 IN_param_value->accept(*this);
       
   795                 return NULL;
       
   796                 
       
   797             }
       
   798             
       
   799             ERROR;
       
   800         }
       
   801         
       
   802     }/*function_sint_to_dint*/
       
   803     break;
       
   804 
       
   805 /****
       
   806  *SINT_TO_LINT
       
   807  */
       
   808     case function_sint_to_lint :
       
   809     {
       
   810         symbol_c *last_type_symbol = NULL;
       
   811 
       
   812         {
       
   813             identifier_c param_name("IN");
       
   814             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   815             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   816             
       
   817             /* Get the value from a foo(<param_value>) style call */
       
   818             if (IN_param_value == NULL)
       
   819               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   822             
       
   823             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   824             {
       
   825         
       
   826                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   827                 s4o.print("(");
       
   828                 return_type_symbol->accept(*this);
       
   829                 s4o.print(")");
       
   830                 IN_param_value->accept(*this);
       
   831                 return NULL;
       
   832                 
       
   833             }
       
   834             
       
   835             ERROR;
       
   836         }
       
   837         
       
   838     }/*function_sint_to_lint*/
       
   839     break;
       
   840 
       
   841 /****
       
   842  *SINT_TO_USINT
       
   843  */
       
   844     case function_sint_to_usint :
       
   845     {
       
   846         symbol_c *last_type_symbol = NULL;
       
   847 
       
   848         {
       
   849             identifier_c param_name("IN");
       
   850             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   851             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   852             
       
   853             /* Get the value from a foo(<param_value>) style call */
       
   854             if (IN_param_value == NULL)
       
   855               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   858             
       
   859             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   860             {
       
   861         
       
   862                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   863                 s4o.print("(");
       
   864                 return_type_symbol->accept(*this);
       
   865                 s4o.print(")");
       
   866                 IN_param_value->accept(*this);
       
   867                 return NULL;
       
   868                 
       
   869             }
       
   870             
       
   871             ERROR;
       
   872         }
       
   873         
       
   874     }/*function_sint_to_usint*/
       
   875     break;
       
   876 
       
   877 /****
       
   878  *SINT_TO_UINT
       
   879  */
       
   880     case function_sint_to_uint :
       
   881     {
       
   882         symbol_c *last_type_symbol = NULL;
       
   883 
       
   884         {
       
   885             identifier_c param_name("IN");
       
   886             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   887             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   888             
       
   889             /* Get the value from a foo(<param_value>) style call */
       
   890             if (IN_param_value == NULL)
       
   891               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   894             
       
   895             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   896             {
       
   897         
       
   898                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   899                 s4o.print("(");
       
   900                 return_type_symbol->accept(*this);
       
   901                 s4o.print(")");
       
   902                 IN_param_value->accept(*this);
       
   903                 return NULL;
       
   904                 
       
   905             }
       
   906             
       
   907             ERROR;
       
   908         }
       
   909         
       
   910     }/*function_sint_to_uint*/
       
   911     break;
       
   912 
       
   913 /****
       
   914  *SINT_TO_UDINT
       
   915  */
       
   916     case function_sint_to_udint :
       
   917     {
       
   918         symbol_c *last_type_symbol = NULL;
       
   919 
       
   920         {
       
   921             identifier_c param_name("IN");
       
   922             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   923             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   924             
       
   925             /* Get the value from a foo(<param_value>) style call */
       
   926             if (IN_param_value == NULL)
       
   927               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   930             
       
   931             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   932             {
       
   933         
       
   934                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   935                 s4o.print("(");
       
   936                 return_type_symbol->accept(*this);
       
   937                 s4o.print(")");
       
   938                 IN_param_value->accept(*this);
       
   939                 return NULL;
       
   940                 
       
   941             }
       
   942             
       
   943             ERROR;
       
   944         }
       
   945         
       
   946     }/*function_sint_to_udint*/
       
   947     break;
       
   948 
       
   949 /****
       
   950  *SINT_TO_ULINT
       
   951  */
       
   952     case function_sint_to_ulint :
       
   953     {
       
   954         symbol_c *last_type_symbol = NULL;
       
   955 
       
   956         {
       
   957             identifier_c param_name("IN");
       
   958             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   959             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   960             
       
   961             /* Get the value from a foo(<param_value>) style call */
       
   962             if (IN_param_value == NULL)
       
   963               IN_param_value = function_call_param_iterator.next();
       
   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 ;
       
   966             
       
   967             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
   968             {
       
   969         
       
   970                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   971                 s4o.print("(");
       
   972                 return_type_symbol->accept(*this);
       
   973                 s4o.print(")");
       
   974                 IN_param_value->accept(*this);
       
   975                 return NULL;
       
   976                 
       
   977             }
       
   978             
       
   979             ERROR;
       
   980         }
       
   981         
       
   982     }/*function_sint_to_ulint*/
       
   983     break;
       
   984 
       
   985 /****
       
   986  *SINT_TO_REAL
       
   987  */
       
   988     case function_sint_to_real :
       
   989     {
       
   990         symbol_c *last_type_symbol = NULL;
       
   991 
       
   992         {
       
   993             identifier_c param_name("IN");
       
   994             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   995             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   996             
       
   997             /* Get the value from a foo(<param_value>) style call */
       
   998             if (IN_param_value == NULL)
       
   999               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1002             
       
  1003             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1004             {
       
  1005         
       
  1006                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1007                 s4o.print("(");
       
  1008                 return_type_symbol->accept(*this);
       
  1009                 s4o.print(")");
       
  1010                 IN_param_value->accept(*this);
       
  1011                 return NULL;
       
  1012                 
       
  1013             }
       
  1014             
       
  1015             ERROR;
       
  1016         }
       
  1017         
       
  1018     }/*function_sint_to_real*/
       
  1019     break;
       
  1020 
       
  1021 /****
       
  1022  *SINT_TO_LREAL
       
  1023  */
       
  1024     case function_sint_to_lreal :
       
  1025     {
       
  1026         symbol_c *last_type_symbol = NULL;
       
  1027 
       
  1028         {
       
  1029             identifier_c param_name("IN");
       
  1030             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1031             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1032             
       
  1033             /* Get the value from a foo(<param_value>) style call */
       
  1034             if (IN_param_value == NULL)
       
  1035               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1038             
       
  1039             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1040             {
       
  1041         
       
  1042                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1043                 s4o.print("(");
       
  1044                 return_type_symbol->accept(*this);
       
  1045                 s4o.print(")");
       
  1046                 IN_param_value->accept(*this);
       
  1047                 return NULL;
       
  1048                 
       
  1049             }
       
  1050             
       
  1051             ERROR;
       
  1052         }
       
  1053         
       
  1054     }/*function_sint_to_lreal*/
       
  1055     break;
       
  1056 
       
  1057 /****
       
  1058  *SINT_TO_TIME
       
  1059  */
       
  1060     case function_sint_to_time :
       
  1061     {
       
  1062         symbol_c *last_type_symbol = NULL;
       
  1063 
       
  1064         {
       
  1065             identifier_c param_name("IN");
       
  1066             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1067             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1068             
       
  1069             /* Get the value from a foo(<param_value>) style call */
       
  1070             if (IN_param_value == NULL)
       
  1071               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1074             
       
  1075             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1076             {
       
  1077         
       
  1078                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1079                 s4o.print("(");
       
  1080                 return_type_symbol->accept(*this);
       
  1081                 s4o.print(")__int_to_time(");
       
  1082                 IN_param_value->accept(*this);
       
  1083                 s4o.print(")");
       
  1084                 return NULL;
       
  1085                 
       
  1086             }
       
  1087             
       
  1088             ERROR;
       
  1089         }
       
  1090         
       
  1091     }/*function_sint_to_time*/
       
  1092     break;
       
  1093 
       
  1094 /****
       
  1095  *SINT_TO_DATE
       
  1096  */
       
  1097     case function_sint_to_date :
       
  1098     {
       
  1099         symbol_c *last_type_symbol = NULL;
       
  1100 
       
  1101         {
       
  1102             identifier_c param_name("IN");
       
  1103             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1104             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1105             
       
  1106             /* Get the value from a foo(<param_value>) style call */
       
  1107             if (IN_param_value == NULL)
       
  1108               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1111             
       
  1112             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1113             {
       
  1114         
       
  1115                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1116                 s4o.print("(");
       
  1117                 return_type_symbol->accept(*this);
       
  1118                 s4o.print(")__int_to_time(");
       
  1119                 IN_param_value->accept(*this);
       
  1120                 s4o.print(")");
       
  1121                 return NULL;
       
  1122                 
       
  1123             }
       
  1124             
       
  1125             ERROR;
       
  1126         }
       
  1127         
       
  1128     }/*function_sint_to_date*/
       
  1129     break;
       
  1130 
       
  1131 /****
       
  1132  *SINT_TO_TOD
       
  1133  */
       
  1134     case function_sint_to_tod :
       
  1135     {
       
  1136         symbol_c *last_type_symbol = NULL;
       
  1137 
       
  1138         {
       
  1139             identifier_c param_name("IN");
       
  1140             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1141             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1142             
       
  1143             /* Get the value from a foo(<param_value>) style call */
       
  1144             if (IN_param_value == NULL)
       
  1145               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1148             
       
  1149             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1150             {
       
  1151         
       
  1152                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1153                 s4o.print("(");
       
  1154                 return_type_symbol->accept(*this);
       
  1155                 s4o.print(")__int_to_time(");
       
  1156                 IN_param_value->accept(*this);
       
  1157                 s4o.print(")");
       
  1158                 return NULL;
       
  1159                 
       
  1160             }
       
  1161             
       
  1162             ERROR;
       
  1163         }
       
  1164         
       
  1165     }/*function_sint_to_tod*/
       
  1166     break;
       
  1167 
       
  1168 /****
       
  1169  *SINT_TO_DT
       
  1170  */
       
  1171     case function_sint_to_dt :
       
  1172     {
       
  1173         symbol_c *last_type_symbol = NULL;
       
  1174 
       
  1175         {
       
  1176             identifier_c param_name("IN");
       
  1177             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1178             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1179             
       
  1180             /* Get the value from a foo(<param_value>) style call */
       
  1181             if (IN_param_value == NULL)
       
  1182               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1185             
       
  1186             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1187             {
       
  1188         
       
  1189                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1190                 s4o.print("(");
       
  1191                 return_type_symbol->accept(*this);
       
  1192                 s4o.print(")__int_to_time(");
       
  1193                 IN_param_value->accept(*this);
       
  1194                 s4o.print(")");
       
  1195                 return NULL;
       
  1196                 
       
  1197             }
       
  1198             
       
  1199             ERROR;
       
  1200         }
       
  1201         
       
  1202     }/*function_sint_to_dt*/
       
  1203     break;
       
  1204 
       
  1205 /****
       
  1206  *SINT_TO_STRING
       
  1207  */
       
  1208     case function_sint_to_string :
       
  1209     {
       
  1210         symbol_c *last_type_symbol = NULL;
       
  1211 
       
  1212         {
       
  1213             identifier_c param_name("IN");
       
  1214             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1215             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1216             
       
  1217             /* Get the value from a foo(<param_value>) style call */
       
  1218             if (IN_param_value == NULL)
       
  1219               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1222             
       
  1223             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1224             {
       
  1225         
       
  1226                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1227                 s4o.print("(");
       
  1228                 return_type_symbol->accept(*this);
       
  1229                 s4o.print(")__sint_to_string(");
       
  1230                 IN_param_value->accept(*this);
       
  1231                 s4o.print(")");
       
  1232                 return NULL;
       
  1233                 
       
  1234             }
       
  1235             
       
  1236             ERROR;
       
  1237         }
       
  1238         
       
  1239     }/*function_sint_to_string*/
       
  1240     break;
       
  1241 
       
  1242 /****
       
  1243  *SINT_TO_BYTE
       
  1244  */
       
  1245     case function_sint_to_byte :
       
  1246     {
       
  1247         symbol_c *last_type_symbol = NULL;
       
  1248 
       
  1249         {
       
  1250             identifier_c param_name("IN");
       
  1251             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1252             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1253             
       
  1254             /* Get the value from a foo(<param_value>) style call */
       
  1255             if (IN_param_value == NULL)
       
  1256               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1259             
       
  1260             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1261             {
       
  1262         
       
  1263                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1264                 s4o.print("(");
       
  1265                 return_type_symbol->accept(*this);
       
  1266                 s4o.print(")");
       
  1267                 IN_param_value->accept(*this);
       
  1268                 return NULL;
       
  1269                 
       
  1270             }
       
  1271             
       
  1272             ERROR;
       
  1273         }
       
  1274         
       
  1275     }/*function_sint_to_byte*/
       
  1276     break;
       
  1277 
       
  1278 /****
       
  1279  *SINT_TO_WORD
       
  1280  */
       
  1281     case function_sint_to_word :
       
  1282     {
       
  1283         symbol_c *last_type_symbol = NULL;
       
  1284 
       
  1285         {
       
  1286             identifier_c param_name("IN");
       
  1287             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1288             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1289             
       
  1290             /* Get the value from a foo(<param_value>) style call */
       
  1291             if (IN_param_value == NULL)
       
  1292               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1295             
       
  1296             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1297             {
       
  1298         
       
  1299                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1300                 s4o.print("(");
       
  1301                 return_type_symbol->accept(*this);
       
  1302                 s4o.print(")");
       
  1303                 IN_param_value->accept(*this);
       
  1304                 return NULL;
       
  1305                 
       
  1306             }
       
  1307             
       
  1308             ERROR;
       
  1309         }
       
  1310         
       
  1311     }/*function_sint_to_word*/
       
  1312     break;
       
  1313 
       
  1314 /****
       
  1315  *SINT_TO_DWORD
       
  1316  */
       
  1317     case function_sint_to_dword :
       
  1318     {
       
  1319         symbol_c *last_type_symbol = NULL;
       
  1320 
       
  1321         {
       
  1322             identifier_c param_name("IN");
       
  1323             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1324             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1325             
       
  1326             /* Get the value from a foo(<param_value>) style call */
       
  1327             if (IN_param_value == NULL)
       
  1328               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1331             
       
  1332             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1333             {
       
  1334         
       
  1335                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1336                 s4o.print("(");
       
  1337                 return_type_symbol->accept(*this);
       
  1338                 s4o.print(")");
       
  1339                 IN_param_value->accept(*this);
       
  1340                 return NULL;
       
  1341                 
       
  1342             }
       
  1343             
       
  1344             ERROR;
       
  1345         }
       
  1346         
       
  1347     }/*function_sint_to_dword*/
       
  1348     break;
       
  1349 
       
  1350 /****
       
  1351  *SINT_TO_LWORD
       
  1352  */
       
  1353     case function_sint_to_lword :
       
  1354     {
       
  1355         symbol_c *last_type_symbol = NULL;
       
  1356 
       
  1357         {
       
  1358             identifier_c param_name("IN");
       
  1359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1360             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1361             
       
  1362             /* Get the value from a foo(<param_value>) style call */
       
  1363             if (IN_param_value == NULL)
       
  1364               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1367             
       
  1368             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1369             {
       
  1370         
       
  1371                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1372                 s4o.print("(");
       
  1373                 return_type_symbol->accept(*this);
       
  1374                 s4o.print(")");
       
  1375                 IN_param_value->accept(*this);
       
  1376                 return NULL;
       
  1377                 
       
  1378             }
       
  1379             
       
  1380             ERROR;
       
  1381         }
       
  1382         
       
  1383     }/*function_sint_to_lword*/
       
  1384     break;
       
  1385 
       
  1386 /****
       
  1387  *INT_TO_BOOL
       
  1388  */
       
  1389     case function_int_to_bool :
       
  1390     {
       
  1391         symbol_c *last_type_symbol = NULL;
       
  1392 
       
  1393         {
       
  1394             identifier_c param_name("IN");
       
  1395             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1396             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1397             
       
  1398             /* Get the value from a foo(<param_value>) style call */
       
  1399             if (IN_param_value == NULL)
       
  1400               IN_param_value = function_call_param_iterator.next();
       
  1401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1403             
       
  1404             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1405             {
       
  1406         
       
  1407                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1408                 s4o.print("(");
       
  1409                 return_type_symbol->accept(*this);
       
  1410                 s4o.print(")");
       
  1411                 IN_param_value->accept(*this);
       
  1412                 return NULL;
       
  1413                 
       
  1414             }
       
  1415             
       
  1416             ERROR;
       
  1417         }
       
  1418         
       
  1419     }/*function_int_to_bool*/
       
  1420     break;
       
  1421 
       
  1422 /****
       
  1423  *INT_TO_SINT
       
  1424  */
       
  1425     case function_int_to_sint :
       
  1426     {
       
  1427         symbol_c *last_type_symbol = NULL;
       
  1428 
       
  1429         {
       
  1430             identifier_c param_name("IN");
       
  1431             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1432             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1433             
       
  1434             /* Get the value from a foo(<param_value>) style call */
       
  1435             if (IN_param_value == NULL)
       
  1436               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1439             
       
  1440             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1441             {
       
  1442         
       
  1443                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1444                 s4o.print("(");
       
  1445                 return_type_symbol->accept(*this);
       
  1446                 s4o.print(")");
       
  1447                 IN_param_value->accept(*this);
       
  1448                 return NULL;
       
  1449                 
       
  1450             }
       
  1451             
       
  1452             ERROR;
       
  1453         }
       
  1454         
       
  1455     }/*function_int_to_sint*/
       
  1456     break;
       
  1457 
       
  1458 /****
       
  1459  *INT_TO_DINT
       
  1460  */
       
  1461     case function_int_to_dint :
       
  1462     {
       
  1463         symbol_c *last_type_symbol = NULL;
       
  1464 
       
  1465         {
       
  1466             identifier_c param_name("IN");
       
  1467             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1468             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1469             
       
  1470             /* Get the value from a foo(<param_value>) style call */
       
  1471             if (IN_param_value == NULL)
       
  1472               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1475             
       
  1476             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1477             {
       
  1478         
       
  1479                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1480                 s4o.print("(");
       
  1481                 return_type_symbol->accept(*this);
       
  1482                 s4o.print(")");
       
  1483                 IN_param_value->accept(*this);
       
  1484                 return NULL;
       
  1485                 
       
  1486             }
       
  1487             
       
  1488             ERROR;
       
  1489         }
       
  1490         
       
  1491     }/*function_int_to_dint*/
       
  1492     break;
       
  1493 
       
  1494 /****
       
  1495  *INT_TO_LINT
       
  1496  */
       
  1497     case function_int_to_lint :
       
  1498     {
       
  1499         symbol_c *last_type_symbol = NULL;
       
  1500 
       
  1501         {
       
  1502             identifier_c param_name("IN");
       
  1503             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1504             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1505             
       
  1506             /* Get the value from a foo(<param_value>) style call */
       
  1507             if (IN_param_value == NULL)
       
  1508               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1511             
       
  1512             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1513             {
       
  1514         
       
  1515                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1516                 s4o.print("(");
       
  1517                 return_type_symbol->accept(*this);
       
  1518                 s4o.print(")");
       
  1519                 IN_param_value->accept(*this);
       
  1520                 return NULL;
       
  1521                 
       
  1522             }
       
  1523             
       
  1524             ERROR;
       
  1525         }
       
  1526         
       
  1527     }/*function_int_to_lint*/
       
  1528     break;
       
  1529 
       
  1530 /****
       
  1531  *INT_TO_USINT
       
  1532  */
       
  1533     case function_int_to_usint :
       
  1534     {
       
  1535         symbol_c *last_type_symbol = NULL;
       
  1536 
       
  1537         {
       
  1538             identifier_c param_name("IN");
       
  1539             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1540             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1541             
       
  1542             /* Get the value from a foo(<param_value>) style call */
       
  1543             if (IN_param_value == NULL)
       
  1544               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1547             
       
  1548             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1549             {
       
  1550         
       
  1551                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1552                 s4o.print("(");
       
  1553                 return_type_symbol->accept(*this);
       
  1554                 s4o.print(")");
       
  1555                 IN_param_value->accept(*this);
       
  1556                 return NULL;
       
  1557                 
       
  1558             }
       
  1559             
       
  1560             ERROR;
       
  1561         }
       
  1562         
       
  1563     }/*function_int_to_usint*/
       
  1564     break;
       
  1565 
       
  1566 /****
       
  1567  *INT_TO_UINT
       
  1568  */
       
  1569     case function_int_to_uint :
       
  1570     {
       
  1571         symbol_c *last_type_symbol = NULL;
       
  1572 
       
  1573         {
       
  1574             identifier_c param_name("IN");
       
  1575             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1576             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1577             
       
  1578             /* Get the value from a foo(<param_value>) style call */
       
  1579             if (IN_param_value == NULL)
       
  1580               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1583             
       
  1584             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1585             {
       
  1586         
       
  1587                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1588                 s4o.print("(");
       
  1589                 return_type_symbol->accept(*this);
       
  1590                 s4o.print(")");
       
  1591                 IN_param_value->accept(*this);
       
  1592                 return NULL;
       
  1593                 
       
  1594             }
       
  1595             
       
  1596             ERROR;
       
  1597         }
       
  1598         
       
  1599     }/*function_int_to_uint*/
       
  1600     break;
       
  1601 
       
  1602 /****
       
  1603  *INT_TO_UDINT
       
  1604  */
       
  1605     case function_int_to_udint :
       
  1606     {
       
  1607         symbol_c *last_type_symbol = NULL;
       
  1608 
       
  1609         {
       
  1610             identifier_c param_name("IN");
       
  1611             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1612             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1613             
       
  1614             /* Get the value from a foo(<param_value>) style call */
       
  1615             if (IN_param_value == NULL)
       
  1616               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1619             
       
  1620             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1621             {
       
  1622         
       
  1623                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1624                 s4o.print("(");
       
  1625                 return_type_symbol->accept(*this);
       
  1626                 s4o.print(")");
       
  1627                 IN_param_value->accept(*this);
       
  1628                 return NULL;
       
  1629                 
       
  1630             }
       
  1631             
       
  1632             ERROR;
       
  1633         }
       
  1634         
       
  1635     }/*function_int_to_udint*/
       
  1636     break;
       
  1637 
       
  1638 /****
       
  1639  *INT_TO_ULINT
       
  1640  */
       
  1641     case function_int_to_ulint :
       
  1642     {
       
  1643         symbol_c *last_type_symbol = NULL;
       
  1644 
       
  1645         {
       
  1646             identifier_c param_name("IN");
       
  1647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1649             
       
  1650             /* Get the value from a foo(<param_value>) style call */
       
  1651             if (IN_param_value == NULL)
       
  1652               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1655             
       
  1656             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1657             {
       
  1658         
       
  1659                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1660                 s4o.print("(");
       
  1661                 return_type_symbol->accept(*this);
       
  1662                 s4o.print(")");
       
  1663                 IN_param_value->accept(*this);
       
  1664                 return NULL;
       
  1665                 
       
  1666             }
       
  1667             
       
  1668             ERROR;
       
  1669         }
       
  1670         
       
  1671     }/*function_int_to_ulint*/
       
  1672     break;
       
  1673 
       
  1674 /****
       
  1675  *INT_TO_REAL
       
  1676  */
       
  1677     case function_int_to_real :
       
  1678     {
       
  1679         symbol_c *last_type_symbol = NULL;
       
  1680 
       
  1681         {
       
  1682             identifier_c param_name("IN");
       
  1683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1685             
       
  1686             /* Get the value from a foo(<param_value>) style call */
       
  1687             if (IN_param_value == NULL)
       
  1688               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1691             
       
  1692             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1693             {
       
  1694         
       
  1695                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1696                 s4o.print("(");
       
  1697                 return_type_symbol->accept(*this);
       
  1698                 s4o.print(")");
       
  1699                 IN_param_value->accept(*this);
       
  1700                 return NULL;
       
  1701                 
       
  1702             }
       
  1703             
       
  1704             ERROR;
       
  1705         }
       
  1706         
       
  1707     }/*function_int_to_real*/
       
  1708     break;
       
  1709 
       
  1710 /****
       
  1711  *INT_TO_LREAL
       
  1712  */
       
  1713     case function_int_to_lreal :
       
  1714     {
       
  1715         symbol_c *last_type_symbol = NULL;
       
  1716 
       
  1717         {
       
  1718             identifier_c param_name("IN");
       
  1719             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1721             
       
  1722             /* Get the value from a foo(<param_value>) style call */
       
  1723             if (IN_param_value == NULL)
       
  1724               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1727             
       
  1728             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1729             {
       
  1730         
       
  1731                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1732                 s4o.print("(");
       
  1733                 return_type_symbol->accept(*this);
       
  1734                 s4o.print(")");
       
  1735                 IN_param_value->accept(*this);
       
  1736                 return NULL;
       
  1737                 
       
  1738             }
       
  1739             
       
  1740             ERROR;
       
  1741         }
       
  1742         
       
  1743     }/*function_int_to_lreal*/
       
  1744     break;
       
  1745 
       
  1746 /****
       
  1747  *INT_TO_TIME
       
  1748  */
       
  1749     case function_int_to_time :
       
  1750     {
       
  1751         symbol_c *last_type_symbol = NULL;
       
  1752 
       
  1753         {
       
  1754             identifier_c param_name("IN");
       
  1755             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1757             
       
  1758             /* Get the value from a foo(<param_value>) style call */
       
  1759             if (IN_param_value == NULL)
       
  1760               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1763             
       
  1764             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1765             {
       
  1766         
       
  1767                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1768                 s4o.print("(");
       
  1769                 return_type_symbol->accept(*this);
       
  1770                 s4o.print(")__int_to_time(");
       
  1771                 IN_param_value->accept(*this);
       
  1772                 s4o.print(")");
       
  1773                 return NULL;
       
  1774                 
       
  1775             }
       
  1776             
       
  1777             ERROR;
       
  1778         }
       
  1779         
       
  1780     }/*function_int_to_time*/
       
  1781     break;
       
  1782 
       
  1783 /****
       
  1784  *INT_TO_DATE
       
  1785  */
       
  1786     case function_int_to_date :
       
  1787     {
       
  1788         symbol_c *last_type_symbol = NULL;
       
  1789 
       
  1790         {
       
  1791             identifier_c param_name("IN");
       
  1792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1794             
       
  1795             /* Get the value from a foo(<param_value>) style call */
       
  1796             if (IN_param_value == NULL)
       
  1797               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1800             
       
  1801             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1802             {
       
  1803         
       
  1804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1805                 s4o.print("(");
       
  1806                 return_type_symbol->accept(*this);
       
  1807                 s4o.print(")__int_to_time(");
       
  1808                 IN_param_value->accept(*this);
       
  1809                 s4o.print(")");
       
  1810                 return NULL;
       
  1811                 
       
  1812             }
       
  1813             
       
  1814             ERROR;
       
  1815         }
       
  1816         
       
  1817     }/*function_int_to_date*/
       
  1818     break;
       
  1819 
       
  1820 /****
       
  1821  *INT_TO_TOD
       
  1822  */
       
  1823     case function_int_to_tod :
       
  1824     {
       
  1825         symbol_c *last_type_symbol = NULL;
       
  1826 
       
  1827         {
       
  1828             identifier_c param_name("IN");
       
  1829             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1830             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1831             
       
  1832             /* Get the value from a foo(<param_value>) style call */
       
  1833             if (IN_param_value == NULL)
       
  1834               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1837             
       
  1838             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1839             {
       
  1840         
       
  1841                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1842                 s4o.print("(");
       
  1843                 return_type_symbol->accept(*this);
       
  1844                 s4o.print(")__int_to_time(");
       
  1845                 IN_param_value->accept(*this);
       
  1846                 s4o.print(")");
       
  1847                 return NULL;
       
  1848                 
       
  1849             }
       
  1850             
       
  1851             ERROR;
       
  1852         }
       
  1853         
       
  1854     }/*function_int_to_tod*/
       
  1855     break;
       
  1856 
       
  1857 /****
       
  1858  *INT_TO_DT
       
  1859  */
       
  1860     case function_int_to_dt :
       
  1861     {
       
  1862         symbol_c *last_type_symbol = NULL;
       
  1863 
       
  1864         {
       
  1865             identifier_c param_name("IN");
       
  1866             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1867             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1868             
       
  1869             /* Get the value from a foo(<param_value>) style call */
       
  1870             if (IN_param_value == NULL)
       
  1871               IN_param_value = function_call_param_iterator.next();
       
  1872             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1873             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1874             
       
  1875             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1876             {
       
  1877         
       
  1878                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1879                 s4o.print("(");
       
  1880                 return_type_symbol->accept(*this);
       
  1881                 s4o.print(")__int_to_time(");
       
  1882                 IN_param_value->accept(*this);
       
  1883                 s4o.print(")");
       
  1884                 return NULL;
       
  1885                 
       
  1886             }
       
  1887             
       
  1888             ERROR;
       
  1889         }
       
  1890         
       
  1891     }/*function_int_to_dt*/
       
  1892     break;
       
  1893 
       
  1894 /****
       
  1895  *INT_TO_STRING
       
  1896  */
       
  1897     case function_int_to_string :
       
  1898     {
       
  1899         symbol_c *last_type_symbol = NULL;
       
  1900 
       
  1901         {
       
  1902             identifier_c param_name("IN");
       
  1903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1904             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1905             
       
  1906             /* Get the value from a foo(<param_value>) style call */
       
  1907             if (IN_param_value == NULL)
       
  1908               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1911             
       
  1912             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1913             {
       
  1914         
       
  1915                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1916                 s4o.print("(");
       
  1917                 return_type_symbol->accept(*this);
       
  1918                 s4o.print(")__sint_to_string(");
       
  1919                 IN_param_value->accept(*this);
       
  1920                 s4o.print(")");
       
  1921                 return NULL;
       
  1922                 
       
  1923             }
       
  1924             
       
  1925             ERROR;
       
  1926         }
       
  1927         
       
  1928     }/*function_int_to_string*/
       
  1929     break;
       
  1930 
       
  1931 /****
       
  1932  *INT_TO_BYTE
       
  1933  */
       
  1934     case function_int_to_byte :
       
  1935     {
       
  1936         symbol_c *last_type_symbol = NULL;
       
  1937 
       
  1938         {
       
  1939             identifier_c param_name("IN");
       
  1940             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1941             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1942             
       
  1943             /* Get the value from a foo(<param_value>) style call */
       
  1944             if (IN_param_value == NULL)
       
  1945               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1948             
       
  1949             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1950             {
       
  1951         
       
  1952                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1953                 s4o.print("(");
       
  1954                 return_type_symbol->accept(*this);
       
  1955                 s4o.print(")");
       
  1956                 IN_param_value->accept(*this);
       
  1957                 return NULL;
       
  1958                 
       
  1959             }
       
  1960             
       
  1961             ERROR;
       
  1962         }
       
  1963         
       
  1964     }/*function_int_to_byte*/
       
  1965     break;
       
  1966 
       
  1967 /****
       
  1968  *INT_TO_WORD
       
  1969  */
       
  1970     case function_int_to_word :
       
  1971     {
       
  1972         symbol_c *last_type_symbol = NULL;
       
  1973 
       
  1974         {
       
  1975             identifier_c param_name("IN");
       
  1976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1978             
       
  1979             /* Get the value from a foo(<param_value>) style call */
       
  1980             if (IN_param_value == NULL)
       
  1981               IN_param_value = function_call_param_iterator.next();
       
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1984             
       
  1985             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1986             {
       
  1987         
       
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1989                 s4o.print("(");
       
  1990                 return_type_symbol->accept(*this);
       
  1991                 s4o.print(")");
       
  1992                 IN_param_value->accept(*this);
       
  1993                 return NULL;
       
  1994                 
       
  1995             }
       
  1996             
       
  1997             ERROR;
       
  1998         }
       
  1999         
       
  2000     }/*function_int_to_word*/
       
  2001     break;
       
  2002 
       
  2003 /****
       
  2004  *INT_TO_DWORD
       
  2005  */
       
  2006     case function_int_to_dword :
       
  2007     {
       
  2008         symbol_c *last_type_symbol = NULL;
       
  2009 
       
  2010         {
       
  2011             identifier_c param_name("IN");
       
  2012             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2013             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2014             
       
  2015             /* Get the value from a foo(<param_value>) style call */
       
  2016             if (IN_param_value == NULL)
       
  2017               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2020             
       
  2021             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2022             {
       
  2023         
       
  2024                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2025                 s4o.print("(");
       
  2026                 return_type_symbol->accept(*this);
       
  2027                 s4o.print(")");
       
  2028                 IN_param_value->accept(*this);
       
  2029                 return NULL;
       
  2030                 
       
  2031             }
       
  2032             
       
  2033             ERROR;
       
  2034         }
       
  2035         
       
  2036     }/*function_int_to_dword*/
       
  2037     break;
       
  2038 
       
  2039 /****
       
  2040  *INT_TO_LWORD
       
  2041  */
       
  2042     case function_int_to_lword :
       
  2043     {
       
  2044         symbol_c *last_type_symbol = NULL;
       
  2045 
       
  2046         {
       
  2047             identifier_c param_name("IN");
       
  2048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2050             
       
  2051             /* Get the value from a foo(<param_value>) style call */
       
  2052             if (IN_param_value == NULL)
       
  2053               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2056             
       
  2057             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2058             {
       
  2059         
       
  2060                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2061                 s4o.print("(");
       
  2062                 return_type_symbol->accept(*this);
       
  2063                 s4o.print(")");
       
  2064                 IN_param_value->accept(*this);
       
  2065                 return NULL;
       
  2066                 
       
  2067             }
       
  2068             
       
  2069             ERROR;
       
  2070         }
       
  2071         
       
  2072     }/*function_int_to_lword*/
       
  2073     break;
       
  2074 
       
  2075 /****
       
  2076  *DINT_TO_BOOL
       
  2077  */
       
  2078     case function_dint_to_bool :
       
  2079     {
       
  2080         symbol_c *last_type_symbol = NULL;
       
  2081 
       
  2082         {
       
  2083             identifier_c param_name("IN");
       
  2084             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2085             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2086             
       
  2087             /* Get the value from a foo(<param_value>) style call */
       
  2088             if (IN_param_value == NULL)
       
  2089               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2092             
       
  2093             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2094             {
       
  2095         
       
  2096                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2097                 s4o.print("(");
       
  2098                 return_type_symbol->accept(*this);
       
  2099                 s4o.print(")");
       
  2100                 IN_param_value->accept(*this);
       
  2101                 return NULL;
       
  2102                 
       
  2103             }
       
  2104             
       
  2105             ERROR;
       
  2106         }
       
  2107         
       
  2108     }/*function_dint_to_bool*/
       
  2109     break;
       
  2110 
       
  2111 /****
       
  2112  *DINT_TO_SINT
       
  2113  */
       
  2114     case function_dint_to_sint :
       
  2115     {
       
  2116         symbol_c *last_type_symbol = NULL;
       
  2117 
       
  2118         {
       
  2119             identifier_c param_name("IN");
       
  2120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2122             
       
  2123             /* Get the value from a foo(<param_value>) style call */
       
  2124             if (IN_param_value == NULL)
       
  2125               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2128             
       
  2129             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2130             {
       
  2131         
       
  2132                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2133                 s4o.print("(");
       
  2134                 return_type_symbol->accept(*this);
       
  2135                 s4o.print(")");
       
  2136                 IN_param_value->accept(*this);
       
  2137                 return NULL;
       
  2138                 
       
  2139             }
       
  2140             
       
  2141             ERROR;
       
  2142         }
       
  2143         
       
  2144     }/*function_dint_to_sint*/
       
  2145     break;
       
  2146 
       
  2147 /****
       
  2148  *DINT_TO_INT
       
  2149  */
       
  2150     case function_dint_to_int :
       
  2151     {
       
  2152         symbol_c *last_type_symbol = NULL;
       
  2153 
       
  2154         {
       
  2155             identifier_c param_name("IN");
       
  2156             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2157             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2158             
       
  2159             /* Get the value from a foo(<param_value>) style call */
       
  2160             if (IN_param_value == NULL)
       
  2161               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2164             
       
  2165             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2166             {
       
  2167         
       
  2168                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2169                 s4o.print("(");
       
  2170                 return_type_symbol->accept(*this);
       
  2171                 s4o.print(")");
       
  2172                 IN_param_value->accept(*this);
       
  2173                 return NULL;
       
  2174                 
       
  2175             }
       
  2176             
       
  2177             ERROR;
       
  2178         }
       
  2179         
       
  2180     }/*function_dint_to_int*/
       
  2181     break;
       
  2182 
       
  2183 /****
       
  2184  *DINT_TO_LINT
       
  2185  */
       
  2186     case function_dint_to_lint :
       
  2187     {
       
  2188         symbol_c *last_type_symbol = NULL;
       
  2189 
       
  2190         {
       
  2191             identifier_c param_name("IN");
       
  2192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2194             
       
  2195             /* Get the value from a foo(<param_value>) style call */
       
  2196             if (IN_param_value == NULL)
       
  2197               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2200             
       
  2201             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2202             {
       
  2203         
       
  2204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2205                 s4o.print("(");
       
  2206                 return_type_symbol->accept(*this);
       
  2207                 s4o.print(")");
       
  2208                 IN_param_value->accept(*this);
       
  2209                 return NULL;
       
  2210                 
       
  2211             }
       
  2212             
       
  2213             ERROR;
       
  2214         }
       
  2215         
       
  2216     }/*function_dint_to_lint*/
       
  2217     break;
       
  2218 
       
  2219 /****
       
  2220  *DINT_TO_USINT
       
  2221  */
       
  2222     case function_dint_to_usint :
       
  2223     {
       
  2224         symbol_c *last_type_symbol = NULL;
       
  2225 
       
  2226         {
       
  2227             identifier_c param_name("IN");
       
  2228             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2229             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2230             
       
  2231             /* Get the value from a foo(<param_value>) style call */
       
  2232             if (IN_param_value == NULL)
       
  2233               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2236             
       
  2237             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2238             {
       
  2239         
       
  2240                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2241                 s4o.print("(");
       
  2242                 return_type_symbol->accept(*this);
       
  2243                 s4o.print(")");
       
  2244                 IN_param_value->accept(*this);
       
  2245                 return NULL;
       
  2246                 
       
  2247             }
       
  2248             
       
  2249             ERROR;
       
  2250         }
       
  2251         
       
  2252     }/*function_dint_to_usint*/
       
  2253     break;
       
  2254 
       
  2255 /****
       
  2256  *DINT_TO_UINT
       
  2257  */
       
  2258     case function_dint_to_uint :
       
  2259     {
       
  2260         symbol_c *last_type_symbol = NULL;
       
  2261 
       
  2262         {
       
  2263             identifier_c param_name("IN");
       
  2264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2266             
       
  2267             /* Get the value from a foo(<param_value>) style call */
       
  2268             if (IN_param_value == NULL)
       
  2269               IN_param_value = function_call_param_iterator.next();
       
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2272             
       
  2273             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2274             {
       
  2275         
       
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2277                 s4o.print("(");
       
  2278                 return_type_symbol->accept(*this);
       
  2279                 s4o.print(")");
       
  2280                 IN_param_value->accept(*this);
       
  2281                 return NULL;
       
  2282                 
       
  2283             }
       
  2284             
       
  2285             ERROR;
       
  2286         }
       
  2287         
       
  2288     }/*function_dint_to_uint*/
       
  2289     break;
       
  2290 
       
  2291 /****
       
  2292  *DINT_TO_UDINT
       
  2293  */
       
  2294     case function_dint_to_udint :
       
  2295     {
       
  2296         symbol_c *last_type_symbol = NULL;
       
  2297 
       
  2298         {
       
  2299             identifier_c param_name("IN");
       
  2300             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2301             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2302             
       
  2303             /* Get the value from a foo(<param_value>) style call */
       
  2304             if (IN_param_value == NULL)
       
  2305               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2308             
       
  2309             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2310             {
       
  2311         
       
  2312                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2313                 s4o.print("(");
       
  2314                 return_type_symbol->accept(*this);
       
  2315                 s4o.print(")");
       
  2316                 IN_param_value->accept(*this);
       
  2317                 return NULL;
       
  2318                 
       
  2319             }
       
  2320             
       
  2321             ERROR;
       
  2322         }
       
  2323         
       
  2324     }/*function_dint_to_udint*/
       
  2325     break;
       
  2326 
       
  2327 /****
       
  2328  *DINT_TO_ULINT
       
  2329  */
       
  2330     case function_dint_to_ulint :
       
  2331     {
       
  2332         symbol_c *last_type_symbol = NULL;
       
  2333 
       
  2334         {
       
  2335             identifier_c param_name("IN");
       
  2336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2338             
       
  2339             /* Get the value from a foo(<param_value>) style call */
       
  2340             if (IN_param_value == NULL)
       
  2341               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2344             
       
  2345             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2346             {
       
  2347         
       
  2348                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2349                 s4o.print("(");
       
  2350                 return_type_symbol->accept(*this);
       
  2351                 s4o.print(")");
       
  2352                 IN_param_value->accept(*this);
       
  2353                 return NULL;
       
  2354                 
       
  2355             }
       
  2356             
       
  2357             ERROR;
       
  2358         }
       
  2359         
       
  2360     }/*function_dint_to_ulint*/
       
  2361     break;
       
  2362 
       
  2363 /****
       
  2364  *DINT_TO_REAL
       
  2365  */
       
  2366     case function_dint_to_real :
       
  2367     {
       
  2368         symbol_c *last_type_symbol = NULL;
       
  2369 
       
  2370         {
       
  2371             identifier_c param_name("IN");
       
  2372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2374             
       
  2375             /* Get the value from a foo(<param_value>) style call */
       
  2376             if (IN_param_value == NULL)
       
  2377               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2380             
       
  2381             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2382             {
       
  2383         
       
  2384                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2385                 s4o.print("(");
       
  2386                 return_type_symbol->accept(*this);
       
  2387                 s4o.print(")");
       
  2388                 IN_param_value->accept(*this);
       
  2389                 return NULL;
       
  2390                 
       
  2391             }
       
  2392             
       
  2393             ERROR;
       
  2394         }
       
  2395         
       
  2396     }/*function_dint_to_real*/
       
  2397     break;
       
  2398 
       
  2399 /****
       
  2400  *DINT_TO_LREAL
       
  2401  */
       
  2402     case function_dint_to_lreal :
       
  2403     {
       
  2404         symbol_c *last_type_symbol = NULL;
       
  2405 
       
  2406         {
       
  2407             identifier_c param_name("IN");
       
  2408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2410             
       
  2411             /* Get the value from a foo(<param_value>) style call */
       
  2412             if (IN_param_value == NULL)
       
  2413               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2416             
       
  2417             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2418             {
       
  2419         
       
  2420                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2421                 s4o.print("(");
       
  2422                 return_type_symbol->accept(*this);
       
  2423                 s4o.print(")");
       
  2424                 IN_param_value->accept(*this);
       
  2425                 return NULL;
       
  2426                 
       
  2427             }
       
  2428             
       
  2429             ERROR;
       
  2430         }
       
  2431         
       
  2432     }/*function_dint_to_lreal*/
       
  2433     break;
       
  2434 
       
  2435 /****
       
  2436  *DINT_TO_TIME
       
  2437  */
       
  2438     case function_dint_to_time :
       
  2439     {
       
  2440         symbol_c *last_type_symbol = NULL;
       
  2441 
       
  2442         {
       
  2443             identifier_c param_name("IN");
       
  2444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2445             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2446             
       
  2447             /* Get the value from a foo(<param_value>) style call */
       
  2448             if (IN_param_value == NULL)
       
  2449               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2452             
       
  2453             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2454             {
       
  2455         
       
  2456                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2457                 s4o.print("(");
       
  2458                 return_type_symbol->accept(*this);
       
  2459                 s4o.print(")__int_to_time(");
       
  2460                 IN_param_value->accept(*this);
       
  2461                 s4o.print(")");
       
  2462                 return NULL;
       
  2463                 
       
  2464             }
       
  2465             
       
  2466             ERROR;
       
  2467         }
       
  2468         
       
  2469     }/*function_dint_to_time*/
       
  2470     break;
       
  2471 
       
  2472 /****
       
  2473  *DINT_TO_DATE
       
  2474  */
       
  2475     case function_dint_to_date :
       
  2476     {
       
  2477         symbol_c *last_type_symbol = NULL;
       
  2478 
       
  2479         {
       
  2480             identifier_c param_name("IN");
       
  2481             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2482             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2483             
       
  2484             /* Get the value from a foo(<param_value>) style call */
       
  2485             if (IN_param_value == NULL)
       
  2486               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2489             
       
  2490             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2491             {
       
  2492         
       
  2493                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2494                 s4o.print("(");
       
  2495                 return_type_symbol->accept(*this);
       
  2496                 s4o.print(")__int_to_time(");
       
  2497                 IN_param_value->accept(*this);
       
  2498                 s4o.print(")");
       
  2499                 return NULL;
       
  2500                 
       
  2501             }
       
  2502             
       
  2503             ERROR;
       
  2504         }
       
  2505         
       
  2506     }/*function_dint_to_date*/
       
  2507     break;
       
  2508 
       
  2509 /****
       
  2510  *DINT_TO_TOD
       
  2511  */
       
  2512     case function_dint_to_tod :
       
  2513     {
       
  2514         symbol_c *last_type_symbol = NULL;
       
  2515 
       
  2516         {
       
  2517             identifier_c param_name("IN");
       
  2518             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2519             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2520             
       
  2521             /* Get the value from a foo(<param_value>) style call */
       
  2522             if (IN_param_value == NULL)
       
  2523               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2526             
       
  2527             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2528             {
       
  2529         
       
  2530                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2531                 s4o.print("(");
       
  2532                 return_type_symbol->accept(*this);
       
  2533                 s4o.print(")__int_to_time(");
       
  2534                 IN_param_value->accept(*this);
       
  2535                 s4o.print(")");
       
  2536                 return NULL;
       
  2537                 
       
  2538             }
       
  2539             
       
  2540             ERROR;
       
  2541         }
       
  2542         
       
  2543     }/*function_dint_to_tod*/
       
  2544     break;
       
  2545 
       
  2546 /****
       
  2547  *DINT_TO_DT
       
  2548  */
       
  2549     case function_dint_to_dt :
       
  2550     {
       
  2551         symbol_c *last_type_symbol = NULL;
       
  2552 
       
  2553         {
       
  2554             identifier_c param_name("IN");
       
  2555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2556             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2557             
       
  2558             /* Get the value from a foo(<param_value>) style call */
       
  2559             if (IN_param_value == NULL)
       
  2560               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2563             
       
  2564             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2565             {
       
  2566         
       
  2567                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2568                 s4o.print("(");
       
  2569                 return_type_symbol->accept(*this);
       
  2570                 s4o.print(")__int_to_time(");
       
  2571                 IN_param_value->accept(*this);
       
  2572                 s4o.print(")");
       
  2573                 return NULL;
       
  2574                 
       
  2575             }
       
  2576             
       
  2577             ERROR;
       
  2578         }
       
  2579         
       
  2580     }/*function_dint_to_dt*/
       
  2581     break;
       
  2582 
       
  2583 /****
       
  2584  *DINT_TO_STRING
       
  2585  */
       
  2586     case function_dint_to_string :
       
  2587     {
       
  2588         symbol_c *last_type_symbol = NULL;
       
  2589 
       
  2590         {
       
  2591             identifier_c param_name("IN");
       
  2592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2594             
       
  2595             /* Get the value from a foo(<param_value>) style call */
       
  2596             if (IN_param_value == NULL)
       
  2597               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2600             
       
  2601             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2602             {
       
  2603         
       
  2604                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2605                 s4o.print("(");
       
  2606                 return_type_symbol->accept(*this);
       
  2607                 s4o.print(")__sint_to_string(");
       
  2608                 IN_param_value->accept(*this);
       
  2609                 s4o.print(")");
       
  2610                 return NULL;
       
  2611                 
       
  2612             }
       
  2613             
       
  2614             ERROR;
       
  2615         }
       
  2616         
       
  2617     }/*function_dint_to_string*/
       
  2618     break;
       
  2619 
       
  2620 /****
       
  2621  *DINT_TO_BYTE
       
  2622  */
       
  2623     case function_dint_to_byte :
       
  2624     {
       
  2625         symbol_c *last_type_symbol = NULL;
       
  2626 
       
  2627         {
       
  2628             identifier_c param_name("IN");
       
  2629             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2630             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2631             
       
  2632             /* Get the value from a foo(<param_value>) style call */
       
  2633             if (IN_param_value == NULL)
       
  2634               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2637             
       
  2638             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2639             {
       
  2640         
       
  2641                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2642                 s4o.print("(");
       
  2643                 return_type_symbol->accept(*this);
       
  2644                 s4o.print(")");
       
  2645                 IN_param_value->accept(*this);
       
  2646                 return NULL;
       
  2647                 
       
  2648             }
       
  2649             
       
  2650             ERROR;
       
  2651         }
       
  2652         
       
  2653     }/*function_dint_to_byte*/
       
  2654     break;
       
  2655 
       
  2656 /****
       
  2657  *DINT_TO_WORD
       
  2658  */
       
  2659     case function_dint_to_word :
       
  2660     {
       
  2661         symbol_c *last_type_symbol = NULL;
       
  2662 
       
  2663         {
       
  2664             identifier_c param_name("IN");
       
  2665             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2666             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2667             
       
  2668             /* Get the value from a foo(<param_value>) style call */
       
  2669             if (IN_param_value == NULL)
       
  2670               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2673             
       
  2674             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2675             {
       
  2676         
       
  2677                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2678                 s4o.print("(");
       
  2679                 return_type_symbol->accept(*this);
       
  2680                 s4o.print(")");
       
  2681                 IN_param_value->accept(*this);
       
  2682                 return NULL;
       
  2683                 
       
  2684             }
       
  2685             
       
  2686             ERROR;
       
  2687         }
       
  2688         
       
  2689     }/*function_dint_to_word*/
       
  2690     break;
       
  2691 
       
  2692 /****
       
  2693  *DINT_TO_DWORD
       
  2694  */
       
  2695     case function_dint_to_dword :
       
  2696     {
       
  2697         symbol_c *last_type_symbol = NULL;
       
  2698 
       
  2699         {
       
  2700             identifier_c param_name("IN");
       
  2701             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2702             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2703             
       
  2704             /* Get the value from a foo(<param_value>) style call */
       
  2705             if (IN_param_value == NULL)
       
  2706               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2709             
       
  2710             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2711             {
       
  2712         
       
  2713                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2714                 s4o.print("(");
       
  2715                 return_type_symbol->accept(*this);
       
  2716                 s4o.print(")");
       
  2717                 IN_param_value->accept(*this);
       
  2718                 return NULL;
       
  2719                 
       
  2720             }
       
  2721             
       
  2722             ERROR;
       
  2723         }
       
  2724         
       
  2725     }/*function_dint_to_dword*/
       
  2726     break;
       
  2727 
       
  2728 /****
       
  2729  *DINT_TO_LWORD
       
  2730  */
       
  2731     case function_dint_to_lword :
       
  2732     {
       
  2733         symbol_c *last_type_symbol = NULL;
       
  2734 
       
  2735         {
       
  2736             identifier_c param_name("IN");
       
  2737             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2738             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2739             
       
  2740             /* Get the value from a foo(<param_value>) style call */
       
  2741             if (IN_param_value == NULL)
       
  2742               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2745             
       
  2746             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2747             {
       
  2748         
       
  2749                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2750                 s4o.print("(");
       
  2751                 return_type_symbol->accept(*this);
       
  2752                 s4o.print(")");
       
  2753                 IN_param_value->accept(*this);
       
  2754                 return NULL;
       
  2755                 
       
  2756             }
       
  2757             
       
  2758             ERROR;
       
  2759         }
       
  2760         
       
  2761     }/*function_dint_to_lword*/
       
  2762     break;
       
  2763 
       
  2764 /****
       
  2765  *LINT_TO_BOOL
       
  2766  */
       
  2767     case function_lint_to_bool :
       
  2768     {
       
  2769         symbol_c *last_type_symbol = NULL;
       
  2770 
       
  2771         {
       
  2772             identifier_c param_name("IN");
       
  2773             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2774             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2775             
       
  2776             /* Get the value from a foo(<param_value>) style call */
       
  2777             if (IN_param_value == NULL)
       
  2778               IN_param_value = function_call_param_iterator.next();
       
  2779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2781             
       
  2782             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2783             {
       
  2784         
       
  2785                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2786                 s4o.print("(");
       
  2787                 return_type_symbol->accept(*this);
       
  2788                 s4o.print(")");
       
  2789                 IN_param_value->accept(*this);
       
  2790                 return NULL;
       
  2791                 
       
  2792             }
       
  2793             
       
  2794             ERROR;
       
  2795         }
       
  2796         
       
  2797     }/*function_lint_to_bool*/
       
  2798     break;
       
  2799 
       
  2800 /****
       
  2801  *LINT_TO_SINT
       
  2802  */
       
  2803     case function_lint_to_sint :
       
  2804     {
       
  2805         symbol_c *last_type_symbol = NULL;
       
  2806 
       
  2807         {
       
  2808             identifier_c param_name("IN");
       
  2809             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2810             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2811             
       
  2812             /* Get the value from a foo(<param_value>) style call */
       
  2813             if (IN_param_value == NULL)
       
  2814               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2817             
       
  2818             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2819             {
       
  2820         
       
  2821                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2822                 s4o.print("(");
       
  2823                 return_type_symbol->accept(*this);
       
  2824                 s4o.print(")");
       
  2825                 IN_param_value->accept(*this);
       
  2826                 return NULL;
       
  2827                 
       
  2828             }
       
  2829             
       
  2830             ERROR;
       
  2831         }
       
  2832         
       
  2833     }/*function_lint_to_sint*/
       
  2834     break;
       
  2835 
       
  2836 /****
       
  2837  *LINT_TO_INT
       
  2838  */
       
  2839     case function_lint_to_int :
       
  2840     {
       
  2841         symbol_c *last_type_symbol = NULL;
       
  2842 
       
  2843         {
       
  2844             identifier_c param_name("IN");
       
  2845             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2846             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2847             
       
  2848             /* Get the value from a foo(<param_value>) style call */
       
  2849             if (IN_param_value == NULL)
       
  2850               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2853             
       
  2854             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2855             {
       
  2856         
       
  2857                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2858                 s4o.print("(");
       
  2859                 return_type_symbol->accept(*this);
       
  2860                 s4o.print(")");
       
  2861                 IN_param_value->accept(*this);
       
  2862                 return NULL;
       
  2863                 
       
  2864             }
       
  2865             
       
  2866             ERROR;
       
  2867         }
       
  2868         
       
  2869     }/*function_lint_to_int*/
       
  2870     break;
       
  2871 
       
  2872 /****
       
  2873  *LINT_TO_DINT
       
  2874  */
       
  2875     case function_lint_to_dint :
       
  2876     {
       
  2877         symbol_c *last_type_symbol = NULL;
       
  2878 
       
  2879         {
       
  2880             identifier_c param_name("IN");
       
  2881             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2882             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2883             
       
  2884             /* Get the value from a foo(<param_value>) style call */
       
  2885             if (IN_param_value == NULL)
       
  2886               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2889             
       
  2890             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2891             {
       
  2892         
       
  2893                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2894                 s4o.print("(");
       
  2895                 return_type_symbol->accept(*this);
       
  2896                 s4o.print(")");
       
  2897                 IN_param_value->accept(*this);
       
  2898                 return NULL;
       
  2899                 
       
  2900             }
       
  2901             
       
  2902             ERROR;
       
  2903         }
       
  2904         
       
  2905     }/*function_lint_to_dint*/
       
  2906     break;
       
  2907 
       
  2908 /****
       
  2909  *LINT_TO_USINT
       
  2910  */
       
  2911     case function_lint_to_usint :
       
  2912     {
       
  2913         symbol_c *last_type_symbol = NULL;
       
  2914 
       
  2915         {
       
  2916             identifier_c param_name("IN");
       
  2917             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2918             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2919             
       
  2920             /* Get the value from a foo(<param_value>) style call */
       
  2921             if (IN_param_value == NULL)
       
  2922               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2925             
       
  2926             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2927             {
       
  2928         
       
  2929                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2930                 s4o.print("(");
       
  2931                 return_type_symbol->accept(*this);
       
  2932                 s4o.print(")");
       
  2933                 IN_param_value->accept(*this);
       
  2934                 return NULL;
       
  2935                 
       
  2936             }
       
  2937             
       
  2938             ERROR;
       
  2939         }
       
  2940         
       
  2941     }/*function_lint_to_usint*/
       
  2942     break;
       
  2943 
       
  2944 /****
       
  2945  *LINT_TO_UINT
       
  2946  */
       
  2947     case function_lint_to_uint :
       
  2948     {
       
  2949         symbol_c *last_type_symbol = NULL;
       
  2950 
       
  2951         {
       
  2952             identifier_c param_name("IN");
       
  2953             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2954             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2955             
       
  2956             /* Get the value from a foo(<param_value>) style call */
       
  2957             if (IN_param_value == NULL)
       
  2958               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2961             
       
  2962             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2963             {
       
  2964         
       
  2965                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2966                 s4o.print("(");
       
  2967                 return_type_symbol->accept(*this);
       
  2968                 s4o.print(")");
       
  2969                 IN_param_value->accept(*this);
       
  2970                 return NULL;
       
  2971                 
       
  2972             }
       
  2973             
       
  2974             ERROR;
       
  2975         }
       
  2976         
       
  2977     }/*function_lint_to_uint*/
       
  2978     break;
       
  2979 
       
  2980 /****
       
  2981  *LINT_TO_UDINT
       
  2982  */
       
  2983     case function_lint_to_udint :
       
  2984     {
       
  2985         symbol_c *last_type_symbol = NULL;
       
  2986 
       
  2987         {
       
  2988             identifier_c param_name("IN");
       
  2989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2990             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2991             
       
  2992             /* Get the value from a foo(<param_value>) style call */
       
  2993             if (IN_param_value == NULL)
       
  2994               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2997             
       
  2998             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  2999             {
       
  3000         
       
  3001                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3002                 s4o.print("(");
       
  3003                 return_type_symbol->accept(*this);
       
  3004                 s4o.print(")");
       
  3005                 IN_param_value->accept(*this);
       
  3006                 return NULL;
       
  3007                 
       
  3008             }
       
  3009             
       
  3010             ERROR;
       
  3011         }
       
  3012         
       
  3013     }/*function_lint_to_udint*/
       
  3014     break;
       
  3015 
       
  3016 /****
       
  3017  *LINT_TO_ULINT
       
  3018  */
       
  3019     case function_lint_to_ulint :
       
  3020     {
       
  3021         symbol_c *last_type_symbol = NULL;
       
  3022 
       
  3023         {
       
  3024             identifier_c param_name("IN");
       
  3025             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3026             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3027             
       
  3028             /* Get the value from a foo(<param_value>) style call */
       
  3029             if (IN_param_value == NULL)
       
  3030               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3033             
       
  3034             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3035             {
       
  3036         
       
  3037                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3038                 s4o.print("(");
       
  3039                 return_type_symbol->accept(*this);
       
  3040                 s4o.print(")");
       
  3041                 IN_param_value->accept(*this);
       
  3042                 return NULL;
       
  3043                 
       
  3044             }
       
  3045             
       
  3046             ERROR;
       
  3047         }
       
  3048         
       
  3049     }/*function_lint_to_ulint*/
       
  3050     break;
       
  3051 
       
  3052 /****
       
  3053  *LINT_TO_REAL
       
  3054  */
       
  3055     case function_lint_to_real :
       
  3056     {
       
  3057         symbol_c *last_type_symbol = NULL;
       
  3058 
       
  3059         {
       
  3060             identifier_c param_name("IN");
       
  3061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3062             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3063             
       
  3064             /* Get the value from a foo(<param_value>) style call */
       
  3065             if (IN_param_value == NULL)
       
  3066               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3069             
       
  3070             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3071             {
       
  3072         
       
  3073                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3074                 s4o.print("(");
       
  3075                 return_type_symbol->accept(*this);
       
  3076                 s4o.print(")");
       
  3077                 IN_param_value->accept(*this);
       
  3078                 return NULL;
       
  3079                 
       
  3080             }
       
  3081             
       
  3082             ERROR;
       
  3083         }
       
  3084         
       
  3085     }/*function_lint_to_real*/
       
  3086     break;
       
  3087 
       
  3088 /****
       
  3089  *LINT_TO_LREAL
       
  3090  */
       
  3091     case function_lint_to_lreal :
       
  3092     {
       
  3093         symbol_c *last_type_symbol = NULL;
       
  3094 
       
  3095         {
       
  3096             identifier_c param_name("IN");
       
  3097             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3098             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3099             
       
  3100             /* Get the value from a foo(<param_value>) style call */
       
  3101             if (IN_param_value == NULL)
       
  3102               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3105             
       
  3106             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3107             {
       
  3108         
       
  3109                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3110                 s4o.print("(");
       
  3111                 return_type_symbol->accept(*this);
       
  3112                 s4o.print(")");
       
  3113                 IN_param_value->accept(*this);
       
  3114                 return NULL;
       
  3115                 
       
  3116             }
       
  3117             
       
  3118             ERROR;
       
  3119         }
       
  3120         
       
  3121     }/*function_lint_to_lreal*/
       
  3122     break;
       
  3123 
       
  3124 /****
       
  3125  *LINT_TO_TIME
       
  3126  */
       
  3127     case function_lint_to_time :
       
  3128     {
       
  3129         symbol_c *last_type_symbol = NULL;
       
  3130 
       
  3131         {
       
  3132             identifier_c param_name("IN");
       
  3133             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3134             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3135             
       
  3136             /* Get the value from a foo(<param_value>) style call */
       
  3137             if (IN_param_value == NULL)
       
  3138               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3141             
       
  3142             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3143             {
       
  3144         
       
  3145                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3146                 s4o.print("(");
       
  3147                 return_type_symbol->accept(*this);
       
  3148                 s4o.print(")__int_to_time(");
       
  3149                 IN_param_value->accept(*this);
       
  3150                 s4o.print(")");
       
  3151                 return NULL;
       
  3152                 
       
  3153             }
       
  3154             
       
  3155             ERROR;
       
  3156         }
       
  3157         
       
  3158     }/*function_lint_to_time*/
       
  3159     break;
       
  3160 
       
  3161 /****
       
  3162  *LINT_TO_DATE
       
  3163  */
       
  3164     case function_lint_to_date :
       
  3165     {
       
  3166         symbol_c *last_type_symbol = NULL;
       
  3167 
       
  3168         {
       
  3169             identifier_c param_name("IN");
       
  3170             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3171             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3172             
       
  3173             /* Get the value from a foo(<param_value>) style call */
       
  3174             if (IN_param_value == NULL)
       
  3175               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3178             
       
  3179             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3180             {
       
  3181         
       
  3182                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3183                 s4o.print("(");
       
  3184                 return_type_symbol->accept(*this);
       
  3185                 s4o.print(")__int_to_time(");
       
  3186                 IN_param_value->accept(*this);
       
  3187                 s4o.print(")");
       
  3188                 return NULL;
       
  3189                 
       
  3190             }
       
  3191             
       
  3192             ERROR;
       
  3193         }
       
  3194         
       
  3195     }/*function_lint_to_date*/
       
  3196     break;
       
  3197 
       
  3198 /****
       
  3199  *LINT_TO_TOD
       
  3200  */
       
  3201     case function_lint_to_tod :
       
  3202     {
       
  3203         symbol_c *last_type_symbol = NULL;
       
  3204 
       
  3205         {
       
  3206             identifier_c param_name("IN");
       
  3207             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3208             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3209             
       
  3210             /* Get the value from a foo(<param_value>) style call */
       
  3211             if (IN_param_value == NULL)
       
  3212               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3215             
       
  3216             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3217             {
       
  3218         
       
  3219                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3220                 s4o.print("(");
       
  3221                 return_type_symbol->accept(*this);
       
  3222                 s4o.print(")__int_to_time(");
       
  3223                 IN_param_value->accept(*this);
       
  3224                 s4o.print(")");
       
  3225                 return NULL;
       
  3226                 
       
  3227             }
       
  3228             
       
  3229             ERROR;
       
  3230         }
       
  3231         
       
  3232     }/*function_lint_to_tod*/
       
  3233     break;
       
  3234 
       
  3235 /****
       
  3236  *LINT_TO_DT
       
  3237  */
       
  3238     case function_lint_to_dt :
       
  3239     {
       
  3240         symbol_c *last_type_symbol = NULL;
       
  3241 
       
  3242         {
       
  3243             identifier_c param_name("IN");
       
  3244             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3245             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3246             
       
  3247             /* Get the value from a foo(<param_value>) style call */
       
  3248             if (IN_param_value == NULL)
       
  3249               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3252             
       
  3253             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3254             {
       
  3255         
       
  3256                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3257                 s4o.print("(");
       
  3258                 return_type_symbol->accept(*this);
       
  3259                 s4o.print(")__int_to_time(");
       
  3260                 IN_param_value->accept(*this);
       
  3261                 s4o.print(")");
       
  3262                 return NULL;
       
  3263                 
       
  3264             }
       
  3265             
       
  3266             ERROR;
       
  3267         }
       
  3268         
       
  3269     }/*function_lint_to_dt*/
       
  3270     break;
       
  3271 
       
  3272 /****
       
  3273  *LINT_TO_STRING
       
  3274  */
       
  3275     case function_lint_to_string :
       
  3276     {
       
  3277         symbol_c *last_type_symbol = NULL;
       
  3278 
       
  3279         {
       
  3280             identifier_c param_name("IN");
       
  3281             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3282             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3283             
       
  3284             /* Get the value from a foo(<param_value>) style call */
       
  3285             if (IN_param_value == NULL)
       
  3286               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3289             
       
  3290             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3291             {
       
  3292         
       
  3293                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3294                 s4o.print("(");
       
  3295                 return_type_symbol->accept(*this);
       
  3296                 s4o.print(")__sint_to_string(");
       
  3297                 IN_param_value->accept(*this);
       
  3298                 s4o.print(")");
       
  3299                 return NULL;
       
  3300                 
       
  3301             }
       
  3302             
       
  3303             ERROR;
       
  3304         }
       
  3305         
       
  3306     }/*function_lint_to_string*/
       
  3307     break;
       
  3308 
       
  3309 /****
       
  3310  *LINT_TO_BYTE
       
  3311  */
       
  3312     case function_lint_to_byte :
       
  3313     {
       
  3314         symbol_c *last_type_symbol = NULL;
       
  3315 
       
  3316         {
       
  3317             identifier_c param_name("IN");
       
  3318             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3319             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3320             
       
  3321             /* Get the value from a foo(<param_value>) style call */
       
  3322             if (IN_param_value == NULL)
       
  3323               IN_param_value = function_call_param_iterator.next();
       
  3324             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3325             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3326             
       
  3327             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3328             {
       
  3329         
       
  3330                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3331                 s4o.print("(");
       
  3332                 return_type_symbol->accept(*this);
       
  3333                 s4o.print(")");
       
  3334                 IN_param_value->accept(*this);
       
  3335                 return NULL;
       
  3336                 
       
  3337             }
       
  3338             
       
  3339             ERROR;
       
  3340         }
       
  3341         
       
  3342     }/*function_lint_to_byte*/
       
  3343     break;
       
  3344 
       
  3345 /****
       
  3346  *LINT_TO_WORD
       
  3347  */
       
  3348     case function_lint_to_word :
       
  3349     {
       
  3350         symbol_c *last_type_symbol = NULL;
       
  3351 
       
  3352         {
       
  3353             identifier_c param_name("IN");
       
  3354             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3355             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3356             
       
  3357             /* Get the value from a foo(<param_value>) style call */
       
  3358             if (IN_param_value == NULL)
       
  3359               IN_param_value = function_call_param_iterator.next();
       
  3360             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3361             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3362             
       
  3363             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3364             {
       
  3365         
       
  3366                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3367                 s4o.print("(");
       
  3368                 return_type_symbol->accept(*this);
       
  3369                 s4o.print(")");
       
  3370                 IN_param_value->accept(*this);
       
  3371                 return NULL;
       
  3372                 
       
  3373             }
       
  3374             
       
  3375             ERROR;
       
  3376         }
       
  3377         
       
  3378     }/*function_lint_to_word*/
       
  3379     break;
       
  3380 
       
  3381 /****
       
  3382  *LINT_TO_DWORD
       
  3383  */
       
  3384     case function_lint_to_dword :
       
  3385     {
       
  3386         symbol_c *last_type_symbol = NULL;
       
  3387 
       
  3388         {
       
  3389             identifier_c param_name("IN");
       
  3390             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3391             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3392             
       
  3393             /* Get the value from a foo(<param_value>) style call */
       
  3394             if (IN_param_value == NULL)
       
  3395               IN_param_value = function_call_param_iterator.next();
       
  3396             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3397             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3398             
       
  3399             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3400             {
       
  3401         
       
  3402                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3403                 s4o.print("(");
       
  3404                 return_type_symbol->accept(*this);
       
  3405                 s4o.print(")");
       
  3406                 IN_param_value->accept(*this);
       
  3407                 return NULL;
       
  3408                 
       
  3409             }
       
  3410             
       
  3411             ERROR;
       
  3412         }
       
  3413         
       
  3414     }/*function_lint_to_dword*/
       
  3415     break;
       
  3416 
       
  3417 /****
       
  3418  *LINT_TO_LWORD
       
  3419  */
       
  3420     case function_lint_to_lword :
       
  3421     {
       
  3422         symbol_c *last_type_symbol = NULL;
       
  3423 
       
  3424         {
       
  3425             identifier_c param_name("IN");
       
  3426             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3427             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3428             
       
  3429             /* Get the value from a foo(<param_value>) style call */
       
  3430             if (IN_param_value == NULL)
       
  3431               IN_param_value = function_call_param_iterator.next();
       
  3432             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3433             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3434             
       
  3435             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3436             {
       
  3437         
       
  3438                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3439                 s4o.print("(");
       
  3440                 return_type_symbol->accept(*this);
       
  3441                 s4o.print(")");
       
  3442                 IN_param_value->accept(*this);
       
  3443                 return NULL;
       
  3444                 
       
  3445             }
       
  3446             
       
  3447             ERROR;
       
  3448         }
       
  3449         
       
  3450     }/*function_lint_to_lword*/
       
  3451     break;
       
  3452 
       
  3453 /****
       
  3454  *USINT_TO_BOOL
       
  3455  */
       
  3456     case function_usint_to_bool :
       
  3457     {
       
  3458         symbol_c *last_type_symbol = NULL;
       
  3459 
       
  3460         {
       
  3461             identifier_c param_name("IN");
       
  3462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3464             
       
  3465             /* Get the value from a foo(<param_value>) style call */
       
  3466             if (IN_param_value == NULL)
       
  3467               IN_param_value = function_call_param_iterator.next();
       
  3468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3470             
       
  3471             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3472             {
       
  3473         
       
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3475                 s4o.print("(");
       
  3476                 return_type_symbol->accept(*this);
       
  3477                 s4o.print(")");
       
  3478                 IN_param_value->accept(*this);
       
  3479                 return NULL;
       
  3480                 
       
  3481             }
       
  3482             
       
  3483             ERROR;
       
  3484         }
       
  3485         
       
  3486     }/*function_usint_to_bool*/
       
  3487     break;
       
  3488 
       
  3489 /****
       
  3490  *USINT_TO_SINT
       
  3491  */
       
  3492     case function_usint_to_sint :
       
  3493     {
       
  3494         symbol_c *last_type_symbol = NULL;
       
  3495 
       
  3496         {
       
  3497             identifier_c param_name("IN");
       
  3498             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3499             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3500             
       
  3501             /* Get the value from a foo(<param_value>) style call */
       
  3502             if (IN_param_value == NULL)
       
  3503               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3506             
       
  3507             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3508             {
       
  3509         
       
  3510                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3511                 s4o.print("(");
       
  3512                 return_type_symbol->accept(*this);
       
  3513                 s4o.print(")");
       
  3514                 IN_param_value->accept(*this);
       
  3515                 return NULL;
       
  3516                 
       
  3517             }
       
  3518             
       
  3519             ERROR;
       
  3520         }
       
  3521         
       
  3522     }/*function_usint_to_sint*/
       
  3523     break;
       
  3524 
       
  3525 /****
       
  3526  *USINT_TO_INT
       
  3527  */
       
  3528     case function_usint_to_int :
       
  3529     {
       
  3530         symbol_c *last_type_symbol = NULL;
       
  3531 
       
  3532         {
       
  3533             identifier_c param_name("IN");
       
  3534             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3535             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3536             
       
  3537             /* Get the value from a foo(<param_value>) style call */
       
  3538             if (IN_param_value == NULL)
       
  3539               IN_param_value = function_call_param_iterator.next();
       
  3540             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3541             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3542             
       
  3543             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3544             {
       
  3545         
       
  3546                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3547                 s4o.print("(");
       
  3548                 return_type_symbol->accept(*this);
       
  3549                 s4o.print(")");
       
  3550                 IN_param_value->accept(*this);
       
  3551                 return NULL;
       
  3552                 
       
  3553             }
       
  3554             
       
  3555             ERROR;
       
  3556         }
       
  3557         
       
  3558     }/*function_usint_to_int*/
       
  3559     break;
       
  3560 
       
  3561 /****
       
  3562  *USINT_TO_DINT
       
  3563  */
       
  3564     case function_usint_to_dint :
       
  3565     {
       
  3566         symbol_c *last_type_symbol = NULL;
       
  3567 
       
  3568         {
       
  3569             identifier_c param_name("IN");
       
  3570             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3571             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3572             
       
  3573             /* Get the value from a foo(<param_value>) style call */
       
  3574             if (IN_param_value == NULL)
       
  3575               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3578             
       
  3579             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3580             {
       
  3581         
       
  3582                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3583                 s4o.print("(");
       
  3584                 return_type_symbol->accept(*this);
       
  3585                 s4o.print(")");
       
  3586                 IN_param_value->accept(*this);
       
  3587                 return NULL;
       
  3588                 
       
  3589             }
       
  3590             
       
  3591             ERROR;
       
  3592         }
       
  3593         
       
  3594     }/*function_usint_to_dint*/
       
  3595     break;
       
  3596 
       
  3597 /****
       
  3598  *USINT_TO_LINT
       
  3599  */
       
  3600     case function_usint_to_lint :
       
  3601     {
       
  3602         symbol_c *last_type_symbol = NULL;
       
  3603 
       
  3604         {
       
  3605             identifier_c param_name("IN");
       
  3606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3607             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3608             
       
  3609             /* Get the value from a foo(<param_value>) style call */
       
  3610             if (IN_param_value == NULL)
       
  3611               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3614             
       
  3615             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3616             {
       
  3617         
       
  3618                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3619                 s4o.print("(");
       
  3620                 return_type_symbol->accept(*this);
       
  3621                 s4o.print(")");
       
  3622                 IN_param_value->accept(*this);
       
  3623                 return NULL;
       
  3624                 
       
  3625             }
       
  3626             
       
  3627             ERROR;
       
  3628         }
       
  3629         
       
  3630     }/*function_usint_to_lint*/
       
  3631     break;
       
  3632 
       
  3633 /****
       
  3634  *USINT_TO_UINT
       
  3635  */
       
  3636     case function_usint_to_uint :
       
  3637     {
       
  3638         symbol_c *last_type_symbol = NULL;
       
  3639 
       
  3640         {
       
  3641             identifier_c param_name("IN");
       
  3642             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3643             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3644             
       
  3645             /* Get the value from a foo(<param_value>) style call */
       
  3646             if (IN_param_value == NULL)
       
  3647               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3650             
       
  3651             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3652             {
       
  3653         
       
  3654                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3655                 s4o.print("(");
       
  3656                 return_type_symbol->accept(*this);
       
  3657                 s4o.print(")");
       
  3658                 IN_param_value->accept(*this);
       
  3659                 return NULL;
       
  3660                 
       
  3661             }
       
  3662             
       
  3663             ERROR;
       
  3664         }
       
  3665         
       
  3666     }/*function_usint_to_uint*/
       
  3667     break;
       
  3668 
       
  3669 /****
       
  3670  *USINT_TO_UDINT
       
  3671  */
       
  3672     case function_usint_to_udint :
       
  3673     {
       
  3674         symbol_c *last_type_symbol = NULL;
       
  3675 
       
  3676         {
       
  3677             identifier_c param_name("IN");
       
  3678             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3679             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3680             
       
  3681             /* Get the value from a foo(<param_value>) style call */
       
  3682             if (IN_param_value == NULL)
       
  3683               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3686             
       
  3687             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3688             {
       
  3689         
       
  3690                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3691                 s4o.print("(");
       
  3692                 return_type_symbol->accept(*this);
       
  3693                 s4o.print(")");
       
  3694                 IN_param_value->accept(*this);
       
  3695                 return NULL;
       
  3696                 
       
  3697             }
       
  3698             
       
  3699             ERROR;
       
  3700         }
       
  3701         
       
  3702     }/*function_usint_to_udint*/
       
  3703     break;
       
  3704 
       
  3705 /****
       
  3706  *USINT_TO_ULINT
       
  3707  */
       
  3708     case function_usint_to_ulint :
       
  3709     {
       
  3710         symbol_c *last_type_symbol = NULL;
       
  3711 
       
  3712         {
       
  3713             identifier_c param_name("IN");
       
  3714             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3715             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3716             
       
  3717             /* Get the value from a foo(<param_value>) style call */
       
  3718             if (IN_param_value == NULL)
       
  3719               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3722             
       
  3723             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3724             {
       
  3725         
       
  3726                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3727                 s4o.print("(");
       
  3728                 return_type_symbol->accept(*this);
       
  3729                 s4o.print(")");
       
  3730                 IN_param_value->accept(*this);
       
  3731                 return NULL;
       
  3732                 
       
  3733             }
       
  3734             
       
  3735             ERROR;
       
  3736         }
       
  3737         
       
  3738     }/*function_usint_to_ulint*/
       
  3739     break;
       
  3740 
       
  3741 /****
       
  3742  *USINT_TO_REAL
       
  3743  */
       
  3744     case function_usint_to_real :
       
  3745     {
       
  3746         symbol_c *last_type_symbol = NULL;
       
  3747 
       
  3748         {
       
  3749             identifier_c param_name("IN");
       
  3750             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3751             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3752             
       
  3753             /* Get the value from a foo(<param_value>) style call */
       
  3754             if (IN_param_value == NULL)
       
  3755               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3758             
       
  3759             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3760             {
       
  3761         
       
  3762                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3763                 s4o.print("(");
       
  3764                 return_type_symbol->accept(*this);
       
  3765                 s4o.print(")");
       
  3766                 IN_param_value->accept(*this);
       
  3767                 return NULL;
       
  3768                 
       
  3769             }
       
  3770             
       
  3771             ERROR;
       
  3772         }
       
  3773         
       
  3774     }/*function_usint_to_real*/
       
  3775     break;
       
  3776 
       
  3777 /****
       
  3778  *USINT_TO_LREAL
       
  3779  */
       
  3780     case function_usint_to_lreal :
       
  3781     {
       
  3782         symbol_c *last_type_symbol = NULL;
       
  3783 
       
  3784         {
       
  3785             identifier_c param_name("IN");
       
  3786             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3787             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3788             
       
  3789             /* Get the value from a foo(<param_value>) style call */
       
  3790             if (IN_param_value == NULL)
       
  3791               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3794             
       
  3795             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3796             {
       
  3797         
       
  3798                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3799                 s4o.print("(");
       
  3800                 return_type_symbol->accept(*this);
       
  3801                 s4o.print(")");
       
  3802                 IN_param_value->accept(*this);
       
  3803                 return NULL;
       
  3804                 
       
  3805             }
       
  3806             
       
  3807             ERROR;
       
  3808         }
       
  3809         
       
  3810     }/*function_usint_to_lreal*/
       
  3811     break;
       
  3812 
       
  3813 /****
       
  3814  *USINT_TO_TIME
       
  3815  */
       
  3816     case function_usint_to_time :
       
  3817     {
       
  3818         symbol_c *last_type_symbol = NULL;
       
  3819 
       
  3820         {
       
  3821             identifier_c param_name("IN");
       
  3822             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3823             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3824             
       
  3825             /* Get the value from a foo(<param_value>) style call */
       
  3826             if (IN_param_value == NULL)
       
  3827               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3830             
       
  3831             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3832             {
       
  3833         
       
  3834                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3835                 s4o.print("(");
       
  3836                 return_type_symbol->accept(*this);
       
  3837                 s4o.print(")__int_to_time(");
       
  3838                 IN_param_value->accept(*this);
       
  3839                 s4o.print(")");
       
  3840                 return NULL;
       
  3841                 
       
  3842             }
       
  3843             
       
  3844             ERROR;
       
  3845         }
       
  3846         
       
  3847     }/*function_usint_to_time*/
       
  3848     break;
       
  3849 
       
  3850 /****
       
  3851  *USINT_TO_DATE
       
  3852  */
       
  3853     case function_usint_to_date :
       
  3854     {
       
  3855         symbol_c *last_type_symbol = NULL;
       
  3856 
       
  3857         {
       
  3858             identifier_c param_name("IN");
       
  3859             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3860             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3861             
       
  3862             /* Get the value from a foo(<param_value>) style call */
       
  3863             if (IN_param_value == NULL)
       
  3864               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3867             
       
  3868             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3869             {
       
  3870         
       
  3871                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3872                 s4o.print("(");
       
  3873                 return_type_symbol->accept(*this);
       
  3874                 s4o.print(")__int_to_time(");
       
  3875                 IN_param_value->accept(*this);
       
  3876                 s4o.print(")");
       
  3877                 return NULL;
       
  3878                 
       
  3879             }
       
  3880             
       
  3881             ERROR;
       
  3882         }
       
  3883         
       
  3884     }/*function_usint_to_date*/
       
  3885     break;
       
  3886 
       
  3887 /****
       
  3888  *USINT_TO_TOD
       
  3889  */
       
  3890     case function_usint_to_tod :
       
  3891     {
       
  3892         symbol_c *last_type_symbol = NULL;
       
  3893 
       
  3894         {
       
  3895             identifier_c param_name("IN");
       
  3896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3898             
       
  3899             /* Get the value from a foo(<param_value>) style call */
       
  3900             if (IN_param_value == NULL)
       
  3901               IN_param_value = function_call_param_iterator.next();
       
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3904             
       
  3905             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3906             {
       
  3907         
       
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3909                 s4o.print("(");
       
  3910                 return_type_symbol->accept(*this);
       
  3911                 s4o.print(")__int_to_time(");
       
  3912                 IN_param_value->accept(*this);
       
  3913                 s4o.print(")");
       
  3914                 return NULL;
       
  3915                 
       
  3916             }
       
  3917             
       
  3918             ERROR;
       
  3919         }
       
  3920         
       
  3921     }/*function_usint_to_tod*/
       
  3922     break;
       
  3923 
       
  3924 /****
       
  3925  *USINT_TO_DT
       
  3926  */
       
  3927     case function_usint_to_dt :
       
  3928     {
       
  3929         symbol_c *last_type_symbol = NULL;
       
  3930 
       
  3931         {
       
  3932             identifier_c param_name("IN");
       
  3933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3934             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3935             
       
  3936             /* Get the value from a foo(<param_value>) style call */
       
  3937             if (IN_param_value == NULL)
       
  3938               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3941             
       
  3942             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3943             {
       
  3944         
       
  3945                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3946                 s4o.print("(");
       
  3947                 return_type_symbol->accept(*this);
       
  3948                 s4o.print(")__int_to_time(");
       
  3949                 IN_param_value->accept(*this);
       
  3950                 s4o.print(")");
       
  3951                 return NULL;
       
  3952                 
       
  3953             }
       
  3954             
       
  3955             ERROR;
       
  3956         }
       
  3957         
       
  3958     }/*function_usint_to_dt*/
       
  3959     break;
       
  3960 
       
  3961 /****
       
  3962  *USINT_TO_STRING
       
  3963  */
       
  3964     case function_usint_to_string :
       
  3965     {
       
  3966         symbol_c *last_type_symbol = NULL;
       
  3967 
       
  3968         {
       
  3969             identifier_c param_name("IN");
       
  3970             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3971             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3972             
       
  3973             /* Get the value from a foo(<param_value>) style call */
       
  3974             if (IN_param_value == NULL)
       
  3975               IN_param_value = function_call_param_iterator.next();
       
  3976             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3977             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3978             
       
  3979             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3980             {
       
  3981         
       
  3982                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3983                 s4o.print("(");
       
  3984                 return_type_symbol->accept(*this);
       
  3985                 s4o.print(")__uint_to_string(");
       
  3986                 IN_param_value->accept(*this);
       
  3987                 s4o.print(")");
       
  3988                 return NULL;
       
  3989                 
       
  3990             }
       
  3991             
       
  3992             ERROR;
       
  3993         }
       
  3994         
       
  3995     }/*function_usint_to_string*/
       
  3996     break;
       
  3997 
       
  3998 /****
       
  3999  *USINT_TO_BYTE
       
  4000  */
       
  4001     case function_usint_to_byte :
       
  4002     {
       
  4003         symbol_c *last_type_symbol = NULL;
       
  4004 
       
  4005         {
       
  4006             identifier_c param_name("IN");
       
  4007             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4008             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4009             
       
  4010             /* Get the value from a foo(<param_value>) style call */
       
  4011             if (IN_param_value == NULL)
       
  4012               IN_param_value = function_call_param_iterator.next();
       
  4013             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4014             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4015             
       
  4016             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4017             {
       
  4018         
       
  4019                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4020                 s4o.print("(");
       
  4021                 return_type_symbol->accept(*this);
       
  4022                 s4o.print(")");
       
  4023                 IN_param_value->accept(*this);
       
  4024                 return NULL;
       
  4025                 
       
  4026             }
       
  4027             
       
  4028             ERROR;
       
  4029         }
       
  4030         
       
  4031     }/*function_usint_to_byte*/
       
  4032     break;
       
  4033 
       
  4034 /****
       
  4035  *USINT_TO_WORD
       
  4036  */
       
  4037     case function_usint_to_word :
       
  4038     {
       
  4039         symbol_c *last_type_symbol = NULL;
       
  4040 
       
  4041         {
       
  4042             identifier_c param_name("IN");
       
  4043             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4044             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4045             
       
  4046             /* Get the value from a foo(<param_value>) style call */
       
  4047             if (IN_param_value == NULL)
       
  4048               IN_param_value = function_call_param_iterator.next();
       
  4049             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4050             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4051             
       
  4052             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4053             {
       
  4054         
       
  4055                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4056                 s4o.print("(");
       
  4057                 return_type_symbol->accept(*this);
       
  4058                 s4o.print(")");
       
  4059                 IN_param_value->accept(*this);
       
  4060                 return NULL;
       
  4061                 
       
  4062             }
       
  4063             
       
  4064             ERROR;
       
  4065         }
       
  4066         
       
  4067     }/*function_usint_to_word*/
       
  4068     break;
       
  4069 
       
  4070 /****
       
  4071  *USINT_TO_DWORD
       
  4072  */
       
  4073     case function_usint_to_dword :
       
  4074     {
       
  4075         symbol_c *last_type_symbol = NULL;
       
  4076 
       
  4077         {
       
  4078             identifier_c param_name("IN");
       
  4079             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4080             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4081             
       
  4082             /* Get the value from a foo(<param_value>) style call */
       
  4083             if (IN_param_value == NULL)
       
  4084               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4087             
       
  4088             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4089             {
       
  4090         
       
  4091                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4092                 s4o.print("(");
       
  4093                 return_type_symbol->accept(*this);
       
  4094                 s4o.print(")");
       
  4095                 IN_param_value->accept(*this);
       
  4096                 return NULL;
       
  4097                 
       
  4098             }
       
  4099             
       
  4100             ERROR;
       
  4101         }
       
  4102         
       
  4103     }/*function_usint_to_dword*/
       
  4104     break;
       
  4105 
       
  4106 /****
       
  4107  *USINT_TO_LWORD
       
  4108  */
       
  4109     case function_usint_to_lword :
       
  4110     {
       
  4111         symbol_c *last_type_symbol = NULL;
       
  4112 
       
  4113         {
       
  4114             identifier_c param_name("IN");
       
  4115             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4116             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4117             
       
  4118             /* Get the value from a foo(<param_value>) style call */
       
  4119             if (IN_param_value == NULL)
       
  4120               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4123             
       
  4124             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4125             {
       
  4126         
       
  4127                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4128                 s4o.print("(");
       
  4129                 return_type_symbol->accept(*this);
       
  4130                 s4o.print(")");
       
  4131                 IN_param_value->accept(*this);
       
  4132                 return NULL;
       
  4133                 
       
  4134             }
       
  4135             
       
  4136             ERROR;
       
  4137         }
       
  4138         
       
  4139     }/*function_usint_to_lword*/
       
  4140     break;
       
  4141 
       
  4142 /****
       
  4143  *UINT_TO_BOOL
       
  4144  */
       
  4145     case function_uint_to_bool :
       
  4146     {
       
  4147         symbol_c *last_type_symbol = NULL;
       
  4148 
       
  4149         {
       
  4150             identifier_c param_name("IN");
       
  4151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4153             
       
  4154             /* Get the value from a foo(<param_value>) style call */
       
  4155             if (IN_param_value == NULL)
       
  4156               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4159             
       
  4160             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4161             {
       
  4162         
       
  4163                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4164                 s4o.print("(");
       
  4165                 return_type_symbol->accept(*this);
       
  4166                 s4o.print(")");
       
  4167                 IN_param_value->accept(*this);
       
  4168                 return NULL;
       
  4169                 
       
  4170             }
       
  4171             
       
  4172             ERROR;
       
  4173         }
       
  4174         
       
  4175     }/*function_uint_to_bool*/
       
  4176     break;
       
  4177 
       
  4178 /****
       
  4179  *UINT_TO_SINT
       
  4180  */
       
  4181     case function_uint_to_sint :
       
  4182     {
       
  4183         symbol_c *last_type_symbol = NULL;
       
  4184 
       
  4185         {
       
  4186             identifier_c param_name("IN");
       
  4187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4189             
       
  4190             /* Get the value from a foo(<param_value>) style call */
       
  4191             if (IN_param_value == NULL)
       
  4192               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4195             
       
  4196             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4197             {
       
  4198         
       
  4199                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4200                 s4o.print("(");
       
  4201                 return_type_symbol->accept(*this);
       
  4202                 s4o.print(")");
       
  4203                 IN_param_value->accept(*this);
       
  4204                 return NULL;
       
  4205                 
       
  4206             }
       
  4207             
       
  4208             ERROR;
       
  4209         }
       
  4210         
       
  4211     }/*function_uint_to_sint*/
       
  4212     break;
       
  4213 
       
  4214 /****
       
  4215  *UINT_TO_INT
       
  4216  */
       
  4217     case function_uint_to_int :
       
  4218     {
       
  4219         symbol_c *last_type_symbol = NULL;
       
  4220 
       
  4221         {
       
  4222             identifier_c param_name("IN");
       
  4223             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4225             
       
  4226             /* Get the value from a foo(<param_value>) style call */
       
  4227             if (IN_param_value == NULL)
       
  4228               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4231             
       
  4232             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4233             {
       
  4234         
       
  4235                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4236                 s4o.print("(");
       
  4237                 return_type_symbol->accept(*this);
       
  4238                 s4o.print(")");
       
  4239                 IN_param_value->accept(*this);
       
  4240                 return NULL;
       
  4241                 
       
  4242             }
       
  4243             
       
  4244             ERROR;
       
  4245         }
       
  4246         
       
  4247     }/*function_uint_to_int*/
       
  4248     break;
       
  4249 
       
  4250 /****
       
  4251  *UINT_TO_DINT
       
  4252  */
       
  4253     case function_uint_to_dint :
       
  4254     {
       
  4255         symbol_c *last_type_symbol = NULL;
       
  4256 
       
  4257         {
       
  4258             identifier_c param_name("IN");
       
  4259             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4260             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4261             
       
  4262             /* Get the value from a foo(<param_value>) style call */
       
  4263             if (IN_param_value == NULL)
       
  4264               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4267             
       
  4268             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4269             {
       
  4270         
       
  4271                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4272                 s4o.print("(");
       
  4273                 return_type_symbol->accept(*this);
       
  4274                 s4o.print(")");
       
  4275                 IN_param_value->accept(*this);
       
  4276                 return NULL;
       
  4277                 
       
  4278             }
       
  4279             
       
  4280             ERROR;
       
  4281         }
       
  4282         
       
  4283     }/*function_uint_to_dint*/
       
  4284     break;
       
  4285 
       
  4286 /****
       
  4287  *UINT_TO_LINT
       
  4288  */
       
  4289     case function_uint_to_lint :
       
  4290     {
       
  4291         symbol_c *last_type_symbol = NULL;
       
  4292 
       
  4293         {
       
  4294             identifier_c param_name("IN");
       
  4295             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4296             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4297             
       
  4298             /* Get the value from a foo(<param_value>) style call */
       
  4299             if (IN_param_value == NULL)
       
  4300               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4303             
       
  4304             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4305             {
       
  4306         
       
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4308                 s4o.print("(");
       
  4309                 return_type_symbol->accept(*this);
       
  4310                 s4o.print(")");
       
  4311                 IN_param_value->accept(*this);
       
  4312                 return NULL;
       
  4313                 
       
  4314             }
       
  4315             
       
  4316             ERROR;
       
  4317         }
       
  4318         
       
  4319     }/*function_uint_to_lint*/
       
  4320     break;
       
  4321 
       
  4322 /****
       
  4323  *UINT_TO_USINT
       
  4324  */
       
  4325     case function_uint_to_usint :
       
  4326     {
       
  4327         symbol_c *last_type_symbol = NULL;
       
  4328 
       
  4329         {
       
  4330             identifier_c param_name("IN");
       
  4331             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4332             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4333             
       
  4334             /* Get the value from a foo(<param_value>) style call */
       
  4335             if (IN_param_value == NULL)
       
  4336               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4339             
       
  4340             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4341             {
       
  4342         
       
  4343                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4344                 s4o.print("(");
       
  4345                 return_type_symbol->accept(*this);
       
  4346                 s4o.print(")");
       
  4347                 IN_param_value->accept(*this);
       
  4348                 return NULL;
       
  4349                 
       
  4350             }
       
  4351             
       
  4352             ERROR;
       
  4353         }
       
  4354         
       
  4355     }/*function_uint_to_usint*/
       
  4356     break;
       
  4357 
       
  4358 /****
       
  4359  *UINT_TO_UDINT
       
  4360  */
       
  4361     case function_uint_to_udint :
       
  4362     {
       
  4363         symbol_c *last_type_symbol = NULL;
       
  4364 
       
  4365         {
       
  4366             identifier_c param_name("IN");
       
  4367             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4368             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4369             
       
  4370             /* Get the value from a foo(<param_value>) style call */
       
  4371             if (IN_param_value == NULL)
       
  4372               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4375             
       
  4376             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4377             {
       
  4378         
       
  4379                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4380                 s4o.print("(");
       
  4381                 return_type_symbol->accept(*this);
       
  4382                 s4o.print(")");
       
  4383                 IN_param_value->accept(*this);
       
  4384                 return NULL;
       
  4385                 
       
  4386             }
       
  4387             
       
  4388             ERROR;
       
  4389         }
       
  4390         
       
  4391     }/*function_uint_to_udint*/
       
  4392     break;
       
  4393 
       
  4394 /****
       
  4395  *UINT_TO_ULINT
       
  4396  */
       
  4397     case function_uint_to_ulint :
       
  4398     {
       
  4399         symbol_c *last_type_symbol = NULL;
       
  4400 
       
  4401         {
       
  4402             identifier_c param_name("IN");
       
  4403             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4404             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4405             
       
  4406             /* Get the value from a foo(<param_value>) style call */
       
  4407             if (IN_param_value == NULL)
       
  4408               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4411             
       
  4412             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4413             {
       
  4414         
       
  4415                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4416                 s4o.print("(");
       
  4417                 return_type_symbol->accept(*this);
       
  4418                 s4o.print(")");
       
  4419                 IN_param_value->accept(*this);
       
  4420                 return NULL;
       
  4421                 
       
  4422             }
       
  4423             
       
  4424             ERROR;
       
  4425         }
       
  4426         
       
  4427     }/*function_uint_to_ulint*/
       
  4428     break;
       
  4429 
       
  4430 /****
       
  4431  *UINT_TO_REAL
       
  4432  */
       
  4433     case function_uint_to_real :
       
  4434     {
       
  4435         symbol_c *last_type_symbol = NULL;
       
  4436 
       
  4437         {
       
  4438             identifier_c param_name("IN");
       
  4439             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4440             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4441             
       
  4442             /* Get the value from a foo(<param_value>) style call */
       
  4443             if (IN_param_value == NULL)
       
  4444               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4447             
       
  4448             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4449             {
       
  4450         
       
  4451                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4452                 s4o.print("(");
       
  4453                 return_type_symbol->accept(*this);
       
  4454                 s4o.print(")");
       
  4455                 IN_param_value->accept(*this);
       
  4456                 return NULL;
       
  4457                 
       
  4458             }
       
  4459             
       
  4460             ERROR;
       
  4461         }
       
  4462         
       
  4463     }/*function_uint_to_real*/
       
  4464     break;
       
  4465 
       
  4466 /****
       
  4467  *UINT_TO_LREAL
       
  4468  */
       
  4469     case function_uint_to_lreal :
       
  4470     {
       
  4471         symbol_c *last_type_symbol = NULL;
       
  4472 
       
  4473         {
       
  4474             identifier_c param_name("IN");
       
  4475             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4476             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4477             
       
  4478             /* Get the value from a foo(<param_value>) style call */
       
  4479             if (IN_param_value == NULL)
       
  4480               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4483             
       
  4484             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4485             {
       
  4486         
       
  4487                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4488                 s4o.print("(");
       
  4489                 return_type_symbol->accept(*this);
       
  4490                 s4o.print(")");
       
  4491                 IN_param_value->accept(*this);
       
  4492                 return NULL;
       
  4493                 
       
  4494             }
       
  4495             
       
  4496             ERROR;
       
  4497         }
       
  4498         
       
  4499     }/*function_uint_to_lreal*/
       
  4500     break;
       
  4501 
       
  4502 /****
       
  4503  *UINT_TO_TIME
       
  4504  */
       
  4505     case function_uint_to_time :
       
  4506     {
       
  4507         symbol_c *last_type_symbol = NULL;
       
  4508 
       
  4509         {
       
  4510             identifier_c param_name("IN");
       
  4511             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4512             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4513             
       
  4514             /* Get the value from a foo(<param_value>) style call */
       
  4515             if (IN_param_value == NULL)
       
  4516               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4519             
       
  4520             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4521             {
       
  4522         
       
  4523                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4524                 s4o.print("(");
       
  4525                 return_type_symbol->accept(*this);
       
  4526                 s4o.print(")__int_to_time(");
       
  4527                 IN_param_value->accept(*this);
       
  4528                 s4o.print(")");
       
  4529                 return NULL;
       
  4530                 
       
  4531             }
       
  4532             
       
  4533             ERROR;
       
  4534         }
       
  4535         
       
  4536     }/*function_uint_to_time*/
       
  4537     break;
       
  4538 
       
  4539 /****
       
  4540  *UINT_TO_DATE
       
  4541  */
       
  4542     case function_uint_to_date :
       
  4543     {
       
  4544         symbol_c *last_type_symbol = NULL;
       
  4545 
       
  4546         {
       
  4547             identifier_c param_name("IN");
       
  4548             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4549             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4550             
       
  4551             /* Get the value from a foo(<param_value>) style call */
       
  4552             if (IN_param_value == NULL)
       
  4553               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4556             
       
  4557             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4558             {
       
  4559         
       
  4560                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4561                 s4o.print("(");
       
  4562                 return_type_symbol->accept(*this);
       
  4563                 s4o.print(")__int_to_time(");
       
  4564                 IN_param_value->accept(*this);
       
  4565                 s4o.print(")");
       
  4566                 return NULL;
       
  4567                 
       
  4568             }
       
  4569             
       
  4570             ERROR;
       
  4571         }
       
  4572         
       
  4573     }/*function_uint_to_date*/
       
  4574     break;
       
  4575 
       
  4576 /****
       
  4577  *UINT_TO_TOD
       
  4578  */
       
  4579     case function_uint_to_tod :
       
  4580     {
       
  4581         symbol_c *last_type_symbol = NULL;
       
  4582 
       
  4583         {
       
  4584             identifier_c param_name("IN");
       
  4585             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4586             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4587             
       
  4588             /* Get the value from a foo(<param_value>) style call */
       
  4589             if (IN_param_value == NULL)
       
  4590               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4593             
       
  4594             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4595             {
       
  4596         
       
  4597                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4598                 s4o.print("(");
       
  4599                 return_type_symbol->accept(*this);
       
  4600                 s4o.print(")__int_to_time(");
       
  4601                 IN_param_value->accept(*this);
       
  4602                 s4o.print(")");
       
  4603                 return NULL;
       
  4604                 
       
  4605             }
       
  4606             
       
  4607             ERROR;
       
  4608         }
       
  4609         
       
  4610     }/*function_uint_to_tod*/
       
  4611     break;
       
  4612 
       
  4613 /****
       
  4614  *UINT_TO_DT
       
  4615  */
       
  4616     case function_uint_to_dt :
       
  4617     {
       
  4618         symbol_c *last_type_symbol = NULL;
       
  4619 
       
  4620         {
       
  4621             identifier_c param_name("IN");
       
  4622             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4623             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4624             
       
  4625             /* Get the value from a foo(<param_value>) style call */
       
  4626             if (IN_param_value == NULL)
       
  4627               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4630             
       
  4631             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4632             {
       
  4633         
       
  4634                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4635                 s4o.print("(");
       
  4636                 return_type_symbol->accept(*this);
       
  4637                 s4o.print(")__int_to_time(");
       
  4638                 IN_param_value->accept(*this);
       
  4639                 s4o.print(")");
       
  4640                 return NULL;
       
  4641                 
       
  4642             }
       
  4643             
       
  4644             ERROR;
       
  4645         }
       
  4646         
       
  4647     }/*function_uint_to_dt*/
       
  4648     break;
       
  4649 
       
  4650 /****
       
  4651  *UINT_TO_STRING
       
  4652  */
       
  4653     case function_uint_to_string :
       
  4654     {
       
  4655         symbol_c *last_type_symbol = NULL;
       
  4656 
       
  4657         {
       
  4658             identifier_c param_name("IN");
       
  4659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4660             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4661             
       
  4662             /* Get the value from a foo(<param_value>) style call */
       
  4663             if (IN_param_value == NULL)
       
  4664               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4667             
       
  4668             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4669             {
       
  4670         
       
  4671                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4672                 s4o.print("(");
       
  4673                 return_type_symbol->accept(*this);
       
  4674                 s4o.print(")__uint_to_string(");
       
  4675                 IN_param_value->accept(*this);
       
  4676                 s4o.print(")");
       
  4677                 return NULL;
       
  4678                 
       
  4679             }
       
  4680             
       
  4681             ERROR;
       
  4682         }
       
  4683         
       
  4684     }/*function_uint_to_string*/
       
  4685     break;
       
  4686 
       
  4687 /****
       
  4688  *UINT_TO_BYTE
       
  4689  */
       
  4690     case function_uint_to_byte :
       
  4691     {
       
  4692         symbol_c *last_type_symbol = NULL;
       
  4693 
       
  4694         {
       
  4695             identifier_c param_name("IN");
       
  4696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4698             
       
  4699             /* Get the value from a foo(<param_value>) style call */
       
  4700             if (IN_param_value == NULL)
       
  4701               IN_param_value = function_call_param_iterator.next();
       
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4704             
       
  4705             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4706             {
       
  4707         
       
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4709                 s4o.print("(");
       
  4710                 return_type_symbol->accept(*this);
       
  4711                 s4o.print(")");
       
  4712                 IN_param_value->accept(*this);
       
  4713                 return NULL;
       
  4714                 
       
  4715             }
       
  4716             
       
  4717             ERROR;
       
  4718         }
       
  4719         
       
  4720     }/*function_uint_to_byte*/
       
  4721     break;
       
  4722 
       
  4723 /****
       
  4724  *UINT_TO_WORD
       
  4725  */
       
  4726     case function_uint_to_word :
       
  4727     {
       
  4728         symbol_c *last_type_symbol = NULL;
       
  4729 
       
  4730         {
       
  4731             identifier_c param_name("IN");
       
  4732             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4733             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4734             
       
  4735             /* Get the value from a foo(<param_value>) style call */
       
  4736             if (IN_param_value == NULL)
       
  4737               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4740             
       
  4741             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4742             {
       
  4743         
       
  4744                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4745                 s4o.print("(");
       
  4746                 return_type_symbol->accept(*this);
       
  4747                 s4o.print(")");
       
  4748                 IN_param_value->accept(*this);
       
  4749                 return NULL;
       
  4750                 
       
  4751             }
       
  4752             
       
  4753             ERROR;
       
  4754         }
       
  4755         
       
  4756     }/*function_uint_to_word*/
       
  4757     break;
       
  4758 
       
  4759 /****
       
  4760  *UINT_TO_DWORD
       
  4761  */
       
  4762     case function_uint_to_dword :
       
  4763     {
       
  4764         symbol_c *last_type_symbol = NULL;
       
  4765 
       
  4766         {
       
  4767             identifier_c param_name("IN");
       
  4768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4770             
       
  4771             /* Get the value from a foo(<param_value>) style call */
       
  4772             if (IN_param_value == NULL)
       
  4773               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4776             
       
  4777             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4778             {
       
  4779         
       
  4780                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4781                 s4o.print("(");
       
  4782                 return_type_symbol->accept(*this);
       
  4783                 s4o.print(")");
       
  4784                 IN_param_value->accept(*this);
       
  4785                 return NULL;
       
  4786                 
       
  4787             }
       
  4788             
       
  4789             ERROR;
       
  4790         }
       
  4791         
       
  4792     }/*function_uint_to_dword*/
       
  4793     break;
       
  4794 
       
  4795 /****
       
  4796  *UINT_TO_LWORD
       
  4797  */
       
  4798     case function_uint_to_lword :
       
  4799     {
       
  4800         symbol_c *last_type_symbol = NULL;
       
  4801 
       
  4802         {
       
  4803             identifier_c param_name("IN");
       
  4804             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4805             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4806             
       
  4807             /* Get the value from a foo(<param_value>) style call */
       
  4808             if (IN_param_value == NULL)
       
  4809               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4812             
       
  4813             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4814             {
       
  4815         
       
  4816                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4817                 s4o.print("(");
       
  4818                 return_type_symbol->accept(*this);
       
  4819                 s4o.print(")");
       
  4820                 IN_param_value->accept(*this);
       
  4821                 return NULL;
       
  4822                 
       
  4823             }
       
  4824             
       
  4825             ERROR;
       
  4826         }
       
  4827         
       
  4828     }/*function_uint_to_lword*/
       
  4829     break;
       
  4830 
       
  4831 /****
       
  4832  *UDINT_TO_BOOL
       
  4833  */
       
  4834     case function_udint_to_bool :
       
  4835     {
       
  4836         symbol_c *last_type_symbol = NULL;
       
  4837 
       
  4838         {
       
  4839             identifier_c param_name("IN");
       
  4840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4842             
       
  4843             /* Get the value from a foo(<param_value>) style call */
       
  4844             if (IN_param_value == NULL)
       
  4845               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4848             
       
  4849             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4850             {
       
  4851         
       
  4852                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4853                 s4o.print("(");
       
  4854                 return_type_symbol->accept(*this);
       
  4855                 s4o.print(")");
       
  4856                 IN_param_value->accept(*this);
       
  4857                 return NULL;
       
  4858                 
       
  4859             }
       
  4860             
       
  4861             ERROR;
       
  4862         }
       
  4863         
       
  4864     }/*function_udint_to_bool*/
       
  4865     break;
       
  4866 
       
  4867 /****
       
  4868  *UDINT_TO_SINT
       
  4869  */
       
  4870     case function_udint_to_sint :
       
  4871     {
       
  4872         symbol_c *last_type_symbol = NULL;
       
  4873 
       
  4874         {
       
  4875             identifier_c param_name("IN");
       
  4876             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4877             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4878             
       
  4879             /* Get the value from a foo(<param_value>) style call */
       
  4880             if (IN_param_value == NULL)
       
  4881               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4884             
       
  4885             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4886             {
       
  4887         
       
  4888                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4889                 s4o.print("(");
       
  4890                 return_type_symbol->accept(*this);
       
  4891                 s4o.print(")");
       
  4892                 IN_param_value->accept(*this);
       
  4893                 return NULL;
       
  4894                 
       
  4895             }
       
  4896             
       
  4897             ERROR;
       
  4898         }
       
  4899         
       
  4900     }/*function_udint_to_sint*/
       
  4901     break;
       
  4902 
       
  4903 /****
       
  4904  *UDINT_TO_INT
       
  4905  */
       
  4906     case function_udint_to_int :
       
  4907     {
       
  4908         symbol_c *last_type_symbol = NULL;
       
  4909 
       
  4910         {
       
  4911             identifier_c param_name("IN");
       
  4912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4914             
       
  4915             /* Get the value from a foo(<param_value>) style call */
       
  4916             if (IN_param_value == NULL)
       
  4917               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4920             
       
  4921             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4922             {
       
  4923         
       
  4924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4925                 s4o.print("(");
       
  4926                 return_type_symbol->accept(*this);
       
  4927                 s4o.print(")");
       
  4928                 IN_param_value->accept(*this);
       
  4929                 return NULL;
       
  4930                 
       
  4931             }
       
  4932             
       
  4933             ERROR;
       
  4934         }
       
  4935         
       
  4936     }/*function_udint_to_int*/
       
  4937     break;
       
  4938 
       
  4939 /****
       
  4940  *UDINT_TO_DINT
       
  4941  */
       
  4942     case function_udint_to_dint :
       
  4943     {
       
  4944         symbol_c *last_type_symbol = NULL;
       
  4945 
       
  4946         {
       
  4947             identifier_c param_name("IN");
       
  4948             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4949             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4950             
       
  4951             /* Get the value from a foo(<param_value>) style call */
       
  4952             if (IN_param_value == NULL)
       
  4953               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4956             
       
  4957             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4958             {
       
  4959         
       
  4960                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4961                 s4o.print("(");
       
  4962                 return_type_symbol->accept(*this);
       
  4963                 s4o.print(")");
       
  4964                 IN_param_value->accept(*this);
       
  4965                 return NULL;
       
  4966                 
       
  4967             }
       
  4968             
       
  4969             ERROR;
       
  4970         }
       
  4971         
       
  4972     }/*function_udint_to_dint*/
       
  4973     break;
       
  4974 
       
  4975 /****
       
  4976  *UDINT_TO_LINT
       
  4977  */
       
  4978     case function_udint_to_lint :
       
  4979     {
       
  4980         symbol_c *last_type_symbol = NULL;
       
  4981 
       
  4982         {
       
  4983             identifier_c param_name("IN");
       
  4984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4986             
       
  4987             /* Get the value from a foo(<param_value>) style call */
       
  4988             if (IN_param_value == NULL)
       
  4989               IN_param_value = function_call_param_iterator.next();
       
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4992             
       
  4993             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4994             {
       
  4995         
       
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4997                 s4o.print("(");
       
  4998                 return_type_symbol->accept(*this);
       
  4999                 s4o.print(")");
       
  5000                 IN_param_value->accept(*this);
       
  5001                 return NULL;
       
  5002                 
       
  5003             }
       
  5004             
       
  5005             ERROR;
       
  5006         }
       
  5007         
       
  5008     }/*function_udint_to_lint*/
       
  5009     break;
       
  5010 
       
  5011 /****
       
  5012  *UDINT_TO_USINT
       
  5013  */
       
  5014     case function_udint_to_usint :
       
  5015     {
       
  5016         symbol_c *last_type_symbol = NULL;
       
  5017 
       
  5018         {
       
  5019             identifier_c param_name("IN");
       
  5020             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5021             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5022             
       
  5023             /* Get the value from a foo(<param_value>) style call */
       
  5024             if (IN_param_value == NULL)
       
  5025               IN_param_value = function_call_param_iterator.next();
       
  5026             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5027             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5028             
       
  5029             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5030             {
       
  5031         
       
  5032                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5033                 s4o.print("(");
       
  5034                 return_type_symbol->accept(*this);
       
  5035                 s4o.print(")");
       
  5036                 IN_param_value->accept(*this);
       
  5037                 return NULL;
       
  5038                 
       
  5039             }
       
  5040             
       
  5041             ERROR;
       
  5042         }
       
  5043         
       
  5044     }/*function_udint_to_usint*/
       
  5045     break;
       
  5046 
       
  5047 /****
       
  5048  *UDINT_TO_UINT
       
  5049  */
       
  5050     case function_udint_to_uint :
       
  5051     {
       
  5052         symbol_c *last_type_symbol = NULL;
       
  5053 
       
  5054         {
       
  5055             identifier_c param_name("IN");
       
  5056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5058             
       
  5059             /* Get the value from a foo(<param_value>) style call */
       
  5060             if (IN_param_value == NULL)
       
  5061               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5064             
       
  5065             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5066             {
       
  5067         
       
  5068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5069                 s4o.print("(");
       
  5070                 return_type_symbol->accept(*this);
       
  5071                 s4o.print(")");
       
  5072                 IN_param_value->accept(*this);
       
  5073                 return NULL;
       
  5074                 
       
  5075             }
       
  5076             
       
  5077             ERROR;
       
  5078         }
       
  5079         
       
  5080     }/*function_udint_to_uint*/
       
  5081     break;
       
  5082 
       
  5083 /****
       
  5084  *UDINT_TO_ULINT
       
  5085  */
       
  5086     case function_udint_to_ulint :
       
  5087     {
       
  5088         symbol_c *last_type_symbol = NULL;
       
  5089 
       
  5090         {
       
  5091             identifier_c param_name("IN");
       
  5092             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5093             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5094             
       
  5095             /* Get the value from a foo(<param_value>) style call */
       
  5096             if (IN_param_value == NULL)
       
  5097               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5100             
       
  5101             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5102             {
       
  5103         
       
  5104                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5105                 s4o.print("(");
       
  5106                 return_type_symbol->accept(*this);
       
  5107                 s4o.print(")");
       
  5108                 IN_param_value->accept(*this);
       
  5109                 return NULL;
       
  5110                 
       
  5111             }
       
  5112             
       
  5113             ERROR;
       
  5114         }
       
  5115         
       
  5116     }/*function_udint_to_ulint*/
       
  5117     break;
       
  5118 
       
  5119 /****
       
  5120  *UDINT_TO_REAL
       
  5121  */
       
  5122     case function_udint_to_real :
       
  5123     {
       
  5124         symbol_c *last_type_symbol = NULL;
       
  5125 
       
  5126         {
       
  5127             identifier_c param_name("IN");
       
  5128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5130             
       
  5131             /* Get the value from a foo(<param_value>) style call */
       
  5132             if (IN_param_value == NULL)
       
  5133               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5136             
       
  5137             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5138             {
       
  5139         
       
  5140                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5141                 s4o.print("(");
       
  5142                 return_type_symbol->accept(*this);
       
  5143                 s4o.print(")");
       
  5144                 IN_param_value->accept(*this);
       
  5145                 return NULL;
       
  5146                 
       
  5147             }
       
  5148             
       
  5149             ERROR;
       
  5150         }
       
  5151         
       
  5152     }/*function_udint_to_real*/
       
  5153     break;
       
  5154 
       
  5155 /****
       
  5156  *UDINT_TO_LREAL
       
  5157  */
       
  5158     case function_udint_to_lreal :
       
  5159     {
       
  5160         symbol_c *last_type_symbol = NULL;
       
  5161 
       
  5162         {
       
  5163             identifier_c param_name("IN");
       
  5164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5165             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5166             
       
  5167             /* Get the value from a foo(<param_value>) style call */
       
  5168             if (IN_param_value == NULL)
       
  5169               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5172             
       
  5173             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5174             {
       
  5175         
       
  5176                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5177                 s4o.print("(");
       
  5178                 return_type_symbol->accept(*this);
       
  5179                 s4o.print(")");
       
  5180                 IN_param_value->accept(*this);
       
  5181                 return NULL;
       
  5182                 
       
  5183             }
       
  5184             
       
  5185             ERROR;
       
  5186         }
       
  5187         
       
  5188     }/*function_udint_to_lreal*/
       
  5189     break;
       
  5190 
       
  5191 /****
       
  5192  *UDINT_TO_TIME
       
  5193  */
       
  5194     case function_udint_to_time :
       
  5195     {
       
  5196         symbol_c *last_type_symbol = NULL;
       
  5197 
       
  5198         {
       
  5199             identifier_c param_name("IN");
       
  5200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5202             
       
  5203             /* Get the value from a foo(<param_value>) style call */
       
  5204             if (IN_param_value == NULL)
       
  5205               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5208             
       
  5209             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5210             {
       
  5211         
       
  5212                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5213                 s4o.print("(");
       
  5214                 return_type_symbol->accept(*this);
       
  5215                 s4o.print(")__int_to_time(");
       
  5216                 IN_param_value->accept(*this);
       
  5217                 s4o.print(")");
       
  5218                 return NULL;
       
  5219                 
       
  5220             }
       
  5221             
       
  5222             ERROR;
       
  5223         }
       
  5224         
       
  5225     }/*function_udint_to_time*/
       
  5226     break;
       
  5227 
       
  5228 /****
       
  5229  *UDINT_TO_DATE
       
  5230  */
       
  5231     case function_udint_to_date :
       
  5232     {
       
  5233         symbol_c *last_type_symbol = NULL;
       
  5234 
       
  5235         {
       
  5236             identifier_c param_name("IN");
       
  5237             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5238             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5239             
       
  5240             /* Get the value from a foo(<param_value>) style call */
       
  5241             if (IN_param_value == NULL)
       
  5242               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5245             
       
  5246             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5247             {
       
  5248         
       
  5249                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5250                 s4o.print("(");
       
  5251                 return_type_symbol->accept(*this);
       
  5252                 s4o.print(")__int_to_time(");
       
  5253                 IN_param_value->accept(*this);
       
  5254                 s4o.print(")");
       
  5255                 return NULL;
       
  5256                 
       
  5257             }
       
  5258             
       
  5259             ERROR;
       
  5260         }
       
  5261         
       
  5262     }/*function_udint_to_date*/
       
  5263     break;
       
  5264 
       
  5265 /****
       
  5266  *UDINT_TO_TOD
       
  5267  */
       
  5268     case function_udint_to_tod :
       
  5269     {
       
  5270         symbol_c *last_type_symbol = NULL;
       
  5271 
       
  5272         {
       
  5273             identifier_c param_name("IN");
       
  5274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5275             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5276             
       
  5277             /* Get the value from a foo(<param_value>) style call */
       
  5278             if (IN_param_value == NULL)
       
  5279               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5282             
       
  5283             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5284             {
       
  5285         
       
  5286                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5287                 s4o.print("(");
       
  5288                 return_type_symbol->accept(*this);
       
  5289                 s4o.print(")__int_to_time(");
       
  5290                 IN_param_value->accept(*this);
       
  5291                 s4o.print(")");
       
  5292                 return NULL;
       
  5293                 
       
  5294             }
       
  5295             
       
  5296             ERROR;
       
  5297         }
       
  5298         
       
  5299     }/*function_udint_to_tod*/
       
  5300     break;
       
  5301 
       
  5302 /****
       
  5303  *UDINT_TO_DT
       
  5304  */
       
  5305     case function_udint_to_dt :
       
  5306     {
       
  5307         symbol_c *last_type_symbol = NULL;
       
  5308 
       
  5309         {
       
  5310             identifier_c param_name("IN");
       
  5311             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5312             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5313             
       
  5314             /* Get the value from a foo(<param_value>) style call */
       
  5315             if (IN_param_value == NULL)
       
  5316               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5319             
       
  5320             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5321             {
       
  5322         
       
  5323                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5324                 s4o.print("(");
       
  5325                 return_type_symbol->accept(*this);
       
  5326                 s4o.print(")__int_to_time(");
       
  5327                 IN_param_value->accept(*this);
       
  5328                 s4o.print(")");
       
  5329                 return NULL;
       
  5330                 
       
  5331             }
       
  5332             
       
  5333             ERROR;
       
  5334         }
       
  5335         
       
  5336     }/*function_udint_to_dt*/
       
  5337     break;
       
  5338 
       
  5339 /****
       
  5340  *UDINT_TO_STRING
       
  5341  */
       
  5342     case function_udint_to_string :
       
  5343     {
       
  5344         symbol_c *last_type_symbol = NULL;
       
  5345 
       
  5346         {
       
  5347             identifier_c param_name("IN");
       
  5348             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5349             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5350             
       
  5351             /* Get the value from a foo(<param_value>) style call */
       
  5352             if (IN_param_value == NULL)
       
  5353               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5356             
       
  5357             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5358             {
       
  5359         
       
  5360                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5361                 s4o.print("(");
       
  5362                 return_type_symbol->accept(*this);
       
  5363                 s4o.print(")__uint_to_string(");
       
  5364                 IN_param_value->accept(*this);
       
  5365                 s4o.print(")");
       
  5366                 return NULL;
       
  5367                 
       
  5368             }
       
  5369             
       
  5370             ERROR;
       
  5371         }
       
  5372         
       
  5373     }/*function_udint_to_string*/
       
  5374     break;
       
  5375 
       
  5376 /****
       
  5377  *UDINT_TO_BYTE
       
  5378  */
       
  5379     case function_udint_to_byte :
       
  5380     {
       
  5381         symbol_c *last_type_symbol = NULL;
       
  5382 
       
  5383         {
       
  5384             identifier_c param_name("IN");
       
  5385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5386             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5387             
       
  5388             /* Get the value from a foo(<param_value>) style call */
       
  5389             if (IN_param_value == NULL)
       
  5390               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5393             
       
  5394             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5395             {
       
  5396         
       
  5397                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5398                 s4o.print("(");
       
  5399                 return_type_symbol->accept(*this);
       
  5400                 s4o.print(")");
       
  5401                 IN_param_value->accept(*this);
       
  5402                 return NULL;
       
  5403                 
       
  5404             }
       
  5405             
       
  5406             ERROR;
       
  5407         }
       
  5408         
       
  5409     }/*function_udint_to_byte*/
       
  5410     break;
       
  5411 
       
  5412 /****
       
  5413  *UDINT_TO_WORD
       
  5414  */
       
  5415     case function_udint_to_word :
       
  5416     {
       
  5417         symbol_c *last_type_symbol = NULL;
       
  5418 
       
  5419         {
       
  5420             identifier_c param_name("IN");
       
  5421             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5422             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5423             
       
  5424             /* Get the value from a foo(<param_value>) style call */
       
  5425             if (IN_param_value == NULL)
       
  5426               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5429             
       
  5430             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5431             {
       
  5432         
       
  5433                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5434                 s4o.print("(");
       
  5435                 return_type_symbol->accept(*this);
       
  5436                 s4o.print(")");
       
  5437                 IN_param_value->accept(*this);
       
  5438                 return NULL;
       
  5439                 
       
  5440             }
       
  5441             
       
  5442             ERROR;
       
  5443         }
       
  5444         
       
  5445     }/*function_udint_to_word*/
       
  5446     break;
       
  5447 
       
  5448 /****
       
  5449  *UDINT_TO_DWORD
       
  5450  */
       
  5451     case function_udint_to_dword :
       
  5452     {
       
  5453         symbol_c *last_type_symbol = NULL;
       
  5454 
       
  5455         {
       
  5456             identifier_c param_name("IN");
       
  5457             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5458             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5459             
       
  5460             /* Get the value from a foo(<param_value>) style call */
       
  5461             if (IN_param_value == NULL)
       
  5462               IN_param_value = function_call_param_iterator.next();
       
  5463             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5464             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5465             
       
  5466             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5467             {
       
  5468         
       
  5469                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5470                 s4o.print("(");
       
  5471                 return_type_symbol->accept(*this);
       
  5472                 s4o.print(")");
       
  5473                 IN_param_value->accept(*this);
       
  5474                 return NULL;
       
  5475                 
       
  5476             }
       
  5477             
       
  5478             ERROR;
       
  5479         }
       
  5480         
       
  5481     }/*function_udint_to_dword*/
       
  5482     break;
       
  5483 
       
  5484 /****
       
  5485  *UDINT_TO_LWORD
       
  5486  */
       
  5487     case function_udint_to_lword :
       
  5488     {
       
  5489         symbol_c *last_type_symbol = NULL;
       
  5490 
       
  5491         {
       
  5492             identifier_c param_name("IN");
       
  5493             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5494             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5495             
       
  5496             /* Get the value from a foo(<param_value>) style call */
       
  5497             if (IN_param_value == NULL)
       
  5498               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5501             
       
  5502             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5503             {
       
  5504         
       
  5505                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5506                 s4o.print("(");
       
  5507                 return_type_symbol->accept(*this);
       
  5508                 s4o.print(")");
       
  5509                 IN_param_value->accept(*this);
       
  5510                 return NULL;
       
  5511                 
       
  5512             }
       
  5513             
       
  5514             ERROR;
       
  5515         }
       
  5516         
       
  5517     }/*function_udint_to_lword*/
       
  5518     break;
       
  5519 
       
  5520 /****
       
  5521  *ULINT_TO_BOOL
       
  5522  */
       
  5523     case function_ulint_to_bool :
       
  5524     {
       
  5525         symbol_c *last_type_symbol = NULL;
       
  5526 
       
  5527         {
       
  5528             identifier_c param_name("IN");
       
  5529             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5530             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5531             
       
  5532             /* Get the value from a foo(<param_value>) style call */
       
  5533             if (IN_param_value == NULL)
       
  5534               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5537             
       
  5538             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5539             {
       
  5540         
       
  5541                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5542                 s4o.print("(");
       
  5543                 return_type_symbol->accept(*this);
       
  5544                 s4o.print(")");
       
  5545                 IN_param_value->accept(*this);
       
  5546                 return NULL;
       
  5547                 
       
  5548             }
       
  5549             
       
  5550             ERROR;
       
  5551         }
       
  5552         
       
  5553     }/*function_ulint_to_bool*/
       
  5554     break;
       
  5555 
       
  5556 /****
       
  5557  *ULINT_TO_SINT
       
  5558  */
       
  5559     case function_ulint_to_sint :
       
  5560     {
       
  5561         symbol_c *last_type_symbol = NULL;
       
  5562 
       
  5563         {
       
  5564             identifier_c param_name("IN");
       
  5565             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5566             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5567             
       
  5568             /* Get the value from a foo(<param_value>) style call */
       
  5569             if (IN_param_value == NULL)
       
  5570               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5573             
       
  5574             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5575             {
       
  5576         
       
  5577                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5578                 s4o.print("(");
       
  5579                 return_type_symbol->accept(*this);
       
  5580                 s4o.print(")");
       
  5581                 IN_param_value->accept(*this);
       
  5582                 return NULL;
       
  5583                 
       
  5584             }
       
  5585             
       
  5586             ERROR;
       
  5587         }
       
  5588         
       
  5589     }/*function_ulint_to_sint*/
       
  5590     break;
       
  5591 
       
  5592 /****
       
  5593  *ULINT_TO_INT
       
  5594  */
       
  5595     case function_ulint_to_int :
       
  5596     {
       
  5597         symbol_c *last_type_symbol = NULL;
       
  5598 
       
  5599         {
       
  5600             identifier_c param_name("IN");
       
  5601             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5602             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5603             
       
  5604             /* Get the value from a foo(<param_value>) style call */
       
  5605             if (IN_param_value == NULL)
       
  5606               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5609             
       
  5610             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5611             {
       
  5612         
       
  5613                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5614                 s4o.print("(");
       
  5615                 return_type_symbol->accept(*this);
       
  5616                 s4o.print(")");
       
  5617                 IN_param_value->accept(*this);
       
  5618                 return NULL;
       
  5619                 
       
  5620             }
       
  5621             
       
  5622             ERROR;
       
  5623         }
       
  5624         
       
  5625     }/*function_ulint_to_int*/
       
  5626     break;
       
  5627 
       
  5628 /****
       
  5629  *ULINT_TO_DINT
       
  5630  */
       
  5631     case function_ulint_to_dint :
       
  5632     {
       
  5633         symbol_c *last_type_symbol = NULL;
       
  5634 
       
  5635         {
       
  5636             identifier_c param_name("IN");
       
  5637             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5638             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5639             
       
  5640             /* Get the value from a foo(<param_value>) style call */
       
  5641             if (IN_param_value == NULL)
       
  5642               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5645             
       
  5646             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5647             {
       
  5648         
       
  5649                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5650                 s4o.print("(");
       
  5651                 return_type_symbol->accept(*this);
       
  5652                 s4o.print(")");
       
  5653                 IN_param_value->accept(*this);
       
  5654                 return NULL;
       
  5655                 
       
  5656             }
       
  5657             
       
  5658             ERROR;
       
  5659         }
       
  5660         
       
  5661     }/*function_ulint_to_dint*/
       
  5662     break;
       
  5663 
       
  5664 /****
       
  5665  *ULINT_TO_LINT
       
  5666  */
       
  5667     case function_ulint_to_lint :
       
  5668     {
       
  5669         symbol_c *last_type_symbol = NULL;
       
  5670 
       
  5671         {
       
  5672             identifier_c param_name("IN");
       
  5673             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5674             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5675             
       
  5676             /* Get the value from a foo(<param_value>) style call */
       
  5677             if (IN_param_value == NULL)
       
  5678               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5681             
       
  5682             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5683             {
       
  5684         
       
  5685                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5686                 s4o.print("(");
       
  5687                 return_type_symbol->accept(*this);
       
  5688                 s4o.print(")");
       
  5689                 IN_param_value->accept(*this);
       
  5690                 return NULL;
       
  5691                 
       
  5692             }
       
  5693             
       
  5694             ERROR;
       
  5695         }
       
  5696         
       
  5697     }/*function_ulint_to_lint*/
       
  5698     break;
       
  5699 
       
  5700 /****
       
  5701  *ULINT_TO_USINT
       
  5702  */
       
  5703     case function_ulint_to_usint :
       
  5704     {
       
  5705         symbol_c *last_type_symbol = NULL;
       
  5706 
       
  5707         {
       
  5708             identifier_c param_name("IN");
       
  5709             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5710             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5711             
       
  5712             /* Get the value from a foo(<param_value>) style call */
       
  5713             if (IN_param_value == NULL)
       
  5714               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5717             
       
  5718             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5719             {
       
  5720         
       
  5721                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5722                 s4o.print("(");
       
  5723                 return_type_symbol->accept(*this);
       
  5724                 s4o.print(")");
       
  5725                 IN_param_value->accept(*this);
       
  5726                 return NULL;
       
  5727                 
       
  5728             }
       
  5729             
       
  5730             ERROR;
       
  5731         }
       
  5732         
       
  5733     }/*function_ulint_to_usint*/
       
  5734     break;
       
  5735 
       
  5736 /****
       
  5737  *ULINT_TO_UINT
       
  5738  */
       
  5739     case function_ulint_to_uint :
       
  5740     {
       
  5741         symbol_c *last_type_symbol = NULL;
       
  5742 
       
  5743         {
       
  5744             identifier_c param_name("IN");
       
  5745             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5746             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5747             
       
  5748             /* Get the value from a foo(<param_value>) style call */
       
  5749             if (IN_param_value == NULL)
       
  5750               IN_param_value = function_call_param_iterator.next();
       
  5751             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5752             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5753             
       
  5754             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5755             {
       
  5756         
       
  5757                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5758                 s4o.print("(");
       
  5759                 return_type_symbol->accept(*this);
       
  5760                 s4o.print(")");
       
  5761                 IN_param_value->accept(*this);
       
  5762                 return NULL;
       
  5763                 
       
  5764             }
       
  5765             
       
  5766             ERROR;
       
  5767         }
       
  5768         
       
  5769     }/*function_ulint_to_uint*/
       
  5770     break;
       
  5771 
       
  5772 /****
       
  5773  *ULINT_TO_UDINT
       
  5774  */
       
  5775     case function_ulint_to_udint :
       
  5776     {
       
  5777         symbol_c *last_type_symbol = NULL;
       
  5778 
       
  5779         {
       
  5780             identifier_c param_name("IN");
       
  5781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5782             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5783             
       
  5784             /* Get the value from a foo(<param_value>) style call */
       
  5785             if (IN_param_value == NULL)
       
  5786               IN_param_value = function_call_param_iterator.next();
       
  5787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5788             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5789             
       
  5790             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5791             {
       
  5792         
       
  5793                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5794                 s4o.print("(");
       
  5795                 return_type_symbol->accept(*this);
       
  5796                 s4o.print(")");
       
  5797                 IN_param_value->accept(*this);
       
  5798                 return NULL;
       
  5799                 
       
  5800             }
       
  5801             
       
  5802             ERROR;
       
  5803         }
       
  5804         
       
  5805     }/*function_ulint_to_udint*/
       
  5806     break;
       
  5807 
       
  5808 /****
       
  5809  *ULINT_TO_REAL
       
  5810  */
       
  5811     case function_ulint_to_real :
       
  5812     {
       
  5813         symbol_c *last_type_symbol = NULL;
       
  5814 
       
  5815         {
       
  5816             identifier_c param_name("IN");
       
  5817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5819             
       
  5820             /* Get the value from a foo(<param_value>) style call */
       
  5821             if (IN_param_value == NULL)
       
  5822               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5825             
       
  5826             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5827             {
       
  5828         
       
  5829                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5830                 s4o.print("(");
       
  5831                 return_type_symbol->accept(*this);
       
  5832                 s4o.print(")");
       
  5833                 IN_param_value->accept(*this);
       
  5834                 return NULL;
       
  5835                 
       
  5836             }
       
  5837             
       
  5838             ERROR;
       
  5839         }
       
  5840         
       
  5841     }/*function_ulint_to_real*/
       
  5842     break;
       
  5843 
       
  5844 /****
       
  5845  *ULINT_TO_LREAL
       
  5846  */
       
  5847     case function_ulint_to_lreal :
       
  5848     {
       
  5849         symbol_c *last_type_symbol = NULL;
       
  5850 
       
  5851         {
       
  5852             identifier_c param_name("IN");
       
  5853             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5854             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5855             
       
  5856             /* Get the value from a foo(<param_value>) style call */
       
  5857             if (IN_param_value == NULL)
       
  5858               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5861             
       
  5862             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5863             {
       
  5864         
       
  5865                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5866                 s4o.print("(");
       
  5867                 return_type_symbol->accept(*this);
       
  5868                 s4o.print(")");
       
  5869                 IN_param_value->accept(*this);
       
  5870                 return NULL;
       
  5871                 
       
  5872             }
       
  5873             
       
  5874             ERROR;
       
  5875         }
       
  5876         
       
  5877     }/*function_ulint_to_lreal*/
       
  5878     break;
       
  5879 
       
  5880 /****
       
  5881  *ULINT_TO_TIME
       
  5882  */
       
  5883     case function_ulint_to_time :
       
  5884     {
       
  5885         symbol_c *last_type_symbol = NULL;
       
  5886 
       
  5887         {
       
  5888             identifier_c param_name("IN");
       
  5889             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5890             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5891             
       
  5892             /* Get the value from a foo(<param_value>) style call */
       
  5893             if (IN_param_value == NULL)
       
  5894               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5897             
       
  5898             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5899             {
       
  5900         
       
  5901                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5902                 s4o.print("(");
       
  5903                 return_type_symbol->accept(*this);
       
  5904                 s4o.print(")__int_to_time(");
       
  5905                 IN_param_value->accept(*this);
       
  5906                 s4o.print(")");
       
  5907                 return NULL;
       
  5908                 
       
  5909             }
       
  5910             
       
  5911             ERROR;
       
  5912         }
       
  5913         
       
  5914     }/*function_ulint_to_time*/
       
  5915     break;
       
  5916 
       
  5917 /****
       
  5918  *ULINT_TO_DATE
       
  5919  */
       
  5920     case function_ulint_to_date :
       
  5921     {
       
  5922         symbol_c *last_type_symbol = NULL;
       
  5923 
       
  5924         {
       
  5925             identifier_c param_name("IN");
       
  5926             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5927             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5928             
       
  5929             /* Get the value from a foo(<param_value>) style call */
       
  5930             if (IN_param_value == NULL)
       
  5931               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5934             
       
  5935             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5936             {
       
  5937         
       
  5938                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5939                 s4o.print("(");
       
  5940                 return_type_symbol->accept(*this);
       
  5941                 s4o.print(")__int_to_time(");
       
  5942                 IN_param_value->accept(*this);
       
  5943                 s4o.print(")");
       
  5944                 return NULL;
       
  5945                 
       
  5946             }
       
  5947             
       
  5948             ERROR;
       
  5949         }
       
  5950         
       
  5951     }/*function_ulint_to_date*/
       
  5952     break;
       
  5953 
       
  5954 /****
       
  5955  *ULINT_TO_TOD
       
  5956  */
       
  5957     case function_ulint_to_tod :
       
  5958     {
       
  5959         symbol_c *last_type_symbol = NULL;
       
  5960 
       
  5961         {
       
  5962             identifier_c param_name("IN");
       
  5963             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5964             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5965             
       
  5966             /* Get the value from a foo(<param_value>) style call */
       
  5967             if (IN_param_value == NULL)
       
  5968               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5971             
       
  5972             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5973             {
       
  5974         
       
  5975                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5976                 s4o.print("(");
       
  5977                 return_type_symbol->accept(*this);
       
  5978                 s4o.print(")__int_to_time(");
       
  5979                 IN_param_value->accept(*this);
       
  5980                 s4o.print(")");
       
  5981                 return NULL;
       
  5982                 
       
  5983             }
       
  5984             
       
  5985             ERROR;
       
  5986         }
       
  5987         
       
  5988     }/*function_ulint_to_tod*/
       
  5989     break;
       
  5990 
       
  5991 /****
       
  5992  *ULINT_TO_DT
       
  5993  */
       
  5994     case function_ulint_to_dt :
       
  5995     {
       
  5996         symbol_c *last_type_symbol = NULL;
       
  5997 
       
  5998         {
       
  5999             identifier_c param_name("IN");
       
  6000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6002             
       
  6003             /* Get the value from a foo(<param_value>) style call */
       
  6004             if (IN_param_value == NULL)
       
  6005               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6008             
       
  6009             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6010             {
       
  6011         
       
  6012                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6013                 s4o.print("(");
       
  6014                 return_type_symbol->accept(*this);
       
  6015                 s4o.print(")__int_to_time(");
       
  6016                 IN_param_value->accept(*this);
       
  6017                 s4o.print(")");
       
  6018                 return NULL;
       
  6019                 
       
  6020             }
       
  6021             
       
  6022             ERROR;
       
  6023         }
       
  6024         
       
  6025     }/*function_ulint_to_dt*/
       
  6026     break;
       
  6027 
       
  6028 /****
       
  6029  *ULINT_TO_STRING
       
  6030  */
       
  6031     case function_ulint_to_string :
       
  6032     {
       
  6033         symbol_c *last_type_symbol = NULL;
       
  6034 
       
  6035         {
       
  6036             identifier_c param_name("IN");
       
  6037             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6038             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6039             
       
  6040             /* Get the value from a foo(<param_value>) style call */
       
  6041             if (IN_param_value == NULL)
       
  6042               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6045             
       
  6046             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6047             {
       
  6048         
       
  6049                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6050                 s4o.print("(");
       
  6051                 return_type_symbol->accept(*this);
       
  6052                 s4o.print(")__uint_to_string(");
       
  6053                 IN_param_value->accept(*this);
       
  6054                 s4o.print(")");
       
  6055                 return NULL;
       
  6056                 
       
  6057             }
       
  6058             
       
  6059             ERROR;
       
  6060         }
       
  6061         
       
  6062     }/*function_ulint_to_string*/
       
  6063     break;
       
  6064 
       
  6065 /****
       
  6066  *ULINT_TO_BYTE
       
  6067  */
       
  6068     case function_ulint_to_byte :
       
  6069     {
       
  6070         symbol_c *last_type_symbol = NULL;
       
  6071 
       
  6072         {
       
  6073             identifier_c param_name("IN");
       
  6074             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6075             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6076             
       
  6077             /* Get the value from a foo(<param_value>) style call */
       
  6078             if (IN_param_value == NULL)
       
  6079               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6082             
       
  6083             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6084             {
       
  6085         
       
  6086                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6087                 s4o.print("(");
       
  6088                 return_type_symbol->accept(*this);
       
  6089                 s4o.print(")");
       
  6090                 IN_param_value->accept(*this);
       
  6091                 return NULL;
       
  6092                 
       
  6093             }
       
  6094             
       
  6095             ERROR;
       
  6096         }
       
  6097         
       
  6098     }/*function_ulint_to_byte*/
       
  6099     break;
       
  6100 
       
  6101 /****
       
  6102  *ULINT_TO_WORD
       
  6103  */
       
  6104     case function_ulint_to_word :
       
  6105     {
       
  6106         symbol_c *last_type_symbol = NULL;
       
  6107 
       
  6108         {
       
  6109             identifier_c param_name("IN");
       
  6110             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6111             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6112             
       
  6113             /* Get the value from a foo(<param_value>) style call */
       
  6114             if (IN_param_value == NULL)
       
  6115               IN_param_value = function_call_param_iterator.next();
       
  6116             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6117             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6118             
       
  6119             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6120             {
       
  6121         
       
  6122                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6123                 s4o.print("(");
       
  6124                 return_type_symbol->accept(*this);
       
  6125                 s4o.print(")");
       
  6126                 IN_param_value->accept(*this);
       
  6127                 return NULL;
       
  6128                 
       
  6129             }
       
  6130             
       
  6131             ERROR;
       
  6132         }
       
  6133         
       
  6134     }/*function_ulint_to_word*/
       
  6135     break;
       
  6136 
       
  6137 /****
       
  6138  *ULINT_TO_DWORD
       
  6139  */
       
  6140     case function_ulint_to_dword :
       
  6141     {
       
  6142         symbol_c *last_type_symbol = NULL;
       
  6143 
       
  6144         {
       
  6145             identifier_c param_name("IN");
       
  6146             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6147             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6148             
       
  6149             /* Get the value from a foo(<param_value>) style call */
       
  6150             if (IN_param_value == NULL)
       
  6151               IN_param_value = function_call_param_iterator.next();
       
  6152             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6153             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6154             
       
  6155             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6156             {
       
  6157         
       
  6158                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6159                 s4o.print("(");
       
  6160                 return_type_symbol->accept(*this);
       
  6161                 s4o.print(")");
       
  6162                 IN_param_value->accept(*this);
       
  6163                 return NULL;
       
  6164                 
       
  6165             }
       
  6166             
       
  6167             ERROR;
       
  6168         }
       
  6169         
       
  6170     }/*function_ulint_to_dword*/
       
  6171     break;
       
  6172 
       
  6173 /****
       
  6174  *ULINT_TO_LWORD
       
  6175  */
       
  6176     case function_ulint_to_lword :
       
  6177     {
       
  6178         symbol_c *last_type_symbol = NULL;
       
  6179 
       
  6180         {
       
  6181             identifier_c param_name("IN");
       
  6182             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6183             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6184             
       
  6185             /* Get the value from a foo(<param_value>) style call */
       
  6186             if (IN_param_value == NULL)
       
  6187               IN_param_value = function_call_param_iterator.next();
       
  6188             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6189             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6190             
       
  6191             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6192             {
       
  6193         
       
  6194                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6195                 s4o.print("(");
       
  6196                 return_type_symbol->accept(*this);
       
  6197                 s4o.print(")");
       
  6198                 IN_param_value->accept(*this);
       
  6199                 return NULL;
       
  6200                 
       
  6201             }
       
  6202             
       
  6203             ERROR;
       
  6204         }
       
  6205         
       
  6206     }/*function_ulint_to_lword*/
       
  6207     break;
       
  6208 
       
  6209 /****
       
  6210  *REAL_TO_BOOL
       
  6211  */
       
  6212     case function_real_to_bool :
       
  6213     {
       
  6214         symbol_c *last_type_symbol = NULL;
       
  6215 
       
  6216         {
       
  6217             identifier_c param_name("IN");
       
  6218             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6219             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6220             
       
  6221             /* Get the value from a foo(<param_value>) style call */
       
  6222             if (IN_param_value == NULL)
       
  6223               IN_param_value = function_call_param_iterator.next();
       
  6224             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6225             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6226             
       
  6227             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6228             {
       
  6229         
       
  6230                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6231                 s4o.print("(");
       
  6232                 return_type_symbol->accept(*this);
       
  6233                 s4o.print(")");
       
  6234                 IN_param_value->accept(*this);
       
  6235                 return NULL;
       
  6236                 
       
  6237             }
       
  6238             
       
  6239             ERROR;
       
  6240         }
       
  6241         
       
  6242     }/*function_real_to_bool*/
       
  6243     break;
       
  6244 
       
  6245 /****
       
  6246  *REAL_TO_SINT
       
  6247  */
       
  6248     case function_real_to_sint :
       
  6249     {
       
  6250         symbol_c *last_type_symbol = NULL;
       
  6251 
       
  6252         {
       
  6253             identifier_c param_name("IN");
       
  6254             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6255             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6256             
       
  6257             /* Get the value from a foo(<param_value>) style call */
       
  6258             if (IN_param_value == NULL)
       
  6259               IN_param_value = function_call_param_iterator.next();
       
  6260             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6261             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6262             
       
  6263             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6264             {
       
  6265         
       
  6266                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6267                 s4o.print("(");
       
  6268                 return_type_symbol->accept(*this);
       
  6269                 s4o.print(")");
       
  6270                 IN_param_value->accept(*this);
       
  6271                 return NULL;
       
  6272                 
       
  6273             }
       
  6274             
       
  6275             ERROR;
       
  6276         }
       
  6277         
       
  6278     }/*function_real_to_sint*/
       
  6279     break;
       
  6280 
       
  6281 /****
       
  6282  *REAL_TO_INT
       
  6283  */
       
  6284     case function_real_to_int :
       
  6285     {
       
  6286         symbol_c *last_type_symbol = NULL;
       
  6287 
       
  6288         {
       
  6289             identifier_c param_name("IN");
       
  6290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6291             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6292             
       
  6293             /* Get the value from a foo(<param_value>) style call */
       
  6294             if (IN_param_value == NULL)
       
  6295               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6298             
       
  6299             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6300             {
       
  6301         
       
  6302                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6303                 s4o.print("(");
       
  6304                 return_type_symbol->accept(*this);
       
  6305                 s4o.print(")");
       
  6306                 IN_param_value->accept(*this);
       
  6307                 return NULL;
       
  6308                 
       
  6309             }
       
  6310             
       
  6311             ERROR;
       
  6312         }
       
  6313         
       
  6314     }/*function_real_to_int*/
       
  6315     break;
       
  6316 
       
  6317 /****
       
  6318  *REAL_TO_DINT
       
  6319  */
       
  6320     case function_real_to_dint :
       
  6321     {
       
  6322         symbol_c *last_type_symbol = NULL;
       
  6323 
       
  6324         {
       
  6325             identifier_c param_name("IN");
       
  6326             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6327             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6328             
       
  6329             /* Get the value from a foo(<param_value>) style call */
       
  6330             if (IN_param_value == NULL)
       
  6331               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6334             
       
  6335             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6336             {
       
  6337         
       
  6338                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6339                 s4o.print("(");
       
  6340                 return_type_symbol->accept(*this);
       
  6341                 s4o.print(")");
       
  6342                 IN_param_value->accept(*this);
       
  6343                 return NULL;
       
  6344                 
       
  6345             }
       
  6346             
       
  6347             ERROR;
       
  6348         }
       
  6349         
       
  6350     }/*function_real_to_dint*/
       
  6351     break;
       
  6352 
       
  6353 /****
       
  6354  *REAL_TO_LINT
       
  6355  */
       
  6356     case function_real_to_lint :
       
  6357     {
       
  6358         symbol_c *last_type_symbol = NULL;
       
  6359 
       
  6360         {
       
  6361             identifier_c param_name("IN");
       
  6362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6363             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6364             
       
  6365             /* Get the value from a foo(<param_value>) style call */
       
  6366             if (IN_param_value == NULL)
       
  6367               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6370             
       
  6371             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6372             {
       
  6373         
       
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6375                 s4o.print("(");
       
  6376                 return_type_symbol->accept(*this);
       
  6377                 s4o.print(")");
       
  6378                 IN_param_value->accept(*this);
       
  6379                 return NULL;
       
  6380                 
       
  6381             }
       
  6382             
       
  6383             ERROR;
       
  6384         }
       
  6385         
       
  6386     }/*function_real_to_lint*/
       
  6387     break;
       
  6388 
       
  6389 /****
       
  6390  *REAL_TO_USINT
       
  6391  */
       
  6392     case function_real_to_usint :
       
  6393     {
       
  6394         symbol_c *last_type_symbol = NULL;
       
  6395 
       
  6396         {
       
  6397             identifier_c param_name("IN");
       
  6398             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6399             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6400             
       
  6401             /* Get the value from a foo(<param_value>) style call */
       
  6402             if (IN_param_value == NULL)
       
  6403               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6406             
       
  6407             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6408             {
       
  6409         
       
  6410                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6411                 s4o.print("(");
       
  6412                 return_type_symbol->accept(*this);
       
  6413                 s4o.print(")");
       
  6414                 IN_param_value->accept(*this);
       
  6415                 return NULL;
       
  6416                 
       
  6417             }
       
  6418             
       
  6419             ERROR;
       
  6420         }
       
  6421         
       
  6422     }/*function_real_to_usint*/
       
  6423     break;
       
  6424 
       
  6425 /****
       
  6426  *REAL_TO_UINT
       
  6427  */
       
  6428     case function_real_to_uint :
       
  6429     {
       
  6430         symbol_c *last_type_symbol = NULL;
       
  6431 
       
  6432         {
       
  6433             identifier_c param_name("IN");
       
  6434             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6435             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6436             
       
  6437             /* Get the value from a foo(<param_value>) style call */
       
  6438             if (IN_param_value == NULL)
       
  6439               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6442             
       
  6443             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6444             {
       
  6445         
       
  6446                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6447                 s4o.print("(");
       
  6448                 return_type_symbol->accept(*this);
       
  6449                 s4o.print(")");
       
  6450                 IN_param_value->accept(*this);
       
  6451                 return NULL;
       
  6452                 
       
  6453             }
       
  6454             
       
  6455             ERROR;
       
  6456         }
       
  6457         
       
  6458     }/*function_real_to_uint*/
       
  6459     break;
       
  6460 
       
  6461 /****
       
  6462  *REAL_TO_UDINT
       
  6463  */
       
  6464     case function_real_to_udint :
       
  6465     {
       
  6466         symbol_c *last_type_symbol = NULL;
       
  6467 
       
  6468         {
       
  6469             identifier_c param_name("IN");
       
  6470             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6471             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6472             
       
  6473             /* Get the value from a foo(<param_value>) style call */
       
  6474             if (IN_param_value == NULL)
       
  6475               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6478             
       
  6479             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6480             {
       
  6481         
       
  6482                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6483                 s4o.print("(");
       
  6484                 return_type_symbol->accept(*this);
       
  6485                 s4o.print(")");
       
  6486                 IN_param_value->accept(*this);
       
  6487                 return NULL;
       
  6488                 
       
  6489             }
       
  6490             
       
  6491             ERROR;
       
  6492         }
       
  6493         
       
  6494     }/*function_real_to_udint*/
       
  6495     break;
       
  6496 
       
  6497 /****
       
  6498  *REAL_TO_ULINT
       
  6499  */
       
  6500     case function_real_to_ulint :
       
  6501     {
       
  6502         symbol_c *last_type_symbol = NULL;
       
  6503 
       
  6504         {
       
  6505             identifier_c param_name("IN");
       
  6506             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6507             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6508             
       
  6509             /* Get the value from a foo(<param_value>) style call */
       
  6510             if (IN_param_value == NULL)
       
  6511               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6514             
       
  6515             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6516             {
       
  6517         
       
  6518                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6519                 s4o.print("(");
       
  6520                 return_type_symbol->accept(*this);
       
  6521                 s4o.print(")");
       
  6522                 IN_param_value->accept(*this);
       
  6523                 return NULL;
       
  6524                 
       
  6525             }
       
  6526             
       
  6527             ERROR;
       
  6528         }
       
  6529         
       
  6530     }/*function_real_to_ulint*/
       
  6531     break;
       
  6532 
       
  6533 /****
     9  *REAL_TO_LREAL
  6534  *REAL_TO_LREAL
    10  */
  6535  */
    11     case function_real_to_lreal :
  6536     case function_real_to_lreal :
    12     {
  6537     {
    13         symbol_c *last_type_symbol = NULL;
  6538         symbol_c *last_type_symbol = NULL;
    40         
  6565         
    41     }/*function_real_to_lreal*/
  6566     }/*function_real_to_lreal*/
    42     break;
  6567     break;
    43 
  6568 
    44 /****
  6569 /****
    45  *REAL_TO_SINT
  6570  *REAL_TO_TIME
    46  */
  6571  */
    47     case function_real_to_sint :
  6572     case function_real_to_time :
    48     {
  6573     {
    49         symbol_c *last_type_symbol = NULL;
  6574         symbol_c *last_type_symbol = NULL;
    50 
  6575 
    51         {
  6576         {
    52             identifier_c param_name("IN");
  6577             identifier_c param_name("IN");
    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 ;
  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 ;
    61             
  6586             
    62             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6587             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
    63             {
  6588             {
    64         
  6589         
       
  6590                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6591                 s4o.print("(");
       
  6592                 return_type_symbol->accept(*this);
       
  6593                 s4o.print(")__real_to_time(");
       
  6594                 IN_param_value->accept(*this);
       
  6595                 s4o.print(")");
       
  6596                 return NULL;
       
  6597                 
       
  6598             }
       
  6599             
       
  6600             ERROR;
       
  6601         }
       
  6602         
       
  6603     }/*function_real_to_time*/
       
  6604     break;
       
  6605 
       
  6606 /****
       
  6607  *REAL_TO_DATE
       
  6608  */
       
  6609     case function_real_to_date :
       
  6610     {
       
  6611         symbol_c *last_type_symbol = NULL;
       
  6612 
       
  6613         {
       
  6614             identifier_c param_name("IN");
       
  6615             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6616             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6617             
       
  6618             /* Get the value from a foo(<param_value>) style call */
       
  6619             if (IN_param_value == NULL)
       
  6620               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6623             
       
  6624             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6625             {
       
  6626         
       
  6627                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6628                 s4o.print("(");
       
  6629                 return_type_symbol->accept(*this);
       
  6630                 s4o.print(")__real_to_time(");
       
  6631                 IN_param_value->accept(*this);
       
  6632                 s4o.print(")");
       
  6633                 return NULL;
       
  6634                 
       
  6635             }
       
  6636             
       
  6637             ERROR;
       
  6638         }
       
  6639         
       
  6640     }/*function_real_to_date*/
       
  6641     break;
       
  6642 
       
  6643 /****
       
  6644  *REAL_TO_TOD
       
  6645  */
       
  6646     case function_real_to_tod :
       
  6647     {
       
  6648         symbol_c *last_type_symbol = NULL;
       
  6649 
       
  6650         {
       
  6651             identifier_c param_name("IN");
       
  6652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6653             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6654             
       
  6655             /* Get the value from a foo(<param_value>) style call */
       
  6656             if (IN_param_value == NULL)
       
  6657               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6660             
       
  6661             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6662             {
       
  6663         
       
  6664                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6665                 s4o.print("(");
       
  6666                 return_type_symbol->accept(*this);
       
  6667                 s4o.print(")__real_to_time(");
       
  6668                 IN_param_value->accept(*this);
       
  6669                 s4o.print(")");
       
  6670                 return NULL;
       
  6671                 
       
  6672             }
       
  6673             
       
  6674             ERROR;
       
  6675         }
       
  6676         
       
  6677     }/*function_real_to_tod*/
       
  6678     break;
       
  6679 
       
  6680 /****
       
  6681  *REAL_TO_DT
       
  6682  */
       
  6683     case function_real_to_dt :
       
  6684     {
       
  6685         symbol_c *last_type_symbol = NULL;
       
  6686 
       
  6687         {
       
  6688             identifier_c param_name("IN");
       
  6689             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6690             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6691             
       
  6692             /* Get the value from a foo(<param_value>) style call */
       
  6693             if (IN_param_value == NULL)
       
  6694               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6697             
       
  6698             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6699             {
       
  6700         
       
  6701                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6702                 s4o.print("(");
       
  6703                 return_type_symbol->accept(*this);
       
  6704                 s4o.print(")__real_to_time(");
       
  6705                 IN_param_value->accept(*this);
       
  6706                 s4o.print(")");
       
  6707                 return NULL;
       
  6708                 
       
  6709             }
       
  6710             
       
  6711             ERROR;
       
  6712         }
       
  6713         
       
  6714     }/*function_real_to_dt*/
       
  6715     break;
       
  6716 
       
  6717 /****
       
  6718  *REAL_TO_STRING
       
  6719  */
       
  6720     case function_real_to_string :
       
  6721     {
       
  6722         symbol_c *last_type_symbol = NULL;
       
  6723 
       
  6724         {
       
  6725             identifier_c param_name("IN");
       
  6726             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6727             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6728             
       
  6729             /* Get the value from a foo(<param_value>) style call */
       
  6730             if (IN_param_value == NULL)
       
  6731               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6734             
       
  6735             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6736             {
       
  6737         
       
  6738                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6739                 s4o.print("(");
       
  6740                 return_type_symbol->accept(*this);
       
  6741                 s4o.print(")__real_to_string(");
       
  6742                 IN_param_value->accept(*this);
       
  6743                 s4o.print(")");
       
  6744                 return NULL;
       
  6745                 
       
  6746             }
       
  6747             
       
  6748             ERROR;
       
  6749         }
       
  6750         
       
  6751     }/*function_real_to_string*/
       
  6752     break;
       
  6753 
       
  6754 /****
       
  6755  *REAL_TO_BYTE
       
  6756  */
       
  6757     case function_real_to_byte :
       
  6758     {
       
  6759         symbol_c *last_type_symbol = NULL;
       
  6760 
       
  6761         {
       
  6762             identifier_c param_name("IN");
       
  6763             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6764             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6765             
       
  6766             /* Get the value from a foo(<param_value>) style call */
       
  6767             if (IN_param_value == NULL)
       
  6768               IN_param_value = function_call_param_iterator.next();
       
  6769             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6770             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6771             
       
  6772             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6773             {
       
  6774         
       
  6775                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6776                 s4o.print("(");
       
  6777                 return_type_symbol->accept(*this);
       
  6778                 s4o.print(")");
       
  6779                 IN_param_value->accept(*this);
       
  6780                 return NULL;
       
  6781                 
       
  6782             }
       
  6783             
       
  6784             ERROR;
       
  6785         }
       
  6786         
       
  6787     }/*function_real_to_byte*/
       
  6788     break;
       
  6789 
       
  6790 /****
       
  6791  *REAL_TO_WORD
       
  6792  */
       
  6793     case function_real_to_word :
       
  6794     {
       
  6795         symbol_c *last_type_symbol = NULL;
       
  6796 
       
  6797         {
       
  6798             identifier_c param_name("IN");
       
  6799             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6800             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6801             
       
  6802             /* Get the value from a foo(<param_value>) style call */
       
  6803             if (IN_param_value == NULL)
       
  6804               IN_param_value = function_call_param_iterator.next();
       
  6805             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6806             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6807             
       
  6808             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6809             {
       
  6810         
       
  6811                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6812                 s4o.print("(");
       
  6813                 return_type_symbol->accept(*this);
       
  6814                 s4o.print(")");
       
  6815                 IN_param_value->accept(*this);
       
  6816                 return NULL;
       
  6817                 
       
  6818             }
       
  6819             
       
  6820             ERROR;
       
  6821         }
       
  6822         
       
  6823     }/*function_real_to_word*/
       
  6824     break;
       
  6825 
       
  6826 /****
       
  6827  *REAL_TO_DWORD
       
  6828  */
       
  6829     case function_real_to_dword :
       
  6830     {
       
  6831         symbol_c *last_type_symbol = NULL;
       
  6832 
       
  6833         {
       
  6834             identifier_c param_name("IN");
       
  6835             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6836             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6837             
       
  6838             /* Get the value from a foo(<param_value>) style call */
       
  6839             if (IN_param_value == NULL)
       
  6840               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6843             
       
  6844             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6845             {
       
  6846         
       
  6847                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6848                 s4o.print("(");
       
  6849                 return_type_symbol->accept(*this);
       
  6850                 s4o.print(")");
       
  6851                 IN_param_value->accept(*this);
       
  6852                 return NULL;
       
  6853                 
       
  6854             }
       
  6855             
       
  6856             ERROR;
       
  6857         }
       
  6858         
       
  6859     }/*function_real_to_dword*/
       
  6860     break;
       
  6861 
       
  6862 /****
       
  6863  *REAL_TO_LWORD
       
  6864  */
       
  6865     case function_real_to_lword :
       
  6866     {
       
  6867         symbol_c *last_type_symbol = NULL;
       
  6868 
       
  6869         {
       
  6870             identifier_c param_name("IN");
       
  6871             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6872             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6873             
       
  6874             /* Get the value from a foo(<param_value>) style call */
       
  6875             if (IN_param_value == NULL)
       
  6876               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6879             
       
  6880             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
  6881             {
       
  6882         
       
  6883                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6884                 s4o.print("(");
       
  6885                 return_type_symbol->accept(*this);
       
  6886                 s4o.print(")");
       
  6887                 IN_param_value->accept(*this);
       
  6888                 return NULL;
       
  6889                 
       
  6890             }
       
  6891             
       
  6892             ERROR;
       
  6893         }
       
  6894         
       
  6895     }/*function_real_to_lword*/
       
  6896     break;
       
  6897 
       
  6898 /****
       
  6899  *LREAL_TO_BOOL
       
  6900  */
       
  6901     case function_lreal_to_bool :
       
  6902     {
       
  6903         symbol_c *last_type_symbol = NULL;
       
  6904 
       
  6905         {
       
  6906             identifier_c param_name("IN");
       
  6907             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6908             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6909             
       
  6910             /* Get the value from a foo(<param_value>) style call */
       
  6911             if (IN_param_value == NULL)
       
  6912               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6915             
       
  6916             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  6917             {
       
  6918         
       
  6919                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6920                 s4o.print("(");
       
  6921                 return_type_symbol->accept(*this);
       
  6922                 s4o.print(")");
       
  6923                 IN_param_value->accept(*this);
       
  6924                 return NULL;
       
  6925                 
       
  6926             }
       
  6927             
       
  6928             ERROR;
       
  6929         }
       
  6930         
       
  6931     }/*function_lreal_to_bool*/
       
  6932     break;
       
  6933 
       
  6934 /****
       
  6935  *LREAL_TO_SINT
       
  6936  */
       
  6937     case function_lreal_to_sint :
       
  6938     {
       
  6939         symbol_c *last_type_symbol = NULL;
       
  6940 
       
  6941         {
       
  6942             identifier_c param_name("IN");
       
  6943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6944             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6945             
       
  6946             /* Get the value from a foo(<param_value>) style call */
       
  6947             if (IN_param_value == NULL)
       
  6948               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6951             
       
  6952             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  6953             {
       
  6954         
    65                 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;
    66                 s4o.print("(");
  6956                 s4o.print("(");
    67                 return_type_symbol->accept(*this);
  6957                 return_type_symbol->accept(*this);
    68                 s4o.print(")");
  6958                 s4o.print(")");
    69                 IN_param_value->accept(*this);
  6959                 IN_param_value->accept(*this);
    72             }
  6962             }
    73             
  6963             
    74             ERROR;
  6964             ERROR;
    75         }
  6965         }
    76         
  6966         
    77     }/*function_real_to_sint*/
  6967     }/*function_lreal_to_sint*/
    78     break;
  6968     break;
    79 
  6969 
    80 /****
  6970 /****
    81  *REAL_TO_INT
  6971  *LREAL_TO_INT
    82  */
  6972  */
    83     case function_real_to_int :
  6973     case function_lreal_to_int :
    84     {
  6974     {
    85         symbol_c *last_type_symbol = NULL;
  6975         symbol_c *last_type_symbol = NULL;
    86 
  6976 
    87         {
  6977         {
    88             identifier_c param_name("IN");
  6978             identifier_c param_name("IN");
    89             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6979             /* Get the value from a foo(<param_name> = <param_value>) style call */
    90             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6980             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
    91             
  6981             
    92             /* Get the value from a foo(<param_value>) style call */
  6982             /* Get the value from a foo(<param_value>) style call */
    93             if (IN_param_value == NULL)
  6983             if (IN_param_value == NULL)
    94               IN_param_value = function_call_param_iterator.next();
  6984               IN_param_value = function_call_param_iterator.next();
    95             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);
    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 ;
  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 ;
    97             
  6987             
    98             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6988             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
    99             {
  6989             {
   100         
  6990         
   101                 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;
   102                 s4o.print("(");
  6992                 s4o.print("(");
   103                 return_type_symbol->accept(*this);
  6993                 return_type_symbol->accept(*this);
   108             }
  6998             }
   109             
  6999             
   110             ERROR;
  7000             ERROR;
   111         }
  7001         }
   112         
  7002         
   113     }/*function_real_to_int*/
  7003     }/*function_lreal_to_int*/
   114     break;
  7004     break;
   115 
  7005 
   116 /****
  7006 /****
   117  *REAL_TO_DINT
  7007  *LREAL_TO_DINT
   118  */
  7008  */
   119     case function_real_to_dint :
  7009     case function_lreal_to_dint :
   120     {
  7010     {
   121         symbol_c *last_type_symbol = NULL;
  7011         symbol_c *last_type_symbol = NULL;
   122 
  7012 
   123         {
  7013         {
   124             identifier_c param_name("IN");
  7014             identifier_c param_name("IN");
   125             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7015             /* Get the value from a foo(<param_name> = <param_value>) style call */
   126             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7016             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   127             
  7017             
   128             /* Get the value from a foo(<param_value>) style call */
  7018             /* Get the value from a foo(<param_value>) style call */
   129             if (IN_param_value == NULL)
  7019             if (IN_param_value == NULL)
   130               IN_param_value = function_call_param_iterator.next();
  7020               IN_param_value = function_call_param_iterator.next();
   131             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);
   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 ;
  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 ;
   133             
  7023             
   134             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7024             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   135             {
  7025             {
   136         
  7026         
   137                 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;
   138                 s4o.print("(");
  7028                 s4o.print("(");
   139                 return_type_symbol->accept(*this);
  7029                 return_type_symbol->accept(*this);
   144             }
  7034             }
   145             
  7035             
   146             ERROR;
  7036             ERROR;
   147         }
  7037         }
   148         
  7038         
   149     }/*function_real_to_dint*/
  7039     }/*function_lreal_to_dint*/
   150     break;
  7040     break;
   151 
  7041 
   152 /****
  7042 /****
   153  *REAL_TO_LINT
  7043  *LREAL_TO_LINT
   154  */
  7044  */
   155     case function_real_to_lint :
  7045     case function_lreal_to_lint :
   156     {
  7046     {
   157         symbol_c *last_type_symbol = NULL;
  7047         symbol_c *last_type_symbol = NULL;
   158 
  7048 
   159         {
  7049         {
   160             identifier_c param_name("IN");
  7050             identifier_c param_name("IN");
   161             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7051             /* Get the value from a foo(<param_name> = <param_value>) style call */
   162             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7052             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   163             
  7053             
   164             /* Get the value from a foo(<param_value>) style call */
  7054             /* Get the value from a foo(<param_value>) style call */
   165             if (IN_param_value == NULL)
  7055             if (IN_param_value == NULL)
   166               IN_param_value = function_call_param_iterator.next();
  7056               IN_param_value = function_call_param_iterator.next();
   167             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);
   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 ;
  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 ;
   169             
  7059             
   170             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7060             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   171             {
  7061             {
   172         
  7062         
   173                 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;
   174                 s4o.print("(");
  7064                 s4o.print("(");
   175                 return_type_symbol->accept(*this);
  7065                 return_type_symbol->accept(*this);
   180             }
  7070             }
   181             
  7071             
   182             ERROR;
  7072             ERROR;
   183         }
  7073         }
   184         
  7074         
   185     }/*function_real_to_lint*/
  7075     }/*function_lreal_to_lint*/
   186     break;
  7076     break;
   187 
  7077 
   188 /****
  7078 /****
   189  *REAL_TO_USINT
  7079  *LREAL_TO_USINT
   190  */
  7080  */
   191     case function_real_to_usint :
  7081     case function_lreal_to_usint :
   192     {
  7082     {
   193         symbol_c *last_type_symbol = NULL;
  7083         symbol_c *last_type_symbol = NULL;
   194 
  7084 
   195         {
  7085         {
   196             identifier_c param_name("IN");
  7086             identifier_c param_name("IN");
   197             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7087             /* Get the value from a foo(<param_name> = <param_value>) style call */
   198             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7088             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   199             
  7089             
   200             /* Get the value from a foo(<param_value>) style call */
  7090             /* Get the value from a foo(<param_value>) style call */
   201             if (IN_param_value == NULL)
  7091             if (IN_param_value == NULL)
   202               IN_param_value = function_call_param_iterator.next();
  7092               IN_param_value = function_call_param_iterator.next();
   203             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);
   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 ;
  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 ;
   205             
  7095             
   206             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7096             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   207             {
  7097             {
   208         
  7098         
   209                 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;
   210                 s4o.print("(");
  7100                 s4o.print("(");
   211                 return_type_symbol->accept(*this);
  7101                 return_type_symbol->accept(*this);
   216             }
  7106             }
   217             
  7107             
   218             ERROR;
  7108             ERROR;
   219         }
  7109         }
   220         
  7110         
   221     }/*function_real_to_usint*/
  7111     }/*function_lreal_to_usint*/
   222     break;
  7112     break;
   223 
  7113 
   224 /****
  7114 /****
   225  *REAL_TO_UINT
  7115  *LREAL_TO_UINT
   226  */
  7116  */
   227     case function_real_to_uint :
  7117     case function_lreal_to_uint :
   228     {
  7118     {
   229         symbol_c *last_type_symbol = NULL;
  7119         symbol_c *last_type_symbol = NULL;
   230 
  7120 
   231         {
  7121         {
   232             identifier_c param_name("IN");
  7122             identifier_c param_name("IN");
   233             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7123             /* Get the value from a foo(<param_name> = <param_value>) style call */
   234             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7124             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   235             
  7125             
   236             /* Get the value from a foo(<param_value>) style call */
  7126             /* Get the value from a foo(<param_value>) style call */
   237             if (IN_param_value == NULL)
  7127             if (IN_param_value == NULL)
   238               IN_param_value = function_call_param_iterator.next();
  7128               IN_param_value = function_call_param_iterator.next();
   239             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);
   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 ;
  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 ;
   241             
  7131             
   242             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7132             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   243             {
  7133             {
   244         
  7134         
   245                 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;
   246                 s4o.print("(");
  7136                 s4o.print("(");
   247                 return_type_symbol->accept(*this);
  7137                 return_type_symbol->accept(*this);
   252             }
  7142             }
   253             
  7143             
   254             ERROR;
  7144             ERROR;
   255         }
  7145         }
   256         
  7146         
   257     }/*function_real_to_uint*/
  7147     }/*function_lreal_to_uint*/
   258     break;
  7148     break;
   259 
  7149 
   260 /****
  7150 /****
   261  *REAL_TO_UDINT
  7151  *LREAL_TO_UDINT
   262  */
  7152  */
   263     case function_real_to_udint :
  7153     case function_lreal_to_udint :
   264     {
  7154     {
   265         symbol_c *last_type_symbol = NULL;
  7155         symbol_c *last_type_symbol = NULL;
   266 
  7156 
   267         {
  7157         {
   268             identifier_c param_name("IN");
  7158             identifier_c param_name("IN");
   269             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7159             /* Get the value from a foo(<param_name> = <param_value>) style call */
   270             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7160             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   271             
  7161             
   272             /* Get the value from a foo(<param_value>) style call */
  7162             /* Get the value from a foo(<param_value>) style call */
   273             if (IN_param_value == NULL)
  7163             if (IN_param_value == NULL)
   274               IN_param_value = function_call_param_iterator.next();
  7164               IN_param_value = function_call_param_iterator.next();
   275             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);
   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 ;
  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 ;
   277             
  7167             
   278             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7168             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   279             {
  7169             {
   280         
  7170         
   281                 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;
   282                 s4o.print("(");
  7172                 s4o.print("(");
   283                 return_type_symbol->accept(*this);
  7173                 return_type_symbol->accept(*this);
   288             }
  7178             }
   289             
  7179             
   290             ERROR;
  7180             ERROR;
   291         }
  7181         }
   292         
  7182         
   293     }/*function_real_to_udint*/
  7183     }/*function_lreal_to_udint*/
   294     break;
  7184     break;
   295 
  7185 
   296 /****
  7186 /****
   297  *REAL_TO_ULINT
  7187  *LREAL_TO_ULINT
   298  */
  7188  */
   299     case function_real_to_ulint :
  7189     case function_lreal_to_ulint :
   300     {
  7190     {
   301         symbol_c *last_type_symbol = NULL;
  7191         symbol_c *last_type_symbol = NULL;
   302 
  7192 
   303         {
  7193         {
   304             identifier_c param_name("IN");
  7194             identifier_c param_name("IN");
   305             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7195             /* Get the value from a foo(<param_name> = <param_value>) style call */
   306             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7196             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   307             
  7197             
   308             /* Get the value from a foo(<param_value>) style call */
  7198             /* Get the value from a foo(<param_value>) style call */
   309             if (IN_param_value == NULL)
  7199             if (IN_param_value == NULL)
   310               IN_param_value = function_call_param_iterator.next();
  7200               IN_param_value = function_call_param_iterator.next();
   311             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);
   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 ;
  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 ;
   313             
  7203             
   314             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7204             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   315             {
  7205             {
   316         
  7206         
   317                 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;
   318                 s4o.print("(");
  7208                 s4o.print("(");
   319                 return_type_symbol->accept(*this);
  7209                 return_type_symbol->accept(*this);
   324             }
  7214             }
   325             
  7215             
   326             ERROR;
  7216             ERROR;
   327         }
  7217         }
   328         
  7218         
   329     }/*function_real_to_ulint*/
  7219     }/*function_lreal_to_ulint*/
   330     break;
  7220     break;
   331 
  7221 
   332 /****
  7222 /****
   333  *REAL_TO_TIME
  7223  *LREAL_TO_REAL
   334  */
  7224  */
   335     case function_real_to_time :
  7225     case function_lreal_to_real :
   336     {
  7226     {
   337         symbol_c *last_type_symbol = NULL;
  7227         symbol_c *last_type_symbol = NULL;
   338 
  7228 
   339         {
  7229         {
   340             identifier_c param_name("IN");
  7230             identifier_c param_name("IN");
   341             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7231             /* Get the value from a foo(<param_name> = <param_value>) style call */
   342             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7232             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   343             
  7233             
   344             /* Get the value from a foo(<param_value>) style call */
  7234             /* Get the value from a foo(<param_value>) style call */
   345             if (IN_param_value == NULL)
  7235             if (IN_param_value == NULL)
   346               IN_param_value = function_call_param_iterator.next();
  7236               IN_param_value = function_call_param_iterator.next();
   347             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);
   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 ;
  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 ;
   349             
  7239             
   350             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7240             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7241             {
       
  7242         
       
  7243                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7244                 s4o.print("(");
       
  7245                 return_type_symbol->accept(*this);
       
  7246                 s4o.print(")");
       
  7247                 IN_param_value->accept(*this);
       
  7248                 return NULL;
       
  7249                 
       
  7250             }
       
  7251             
       
  7252             ERROR;
       
  7253         }
       
  7254         
       
  7255     }/*function_lreal_to_real*/
       
  7256     break;
       
  7257 
       
  7258 /****
       
  7259  *LREAL_TO_TIME
       
  7260  */
       
  7261     case function_lreal_to_time :
       
  7262     {
       
  7263         symbol_c *last_type_symbol = NULL;
       
  7264 
       
  7265         {
       
  7266             identifier_c param_name("IN");
       
  7267             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7268             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7269             
       
  7270             /* Get the value from a foo(<param_value>) style call */
       
  7271             if (IN_param_value == NULL)
       
  7272               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7275             
       
  7276             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   351             {
  7277             {
   352         
  7278         
   353                 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;
   354                 s4o.print("(");
  7280                 s4o.print("(");
   355                 return_type_symbol->accept(*this);
  7281                 return_type_symbol->accept(*this);
   361             }
  7287             }
   362             
  7288             
   363             ERROR;
  7289             ERROR;
   364         }
  7290         }
   365         
  7291         
   366     }/*function_real_to_time*/
  7292     }/*function_lreal_to_time*/
   367     break;
  7293     break;
   368 
  7294 
   369 /****
  7295 /****
   370  *REAL_TO_BOOL
  7296  *LREAL_TO_DATE
   371  */
  7297  */
   372     case function_real_to_bool :
  7298     case function_lreal_to_date :
   373     {
  7299     {
   374         symbol_c *last_type_symbol = NULL;
  7300         symbol_c *last_type_symbol = NULL;
   375 
  7301 
   376         {
  7302         {
   377             identifier_c param_name("IN");
  7303             identifier_c param_name("IN");
   378             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7304             /* Get the value from a foo(<param_name> = <param_value>) style call */
   379             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   380             
  7306             
   381             /* Get the value from a foo(<param_value>) style call */
  7307             /* Get the value from a foo(<param_value>) style call */
   382             if (IN_param_value == NULL)
  7308             if (IN_param_value == NULL)
   383               IN_param_value = function_call_param_iterator.next();
  7309               IN_param_value = function_call_param_iterator.next();
   384             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);
   385             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  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 ;
   386             
  7312             
   387             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7313             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7314             {
       
  7315         
       
  7316                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7317                 s4o.print("(");
       
  7318                 return_type_symbol->accept(*this);
       
  7319                 s4o.print(")__real_to_time(");
       
  7320                 IN_param_value->accept(*this);
       
  7321                 s4o.print(")");
       
  7322                 return NULL;
       
  7323                 
       
  7324             }
       
  7325             
       
  7326             ERROR;
       
  7327         }
       
  7328         
       
  7329     }/*function_lreal_to_date*/
       
  7330     break;
       
  7331 
       
  7332 /****
       
  7333  *LREAL_TO_TOD
       
  7334  */
       
  7335     case function_lreal_to_tod :
       
  7336     {
       
  7337         symbol_c *last_type_symbol = NULL;
       
  7338 
       
  7339         {
       
  7340             identifier_c param_name("IN");
       
  7341             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7342             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7343             
       
  7344             /* Get the value from a foo(<param_value>) style call */
       
  7345             if (IN_param_value == NULL)
       
  7346               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7349             
       
  7350             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7351             {
       
  7352         
       
  7353                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7354                 s4o.print("(");
       
  7355                 return_type_symbol->accept(*this);
       
  7356                 s4o.print(")__real_to_time(");
       
  7357                 IN_param_value->accept(*this);
       
  7358                 s4o.print(")");
       
  7359                 return NULL;
       
  7360                 
       
  7361             }
       
  7362             
       
  7363             ERROR;
       
  7364         }
       
  7365         
       
  7366     }/*function_lreal_to_tod*/
       
  7367     break;
       
  7368 
       
  7369 /****
       
  7370  *LREAL_TO_DT
       
  7371  */
       
  7372     case function_lreal_to_dt :
       
  7373     {
       
  7374         symbol_c *last_type_symbol = NULL;
       
  7375 
       
  7376         {
       
  7377             identifier_c param_name("IN");
       
  7378             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7379             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7380             
       
  7381             /* Get the value from a foo(<param_value>) style call */
       
  7382             if (IN_param_value == NULL)
       
  7383               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7386             
       
  7387             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7388             {
       
  7389         
       
  7390                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7391                 s4o.print("(");
       
  7392                 return_type_symbol->accept(*this);
       
  7393                 s4o.print(")__real_to_time(");
       
  7394                 IN_param_value->accept(*this);
       
  7395                 s4o.print(")");
       
  7396                 return NULL;
       
  7397                 
       
  7398             }
       
  7399             
       
  7400             ERROR;
       
  7401         }
       
  7402         
       
  7403     }/*function_lreal_to_dt*/
       
  7404     break;
       
  7405 
       
  7406 /****
       
  7407  *LREAL_TO_STRING
       
  7408  */
       
  7409     case function_lreal_to_string :
       
  7410     {
       
  7411         symbol_c *last_type_symbol = NULL;
       
  7412 
       
  7413         {
       
  7414             identifier_c param_name("IN");
       
  7415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7416             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7417             
       
  7418             /* Get the value from a foo(<param_value>) style call */
       
  7419             if (IN_param_value == NULL)
       
  7420               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7423             
       
  7424             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7425             {
       
  7426         
       
  7427                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7428                 s4o.print("(");
       
  7429                 return_type_symbol->accept(*this);
       
  7430                 s4o.print(")__real_to_string(");
       
  7431                 IN_param_value->accept(*this);
       
  7432                 s4o.print(")");
       
  7433                 return NULL;
       
  7434                 
       
  7435             }
       
  7436             
       
  7437             ERROR;
       
  7438         }
       
  7439         
       
  7440     }/*function_lreal_to_string*/
       
  7441     break;
       
  7442 
       
  7443 /****
       
  7444  *LREAL_TO_BYTE
       
  7445  */
       
  7446     case function_lreal_to_byte :
       
  7447     {
       
  7448         symbol_c *last_type_symbol = NULL;
       
  7449 
       
  7450         {
       
  7451             identifier_c param_name("IN");
       
  7452             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7453             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7454             
       
  7455             /* Get the value from a foo(<param_value>) style call */
       
  7456             if (IN_param_value == NULL)
       
  7457               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7460             
       
  7461             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7462             {
       
  7463         
       
  7464                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7465                 s4o.print("(");
       
  7466                 return_type_symbol->accept(*this);
       
  7467                 s4o.print(")");
       
  7468                 IN_param_value->accept(*this);
       
  7469                 return NULL;
       
  7470                 
       
  7471             }
       
  7472             
       
  7473             ERROR;
       
  7474         }
       
  7475         
       
  7476     }/*function_lreal_to_byte*/
       
  7477     break;
       
  7478 
       
  7479 /****
       
  7480  *LREAL_TO_WORD
       
  7481  */
       
  7482     case function_lreal_to_word :
       
  7483     {
       
  7484         symbol_c *last_type_symbol = NULL;
       
  7485 
       
  7486         {
       
  7487             identifier_c param_name("IN");
       
  7488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7490             
       
  7491             /* Get the value from a foo(<param_value>) style call */
       
  7492             if (IN_param_value == NULL)
       
  7493               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7496             
       
  7497             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7498             {
       
  7499         
       
  7500                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7501                 s4o.print("(");
       
  7502                 return_type_symbol->accept(*this);
       
  7503                 s4o.print(")");
       
  7504                 IN_param_value->accept(*this);
       
  7505                 return NULL;
       
  7506                 
       
  7507             }
       
  7508             
       
  7509             ERROR;
       
  7510         }
       
  7511         
       
  7512     }/*function_lreal_to_word*/
       
  7513     break;
       
  7514 
       
  7515 /****
       
  7516  *LREAL_TO_DWORD
       
  7517  */
       
  7518     case function_lreal_to_dword :
       
  7519     {
       
  7520         symbol_c *last_type_symbol = NULL;
       
  7521 
       
  7522         {
       
  7523             identifier_c param_name("IN");
       
  7524             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7525             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7526             
       
  7527             /* Get the value from a foo(<param_value>) style call */
       
  7528             if (IN_param_value == NULL)
       
  7529               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7532             
       
  7533             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7534             {
       
  7535         
       
  7536                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7537                 s4o.print("(");
       
  7538                 return_type_symbol->accept(*this);
       
  7539                 s4o.print(")");
       
  7540                 IN_param_value->accept(*this);
       
  7541                 return NULL;
       
  7542                 
       
  7543             }
       
  7544             
       
  7545             ERROR;
       
  7546         }
       
  7547         
       
  7548     }/*function_lreal_to_dword*/
       
  7549     break;
       
  7550 
       
  7551 /****
       
  7552  *LREAL_TO_LWORD
       
  7553  */
       
  7554     case function_lreal_to_lword :
       
  7555     {
       
  7556         symbol_c *last_type_symbol = NULL;
       
  7557 
       
  7558         {
       
  7559             identifier_c param_name("IN");
       
  7560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7562             
       
  7563             /* Get the value from a foo(<param_value>) style call */
       
  7564             if (IN_param_value == NULL)
       
  7565               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7568             
       
  7569             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  7570             {
       
  7571         
       
  7572                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7573                 s4o.print("(");
       
  7574                 return_type_symbol->accept(*this);
       
  7575                 s4o.print(")");
       
  7576                 IN_param_value->accept(*this);
       
  7577                 return NULL;
       
  7578                 
       
  7579             }
       
  7580             
       
  7581             ERROR;
       
  7582         }
       
  7583         
       
  7584     }/*function_lreal_to_lword*/
       
  7585     break;
       
  7586 
       
  7587 /****
       
  7588  *TIME_TO_BOOL
       
  7589  */
       
  7590     case function_time_to_bool :
       
  7591     {
       
  7592         symbol_c *last_type_symbol = NULL;
       
  7593 
       
  7594         {
       
  7595             identifier_c param_name("IN");
       
  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);
       
  7598             
       
  7599             /* Get the value from a foo(<param_value>) style call */
       
  7600             if (IN_param_value == NULL)
       
  7601               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  7604             
       
  7605             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
   388             {
  7606             {
   389         
  7607         
   390                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  7608                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   391                 s4o.print("(");
  7609                 s4o.print("(");
   392                 return_type_symbol->accept(*this);
  7610                 return_type_symbol->accept(*this);
   393                 s4o.print(")");
  7611                 s4o.print(")__time_to_int(");
   394                 IN_param_value->accept(*this);
  7612                 IN_param_value->accept(*this);
   395                 return NULL;
  7613                 s4o.print(")");
   396                 
  7614                 return NULL;
   397             }
  7615                 
   398             
  7616             }
   399             ERROR;
  7617             
   400         }
  7618             ERROR;
   401         
  7619         }
   402     }/*function_real_to_bool*/
  7620         
   403     break;
  7621     }/*function_time_to_bool*/
   404 
  7622     break;
   405 /****
  7623 
   406  *REAL_TO_BYTE
  7624 /****
   407  */
  7625  *TIME_TO_SINT
   408     case function_real_to_byte :
  7626  */
   409     {
  7627     case function_time_to_sint :
   410         symbol_c *last_type_symbol = NULL;
  7628     {
   411 
  7629         symbol_c *last_type_symbol = NULL;
   412         {
  7630 
   413             identifier_c param_name("IN");
  7631         {
   414             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7632             identifier_c param_name("IN");
   415             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7633             /* Get the value from a foo(<param_name> = <param_value>) style call */
   416             
  7634             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   417             /* Get the value from a foo(<param_value>) style call */
  7635             
   418             if (IN_param_value == NULL)
  7636             /* Get the value from a foo(<param_value>) style call */
   419               IN_param_value = function_call_param_iterator.next();
  7637             if (IN_param_value == NULL)
   420             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7638               IN_param_value = function_call_param_iterator.next();
   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 ;
  7639             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   422             
  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 ;
   423             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  7641             
       
  7642             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7643             {
       
  7644         
       
  7645                 symbol_c * return_type_symbol = &search_constant_type_c::sint_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_sint*/
       
  7659     break;
       
  7660 
       
  7661 /****
       
  7662  *TIME_TO_INT
       
  7663  */
       
  7664     case function_time_to_int :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7680             {
       
  7681         
       
  7682                 symbol_c * return_type_symbol = &search_constant_type_c::int_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_int*/
       
  7696     break;
       
  7697 
       
  7698 /****
       
  7699  *TIME_TO_DINT
       
  7700  */
       
  7701     case function_time_to_dint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7717             {
       
  7718         
       
  7719                 symbol_c * return_type_symbol = &search_constant_type_c::dint_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_dint*/
       
  7733     break;
       
  7734 
       
  7735 /****
       
  7736  *TIME_TO_LINT
       
  7737  */
       
  7738     case function_time_to_lint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7754             {
       
  7755         
       
  7756                 symbol_c * return_type_symbol = &search_constant_type_c::lint_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_lint*/
       
  7770     break;
       
  7771 
       
  7772 /****
       
  7773  *TIME_TO_USINT
       
  7774  */
       
  7775     case function_time_to_usint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7791             {
       
  7792         
       
  7793                 symbol_c * return_type_symbol = &search_constant_type_c::usint_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_usint*/
       
  7807     break;
       
  7808 
       
  7809 /****
       
  7810  *TIME_TO_UINT
       
  7811  */
       
  7812     case function_time_to_uint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7828             {
       
  7829         
       
  7830                 symbol_c * return_type_symbol = &search_constant_type_c::uint_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_uint*/
       
  7844     break;
       
  7845 
       
  7846 /****
       
  7847  *TIME_TO_UDINT
       
  7848  */
       
  7849     case function_time_to_udint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7865             {
       
  7866         
       
  7867                 symbol_c * return_type_symbol = &search_constant_type_c::udint_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_udint*/
       
  7881     break;
       
  7882 
       
  7883 /****
       
  7884  *TIME_TO_ULINT
       
  7885  */
       
  7886     case function_time_to_ulint :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7902             {
       
  7903         
       
  7904                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7905                 s4o.print("(");
       
  7906                 return_type_symbol->accept(*this);
       
  7907                 s4o.print(")__time_to_int(");
       
  7908                 IN_param_value->accept(*this);
       
  7909                 s4o.print(")");
       
  7910                 return NULL;
       
  7911                 
       
  7912             }
       
  7913             
       
  7914             ERROR;
       
  7915         }
       
  7916         
       
  7917     }/*function_time_to_ulint*/
       
  7918     break;
       
  7919 
       
  7920 /****
       
  7921  *TIME_TO_REAL
       
  7922  */
       
  7923     case function_time_to_real :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7939             {
       
  7940         
       
  7941                 symbol_c * return_type_symbol = &search_constant_type_c::real_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_real*/
       
  7955     break;
       
  7956 
       
  7957 /****
       
  7958  *TIME_TO_LREAL
       
  7959  */
       
  7960     case function_time_to_lreal :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7976             {
       
  7977         
       
  7978                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7979                 s4o.print("(");
       
  7980                 return_type_symbol->accept(*this);
       
  7981                 s4o.print(")__time_to_real(");
       
  7982                 IN_param_value->accept(*this);
       
  7983                 s4o.print(")");
       
  7984                 return NULL;
       
  7985                 
       
  7986             }
       
  7987             
       
  7988             ERROR;
       
  7989         }
       
  7990         
       
  7991     }/*function_time_to_lreal*/
       
  7992     break;
       
  7993 
       
  7994 /****
       
  7995  *TIME_TO_STRING
       
  7996  */
       
  7997     case function_time_to_string :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  8013             {
       
  8014         
       
  8015                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8016                 s4o.print("(");
       
  8017                 return_type_symbol->accept(*this);
       
  8018                 s4o.print(")__time_to_string(");
       
  8019                 IN_param_value->accept(*this);
       
  8020                 s4o.print(")");
       
  8021                 return NULL;
       
  8022                 
       
  8023             }
       
  8024             
       
  8025             ERROR;
       
  8026         }
       
  8027         
       
  8028     }/*function_time_to_string*/
       
  8029     break;
       
  8030 
       
  8031 /****
       
  8032  *TIME_TO_BYTE
       
  8033  */
       
  8034     case function_time_to_byte :
       
  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 (typeid(*last_type_symbol) == typeid(time_type_name_c))
   424             {
  8050             {
   425         
  8051         
   426                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  8052                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   427                 s4o.print("(");
  8053                 s4o.print("(");
   428                 return_type_symbol->accept(*this);
  8054                 return_type_symbol->accept(*this);
   429                 s4o.print(")");
  8055                 s4o.print(")__time_to_int(");
   430                 IN_param_value->accept(*this);
  8056                 IN_param_value->accept(*this);
   431                 return NULL;
  8057                 s4o.print(")");
   432                 
  8058                 return NULL;
   433             }
  8059                 
   434             
  8060             }
   435             ERROR;
  8061             
   436         }
  8062             ERROR;
   437         
  8063         }
   438     }/*function_real_to_byte*/
  8064         
   439     break;
  8065     }/*function_time_to_byte*/
   440 
  8066     break;
   441 /****
  8067 
   442  *REAL_TO_WORD
  8068 /****
   443  */
  8069  *TIME_TO_WORD
   444     case function_real_to_word :
  8070  */
   445     {
  8071     case function_time_to_word :
   446         symbol_c *last_type_symbol = NULL;
  8072     {
   447 
  8073         symbol_c *last_type_symbol = NULL;
   448         {
  8074 
   449             identifier_c param_name("IN");
  8075         {
   450             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8076             identifier_c param_name("IN");
   451             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8077             /* Get the value from a foo(<param_name> = <param_value>) style call */
   452             
  8078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   453             /* Get the value from a foo(<param_value>) style call */
  8079             
   454             if (IN_param_value == NULL)
  8080             /* Get the value from a foo(<param_value>) style call */
   455               IN_param_value = function_call_param_iterator.next();
  8081             if (IN_param_value == NULL)
   456             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8082               IN_param_value = function_call_param_iterator.next();
   457             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   458             
  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 ;
   459             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  8085             
       
  8086             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
   460             {
  8087             {
   461         
  8088         
   462                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  8089                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   463                 s4o.print("(");
  8090                 s4o.print("(");
   464                 return_type_symbol->accept(*this);
  8091                 return_type_symbol->accept(*this);
   465                 s4o.print(")");
  8092                 s4o.print(")__time_to_int(");
   466                 IN_param_value->accept(*this);
  8093                 IN_param_value->accept(*this);
   467                 return NULL;
  8094                 s4o.print(")");
   468                 
  8095                 return NULL;
   469             }
  8096                 
   470             
  8097             }
   471             ERROR;
  8098             
   472         }
  8099             ERROR;
   473         
  8100         }
   474     }/*function_real_to_word*/
  8101         
   475     break;
  8102     }/*function_time_to_word*/
   476 
  8103     break;
   477 /****
  8104 
   478  *REAL_TO_DWORD
  8105 /****
   479  */
  8106  *TIME_TO_DWORD
   480     case function_real_to_dword :
  8107  */
   481     {
  8108     case function_time_to_dword :
   482         symbol_c *last_type_symbol = NULL;
  8109     {
   483 
  8110         symbol_c *last_type_symbol = NULL;
   484         {
  8111 
   485             identifier_c param_name("IN");
  8112         {
   486             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8113             identifier_c param_name("IN");
   487             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8114             /* Get the value from a foo(<param_name> = <param_value>) style call */
   488             
  8115             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   489             /* Get the value from a foo(<param_value>) style call */
  8116             
   490             if (IN_param_value == NULL)
  8117             /* Get the value from a foo(<param_value>) style call */
   491               IN_param_value = function_call_param_iterator.next();
  8118             if (IN_param_value == NULL)
   492             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8119               IN_param_value = function_call_param_iterator.next();
   493             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   494             
  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 ;
   495             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  8122             
       
  8123             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
   496             {
  8124             {
   497         
  8125         
   498                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  8126                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   499                 s4o.print("(");
  8127                 s4o.print("(");
   500                 return_type_symbol->accept(*this);
  8128                 return_type_symbol->accept(*this);
   501                 s4o.print(")");
  8129                 s4o.print(")__time_to_int(");
   502                 IN_param_value->accept(*this);
  8130                 IN_param_value->accept(*this);
   503                 return NULL;
  8131                 s4o.print(")");
   504                 
  8132                 return NULL;
   505             }
  8133                 
   506             
  8134             }
   507             ERROR;
  8135             
   508         }
  8136             ERROR;
   509         
  8137         }
   510     }/*function_real_to_dword*/
  8138         
   511     break;
  8139     }/*function_time_to_dword*/
   512 
  8140     break;
   513 /****
  8141 
   514  *REAL_TO_LWORD
  8142 /****
   515  */
  8143  *TIME_TO_LWORD
   516     case function_real_to_lword :
  8144  */
   517     {
  8145     case function_time_to_lword :
   518         symbol_c *last_type_symbol = NULL;
  8146     {
   519 
  8147         symbol_c *last_type_symbol = NULL;
   520         {
  8148 
   521             identifier_c param_name("IN");
  8149         {
   522             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8150             identifier_c param_name("IN");
   523             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8151             /* Get the value from a foo(<param_name> = <param_value>) style call */
   524             
  8152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   525             /* Get the value from a foo(<param_value>) style call */
  8153             
   526             if (IN_param_value == NULL)
  8154             /* Get the value from a foo(<param_value>) style call */
   527               IN_param_value = function_call_param_iterator.next();
  8155             if (IN_param_value == NULL)
   528             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8156               IN_param_value = function_call_param_iterator.next();
   529             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   530             
  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 ;
   531             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  8159             
       
  8160             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
   532             {
  8161             {
   533         
  8162         
   534                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  8163                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   535                 s4o.print("(");
  8164                 s4o.print("(");
   536                 return_type_symbol->accept(*this);
  8165                 return_type_symbol->accept(*this);
   537                 s4o.print(")");
  8166                 s4o.print(")__time_to_int(");
   538                 IN_param_value->accept(*this);
  8167                 IN_param_value->accept(*this);
   539                 return NULL;
  8168                 s4o.print(")");
   540                 
  8169                 return NULL;
   541             }
  8170                 
   542             
  8171             }
   543             ERROR;
  8172             
   544         }
  8173             ERROR;
   545         
  8174         }
   546     }/*function_real_to_lword*/
  8175         
   547     break;
  8176     }/*function_time_to_lword*/
   548 
  8177     break;
   549 /****
  8178 
   550  *REAL_TO_STRING
  8179 /****
   551  */
  8180  *DATE_TO_BOOL
   552     case function_real_to_string :
  8181  */
   553     {
  8182     case function_date_to_bool :
   554         symbol_c *last_type_symbol = NULL;
  8183     {
   555 
  8184         symbol_c *last_type_symbol = NULL;
   556         {
  8185 
   557             identifier_c param_name("IN");
  8186         {
   558             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8187             identifier_c param_name("IN");
   559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8188             /* Get the value from a foo(<param_name> = <param_value>) style call */
   560             
  8189             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   561             /* Get the value from a foo(<param_value>) style call */
  8190             
   562             if (IN_param_value == NULL)
  8191             /* Get the value from a foo(<param_value>) style call */
   563               IN_param_value = function_call_param_iterator.next();
  8192             if (IN_param_value == NULL)
   564             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8193               IN_param_value = function_call_param_iterator.next();
   565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8194             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   566             
  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 ;
   567             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  8196             
       
  8197             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8198             {
       
  8199         
       
  8200                 symbol_c * return_type_symbol = &search_constant_type_c::bool_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_bool*/
       
  8214     break;
       
  8215 
       
  8216 /****
       
  8217  *DATE_TO_SINT
       
  8218  */
       
  8219     case function_date_to_sint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8235             {
       
  8236         
       
  8237                 symbol_c * return_type_symbol = &search_constant_type_c::sint_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_sint*/
       
  8251     break;
       
  8252 
       
  8253 /****
       
  8254  *DATE_TO_INT
       
  8255  */
       
  8256     case function_date_to_int :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8272             {
       
  8273         
       
  8274                 symbol_c * return_type_symbol = &search_constant_type_c::int_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_int*/
       
  8288     break;
       
  8289 
       
  8290 /****
       
  8291  *DATE_TO_DINT
       
  8292  */
       
  8293     case function_date_to_dint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8309             {
       
  8310         
       
  8311                 symbol_c * return_type_symbol = &search_constant_type_c::dint_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_dint*/
       
  8325     break;
       
  8326 
       
  8327 /****
       
  8328  *DATE_TO_LINT
       
  8329  */
       
  8330     case function_date_to_lint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8346             {
       
  8347         
       
  8348                 symbol_c * return_type_symbol = &search_constant_type_c::lint_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_lint*/
       
  8362     break;
       
  8363 
       
  8364 /****
       
  8365  *DATE_TO_USINT
       
  8366  */
       
  8367     case function_date_to_usint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8383             {
       
  8384         
       
  8385                 symbol_c * return_type_symbol = &search_constant_type_c::usint_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_usint*/
       
  8399     break;
       
  8400 
       
  8401 /****
       
  8402  *DATE_TO_UINT
       
  8403  */
       
  8404     case function_date_to_uint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8420             {
       
  8421         
       
  8422                 symbol_c * return_type_symbol = &search_constant_type_c::uint_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_uint*/
       
  8436     break;
       
  8437 
       
  8438 /****
       
  8439  *DATE_TO_UDINT
       
  8440  */
       
  8441     case function_date_to_udint :
       
  8442     {
       
  8443         symbol_c *last_type_symbol = NULL;
       
  8444 
       
  8445         {
       
  8446             identifier_c param_name("IN");
       
  8447             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8449             
       
  8450             /* Get the value from a foo(<param_value>) style call */
       
  8451             if (IN_param_value == NULL)
       
  8452               IN_param_value = function_call_param_iterator.next();
       
  8453             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8454             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8455             
       
  8456             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8457             {
       
  8458         
       
  8459                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8460                 s4o.print("(");
       
  8461                 return_type_symbol->accept(*this);
       
  8462                 s4o.print(")__time_to_int(");
       
  8463                 IN_param_value->accept(*this);
       
  8464                 s4o.print(")");
       
  8465                 return NULL;
       
  8466                 
       
  8467             }
       
  8468             
       
  8469             ERROR;
       
  8470         }
       
  8471         
       
  8472     }/*function_date_to_udint*/
       
  8473     break;
       
  8474 
       
  8475 /****
       
  8476  *DATE_TO_ULINT
       
  8477  */
       
  8478     case function_date_to_ulint :
       
  8479     {
       
  8480         symbol_c *last_type_symbol = NULL;
       
  8481 
       
  8482         {
       
  8483             identifier_c param_name("IN");
       
  8484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8485             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next();
       
  8490             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8491             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8492             
       
  8493             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8494             {
       
  8495         
       
  8496                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8497                 s4o.print("(");
       
  8498                 return_type_symbol->accept(*this);
       
  8499                 s4o.print(")__time_to_int(");
       
  8500                 IN_param_value->accept(*this);
       
  8501                 s4o.print(")");
       
  8502                 return NULL;
       
  8503                 
       
  8504             }
       
  8505             
       
  8506             ERROR;
       
  8507         }
       
  8508         
       
  8509     }/*function_date_to_ulint*/
       
  8510     break;
       
  8511 
       
  8512 /****
       
  8513  *DATE_TO_REAL
       
  8514  */
       
  8515     case function_date_to_real :
       
  8516     {
       
  8517         symbol_c *last_type_symbol = NULL;
       
  8518 
       
  8519         {
       
  8520             identifier_c param_name("IN");
       
  8521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8522             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8523             
       
  8524             /* Get the value from a foo(<param_value>) style call */
       
  8525             if (IN_param_value == NULL)
       
  8526               IN_param_value = function_call_param_iterator.next();
       
  8527             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8528             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8529             
       
  8530             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8531             {
       
  8532         
       
  8533                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8534                 s4o.print("(");
       
  8535                 return_type_symbol->accept(*this);
       
  8536                 s4o.print(")__time_to_real(");
       
  8537                 IN_param_value->accept(*this);
       
  8538                 s4o.print(")");
       
  8539                 return NULL;
       
  8540                 
       
  8541             }
       
  8542             
       
  8543             ERROR;
       
  8544         }
       
  8545         
       
  8546     }/*function_date_to_real*/
       
  8547     break;
       
  8548 
       
  8549 /****
       
  8550  *DATE_TO_LREAL
       
  8551  */
       
  8552     case function_date_to_lreal :
       
  8553     {
       
  8554         symbol_c *last_type_symbol = NULL;
       
  8555 
       
  8556         {
       
  8557             identifier_c param_name("IN");
       
  8558             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8559             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8560             
       
  8561             /* Get the value from a foo(<param_value>) style call */
       
  8562             if (IN_param_value == NULL)
       
  8563               IN_param_value = function_call_param_iterator.next();
       
  8564             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8565             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8566             
       
  8567             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8568             {
       
  8569         
       
  8570                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8571                 s4o.print("(");
       
  8572                 return_type_symbol->accept(*this);
       
  8573                 s4o.print(")__time_to_real(");
       
  8574                 IN_param_value->accept(*this);
       
  8575                 s4o.print(")");
       
  8576                 return NULL;
       
  8577                 
       
  8578             }
       
  8579             
       
  8580             ERROR;
       
  8581         }
       
  8582         
       
  8583     }/*function_date_to_lreal*/
       
  8584     break;
       
  8585 
       
  8586 /****
       
  8587  *DATE_TO_STRING
       
  8588  */
       
  8589     case function_date_to_string :
       
  8590     {
       
  8591         symbol_c *last_type_symbol = NULL;
       
  8592 
       
  8593         {
       
  8594             identifier_c param_name("IN");
       
  8595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8597             
       
  8598             /* Get the value from a foo(<param_value>) style call */
       
  8599             if (IN_param_value == NULL)
       
  8600               IN_param_value = function_call_param_iterator.next();
       
  8601             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8603             
       
  8604             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
   568             {
  8605             {
   569         
  8606         
   570                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  8607                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   571                 s4o.print("(");
  8608                 s4o.print("(");
   572                 return_type_symbol->accept(*this);
  8609                 return_type_symbol->accept(*this);
   573                 s4o.print(")__real_to_string(");
  8610                 s4o.print(")__date_to_string(");
   574                 IN_param_value->accept(*this);
  8611                 IN_param_value->accept(*this);
   575                 s4o.print(")");
  8612                 s4o.print(")");
   576                 return NULL;
  8613                 return NULL;
   577                 
  8614                 
   578             }
  8615             }
   579             
  8616             
   580             ERROR;
  8617             ERROR;
   581         }
  8618         }
   582         
  8619         
   583     }/*function_real_to_string*/
  8620     }/*function_date_to_string*/
   584     break;
  8621     break;
   585 
  8622 
   586 /****
  8623 /****
   587  *REAL_TO_DATE
  8624  *DATE_TO_BYTE
   588  */
  8625  */
   589     case function_real_to_date :
  8626     case function_date_to_byte :
   590     {
  8627     {
   591         symbol_c *last_type_symbol = NULL;
  8628         symbol_c *last_type_symbol = NULL;
   592 
  8629 
   593         {
  8630         {
   594             identifier_c param_name("IN");
  8631             identifier_c param_name("IN");
   595             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
   596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   597             
  8634             
   598             /* Get the value from a foo(<param_value>) style call */
  8635             /* Get the value from a foo(<param_value>) style call */
   599             if (IN_param_value == NULL)
  8636             if (IN_param_value == NULL)
   600               IN_param_value = function_call_param_iterator.next();
  8637               IN_param_value = function_call_param_iterator.next();
   601             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   602             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  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 ;
   603             
  8640             
   604             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  8641             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::byte_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_byte*/
       
  8658     break;
       
  8659 
       
  8660 /****
       
  8661  *DATE_TO_WORD
       
  8662  */
       
  8663     case function_date_to_word :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  8679             {
       
  8680         
       
  8681                 symbol_c * return_type_symbol = &search_constant_type_c::word_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_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))
   605             {
 10418             {
   606         
 10419         
   607                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 10420                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   608                 s4o.print("(");
 10421                 s4o.print("(");
   609                 return_type_symbol->accept(*this);
 10422                 return_type_symbol->accept(*this);
   610                 s4o.print(")__real_to_time(");
 10423                 s4o.print(")__string_to_time(");
   611                 IN_param_value->accept(*this);
 10424                 IN_param_value->accept(*this);
   612                 s4o.print(")");
 10425                 s4o.print(")");
   613                 return NULL;
 10426                 return NULL;
   614                 
 10427                 
   615             }
 10428             }
   616             
 10429             
   617             ERROR;
 10430             ERROR;
   618         }
 10431         }
   619         
 10432         
   620     }/*function_real_to_date*/
 10433     }/*function_string_to_date*/
   621     break;
 10434     break;
   622 
 10435 
   623 /****
 10436 /****
   624  *REAL_TO_TOD
 10437  *STRING_TO_TOD
   625  */
 10438  */
   626     case function_real_to_tod :
 10439     case function_string_to_tod :
   627     {
 10440     {
   628         symbol_c *last_type_symbol = NULL;
 10441         symbol_c *last_type_symbol = NULL;
   629 
 10442 
   630         {
 10443         {
   631             identifier_c param_name("IN");
 10444             identifier_c param_name("IN");
   632             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10445             /* Get the value from a foo(<param_name> = <param_value>) style call */
   633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   634             
 10447             
   635             /* Get the value from a foo(<param_value>) style call */
 10448             /* Get the value from a foo(<param_value>) style call */
   636             if (IN_param_value == NULL)
 10449             if (IN_param_value == NULL)
   637               IN_param_value = function_call_param_iterator.next();
 10450               IN_param_value = function_call_param_iterator.next();
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   640             
 10453             
   641             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 10454             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
   642             {
 10455             {
   643         
 10456         
   644                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 10457                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   645                 s4o.print("(");
 10458                 s4o.print("(");
   646                 return_type_symbol->accept(*this);
 10459                 return_type_symbol->accept(*this);
   647                 s4o.print(")__real_to_time(");
 10460                 s4o.print(")__string_to_time(");
   648                 IN_param_value->accept(*this);
 10461                 IN_param_value->accept(*this);
   649                 s4o.print(")");
 10462                 s4o.print(")");
   650                 return NULL;
 10463                 return NULL;
   651                 
 10464                 
   652             }
 10465             }
   653             
 10466             
   654             ERROR;
 10467             ERROR;
   655         }
 10468         }
   656         
 10469         
   657     }/*function_real_to_tod*/
 10470     }/*function_string_to_tod*/
   658     break;
 10471     break;
   659 
 10472 
   660 /****
 10473 /****
   661  *REAL_TO_DT
 10474  *STRING_TO_DT
   662  */
 10475  */
   663     case function_real_to_dt :
 10476     case function_string_to_dt :
   664     {
 10477     {
   665         symbol_c *last_type_symbol = NULL;
 10478         symbol_c *last_type_symbol = NULL;
   666 
 10479 
   667         {
 10480         {
   668             identifier_c param_name("IN");
 10481             identifier_c param_name("IN");
   669             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10482             /* Get the value from a foo(<param_name> = <param_value>) style call */
   670             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10483             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   671             
 10484             
   672             /* Get the value from a foo(<param_value>) style call */
 10485             /* Get the value from a foo(<param_value>) style call */
   673             if (IN_param_value == NULL)
 10486             if (IN_param_value == NULL)
   674               IN_param_value = function_call_param_iterator.next();
 10487               IN_param_value = function_call_param_iterator.next();
   675             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10488             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   676             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
   677             
 10490             
   678             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 10491             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
   679             {
 10492             {
   680         
 10493         
   681                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 10494                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   682                 s4o.print("(");
 10495                 s4o.print("(");
   683                 return_type_symbol->accept(*this);
 10496                 return_type_symbol->accept(*this);
   684                 s4o.print(")__real_to_time(");
 10497                 s4o.print(")__string_to_time(");
   685                 IN_param_value->accept(*this);
 10498                 IN_param_value->accept(*this);
   686                 s4o.print(")");
 10499                 s4o.print(")");
   687                 return NULL;
 10500                 return NULL;
   688                 
 10501                 
   689             }
 10502             }
   690             
 10503             
   691             ERROR;
 10504             ERROR;
   692         }
 10505         }
   693         
 10506         
   694     }/*function_real_to_dt*/
 10507     }/*function_string_to_dt*/
   695     break;
 10508     break;
   696 
 10509 
   697 /****
 10510 /****
   698  *LREAL_TO_REAL
 10511  *STRING_TO_BYTE
   699  */
 10512  */
   700     case function_lreal_to_real :
 10513     case function_string_to_byte :
   701     {
 10514     {
   702         symbol_c *last_type_symbol = NULL;
 10515         symbol_c *last_type_symbol = NULL;
   703 
 10516 
   704         {
 10517         {
   705             identifier_c param_name("IN");
 10518             identifier_c param_name("IN");
   706             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10519             /* Get the value from a foo(<param_name> = <param_value>) style call */
   707             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10520             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   708             
 10521             
   709             /* Get the value from a foo(<param_value>) style call */
 10522             /* Get the value from a foo(<param_value>) style call */
   710             if (IN_param_value == NULL)
 10523             if (IN_param_value == NULL)
   711               IN_param_value = function_call_param_iterator.next();
 10524               IN_param_value = function_call_param_iterator.next();
   712             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10525             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 ;
 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 ;
   714             
 10527             
   715             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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))
   716             {
 11001             {
   717         
 11002         
   718                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 11003                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   719                 s4o.print("(");
 11004                 s4o.print("(");
   720                 return_type_symbol->accept(*this);
 11005                 return_type_symbol->accept(*this);
   725             }
 11010             }
   726             
 11011             
   727             ERROR;
 11012             ERROR;
   728         }
 11013         }
   729         
 11014         
   730     }/*function_lreal_to_real*/
 11015     }/*function_byte_to_real*/
   731     break;
 11016     break;
   732 
 11017 
   733 /****
 11018 /****
   734  *LREAL_TO_SINT
 11019  *BYTE_TO_LREAL
   735  */
 11020  */
   736     case function_lreal_to_sint :
 11021     case function_byte_to_lreal :
   737     {
 11022     {
   738         symbol_c *last_type_symbol = NULL;
 11023         symbol_c *last_type_symbol = NULL;
   739 
 11024 
   740         {
 11025         {
   741             identifier_c param_name("IN");
 11026             identifier_c param_name("IN");
   742             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11027             /* Get the value from a foo(<param_name> = <param_value>) style call */
   743             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11028             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   744             
 11029             
   745             /* Get the value from a foo(<param_value>) style call */
 11030             /* Get the value from a foo(<param_value>) style call */
   746             if (IN_param_value == NULL)
 11031             if (IN_param_value == NULL)
   747               IN_param_value = function_call_param_iterator.next();
 11032               IN_param_value = function_call_param_iterator.next();
   748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11033             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 ;
 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 ;
   750             
 11035             
   751             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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))
   752             {
 11402             {
   753         
 11403         
   754                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 11404                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
   755                 s4o.print("(");
 11405                 s4o.print("(");
   756                 return_type_symbol->accept(*this);
 11406                 return_type_symbol->accept(*this);
   761             }
 11411             }
   762             
 11412             
   763             ERROR;
 11413             ERROR;
   764         }
 11414         }
   765         
 11415         
   766     }/*function_lreal_to_sint*/
 11416     }/*function_word_to_sint*/
   767     break;
 11417     break;
   768 
 11418 
   769 /****
 11419 /****
   770  *LREAL_TO_INT
 11420  *WORD_TO_INT
   771  */
 11421  */
   772     case function_lreal_to_int :
 11422     case function_word_to_int :
   773     {
 11423     {
   774         symbol_c *last_type_symbol = NULL;
 11424         symbol_c *last_type_symbol = NULL;
   775 
 11425 
   776         {
 11426         {
   777             identifier_c param_name("IN");
 11427             identifier_c param_name("IN");
   778             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11428             /* Get the value from a foo(<param_name> = <param_value>) style call */
   779             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11429             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   780             
 11430             
   781             /* Get the value from a foo(<param_value>) style call */
 11431             /* Get the value from a foo(<param_value>) style call */
   782             if (IN_param_value == NULL)
 11432             if (IN_param_value == NULL)
   783               IN_param_value = function_call_param_iterator.next();
 11433               IN_param_value = function_call_param_iterator.next();
   784             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11434             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 ;
 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 ;
   786             
 11436             
   787             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11437             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   788             {
 11438             {
   789         
 11439         
   790                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 11440                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   791                 s4o.print("(");
 11441                 s4o.print("(");
   792                 return_type_symbol->accept(*this);
 11442                 return_type_symbol->accept(*this);
   797             }
 11447             }
   798             
 11448             
   799             ERROR;
 11449             ERROR;
   800         }
 11450         }
   801         
 11451         
   802     }/*function_lreal_to_int*/
 11452     }/*function_word_to_int*/
   803     break;
 11453     break;
   804 
 11454 
   805 /****
 11455 /****
   806  *LREAL_TO_DINT
 11456  *WORD_TO_DINT
   807  */
 11457  */
   808     case function_lreal_to_dint :
 11458     case function_word_to_dint :
   809     {
 11459     {
   810         symbol_c *last_type_symbol = NULL;
 11460         symbol_c *last_type_symbol = NULL;
   811 
 11461 
   812         {
 11462         {
   813             identifier_c param_name("IN");
 11463             identifier_c param_name("IN");
   814             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11464             /* Get the value from a foo(<param_name> = <param_value>) style call */
   815             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   816             
 11466             
   817             /* Get the value from a foo(<param_value>) style call */
 11467             /* Get the value from a foo(<param_value>) style call */
   818             if (IN_param_value == NULL)
 11468             if (IN_param_value == NULL)
   819               IN_param_value = function_call_param_iterator.next();
 11469               IN_param_value = function_call_param_iterator.next();
   820             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11470             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 ;
 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 ;
   822             
 11472             
   823             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11473             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   824             {
 11474             {
   825         
 11475         
   826                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 11476                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   827                 s4o.print("(");
 11477                 s4o.print("(");
   828                 return_type_symbol->accept(*this);
 11478                 return_type_symbol->accept(*this);
   833             }
 11483             }
   834             
 11484             
   835             ERROR;
 11485             ERROR;
   836         }
 11486         }
   837         
 11487         
   838     }/*function_lreal_to_dint*/
 11488     }/*function_word_to_dint*/
   839     break;
 11489     break;
   840 
 11490 
   841 /****
 11491 /****
   842  *LREAL_TO_LINT
 11492  *WORD_TO_LINT
   843  */
 11493  */
   844     case function_lreal_to_lint :
 11494     case function_word_to_lint :
   845     {
 11495     {
   846         symbol_c *last_type_symbol = NULL;
 11496         symbol_c *last_type_symbol = NULL;
   847 
 11497 
   848         {
 11498         {
   849             identifier_c param_name("IN");
 11499             identifier_c param_name("IN");
   850             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11500             /* Get the value from a foo(<param_name> = <param_value>) style call */
   851             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11501             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   852             
 11502             
   853             /* Get the value from a foo(<param_value>) style call */
 11503             /* Get the value from a foo(<param_value>) style call */
   854             if (IN_param_value == NULL)
 11504             if (IN_param_value == NULL)
   855               IN_param_value = function_call_param_iterator.next();
 11505               IN_param_value = function_call_param_iterator.next();
   856             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11506             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 ;
 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 ;
   858             
 11508             
   859             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11509             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   860             {
 11510             {
   861         
 11511         
   862                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 11512                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   863                 s4o.print("(");
 11513                 s4o.print("(");
   864                 return_type_symbol->accept(*this);
 11514                 return_type_symbol->accept(*this);
   869             }
 11519             }
   870             
 11520             
   871             ERROR;
 11521             ERROR;
   872         }
 11522         }
   873         
 11523         
   874     }/*function_lreal_to_lint*/
 11524     }/*function_word_to_lint*/
   875     break;
 11525     break;
   876 
 11526 
   877 /****
 11527 /****
   878  *LREAL_TO_USINT
 11528  *WORD_TO_USINT
   879  */
 11529  */
   880     case function_lreal_to_usint :
 11530     case function_word_to_usint :
   881     {
 11531     {
   882         symbol_c *last_type_symbol = NULL;
 11532         symbol_c *last_type_symbol = NULL;
   883 
 11533 
   884         {
 11534         {
   885             identifier_c param_name("IN");
 11535             identifier_c param_name("IN");
   886             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11536             /* Get the value from a foo(<param_name> = <param_value>) style call */
   887             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   888             
 11538             
   889             /* Get the value from a foo(<param_value>) style call */
 11539             /* Get the value from a foo(<param_value>) style call */
   890             if (IN_param_value == NULL)
 11540             if (IN_param_value == NULL)
   891               IN_param_value = function_call_param_iterator.next();
 11541               IN_param_value = function_call_param_iterator.next();
   892             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11542             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 ;
 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 ;
   894             
 11544             
   895             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11545             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   896             {
 11546             {
   897         
 11547         
   898                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 11548                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   899                 s4o.print("(");
 11549                 s4o.print("(");
   900                 return_type_symbol->accept(*this);
 11550                 return_type_symbol->accept(*this);
   905             }
 11555             }
   906             
 11556             
   907             ERROR;
 11557             ERROR;
   908         }
 11558         }
   909         
 11559         
   910     }/*function_lreal_to_usint*/
 11560     }/*function_word_to_usint*/
   911     break;
 11561     break;
   912 
 11562 
   913 /****
 11563 /****
   914  *LREAL_TO_UINT
 11564  *WORD_TO_UINT
   915  */
 11565  */
   916     case function_lreal_to_uint :
 11566     case function_word_to_uint :
   917     {
 11567     {
   918         symbol_c *last_type_symbol = NULL;
 11568         symbol_c *last_type_symbol = NULL;
   919 
 11569 
   920         {
 11570         {
   921             identifier_c param_name("IN");
 11571             identifier_c param_name("IN");
   922             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11572             /* Get the value from a foo(<param_name> = <param_value>) style call */
   923             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11573             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   924             
 11574             
   925             /* Get the value from a foo(<param_value>) style call */
 11575             /* Get the value from a foo(<param_value>) style call */
   926             if (IN_param_value == NULL)
 11576             if (IN_param_value == NULL)
   927               IN_param_value = function_call_param_iterator.next();
 11577               IN_param_value = function_call_param_iterator.next();
   928             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11578             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 ;
 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 ;
   930             
 11580             
   931             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11581             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   932             {
 11582             {
   933         
 11583         
   934                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 11584                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   935                 s4o.print("(");
 11585                 s4o.print("(");
   936                 return_type_symbol->accept(*this);
 11586                 return_type_symbol->accept(*this);
   941             }
 11591             }
   942             
 11592             
   943             ERROR;
 11593             ERROR;
   944         }
 11594         }
   945         
 11595         
   946     }/*function_lreal_to_uint*/
 11596     }/*function_word_to_uint*/
   947     break;
 11597     break;
   948 
 11598 
   949 /****
 11599 /****
   950  *LREAL_TO_UDINT
 11600  *WORD_TO_UDINT
   951  */
 11601  */
   952     case function_lreal_to_udint :
 11602     case function_word_to_udint :
   953     {
 11603     {
   954         symbol_c *last_type_symbol = NULL;
 11604         symbol_c *last_type_symbol = NULL;
   955 
 11605 
   956         {
 11606         {
   957             identifier_c param_name("IN");
 11607             identifier_c param_name("IN");
   958             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11608             /* Get the value from a foo(<param_name> = <param_value>) style call */
   959             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   960             
 11610             
   961             /* Get the value from a foo(<param_value>) style call */
 11611             /* Get the value from a foo(<param_value>) style call */
   962             if (IN_param_value == NULL)
 11612             if (IN_param_value == NULL)
   963               IN_param_value = function_call_param_iterator.next();
 11613               IN_param_value = function_call_param_iterator.next();
   964             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11614             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 ;
 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 ;
   966             
 11616             
   967             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11617             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
   968             {
 11618             {
   969         
 11619         
   970                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   971                 s4o.print("(");
 11621                 s4o.print("(");
   972                 return_type_symbol->accept(*this);
 11622                 return_type_symbol->accept(*this);
   977             }
 11627             }
   978             
 11628             
   979             ERROR;
 11629             ERROR;
   980         }
 11630         }
   981         
 11631         
   982     }/*function_lreal_to_udint*/
 11632     }/*function_word_to_udint*/
   983     break;
 11633     break;
   984 
 11634 
   985 /****
 11635 /****
   986  *LREAL_TO_ULINT
 11636  *WORD_TO_ULINT
   987  */
 11637  */
   988     case function_lreal_to_ulint :
 11638     case function_word_to_ulint :
   989     {
 11639     {
   990         symbol_c *last_type_symbol = NULL;
 11640         symbol_c *last_type_symbol = NULL;
   991 
 11641 
   992         {
 11642         {
   993             identifier_c param_name("IN");
 11643             identifier_c param_name("IN");
   994             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11644             /* Get the value from a foo(<param_name> = <param_value>) style call */
   995             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11645             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   996             
 11646             
   997             /* Get the value from a foo(<param_value>) style call */
 11647             /* Get the value from a foo(<param_value>) style call */
   998             if (IN_param_value == NULL)
 11648             if (IN_param_value == NULL)
   999               IN_param_value = function_call_param_iterator.next();
 11649               IN_param_value = function_call_param_iterator.next();
  1000             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11650             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 ;
 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 ;
  1002             
 11652             
  1003             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 11653             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
  1004             {
 11654             {
  1005         
 11655         
  1006                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 11656                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1007                 s4o.print("(");
 11657                 s4o.print("(");
  1008                 return_type_symbol->accept(*this);
 11658                 return_type_symbol->accept(*this);
  1013             }
 11663             }
  1014             
 11664             
  1015             ERROR;
 11665             ERROR;
  1016         }
 11666         }
  1017         
 11667         
  1018     }/*function_lreal_to_ulint*/
 11668     }/*function_word_to_ulint*/
  1019     break;
 11669     break;
  1020 
 11670 
  1021 /****
 11671 /****
  1022  *LREAL_TO_TIME
 11672  *WORD_TO_REAL
  1023  */
 11673  */
  1024     case function_lreal_to_time :
 11674     case function_word_to_real :
  1025     {
 11675     {
  1026         symbol_c *last_type_symbol = NULL;
 11676         symbol_c *last_type_symbol = NULL;
  1027 
 11677 
  1028         {
 11678         {
  1029             identifier_c param_name("IN");
 11679             identifier_c param_name("IN");
  1030             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11680             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1031             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1032             
 11682             
  1033             /* Get the value from a foo(<param_value>) style call */
 11683             /* Get the value from a foo(<param_value>) style call */
  1034             if (IN_param_value == NULL)
 11684             if (IN_param_value == NULL)
  1035               IN_param_value = function_call_param_iterator.next();
 11685               IN_param_value = function_call_param_iterator.next();
  1036             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11686             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 ;
 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 ;
  1038             
 11688             
  1039             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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))
  1040             {
 11762             {
  1041         
 11763         
  1042                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 11764                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1043                 s4o.print("(");
 11765                 s4o.print("(");
  1044                 return_type_symbol->accept(*this);
 11766                 return_type_symbol->accept(*this);
  1045                 s4o.print(")__real_to_time(");
 11767                 s4o.print(")__int_to_time(");
  1046                 IN_param_value->accept(*this);
 11768                 IN_param_value->accept(*this);
  1047                 s4o.print(")");
 11769                 s4o.print(")");
  1048                 return NULL;
 11770                 return NULL;
  1049                 
 11771                 
  1050             }
 11772             }
  1051             
 11773             
  1052             ERROR;
 11774             ERROR;
  1053         }
 11775         }
  1054         
 11776         
  1055     }/*function_lreal_to_time*/
 11777     }/*function_word_to_time*/
  1056     break;
 11778     break;
  1057 
 11779 
  1058 /****
 11780 /****
  1059  *LREAL_TO_BOOL
 11781  *WORD_TO_DATE
  1060  */
 11782  */
  1061     case function_lreal_to_bool :
 11783     case function_word_to_date :
  1062     {
 11784     {
  1063         symbol_c *last_type_symbol = NULL;
 11785         symbol_c *last_type_symbol = NULL;
  1064 
 11786 
  1065         {
 11787         {
  1066             identifier_c param_name("IN");
 11788             identifier_c param_name("IN");
  1067             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11789             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1068             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11790             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1069             
 11791             
  1070             /* Get the value from a foo(<param_value>) style call */
 11792             /* Get the value from a foo(<param_value>) style call */
  1071             if (IN_param_value == NULL)
 11793             if (IN_param_value == NULL)
  1072               IN_param_value = function_call_param_iterator.next();
 11794               IN_param_value = function_call_param_iterator.next();
  1073             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11795             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1074             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  1075             
 11797             
  1076             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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))
  1077             {
 12055             {
  1078         
 12056         
  1079                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 12057                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1080                 s4o.print("(");
 12058                 s4o.print("(");
  1081                 return_type_symbol->accept(*this);
 12059                 return_type_symbol->accept(*this);
  1086             }
 12064             }
  1087             
 12065             
  1088             ERROR;
 12066             ERROR;
  1089         }
 12067         }
  1090         
 12068         
  1091     }/*function_lreal_to_bool*/
 12069     }/*function_dword_to_bool*/
  1092     break;
 12070     break;
  1093 
 12071 
  1094 /****
 12072 /****
  1095  *LREAL_TO_BYTE
 12073  *DWORD_TO_SINT
  1096  */
 12074  */
  1097     case function_lreal_to_byte :
 12075     case function_dword_to_sint :
  1098     {
 12076     {
  1099         symbol_c *last_type_symbol = NULL;
 12077         symbol_c *last_type_symbol = NULL;
  1100 
 12078 
  1101         {
 12079         {
  1102             identifier_c param_name("IN");
 12080             identifier_c param_name("IN");
  1103             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12081             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1104             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12082             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1105             
 12083             
  1106             /* Get the value from a foo(<param_value>) style call */
 12084             /* Get the value from a foo(<param_value>) style call */
  1107             if (IN_param_value == NULL)
 12085             if (IN_param_value == NULL)
  1108               IN_param_value = function_call_param_iterator.next();
 12086               IN_param_value = function_call_param_iterator.next();
  1109             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12087             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 ;
 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 ;
  1111             
 12089             
  1112             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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))
  1113             {
 12636             {
  1114         
 12637         
  1115                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 12638                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1116                 s4o.print("(");
 12639                 s4o.print("(");
  1117                 return_type_symbol->accept(*this);
 12640                 return_type_symbol->accept(*this);
  1122             }
 12645             }
  1123             
 12646             
  1124             ERROR;
 12647             ERROR;
  1125         }
 12648         }
  1126         
 12649         
  1127     }/*function_lreal_to_byte*/
 12650     }/*function_dword_to_byte*/
  1128     break;
 12651     break;
  1129 
 12652 
  1130 /****
 12653 /****
  1131  *LREAL_TO_WORD
 12654  *DWORD_TO_WORD
  1132  */
 12655  */
  1133     case function_lreal_to_word :
 12656     case function_dword_to_word :
  1134     {
 12657     {
  1135         symbol_c *last_type_symbol = NULL;
 12658         symbol_c *last_type_symbol = NULL;
  1136 
 12659 
  1137         {
 12660         {
  1138             identifier_c param_name("IN");
 12661             identifier_c param_name("IN");
  1139             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12662             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1140             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12663             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1141             
 12664             
  1142             /* Get the value from a foo(<param_value>) style call */
 12665             /* Get the value from a foo(<param_value>) style call */
  1143             if (IN_param_value == NULL)
 12666             if (IN_param_value == NULL)
  1144               IN_param_value = function_call_param_iterator.next();
 12667               IN_param_value = function_call_param_iterator.next();
  1145             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12668             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1146             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  1147             
 12670             
  1148             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 12671             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
  1149             {
 12672             {
  1150         
 12673         
  1151                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 12674                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1152                 s4o.print("(");
 12675                 s4o.print("(");
  1153                 return_type_symbol->accept(*this);
 12676                 return_type_symbol->accept(*this);
  1158             }
 12681             }
  1159             
 12682             
  1160             ERROR;
 12683             ERROR;
  1161         }
 12684         }
  1162         
 12685         
  1163     }/*function_lreal_to_word*/
 12686     }/*function_dword_to_word*/
  1164     break;
 12687     break;
  1165 
 12688 
  1166 /****
 12689 /****
  1167  *LREAL_TO_DWORD
 12690  *DWORD_TO_LWORD
  1168  */
 12691  */
  1169     case function_lreal_to_dword :
 12692     case function_dword_to_lword :
  1170     {
 12693     {
  1171         symbol_c *last_type_symbol = NULL;
 12694         symbol_c *last_type_symbol = NULL;
  1172 
 12695 
  1173         {
 12696         {
  1174             identifier_c param_name("IN");
 12697             identifier_c param_name("IN");
  1175             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12698             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1176             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12699             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1177             
 12700             
  1178             /* Get the value from a foo(<param_value>) style call */
 12701             /* Get the value from a foo(<param_value>) style call */
  1179             if (IN_param_value == NULL)
 12702             if (IN_param_value == NULL)
  1180               IN_param_value = function_call_param_iterator.next();
 12703               IN_param_value = function_call_param_iterator.next();
  1181             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12704             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1182             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  1183             
 12706             
  1184             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 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(")");
       
 13367                 IN_param_value->accept(*this);
       
 13368                 return NULL;
       
 13369                 
       
 13370             }
       
 13371             
       
 13372             ERROR;
       
 13373         }
       
 13374         
       
 13375     }/*function_lword_to_word*/
       
 13376     break;
       
 13377 
       
 13378 /****
       
 13379  *LWORD_TO_DWORD
       
 13380  */
       
 13381     case function_lword_to_dword :
       
 13382     {
       
 13383         symbol_c *last_type_symbol = NULL;
       
 13384 
       
 13385         {
       
 13386             identifier_c param_name("IN");
       
 13387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13388             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13389             
       
 13390             /* Get the value from a foo(<param_value>) style call */
       
 13391             if (IN_param_value == NULL)
       
 13392               IN_param_value = function_call_param_iterator.next();
       
 13393             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 ;
       
 13395             
       
 13396             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
  1185             {
 13397             {
  1186         
 13398         
  1187                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 13399                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1188                 s4o.print("(");
 13400                 s4o.print("(");
  1189                 return_type_symbol->accept(*this);
 13401                 return_type_symbol->accept(*this);
  1194             }
 13406             }
  1195             
 13407             
  1196             ERROR;
 13408             ERROR;
  1197         }
 13409         }
  1198         
 13410         
  1199     }/*function_lreal_to_dword*/
       
  1200     break;
       
  1201 
       
  1202 /****
       
  1203  *LREAL_TO_LWORD
       
  1204  */
       
  1205     case function_lreal_to_lword :
       
  1206     {
       
  1207         symbol_c *last_type_symbol = NULL;
       
  1208 
       
  1209         {
       
  1210             identifier_c param_name("IN");
       
  1211             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1212             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1213             
       
  1214             /* Get the value from a foo(<param_value>) style call */
       
  1215             if (IN_param_value == NULL)
       
  1216               IN_param_value = function_call_param_iterator.next();
       
  1217             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1218             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1219             
       
  1220             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1221             {
       
  1222         
       
  1223                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1224                 s4o.print("(");
       
  1225                 return_type_symbol->accept(*this);
       
  1226                 s4o.print(")");
       
  1227                 IN_param_value->accept(*this);
       
  1228                 return NULL;
       
  1229                 
       
  1230             }
       
  1231             
       
  1232             ERROR;
       
  1233         }
       
  1234         
       
  1235     }/*function_lreal_to_lword*/
       
  1236     break;
       
  1237 
       
  1238 /****
       
  1239  *LREAL_TO_STRING
       
  1240  */
       
  1241     case function_lreal_to_string :
       
  1242     {
       
  1243         symbol_c *last_type_symbol = NULL;
       
  1244 
       
  1245         {
       
  1246             identifier_c param_name("IN");
       
  1247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1248             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1249             
       
  1250             /* Get the value from a foo(<param_value>) style call */
       
  1251             if (IN_param_value == NULL)
       
  1252               IN_param_value = function_call_param_iterator.next();
       
  1253             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1254             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1255             
       
  1256             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1257             {
       
  1258         
       
  1259                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1260                 s4o.print("(");
       
  1261                 return_type_symbol->accept(*this);
       
  1262                 s4o.print(")__real_to_string(");
       
  1263                 IN_param_value->accept(*this);
       
  1264                 s4o.print(")");
       
  1265                 return NULL;
       
  1266                 
       
  1267             }
       
  1268             
       
  1269             ERROR;
       
  1270         }
       
  1271         
       
  1272     }/*function_lreal_to_string*/
       
  1273     break;
       
  1274 
       
  1275 /****
       
  1276  *LREAL_TO_DATE
       
  1277  */
       
  1278     case function_lreal_to_date :
       
  1279     {
       
  1280         symbol_c *last_type_symbol = NULL;
       
  1281 
       
  1282         {
       
  1283             identifier_c param_name("IN");
       
  1284             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1285             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1286             
       
  1287             /* Get the value from a foo(<param_value>) style call */
       
  1288             if (IN_param_value == NULL)
       
  1289               IN_param_value = function_call_param_iterator.next();
       
  1290             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1291             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1292             
       
  1293             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1294             {
       
  1295         
       
  1296                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1297                 s4o.print("(");
       
  1298                 return_type_symbol->accept(*this);
       
  1299                 s4o.print(")__real_to_time(");
       
  1300                 IN_param_value->accept(*this);
       
  1301                 s4o.print(")");
       
  1302                 return NULL;
       
  1303                 
       
  1304             }
       
  1305             
       
  1306             ERROR;
       
  1307         }
       
  1308         
       
  1309     }/*function_lreal_to_date*/
       
  1310     break;
       
  1311 
       
  1312 /****
       
  1313  *LREAL_TO_TOD
       
  1314  */
       
  1315     case function_lreal_to_tod :
       
  1316     {
       
  1317         symbol_c *last_type_symbol = NULL;
       
  1318 
       
  1319         {
       
  1320             identifier_c param_name("IN");
       
  1321             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1322             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1323             
       
  1324             /* Get the value from a foo(<param_value>) style call */
       
  1325             if (IN_param_value == NULL)
       
  1326               IN_param_value = function_call_param_iterator.next();
       
  1327             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1328             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1329             
       
  1330             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1331             {
       
  1332         
       
  1333                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1334                 s4o.print("(");
       
  1335                 return_type_symbol->accept(*this);
       
  1336                 s4o.print(")__real_to_time(");
       
  1337                 IN_param_value->accept(*this);
       
  1338                 s4o.print(")");
       
  1339                 return NULL;
       
  1340                 
       
  1341             }
       
  1342             
       
  1343             ERROR;
       
  1344         }
       
  1345         
       
  1346     }/*function_lreal_to_tod*/
       
  1347     break;
       
  1348 
       
  1349 /****
       
  1350  *LREAL_TO_DT
       
  1351  */
       
  1352     case function_lreal_to_dt :
       
  1353     {
       
  1354         symbol_c *last_type_symbol = NULL;
       
  1355 
       
  1356         {
       
  1357             identifier_c param_name("IN");
       
  1358             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1359             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1360             
       
  1361             /* Get the value from a foo(<param_value>) style call */
       
  1362             if (IN_param_value == NULL)
       
  1363               IN_param_value = function_call_param_iterator.next();
       
  1364             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1365             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1366             
       
  1367             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1368             {
       
  1369         
       
  1370                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1371                 s4o.print("(");
       
  1372                 return_type_symbol->accept(*this);
       
  1373                 s4o.print(")__real_to_time(");
       
  1374                 IN_param_value->accept(*this);
       
  1375                 s4o.print(")");
       
  1376                 return NULL;
       
  1377                 
       
  1378             }
       
  1379             
       
  1380             ERROR;
       
  1381         }
       
  1382         
       
  1383     }/*function_lreal_to_dt*/
       
  1384     break;
       
  1385 
       
  1386 /****
       
  1387  *SINT_TO_REAL
       
  1388  */
       
  1389     case function_sint_to_real :
       
  1390     {
       
  1391         symbol_c *last_type_symbol = NULL;
       
  1392 
       
  1393         {
       
  1394             identifier_c param_name("IN");
       
  1395             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1396             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1397             
       
  1398             /* Get the value from a foo(<param_value>) style call */
       
  1399             if (IN_param_value == NULL)
       
  1400               IN_param_value = function_call_param_iterator.next();
       
  1401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1403             
       
  1404             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1405             {
       
  1406         
       
  1407                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1408                 s4o.print("(");
       
  1409                 return_type_symbol->accept(*this);
       
  1410                 s4o.print(")");
       
  1411                 IN_param_value->accept(*this);
       
  1412                 return NULL;
       
  1413                 
       
  1414             }
       
  1415             
       
  1416             ERROR;
       
  1417         }
       
  1418         
       
  1419     }/*function_sint_to_real*/
       
  1420     break;
       
  1421 
       
  1422 /****
       
  1423  *SINT_TO_LREAL
       
  1424  */
       
  1425     case function_sint_to_lreal :
       
  1426     {
       
  1427         symbol_c *last_type_symbol = NULL;
       
  1428 
       
  1429         {
       
  1430             identifier_c param_name("IN");
       
  1431             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1432             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1433             
       
  1434             /* Get the value from a foo(<param_value>) style call */
       
  1435             if (IN_param_value == NULL)
       
  1436               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1439             
       
  1440             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1441             {
       
  1442         
       
  1443                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1444                 s4o.print("(");
       
  1445                 return_type_symbol->accept(*this);
       
  1446                 s4o.print(")");
       
  1447                 IN_param_value->accept(*this);
       
  1448                 return NULL;
       
  1449                 
       
  1450             }
       
  1451             
       
  1452             ERROR;
       
  1453         }
       
  1454         
       
  1455     }/*function_sint_to_lreal*/
       
  1456     break;
       
  1457 
       
  1458 /****
       
  1459  *SINT_TO_INT
       
  1460  */
       
  1461     case function_sint_to_int :
       
  1462     {
       
  1463         symbol_c *last_type_symbol = NULL;
       
  1464 
       
  1465         {
       
  1466             identifier_c param_name("IN");
       
  1467             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1468             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1469             
       
  1470             /* Get the value from a foo(<param_value>) style call */
       
  1471             if (IN_param_value == NULL)
       
  1472               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1475             
       
  1476             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1477             {
       
  1478         
       
  1479                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1480                 s4o.print("(");
       
  1481                 return_type_symbol->accept(*this);
       
  1482                 s4o.print(")");
       
  1483                 IN_param_value->accept(*this);
       
  1484                 return NULL;
       
  1485                 
       
  1486             }
       
  1487             
       
  1488             ERROR;
       
  1489         }
       
  1490         
       
  1491     }/*function_sint_to_int*/
       
  1492     break;
       
  1493 
       
  1494 /****
       
  1495  *SINT_TO_DINT
       
  1496  */
       
  1497     case function_sint_to_dint :
       
  1498     {
       
  1499         symbol_c *last_type_symbol = NULL;
       
  1500 
       
  1501         {
       
  1502             identifier_c param_name("IN");
       
  1503             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1504             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1505             
       
  1506             /* Get the value from a foo(<param_value>) style call */
       
  1507             if (IN_param_value == NULL)
       
  1508               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1511             
       
  1512             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1513             {
       
  1514         
       
  1515                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1516                 s4o.print("(");
       
  1517                 return_type_symbol->accept(*this);
       
  1518                 s4o.print(")");
       
  1519                 IN_param_value->accept(*this);
       
  1520                 return NULL;
       
  1521                 
       
  1522             }
       
  1523             
       
  1524             ERROR;
       
  1525         }
       
  1526         
       
  1527     }/*function_sint_to_dint*/
       
  1528     break;
       
  1529 
       
  1530 /****
       
  1531  *SINT_TO_LINT
       
  1532  */
       
  1533     case function_sint_to_lint :
       
  1534     {
       
  1535         symbol_c *last_type_symbol = NULL;
       
  1536 
       
  1537         {
       
  1538             identifier_c param_name("IN");
       
  1539             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1540             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1541             
       
  1542             /* Get the value from a foo(<param_value>) style call */
       
  1543             if (IN_param_value == NULL)
       
  1544               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1547             
       
  1548             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1549             {
       
  1550         
       
  1551                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1552                 s4o.print("(");
       
  1553                 return_type_symbol->accept(*this);
       
  1554                 s4o.print(")");
       
  1555                 IN_param_value->accept(*this);
       
  1556                 return NULL;
       
  1557                 
       
  1558             }
       
  1559             
       
  1560             ERROR;
       
  1561         }
       
  1562         
       
  1563     }/*function_sint_to_lint*/
       
  1564     break;
       
  1565 
       
  1566 /****
       
  1567  *SINT_TO_USINT
       
  1568  */
       
  1569     case function_sint_to_usint :
       
  1570     {
       
  1571         symbol_c *last_type_symbol = NULL;
       
  1572 
       
  1573         {
       
  1574             identifier_c param_name("IN");
       
  1575             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1576             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1577             
       
  1578             /* Get the value from a foo(<param_value>) style call */
       
  1579             if (IN_param_value == NULL)
       
  1580               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1583             
       
  1584             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1585             {
       
  1586         
       
  1587                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1588                 s4o.print("(");
       
  1589                 return_type_symbol->accept(*this);
       
  1590                 s4o.print(")");
       
  1591                 IN_param_value->accept(*this);
       
  1592                 return NULL;
       
  1593                 
       
  1594             }
       
  1595             
       
  1596             ERROR;
       
  1597         }
       
  1598         
       
  1599     }/*function_sint_to_usint*/
       
  1600     break;
       
  1601 
       
  1602 /****
       
  1603  *SINT_TO_UINT
       
  1604  */
       
  1605     case function_sint_to_uint :
       
  1606     {
       
  1607         symbol_c *last_type_symbol = NULL;
       
  1608 
       
  1609         {
       
  1610             identifier_c param_name("IN");
       
  1611             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1612             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1613             
       
  1614             /* Get the value from a foo(<param_value>) style call */
       
  1615             if (IN_param_value == NULL)
       
  1616               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1619             
       
  1620             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1621             {
       
  1622         
       
  1623                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1624                 s4o.print("(");
       
  1625                 return_type_symbol->accept(*this);
       
  1626                 s4o.print(")");
       
  1627                 IN_param_value->accept(*this);
       
  1628                 return NULL;
       
  1629                 
       
  1630             }
       
  1631             
       
  1632             ERROR;
       
  1633         }
       
  1634         
       
  1635     }/*function_sint_to_uint*/
       
  1636     break;
       
  1637 
       
  1638 /****
       
  1639  *SINT_TO_UDINT
       
  1640  */
       
  1641     case function_sint_to_udint :
       
  1642     {
       
  1643         symbol_c *last_type_symbol = NULL;
       
  1644 
       
  1645         {
       
  1646             identifier_c param_name("IN");
       
  1647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1649             
       
  1650             /* Get the value from a foo(<param_value>) style call */
       
  1651             if (IN_param_value == NULL)
       
  1652               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1655             
       
  1656             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1657             {
       
  1658         
       
  1659                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1660                 s4o.print("(");
       
  1661                 return_type_symbol->accept(*this);
       
  1662                 s4o.print(")");
       
  1663                 IN_param_value->accept(*this);
       
  1664                 return NULL;
       
  1665                 
       
  1666             }
       
  1667             
       
  1668             ERROR;
       
  1669         }
       
  1670         
       
  1671     }/*function_sint_to_udint*/
       
  1672     break;
       
  1673 
       
  1674 /****
       
  1675  *SINT_TO_ULINT
       
  1676  */
       
  1677     case function_sint_to_ulint :
       
  1678     {
       
  1679         symbol_c *last_type_symbol = NULL;
       
  1680 
       
  1681         {
       
  1682             identifier_c param_name("IN");
       
  1683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1685             
       
  1686             /* Get the value from a foo(<param_value>) style call */
       
  1687             if (IN_param_value == NULL)
       
  1688               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1691             
       
  1692             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1693             {
       
  1694         
       
  1695                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1696                 s4o.print("(");
       
  1697                 return_type_symbol->accept(*this);
       
  1698                 s4o.print(")");
       
  1699                 IN_param_value->accept(*this);
       
  1700                 return NULL;
       
  1701                 
       
  1702             }
       
  1703             
       
  1704             ERROR;
       
  1705         }
       
  1706         
       
  1707     }/*function_sint_to_ulint*/
       
  1708     break;
       
  1709 
       
  1710 /****
       
  1711  *SINT_TO_TIME
       
  1712  */
       
  1713     case function_sint_to_time :
       
  1714     {
       
  1715         symbol_c *last_type_symbol = NULL;
       
  1716 
       
  1717         {
       
  1718             identifier_c param_name("IN");
       
  1719             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1721             
       
  1722             /* Get the value from a foo(<param_value>) style call */
       
  1723             if (IN_param_value == NULL)
       
  1724               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1727             
       
  1728             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1729             {
       
  1730         
       
  1731                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1732                 s4o.print("(");
       
  1733                 return_type_symbol->accept(*this);
       
  1734                 s4o.print(")__int_to_time(");
       
  1735                 IN_param_value->accept(*this);
       
  1736                 s4o.print(")");
       
  1737                 return NULL;
       
  1738                 
       
  1739             }
       
  1740             
       
  1741             ERROR;
       
  1742         }
       
  1743         
       
  1744     }/*function_sint_to_time*/
       
  1745     break;
       
  1746 
       
  1747 /****
       
  1748  *SINT_TO_BOOL
       
  1749  */
       
  1750     case function_sint_to_bool :
       
  1751     {
       
  1752         symbol_c *last_type_symbol = NULL;
       
  1753 
       
  1754         {
       
  1755             identifier_c param_name("IN");
       
  1756             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1757             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1758             
       
  1759             /* Get the value from a foo(<param_value>) style call */
       
  1760             if (IN_param_value == NULL)
       
  1761               IN_param_value = function_call_param_iterator.next();
       
  1762             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1763             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1764             
       
  1765             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1766             {
       
  1767         
       
  1768                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1769                 s4o.print("(");
       
  1770                 return_type_symbol->accept(*this);
       
  1771                 s4o.print(")");
       
  1772                 IN_param_value->accept(*this);
       
  1773                 return NULL;
       
  1774                 
       
  1775             }
       
  1776             
       
  1777             ERROR;
       
  1778         }
       
  1779         
       
  1780     }/*function_sint_to_bool*/
       
  1781     break;
       
  1782 
       
  1783 /****
       
  1784  *SINT_TO_BYTE
       
  1785  */
       
  1786     case function_sint_to_byte :
       
  1787     {
       
  1788         symbol_c *last_type_symbol = NULL;
       
  1789 
       
  1790         {
       
  1791             identifier_c param_name("IN");
       
  1792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1794             
       
  1795             /* Get the value from a foo(<param_value>) style call */
       
  1796             if (IN_param_value == NULL)
       
  1797               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  1800             
       
  1801             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1802             {
       
  1803         
       
  1804                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1805                 s4o.print("(");
       
  1806                 return_type_symbol->accept(*this);
       
  1807                 s4o.print(")");
       
  1808                 IN_param_value->accept(*this);
       
  1809                 return NULL;
       
  1810                 
       
  1811             }
       
  1812             
       
  1813             ERROR;
       
  1814         }
       
  1815         
       
  1816     }/*function_sint_to_byte*/
       
  1817     break;
       
  1818 
       
  1819 /****
       
  1820  *SINT_TO_WORD
       
  1821  */
       
  1822     case function_sint_to_word :
       
  1823     {
       
  1824         symbol_c *last_type_symbol = NULL;
       
  1825 
       
  1826         {
       
  1827             identifier_c param_name("IN");
       
  1828             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1829             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1830             
       
  1831             /* Get the value from a foo(<param_value>) style call */
       
  1832             if (IN_param_value == NULL)
       
  1833               IN_param_value = function_call_param_iterator.next();
       
  1834             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1835             last_type_symbol = last_type_symbol && search_expression_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             
       
  1837             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1838             {
       
  1839         
       
  1840                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1841                 s4o.print("(");
       
  1842                 return_type_symbol->accept(*this);
       
  1843                 s4o.print(")");
       
  1844                 IN_param_value->accept(*this);
       
  1845                 return NULL;
       
  1846                 
       
  1847             }
       
  1848             
       
  1849             ERROR;
       
  1850         }
       
  1851         
       
  1852     }/*function_sint_to_word*/
       
  1853     break;
       
  1854 
       
  1855 /****
       
  1856  *SINT_TO_DWORD
       
  1857  */
       
  1858     case function_sint_to_dword :
       
  1859     {
       
  1860         symbol_c *last_type_symbol = NULL;
       
  1861 
       
  1862         {
       
  1863             identifier_c param_name("IN");
       
  1864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1866             
       
  1867             /* Get the value from a foo(<param_value>) style call */
       
  1868             if (IN_param_value == NULL)
       
  1869               IN_param_value = function_call_param_iterator.next();
       
  1870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1872             
       
  1873             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1874             {
       
  1875         
       
  1876                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1877                 s4o.print("(");
       
  1878                 return_type_symbol->accept(*this);
       
  1879                 s4o.print(")");
       
  1880                 IN_param_value->accept(*this);
       
  1881                 return NULL;
       
  1882                 
       
  1883             }
       
  1884             
       
  1885             ERROR;
       
  1886         }
       
  1887         
       
  1888     }/*function_sint_to_dword*/
       
  1889     break;
       
  1890 
       
  1891 /****
       
  1892  *SINT_TO_LWORD
       
  1893  */
       
  1894     case function_sint_to_lword :
       
  1895     {
       
  1896         symbol_c *last_type_symbol = NULL;
       
  1897 
       
  1898         {
       
  1899             identifier_c param_name("IN");
       
  1900             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1901             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1902             
       
  1903             /* Get the value from a foo(<param_value>) style call */
       
  1904             if (IN_param_value == NULL)
       
  1905               IN_param_value = function_call_param_iterator.next();
       
  1906             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1907             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1908             
       
  1909             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1910             {
       
  1911         
       
  1912                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1913                 s4o.print("(");
       
  1914                 return_type_symbol->accept(*this);
       
  1915                 s4o.print(")");
       
  1916                 IN_param_value->accept(*this);
       
  1917                 return NULL;
       
  1918                 
       
  1919             }
       
  1920             
       
  1921             ERROR;
       
  1922         }
       
  1923         
       
  1924     }/*function_sint_to_lword*/
       
  1925     break;
       
  1926 
       
  1927 /****
       
  1928  *SINT_TO_STRING
       
  1929  */
       
  1930     case function_sint_to_string :
       
  1931     {
       
  1932         symbol_c *last_type_symbol = NULL;
       
  1933 
       
  1934         {
       
  1935             identifier_c param_name("IN");
       
  1936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1938             
       
  1939             /* Get the value from a foo(<param_value>) style call */
       
  1940             if (IN_param_value == NULL)
       
  1941               IN_param_value = function_call_param_iterator.next();
       
  1942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1944             
       
  1945             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1946             {
       
  1947         
       
  1948                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1949                 s4o.print("(");
       
  1950                 return_type_symbol->accept(*this);
       
  1951                 s4o.print(")__sint_to_string(");
       
  1952                 IN_param_value->accept(*this);
       
  1953                 s4o.print(")");
       
  1954                 return NULL;
       
  1955                 
       
  1956             }
       
  1957             
       
  1958             ERROR;
       
  1959         }
       
  1960         
       
  1961     }/*function_sint_to_string*/
       
  1962     break;
       
  1963 
       
  1964 /****
       
  1965  *SINT_TO_DATE
       
  1966  */
       
  1967     case function_sint_to_date :
       
  1968     {
       
  1969         symbol_c *last_type_symbol = NULL;
       
  1970 
       
  1971         {
       
  1972             identifier_c param_name("IN");
       
  1973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1974             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1975             
       
  1976             /* Get the value from a foo(<param_value>) style call */
       
  1977             if (IN_param_value == NULL)
       
  1978               IN_param_value = function_call_param_iterator.next();
       
  1979             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1980             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1981             
       
  1982             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1983             {
       
  1984         
       
  1985                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1986                 s4o.print("(");
       
  1987                 return_type_symbol->accept(*this);
       
  1988                 s4o.print(")__int_to_time(");
       
  1989                 IN_param_value->accept(*this);
       
  1990                 s4o.print(")");
       
  1991                 return NULL;
       
  1992                 
       
  1993             }
       
  1994             
       
  1995             ERROR;
       
  1996         }
       
  1997         
       
  1998     }/*function_sint_to_date*/
       
  1999     break;
       
  2000 
       
  2001 /****
       
  2002  *SINT_TO_TOD
       
  2003  */
       
  2004     case function_sint_to_tod :
       
  2005     {
       
  2006         symbol_c *last_type_symbol = NULL;
       
  2007 
       
  2008         {
       
  2009             identifier_c param_name("IN");
       
  2010             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2011             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2012             
       
  2013             /* Get the value from a foo(<param_value>) style call */
       
  2014             if (IN_param_value == NULL)
       
  2015               IN_param_value = function_call_param_iterator.next();
       
  2016             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2017             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2018             
       
  2019             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  2020             {
       
  2021         
       
  2022                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2023                 s4o.print("(");
       
  2024                 return_type_symbol->accept(*this);
       
  2025                 s4o.print(")__int_to_time(");
       
  2026                 IN_param_value->accept(*this);
       
  2027                 s4o.print(")");
       
  2028                 return NULL;
       
  2029                 
       
  2030             }
       
  2031             
       
  2032             ERROR;
       
  2033         }
       
  2034         
       
  2035     }/*function_sint_to_tod*/
       
  2036     break;
       
  2037 
       
  2038 /****
       
  2039  *SINT_TO_DT
       
  2040  */
       
  2041     case function_sint_to_dt :
       
  2042     {
       
  2043         symbol_c *last_type_symbol = NULL;
       
  2044 
       
  2045         {
       
  2046             identifier_c param_name("IN");
       
  2047             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2048             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2049             
       
  2050             /* Get the value from a foo(<param_value>) style call */
       
  2051             if (IN_param_value == NULL)
       
  2052               IN_param_value = function_call_param_iterator.next();
       
  2053             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2054             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2055             
       
  2056             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  2057             {
       
  2058         
       
  2059                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2060                 s4o.print("(");
       
  2061                 return_type_symbol->accept(*this);
       
  2062                 s4o.print(")__int_to_time(");
       
  2063                 IN_param_value->accept(*this);
       
  2064                 s4o.print(")");
       
  2065                 return NULL;
       
  2066                 
       
  2067             }
       
  2068             
       
  2069             ERROR;
       
  2070         }
       
  2071         
       
  2072     }/*function_sint_to_dt*/
       
  2073     break;
       
  2074 
       
  2075 /****
       
  2076  *INT_TO_REAL
       
  2077  */
       
  2078     case function_int_to_real :
       
  2079     {
       
  2080         symbol_c *last_type_symbol = NULL;
       
  2081 
       
  2082         {
       
  2083             identifier_c param_name("IN");
       
  2084             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2085             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2086             
       
  2087             /* Get the value from a foo(<param_value>) style call */
       
  2088             if (IN_param_value == NULL)
       
  2089               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2092             
       
  2093             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2094             {
       
  2095         
       
  2096                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2097                 s4o.print("(");
       
  2098                 return_type_symbol->accept(*this);
       
  2099                 s4o.print(")");
       
  2100                 IN_param_value->accept(*this);
       
  2101                 return NULL;
       
  2102                 
       
  2103             }
       
  2104             
       
  2105             ERROR;
       
  2106         }
       
  2107         
       
  2108     }/*function_int_to_real*/
       
  2109     break;
       
  2110 
       
  2111 /****
       
  2112  *INT_TO_LREAL
       
  2113  */
       
  2114     case function_int_to_lreal :
       
  2115     {
       
  2116         symbol_c *last_type_symbol = NULL;
       
  2117 
       
  2118         {
       
  2119             identifier_c param_name("IN");
       
  2120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2122             
       
  2123             /* Get the value from a foo(<param_value>) style call */
       
  2124             if (IN_param_value == NULL)
       
  2125               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2128             
       
  2129             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2130             {
       
  2131         
       
  2132                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2133                 s4o.print("(");
       
  2134                 return_type_symbol->accept(*this);
       
  2135                 s4o.print(")");
       
  2136                 IN_param_value->accept(*this);
       
  2137                 return NULL;
       
  2138                 
       
  2139             }
       
  2140             
       
  2141             ERROR;
       
  2142         }
       
  2143         
       
  2144     }/*function_int_to_lreal*/
       
  2145     break;
       
  2146 
       
  2147 /****
       
  2148  *INT_TO_SINT
       
  2149  */
       
  2150     case function_int_to_sint :
       
  2151     {
       
  2152         symbol_c *last_type_symbol = NULL;
       
  2153 
       
  2154         {
       
  2155             identifier_c param_name("IN");
       
  2156             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2157             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2158             
       
  2159             /* Get the value from a foo(<param_value>) style call */
       
  2160             if (IN_param_value == NULL)
       
  2161               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2164             
       
  2165             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2166             {
       
  2167         
       
  2168                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2169                 s4o.print("(");
       
  2170                 return_type_symbol->accept(*this);
       
  2171                 s4o.print(")");
       
  2172                 IN_param_value->accept(*this);
       
  2173                 return NULL;
       
  2174                 
       
  2175             }
       
  2176             
       
  2177             ERROR;
       
  2178         }
       
  2179         
       
  2180     }/*function_int_to_sint*/
       
  2181     break;
       
  2182 
       
  2183 /****
       
  2184  *INT_TO_DINT
       
  2185  */
       
  2186     case function_int_to_dint :
       
  2187     {
       
  2188         symbol_c *last_type_symbol = NULL;
       
  2189 
       
  2190         {
       
  2191             identifier_c param_name("IN");
       
  2192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2194             
       
  2195             /* Get the value from a foo(<param_value>) style call */
       
  2196             if (IN_param_value == NULL)
       
  2197               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2200             
       
  2201             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2202             {
       
  2203         
       
  2204                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2205                 s4o.print("(");
       
  2206                 return_type_symbol->accept(*this);
       
  2207                 s4o.print(")");
       
  2208                 IN_param_value->accept(*this);
       
  2209                 return NULL;
       
  2210                 
       
  2211             }
       
  2212             
       
  2213             ERROR;
       
  2214         }
       
  2215         
       
  2216     }/*function_int_to_dint*/
       
  2217     break;
       
  2218 
       
  2219 /****
       
  2220  *INT_TO_LINT
       
  2221  */
       
  2222     case function_int_to_lint :
       
  2223     {
       
  2224         symbol_c *last_type_symbol = NULL;
       
  2225 
       
  2226         {
       
  2227             identifier_c param_name("IN");
       
  2228             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2229             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2230             
       
  2231             /* Get the value from a foo(<param_value>) style call */
       
  2232             if (IN_param_value == NULL)
       
  2233               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2236             
       
  2237             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2238             {
       
  2239         
       
  2240                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2241                 s4o.print("(");
       
  2242                 return_type_symbol->accept(*this);
       
  2243                 s4o.print(")");
       
  2244                 IN_param_value->accept(*this);
       
  2245                 return NULL;
       
  2246                 
       
  2247             }
       
  2248             
       
  2249             ERROR;
       
  2250         }
       
  2251         
       
  2252     }/*function_int_to_lint*/
       
  2253     break;
       
  2254 
       
  2255 /****
       
  2256  *INT_TO_USINT
       
  2257  */
       
  2258     case function_int_to_usint :
       
  2259     {
       
  2260         symbol_c *last_type_symbol = NULL;
       
  2261 
       
  2262         {
       
  2263             identifier_c param_name("IN");
       
  2264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2266             
       
  2267             /* Get the value from a foo(<param_value>) style call */
       
  2268             if (IN_param_value == NULL)
       
  2269               IN_param_value = function_call_param_iterator.next();
       
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2272             
       
  2273             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2274             {
       
  2275         
       
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2277                 s4o.print("(");
       
  2278                 return_type_symbol->accept(*this);
       
  2279                 s4o.print(")");
       
  2280                 IN_param_value->accept(*this);
       
  2281                 return NULL;
       
  2282                 
       
  2283             }
       
  2284             
       
  2285             ERROR;
       
  2286         }
       
  2287         
       
  2288     }/*function_int_to_usint*/
       
  2289     break;
       
  2290 
       
  2291 /****
       
  2292  *INT_TO_UINT
       
  2293  */
       
  2294     case function_int_to_uint :
       
  2295     {
       
  2296         symbol_c *last_type_symbol = NULL;
       
  2297 
       
  2298         {
       
  2299             identifier_c param_name("IN");
       
  2300             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2301             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2302             
       
  2303             /* Get the value from a foo(<param_value>) style call */
       
  2304             if (IN_param_value == NULL)
       
  2305               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2308             
       
  2309             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2310             {
       
  2311         
       
  2312                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2313                 s4o.print("(");
       
  2314                 return_type_symbol->accept(*this);
       
  2315                 s4o.print(")");
       
  2316                 IN_param_value->accept(*this);
       
  2317                 return NULL;
       
  2318                 
       
  2319             }
       
  2320             
       
  2321             ERROR;
       
  2322         }
       
  2323         
       
  2324     }/*function_int_to_uint*/
       
  2325     break;
       
  2326 
       
  2327 /****
       
  2328  *INT_TO_UDINT
       
  2329  */
       
  2330     case function_int_to_udint :
       
  2331     {
       
  2332         symbol_c *last_type_symbol = NULL;
       
  2333 
       
  2334         {
       
  2335             identifier_c param_name("IN");
       
  2336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2338             
       
  2339             /* Get the value from a foo(<param_value>) style call */
       
  2340             if (IN_param_value == NULL)
       
  2341               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2344             
       
  2345             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2346             {
       
  2347         
       
  2348                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2349                 s4o.print("(");
       
  2350                 return_type_symbol->accept(*this);
       
  2351                 s4o.print(")");
       
  2352                 IN_param_value->accept(*this);
       
  2353                 return NULL;
       
  2354                 
       
  2355             }
       
  2356             
       
  2357             ERROR;
       
  2358         }
       
  2359         
       
  2360     }/*function_int_to_udint*/
       
  2361     break;
       
  2362 
       
  2363 /****
       
  2364  *INT_TO_ULINT
       
  2365  */
       
  2366     case function_int_to_ulint :
       
  2367     {
       
  2368         symbol_c *last_type_symbol = NULL;
       
  2369 
       
  2370         {
       
  2371             identifier_c param_name("IN");
       
  2372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2374             
       
  2375             /* Get the value from a foo(<param_value>) style call */
       
  2376             if (IN_param_value == NULL)
       
  2377               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2380             
       
  2381             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2382             {
       
  2383         
       
  2384                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2385                 s4o.print("(");
       
  2386                 return_type_symbol->accept(*this);
       
  2387                 s4o.print(")");
       
  2388                 IN_param_value->accept(*this);
       
  2389                 return NULL;
       
  2390                 
       
  2391             }
       
  2392             
       
  2393             ERROR;
       
  2394         }
       
  2395         
       
  2396     }/*function_int_to_ulint*/
       
  2397     break;
       
  2398 
       
  2399 /****
       
  2400  *INT_TO_TIME
       
  2401  */
       
  2402     case function_int_to_time :
       
  2403     {
       
  2404         symbol_c *last_type_symbol = NULL;
       
  2405 
       
  2406         {
       
  2407             identifier_c param_name("IN");
       
  2408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2410             
       
  2411             /* Get the value from a foo(<param_value>) style call */
       
  2412             if (IN_param_value == NULL)
       
  2413               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2416             
       
  2417             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2418             {
       
  2419         
       
  2420                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2421                 s4o.print("(");
       
  2422                 return_type_symbol->accept(*this);
       
  2423                 s4o.print(")__int_to_time(");
       
  2424                 IN_param_value->accept(*this);
       
  2425                 s4o.print(")");
       
  2426                 return NULL;
       
  2427                 
       
  2428             }
       
  2429             
       
  2430             ERROR;
       
  2431         }
       
  2432         
       
  2433     }/*function_int_to_time*/
       
  2434     break;
       
  2435 
       
  2436 /****
       
  2437  *INT_TO_BOOL
       
  2438  */
       
  2439     case function_int_to_bool :
       
  2440     {
       
  2441         symbol_c *last_type_symbol = NULL;
       
  2442 
       
  2443         {
       
  2444             identifier_c param_name("IN");
       
  2445             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2447             
       
  2448             /* Get the value from a foo(<param_value>) style call */
       
  2449             if (IN_param_value == NULL)
       
  2450               IN_param_value = function_call_param_iterator.next();
       
  2451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2452             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2453             
       
  2454             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2455             {
       
  2456         
       
  2457                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2458                 s4o.print("(");
       
  2459                 return_type_symbol->accept(*this);
       
  2460                 s4o.print(")");
       
  2461                 IN_param_value->accept(*this);
       
  2462                 return NULL;
       
  2463                 
       
  2464             }
       
  2465             
       
  2466             ERROR;
       
  2467         }
       
  2468         
       
  2469     }/*function_int_to_bool*/
       
  2470     break;
       
  2471 
       
  2472 /****
       
  2473  *INT_TO_BYTE
       
  2474  */
       
  2475     case function_int_to_byte :
       
  2476     {
       
  2477         symbol_c *last_type_symbol = NULL;
       
  2478 
       
  2479         {
       
  2480             identifier_c param_name("IN");
       
  2481             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2482             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2483             
       
  2484             /* Get the value from a foo(<param_value>) style call */
       
  2485             if (IN_param_value == NULL)
       
  2486               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2489             
       
  2490             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2491             {
       
  2492         
       
  2493                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2494                 s4o.print("(");
       
  2495                 return_type_symbol->accept(*this);
       
  2496                 s4o.print(")");
       
  2497                 IN_param_value->accept(*this);
       
  2498                 return NULL;
       
  2499                 
       
  2500             }
       
  2501             
       
  2502             ERROR;
       
  2503         }
       
  2504         
       
  2505     }/*function_int_to_byte*/
       
  2506     break;
       
  2507 
       
  2508 /****
       
  2509  *INT_TO_WORD
       
  2510  */
       
  2511     case function_int_to_word :
       
  2512     {
       
  2513         symbol_c *last_type_symbol = NULL;
       
  2514 
       
  2515         {
       
  2516             identifier_c param_name("IN");
       
  2517             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2518             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2519             
       
  2520             /* Get the value from a foo(<param_value>) style call */
       
  2521             if (IN_param_value == NULL)
       
  2522               IN_param_value = function_call_param_iterator.next();
       
  2523             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2524             last_type_symbol = last_type_symbol && search_expression_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             
       
  2526             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2527             {
       
  2528         
       
  2529                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2530                 s4o.print("(");
       
  2531                 return_type_symbol->accept(*this);
       
  2532                 s4o.print(")");
       
  2533                 IN_param_value->accept(*this);
       
  2534                 return NULL;
       
  2535                 
       
  2536             }
       
  2537             
       
  2538             ERROR;
       
  2539         }
       
  2540         
       
  2541     }/*function_int_to_word*/
       
  2542     break;
       
  2543 
       
  2544 /****
       
  2545  *INT_TO_DWORD
       
  2546  */
       
  2547     case function_int_to_dword :
       
  2548     {
       
  2549         symbol_c *last_type_symbol = NULL;
       
  2550 
       
  2551         {
       
  2552             identifier_c param_name("IN");
       
  2553             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2554             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2555             
       
  2556             /* Get the value from a foo(<param_value>) style call */
       
  2557             if (IN_param_value == NULL)
       
  2558               IN_param_value = function_call_param_iterator.next();
       
  2559             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2560             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2561             
       
  2562             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2563             {
       
  2564         
       
  2565                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2566                 s4o.print("(");
       
  2567                 return_type_symbol->accept(*this);
       
  2568                 s4o.print(")");
       
  2569                 IN_param_value->accept(*this);
       
  2570                 return NULL;
       
  2571                 
       
  2572             }
       
  2573             
       
  2574             ERROR;
       
  2575         }
       
  2576         
       
  2577     }/*function_int_to_dword*/
       
  2578     break;
       
  2579 
       
  2580 /****
       
  2581  *INT_TO_LWORD
       
  2582  */
       
  2583     case function_int_to_lword :
       
  2584     {
       
  2585         symbol_c *last_type_symbol = NULL;
       
  2586 
       
  2587         {
       
  2588             identifier_c param_name("IN");
       
  2589             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2590             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2591             
       
  2592             /* Get the value from a foo(<param_value>) style call */
       
  2593             if (IN_param_value == NULL)
       
  2594               IN_param_value = function_call_param_iterator.next();
       
  2595             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2596             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2597             
       
  2598             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2599             {
       
  2600         
       
  2601                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2602                 s4o.print("(");
       
  2603                 return_type_symbol->accept(*this);
       
  2604                 s4o.print(")");
       
  2605                 IN_param_value->accept(*this);
       
  2606                 return NULL;
       
  2607                 
       
  2608             }
       
  2609             
       
  2610             ERROR;
       
  2611         }
       
  2612         
       
  2613     }/*function_int_to_lword*/
       
  2614     break;
       
  2615 
       
  2616 /****
       
  2617  *INT_TO_STRING
       
  2618  */
       
  2619     case function_int_to_string :
       
  2620     {
       
  2621         symbol_c *last_type_symbol = NULL;
       
  2622 
       
  2623         {
       
  2624             identifier_c param_name("IN");
       
  2625             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2626             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2627             
       
  2628             /* Get the value from a foo(<param_value>) style call */
       
  2629             if (IN_param_value == NULL)
       
  2630               IN_param_value = function_call_param_iterator.next();
       
  2631             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2632             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2633             
       
  2634             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2635             {
       
  2636         
       
  2637                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2638                 s4o.print("(");
       
  2639                 return_type_symbol->accept(*this);
       
  2640                 s4o.print(")__sint_to_string(");
       
  2641                 IN_param_value->accept(*this);
       
  2642                 s4o.print(")");
       
  2643                 return NULL;
       
  2644                 
       
  2645             }
       
  2646             
       
  2647             ERROR;
       
  2648         }
       
  2649         
       
  2650     }/*function_int_to_string*/
       
  2651     break;
       
  2652 
       
  2653 /****
       
  2654  *INT_TO_DATE
       
  2655  */
       
  2656     case function_int_to_date :
       
  2657     {
       
  2658         symbol_c *last_type_symbol = NULL;
       
  2659 
       
  2660         {
       
  2661             identifier_c param_name("IN");
       
  2662             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2663             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2664             
       
  2665             /* Get the value from a foo(<param_value>) style call */
       
  2666             if (IN_param_value == NULL)
       
  2667               IN_param_value = function_call_param_iterator.next();
       
  2668             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2669             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2670             
       
  2671             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2672             {
       
  2673         
       
  2674                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2675                 s4o.print("(");
       
  2676                 return_type_symbol->accept(*this);
       
  2677                 s4o.print(")__int_to_time(");
       
  2678                 IN_param_value->accept(*this);
       
  2679                 s4o.print(")");
       
  2680                 return NULL;
       
  2681                 
       
  2682             }
       
  2683             
       
  2684             ERROR;
       
  2685         }
       
  2686         
       
  2687     }/*function_int_to_date*/
       
  2688     break;
       
  2689 
       
  2690 /****
       
  2691  *INT_TO_TOD
       
  2692  */
       
  2693     case function_int_to_tod :
       
  2694     {
       
  2695         symbol_c *last_type_symbol = NULL;
       
  2696 
       
  2697         {
       
  2698             identifier_c param_name("IN");
       
  2699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2701             
       
  2702             /* Get the value from a foo(<param_value>) style call */
       
  2703             if (IN_param_value == NULL)
       
  2704               IN_param_value = function_call_param_iterator.next();
       
  2705             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2706             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2707             
       
  2708             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2709             {
       
  2710         
       
  2711                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2712                 s4o.print("(");
       
  2713                 return_type_symbol->accept(*this);
       
  2714                 s4o.print(")__int_to_time(");
       
  2715                 IN_param_value->accept(*this);
       
  2716                 s4o.print(")");
       
  2717                 return NULL;
       
  2718                 
       
  2719             }
       
  2720             
       
  2721             ERROR;
       
  2722         }
       
  2723         
       
  2724     }/*function_int_to_tod*/
       
  2725     break;
       
  2726 
       
  2727 /****
       
  2728  *INT_TO_DT
       
  2729  */
       
  2730     case function_int_to_dt :
       
  2731     {
       
  2732         symbol_c *last_type_symbol = NULL;
       
  2733 
       
  2734         {
       
  2735             identifier_c param_name("IN");
       
  2736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2738             
       
  2739             /* Get the value from a foo(<param_value>) style call */
       
  2740             if (IN_param_value == NULL)
       
  2741               IN_param_value = function_call_param_iterator.next();
       
  2742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2744             
       
  2745             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2746             {
       
  2747         
       
  2748                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2749                 s4o.print("(");
       
  2750                 return_type_symbol->accept(*this);
       
  2751                 s4o.print(")__int_to_time(");
       
  2752                 IN_param_value->accept(*this);
       
  2753                 s4o.print(")");
       
  2754                 return NULL;
       
  2755                 
       
  2756             }
       
  2757             
       
  2758             ERROR;
       
  2759         }
       
  2760         
       
  2761     }/*function_int_to_dt*/
       
  2762     break;
       
  2763 
       
  2764 /****
       
  2765  *DINT_TO_REAL
       
  2766  */
       
  2767     case function_dint_to_real :
       
  2768     {
       
  2769         symbol_c *last_type_symbol = NULL;
       
  2770 
       
  2771         {
       
  2772             identifier_c param_name("IN");
       
  2773             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2774             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2775             
       
  2776             /* Get the value from a foo(<param_value>) style call */
       
  2777             if (IN_param_value == NULL)
       
  2778               IN_param_value = function_call_param_iterator.next();
       
  2779             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2780             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2781             
       
  2782             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2783             {
       
  2784         
       
  2785                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2786                 s4o.print("(");
       
  2787                 return_type_symbol->accept(*this);
       
  2788                 s4o.print(")");
       
  2789                 IN_param_value->accept(*this);
       
  2790                 return NULL;
       
  2791                 
       
  2792             }
       
  2793             
       
  2794             ERROR;
       
  2795         }
       
  2796         
       
  2797     }/*function_dint_to_real*/
       
  2798     break;
       
  2799 
       
  2800 /****
       
  2801  *DINT_TO_LREAL
       
  2802  */
       
  2803     case function_dint_to_lreal :
       
  2804     {
       
  2805         symbol_c *last_type_symbol = NULL;
       
  2806 
       
  2807         {
       
  2808             identifier_c param_name("IN");
       
  2809             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2810             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2811             
       
  2812             /* Get the value from a foo(<param_value>) style call */
       
  2813             if (IN_param_value == NULL)
       
  2814               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2817             
       
  2818             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2819             {
       
  2820         
       
  2821                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2822                 s4o.print("(");
       
  2823                 return_type_symbol->accept(*this);
       
  2824                 s4o.print(")");
       
  2825                 IN_param_value->accept(*this);
       
  2826                 return NULL;
       
  2827                 
       
  2828             }
       
  2829             
       
  2830             ERROR;
       
  2831         }
       
  2832         
       
  2833     }/*function_dint_to_lreal*/
       
  2834     break;
       
  2835 
       
  2836 /****
       
  2837  *DINT_TO_SINT
       
  2838  */
       
  2839     case function_dint_to_sint :
       
  2840     {
       
  2841         symbol_c *last_type_symbol = NULL;
       
  2842 
       
  2843         {
       
  2844             identifier_c param_name("IN");
       
  2845             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2846             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2847             
       
  2848             /* Get the value from a foo(<param_value>) style call */
       
  2849             if (IN_param_value == NULL)
       
  2850               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2853             
       
  2854             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2855             {
       
  2856         
       
  2857                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2858                 s4o.print("(");
       
  2859                 return_type_symbol->accept(*this);
       
  2860                 s4o.print(")");
       
  2861                 IN_param_value->accept(*this);
       
  2862                 return NULL;
       
  2863                 
       
  2864             }
       
  2865             
       
  2866             ERROR;
       
  2867         }
       
  2868         
       
  2869     }/*function_dint_to_sint*/
       
  2870     break;
       
  2871 
       
  2872 /****
       
  2873  *DINT_TO_INT
       
  2874  */
       
  2875     case function_dint_to_int :
       
  2876     {
       
  2877         symbol_c *last_type_symbol = NULL;
       
  2878 
       
  2879         {
       
  2880             identifier_c param_name("IN");
       
  2881             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2882             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2883             
       
  2884             /* Get the value from a foo(<param_value>) style call */
       
  2885             if (IN_param_value == NULL)
       
  2886               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2889             
       
  2890             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2891             {
       
  2892         
       
  2893                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2894                 s4o.print("(");
       
  2895                 return_type_symbol->accept(*this);
       
  2896                 s4o.print(")");
       
  2897                 IN_param_value->accept(*this);
       
  2898                 return NULL;
       
  2899                 
       
  2900             }
       
  2901             
       
  2902             ERROR;
       
  2903         }
       
  2904         
       
  2905     }/*function_dint_to_int*/
       
  2906     break;
       
  2907 
       
  2908 /****
       
  2909  *DINT_TO_LINT
       
  2910  */
       
  2911     case function_dint_to_lint :
       
  2912     {
       
  2913         symbol_c *last_type_symbol = NULL;
       
  2914 
       
  2915         {
       
  2916             identifier_c param_name("IN");
       
  2917             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2918             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2919             
       
  2920             /* Get the value from a foo(<param_value>) style call */
       
  2921             if (IN_param_value == NULL)
       
  2922               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2925             
       
  2926             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2927             {
       
  2928         
       
  2929                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2930                 s4o.print("(");
       
  2931                 return_type_symbol->accept(*this);
       
  2932                 s4o.print(")");
       
  2933                 IN_param_value->accept(*this);
       
  2934                 return NULL;
       
  2935                 
       
  2936             }
       
  2937             
       
  2938             ERROR;
       
  2939         }
       
  2940         
       
  2941     }/*function_dint_to_lint*/
       
  2942     break;
       
  2943 
       
  2944 /****
       
  2945  *DINT_TO_USINT
       
  2946  */
       
  2947     case function_dint_to_usint :
       
  2948     {
       
  2949         symbol_c *last_type_symbol = NULL;
       
  2950 
       
  2951         {
       
  2952             identifier_c param_name("IN");
       
  2953             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2954             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2955             
       
  2956             /* Get the value from a foo(<param_value>) style call */
       
  2957             if (IN_param_value == NULL)
       
  2958               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2961             
       
  2962             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2963             {
       
  2964         
       
  2965                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2966                 s4o.print("(");
       
  2967                 return_type_symbol->accept(*this);
       
  2968                 s4o.print(")");
       
  2969                 IN_param_value->accept(*this);
       
  2970                 return NULL;
       
  2971                 
       
  2972             }
       
  2973             
       
  2974             ERROR;
       
  2975         }
       
  2976         
       
  2977     }/*function_dint_to_usint*/
       
  2978     break;
       
  2979 
       
  2980 /****
       
  2981  *DINT_TO_UINT
       
  2982  */
       
  2983     case function_dint_to_uint :
       
  2984     {
       
  2985         symbol_c *last_type_symbol = NULL;
       
  2986 
       
  2987         {
       
  2988             identifier_c param_name("IN");
       
  2989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2990             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2991             
       
  2992             /* Get the value from a foo(<param_value>) style call */
       
  2993             if (IN_param_value == NULL)
       
  2994               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  2997             
       
  2998             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2999             {
       
  3000         
       
  3001                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3002                 s4o.print("(");
       
  3003                 return_type_symbol->accept(*this);
       
  3004                 s4o.print(")");
       
  3005                 IN_param_value->accept(*this);
       
  3006                 return NULL;
       
  3007                 
       
  3008             }
       
  3009             
       
  3010             ERROR;
       
  3011         }
       
  3012         
       
  3013     }/*function_dint_to_uint*/
       
  3014     break;
       
  3015 
       
  3016 /****
       
  3017  *DINT_TO_UDINT
       
  3018  */
       
  3019     case function_dint_to_udint :
       
  3020     {
       
  3021         symbol_c *last_type_symbol = NULL;
       
  3022 
       
  3023         {
       
  3024             identifier_c param_name("IN");
       
  3025             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3026             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3027             
       
  3028             /* Get the value from a foo(<param_value>) style call */
       
  3029             if (IN_param_value == NULL)
       
  3030               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3033             
       
  3034             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3035             {
       
  3036         
       
  3037                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3038                 s4o.print("(");
       
  3039                 return_type_symbol->accept(*this);
       
  3040                 s4o.print(")");
       
  3041                 IN_param_value->accept(*this);
       
  3042                 return NULL;
       
  3043                 
       
  3044             }
       
  3045             
       
  3046             ERROR;
       
  3047         }
       
  3048         
       
  3049     }/*function_dint_to_udint*/
       
  3050     break;
       
  3051 
       
  3052 /****
       
  3053  *DINT_TO_ULINT
       
  3054  */
       
  3055     case function_dint_to_ulint :
       
  3056     {
       
  3057         symbol_c *last_type_symbol = NULL;
       
  3058 
       
  3059         {
       
  3060             identifier_c param_name("IN");
       
  3061             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3062             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3063             
       
  3064             /* Get the value from a foo(<param_value>) style call */
       
  3065             if (IN_param_value == NULL)
       
  3066               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3069             
       
  3070             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3071             {
       
  3072         
       
  3073                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3074                 s4o.print("(");
       
  3075                 return_type_symbol->accept(*this);
       
  3076                 s4o.print(")");
       
  3077                 IN_param_value->accept(*this);
       
  3078                 return NULL;
       
  3079                 
       
  3080             }
       
  3081             
       
  3082             ERROR;
       
  3083         }
       
  3084         
       
  3085     }/*function_dint_to_ulint*/
       
  3086     break;
       
  3087 
       
  3088 /****
       
  3089  *DINT_TO_TIME
       
  3090  */
       
  3091     case function_dint_to_time :
       
  3092     {
       
  3093         symbol_c *last_type_symbol = NULL;
       
  3094 
       
  3095         {
       
  3096             identifier_c param_name("IN");
       
  3097             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3098             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3099             
       
  3100             /* Get the value from a foo(<param_value>) style call */
       
  3101             if (IN_param_value == NULL)
       
  3102               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3105             
       
  3106             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3107             {
       
  3108         
       
  3109                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3110                 s4o.print("(");
       
  3111                 return_type_symbol->accept(*this);
       
  3112                 s4o.print(")__int_to_time(");
       
  3113                 IN_param_value->accept(*this);
       
  3114                 s4o.print(")");
       
  3115                 return NULL;
       
  3116                 
       
  3117             }
       
  3118             
       
  3119             ERROR;
       
  3120         }
       
  3121         
       
  3122     }/*function_dint_to_time*/
       
  3123     break;
       
  3124 
       
  3125 /****
       
  3126  *DINT_TO_BOOL
       
  3127  */
       
  3128     case function_dint_to_bool :
       
  3129     {
       
  3130         symbol_c *last_type_symbol = NULL;
       
  3131 
       
  3132         {
       
  3133             identifier_c param_name("IN");
       
  3134             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3135             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3136             
       
  3137             /* Get the value from a foo(<param_value>) style call */
       
  3138             if (IN_param_value == NULL)
       
  3139               IN_param_value = function_call_param_iterator.next();
       
  3140             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3141             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3142             
       
  3143             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3144             {
       
  3145         
       
  3146                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3147                 s4o.print("(");
       
  3148                 return_type_symbol->accept(*this);
       
  3149                 s4o.print(")");
       
  3150                 IN_param_value->accept(*this);
       
  3151                 return NULL;
       
  3152                 
       
  3153             }
       
  3154             
       
  3155             ERROR;
       
  3156         }
       
  3157         
       
  3158     }/*function_dint_to_bool*/
       
  3159     break;
       
  3160 
       
  3161 /****
       
  3162  *DINT_TO_BYTE
       
  3163  */
       
  3164     case function_dint_to_byte :
       
  3165     {
       
  3166         symbol_c *last_type_symbol = NULL;
       
  3167 
       
  3168         {
       
  3169             identifier_c param_name("IN");
       
  3170             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3171             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3172             
       
  3173             /* Get the value from a foo(<param_value>) style call */
       
  3174             if (IN_param_value == NULL)
       
  3175               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3178             
       
  3179             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3180             {
       
  3181         
       
  3182                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3183                 s4o.print("(");
       
  3184                 return_type_symbol->accept(*this);
       
  3185                 s4o.print(")");
       
  3186                 IN_param_value->accept(*this);
       
  3187                 return NULL;
       
  3188                 
       
  3189             }
       
  3190             
       
  3191             ERROR;
       
  3192         }
       
  3193         
       
  3194     }/*function_dint_to_byte*/
       
  3195     break;
       
  3196 
       
  3197 /****
       
  3198  *DINT_TO_WORD
       
  3199  */
       
  3200     case function_dint_to_word :
       
  3201     {
       
  3202         symbol_c *last_type_symbol = NULL;
       
  3203 
       
  3204         {
       
  3205             identifier_c param_name("IN");
       
  3206             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3207             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3208             
       
  3209             /* Get the value from a foo(<param_value>) style call */
       
  3210             if (IN_param_value == NULL)
       
  3211               IN_param_value = function_call_param_iterator.next();
       
  3212             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3213             last_type_symbol = last_type_symbol && search_expression_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             
       
  3215             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3216             {
       
  3217         
       
  3218                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3219                 s4o.print("(");
       
  3220                 return_type_symbol->accept(*this);
       
  3221                 s4o.print(")");
       
  3222                 IN_param_value->accept(*this);
       
  3223                 return NULL;
       
  3224                 
       
  3225             }
       
  3226             
       
  3227             ERROR;
       
  3228         }
       
  3229         
       
  3230     }/*function_dint_to_word*/
       
  3231     break;
       
  3232 
       
  3233 /****
       
  3234  *DINT_TO_DWORD
       
  3235  */
       
  3236     case function_dint_to_dword :
       
  3237     {
       
  3238         symbol_c *last_type_symbol = NULL;
       
  3239 
       
  3240         {
       
  3241             identifier_c param_name("IN");
       
  3242             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3243             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3244             
       
  3245             /* Get the value from a foo(<param_value>) style call */
       
  3246             if (IN_param_value == NULL)
       
  3247               IN_param_value = function_call_param_iterator.next();
       
  3248             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3249             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3250             
       
  3251             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3252             {
       
  3253         
       
  3254                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3255                 s4o.print("(");
       
  3256                 return_type_symbol->accept(*this);
       
  3257                 s4o.print(")");
       
  3258                 IN_param_value->accept(*this);
       
  3259                 return NULL;
       
  3260                 
       
  3261             }
       
  3262             
       
  3263             ERROR;
       
  3264         }
       
  3265         
       
  3266     }/*function_dint_to_dword*/
       
  3267     break;
       
  3268 
       
  3269 /****
       
  3270  *DINT_TO_LWORD
       
  3271  */
       
  3272     case function_dint_to_lword :
       
  3273     {
       
  3274         symbol_c *last_type_symbol = NULL;
       
  3275 
       
  3276         {
       
  3277             identifier_c param_name("IN");
       
  3278             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3279             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3280             
       
  3281             /* Get the value from a foo(<param_value>) style call */
       
  3282             if (IN_param_value == NULL)
       
  3283               IN_param_value = function_call_param_iterator.next();
       
  3284             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3285             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3286             
       
  3287             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3288             {
       
  3289         
       
  3290                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3291                 s4o.print("(");
       
  3292                 return_type_symbol->accept(*this);
       
  3293                 s4o.print(")");
       
  3294                 IN_param_value->accept(*this);
       
  3295                 return NULL;
       
  3296                 
       
  3297             }
       
  3298             
       
  3299             ERROR;
       
  3300         }
       
  3301         
       
  3302     }/*function_dint_to_lword*/
       
  3303     break;
       
  3304 
       
  3305 /****
       
  3306  *DINT_TO_STRING
       
  3307  */
       
  3308     case function_dint_to_string :
       
  3309     {
       
  3310         symbol_c *last_type_symbol = NULL;
       
  3311 
       
  3312         {
       
  3313             identifier_c param_name("IN");
       
  3314             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3315             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3316             
       
  3317             /* Get the value from a foo(<param_value>) style call */
       
  3318             if (IN_param_value == NULL)
       
  3319               IN_param_value = function_call_param_iterator.next();
       
  3320             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3321             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3322             
       
  3323             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3324             {
       
  3325         
       
  3326                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3327                 s4o.print("(");
       
  3328                 return_type_symbol->accept(*this);
       
  3329                 s4o.print(")__sint_to_string(");
       
  3330                 IN_param_value->accept(*this);
       
  3331                 s4o.print(")");
       
  3332                 return NULL;
       
  3333                 
       
  3334             }
       
  3335             
       
  3336             ERROR;
       
  3337         }
       
  3338         
       
  3339     }/*function_dint_to_string*/
       
  3340     break;
       
  3341 
       
  3342 /****
       
  3343  *DINT_TO_DATE
       
  3344  */
       
  3345     case function_dint_to_date :
       
  3346     {
       
  3347         symbol_c *last_type_symbol = NULL;
       
  3348 
       
  3349         {
       
  3350             identifier_c param_name("IN");
       
  3351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3353             
       
  3354             /* Get the value from a foo(<param_value>) style call */
       
  3355             if (IN_param_value == NULL)
       
  3356               IN_param_value = function_call_param_iterator.next();
       
  3357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3359             
       
  3360             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3361             {
       
  3362         
       
  3363                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3364                 s4o.print("(");
       
  3365                 return_type_symbol->accept(*this);
       
  3366                 s4o.print(")__int_to_time(");
       
  3367                 IN_param_value->accept(*this);
       
  3368                 s4o.print(")");
       
  3369                 return NULL;
       
  3370                 
       
  3371             }
       
  3372             
       
  3373             ERROR;
       
  3374         }
       
  3375         
       
  3376     }/*function_dint_to_date*/
       
  3377     break;
       
  3378 
       
  3379 /****
       
  3380  *DINT_TO_TOD
       
  3381  */
       
  3382     case function_dint_to_tod :
       
  3383     {
       
  3384         symbol_c *last_type_symbol = NULL;
       
  3385 
       
  3386         {
       
  3387             identifier_c param_name("IN");
       
  3388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3390             
       
  3391             /* Get the value from a foo(<param_value>) style call */
       
  3392             if (IN_param_value == NULL)
       
  3393               IN_param_value = function_call_param_iterator.next();
       
  3394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3396             
       
  3397             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3398             {
       
  3399         
       
  3400                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3401                 s4o.print("(");
       
  3402                 return_type_symbol->accept(*this);
       
  3403                 s4o.print(")__int_to_time(");
       
  3404                 IN_param_value->accept(*this);
       
  3405                 s4o.print(")");
       
  3406                 return NULL;
       
  3407                 
       
  3408             }
       
  3409             
       
  3410             ERROR;
       
  3411         }
       
  3412         
       
  3413     }/*function_dint_to_tod*/
       
  3414     break;
       
  3415 
       
  3416 /****
       
  3417  *DINT_TO_DT
       
  3418  */
       
  3419     case function_dint_to_dt :
       
  3420     {
       
  3421         symbol_c *last_type_symbol = NULL;
       
  3422 
       
  3423         {
       
  3424             identifier_c param_name("IN");
       
  3425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3427             
       
  3428             /* Get the value from a foo(<param_value>) style call */
       
  3429             if (IN_param_value == NULL)
       
  3430               IN_param_value = function_call_param_iterator.next();
       
  3431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3432             last_type_symbol = last_type_symbol && search_expression_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             
       
  3434             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3435             {
       
  3436         
       
  3437                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3438                 s4o.print("(");
       
  3439                 return_type_symbol->accept(*this);
       
  3440                 s4o.print(")__int_to_time(");
       
  3441                 IN_param_value->accept(*this);
       
  3442                 s4o.print(")");
       
  3443                 return NULL;
       
  3444                 
       
  3445             }
       
  3446             
       
  3447             ERROR;
       
  3448         }
       
  3449         
       
  3450     }/*function_dint_to_dt*/
       
  3451     break;
       
  3452 
       
  3453 /****
       
  3454  *LINT_TO_REAL
       
  3455  */
       
  3456     case function_lint_to_real :
       
  3457     {
       
  3458         symbol_c *last_type_symbol = NULL;
       
  3459 
       
  3460         {
       
  3461             identifier_c param_name("IN");
       
  3462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3464             
       
  3465             /* Get the value from a foo(<param_value>) style call */
       
  3466             if (IN_param_value == NULL)
       
  3467               IN_param_value = function_call_param_iterator.next();
       
  3468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3470             
       
  3471             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3472             {
       
  3473         
       
  3474                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3475                 s4o.print("(");
       
  3476                 return_type_symbol->accept(*this);
       
  3477                 s4o.print(")");
       
  3478                 IN_param_value->accept(*this);
       
  3479                 return NULL;
       
  3480                 
       
  3481             }
       
  3482             
       
  3483             ERROR;
       
  3484         }
       
  3485         
       
  3486     }/*function_lint_to_real*/
       
  3487     break;
       
  3488 
       
  3489 /****
       
  3490  *LINT_TO_LREAL
       
  3491  */
       
  3492     case function_lint_to_lreal :
       
  3493     {
       
  3494         symbol_c *last_type_symbol = NULL;
       
  3495 
       
  3496         {
       
  3497             identifier_c param_name("IN");
       
  3498             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3499             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3500             
       
  3501             /* Get the value from a foo(<param_value>) style call */
       
  3502             if (IN_param_value == NULL)
       
  3503               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3506             
       
  3507             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3508             {
       
  3509         
       
  3510                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3511                 s4o.print("(");
       
  3512                 return_type_symbol->accept(*this);
       
  3513                 s4o.print(")");
       
  3514                 IN_param_value->accept(*this);
       
  3515                 return NULL;
       
  3516                 
       
  3517             }
       
  3518             
       
  3519             ERROR;
       
  3520         }
       
  3521         
       
  3522     }/*function_lint_to_lreal*/
       
  3523     break;
       
  3524 
       
  3525 /****
       
  3526  *LINT_TO_SINT
       
  3527  */
       
  3528     case function_lint_to_sint :
       
  3529     {
       
  3530         symbol_c *last_type_symbol = NULL;
       
  3531 
       
  3532         {
       
  3533             identifier_c param_name("IN");
       
  3534             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3535             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3536             
       
  3537             /* Get the value from a foo(<param_value>) style call */
       
  3538             if (IN_param_value == NULL)
       
  3539               IN_param_value = function_call_param_iterator.next();
       
  3540             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3541             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3542             
       
  3543             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3544             {
       
  3545         
       
  3546                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3547                 s4o.print("(");
       
  3548                 return_type_symbol->accept(*this);
       
  3549                 s4o.print(")");
       
  3550                 IN_param_value->accept(*this);
       
  3551                 return NULL;
       
  3552                 
       
  3553             }
       
  3554             
       
  3555             ERROR;
       
  3556         }
       
  3557         
       
  3558     }/*function_lint_to_sint*/
       
  3559     break;
       
  3560 
       
  3561 /****
       
  3562  *LINT_TO_INT
       
  3563  */
       
  3564     case function_lint_to_int :
       
  3565     {
       
  3566         symbol_c *last_type_symbol = NULL;
       
  3567 
       
  3568         {
       
  3569             identifier_c param_name("IN");
       
  3570             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3571             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3572             
       
  3573             /* Get the value from a foo(<param_value>) style call */
       
  3574             if (IN_param_value == NULL)
       
  3575               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3578             
       
  3579             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3580             {
       
  3581         
       
  3582                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3583                 s4o.print("(");
       
  3584                 return_type_symbol->accept(*this);
       
  3585                 s4o.print(")");
       
  3586                 IN_param_value->accept(*this);
       
  3587                 return NULL;
       
  3588                 
       
  3589             }
       
  3590             
       
  3591             ERROR;
       
  3592         }
       
  3593         
       
  3594     }/*function_lint_to_int*/
       
  3595     break;
       
  3596 
       
  3597 /****
       
  3598  *LINT_TO_DINT
       
  3599  */
       
  3600     case function_lint_to_dint :
       
  3601     {
       
  3602         symbol_c *last_type_symbol = NULL;
       
  3603 
       
  3604         {
       
  3605             identifier_c param_name("IN");
       
  3606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3607             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3608             
       
  3609             /* Get the value from a foo(<param_value>) style call */
       
  3610             if (IN_param_value == NULL)
       
  3611               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3614             
       
  3615             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3616             {
       
  3617         
       
  3618                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3619                 s4o.print("(");
       
  3620                 return_type_symbol->accept(*this);
       
  3621                 s4o.print(")");
       
  3622                 IN_param_value->accept(*this);
       
  3623                 return NULL;
       
  3624                 
       
  3625             }
       
  3626             
       
  3627             ERROR;
       
  3628         }
       
  3629         
       
  3630     }/*function_lint_to_dint*/
       
  3631     break;
       
  3632 
       
  3633 /****
       
  3634  *LINT_TO_USINT
       
  3635  */
       
  3636     case function_lint_to_usint :
       
  3637     {
       
  3638         symbol_c *last_type_symbol = NULL;
       
  3639 
       
  3640         {
       
  3641             identifier_c param_name("IN");
       
  3642             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3643             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3644             
       
  3645             /* Get the value from a foo(<param_value>) style call */
       
  3646             if (IN_param_value == NULL)
       
  3647               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3650             
       
  3651             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3652             {
       
  3653         
       
  3654                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3655                 s4o.print("(");
       
  3656                 return_type_symbol->accept(*this);
       
  3657                 s4o.print(")");
       
  3658                 IN_param_value->accept(*this);
       
  3659                 return NULL;
       
  3660                 
       
  3661             }
       
  3662             
       
  3663             ERROR;
       
  3664         }
       
  3665         
       
  3666     }/*function_lint_to_usint*/
       
  3667     break;
       
  3668 
       
  3669 /****
       
  3670  *LINT_TO_UINT
       
  3671  */
       
  3672     case function_lint_to_uint :
       
  3673     {
       
  3674         symbol_c *last_type_symbol = NULL;
       
  3675 
       
  3676         {
       
  3677             identifier_c param_name("IN");
       
  3678             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3679             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3680             
       
  3681             /* Get the value from a foo(<param_value>) style call */
       
  3682             if (IN_param_value == NULL)
       
  3683               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3686             
       
  3687             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3688             {
       
  3689         
       
  3690                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3691                 s4o.print("(");
       
  3692                 return_type_symbol->accept(*this);
       
  3693                 s4o.print(")");
       
  3694                 IN_param_value->accept(*this);
       
  3695                 return NULL;
       
  3696                 
       
  3697             }
       
  3698             
       
  3699             ERROR;
       
  3700         }
       
  3701         
       
  3702     }/*function_lint_to_uint*/
       
  3703     break;
       
  3704 
       
  3705 /****
       
  3706  *LINT_TO_UDINT
       
  3707  */
       
  3708     case function_lint_to_udint :
       
  3709     {
       
  3710         symbol_c *last_type_symbol = NULL;
       
  3711 
       
  3712         {
       
  3713             identifier_c param_name("IN");
       
  3714             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3715             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3716             
       
  3717             /* Get the value from a foo(<param_value>) style call */
       
  3718             if (IN_param_value == NULL)
       
  3719               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3722             
       
  3723             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3724             {
       
  3725         
       
  3726                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3727                 s4o.print("(");
       
  3728                 return_type_symbol->accept(*this);
       
  3729                 s4o.print(")");
       
  3730                 IN_param_value->accept(*this);
       
  3731                 return NULL;
       
  3732                 
       
  3733             }
       
  3734             
       
  3735             ERROR;
       
  3736         }
       
  3737         
       
  3738     }/*function_lint_to_udint*/
       
  3739     break;
       
  3740 
       
  3741 /****
       
  3742  *LINT_TO_ULINT
       
  3743  */
       
  3744     case function_lint_to_ulint :
       
  3745     {
       
  3746         symbol_c *last_type_symbol = NULL;
       
  3747 
       
  3748         {
       
  3749             identifier_c param_name("IN");
       
  3750             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3751             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3752             
       
  3753             /* Get the value from a foo(<param_value>) style call */
       
  3754             if (IN_param_value == NULL)
       
  3755               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3758             
       
  3759             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3760             {
       
  3761         
       
  3762                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3763                 s4o.print("(");
       
  3764                 return_type_symbol->accept(*this);
       
  3765                 s4o.print(")");
       
  3766                 IN_param_value->accept(*this);
       
  3767                 return NULL;
       
  3768                 
       
  3769             }
       
  3770             
       
  3771             ERROR;
       
  3772         }
       
  3773         
       
  3774     }/*function_lint_to_ulint*/
       
  3775     break;
       
  3776 
       
  3777 /****
       
  3778  *LINT_TO_TIME
       
  3779  */
       
  3780     case function_lint_to_time :
       
  3781     {
       
  3782         symbol_c *last_type_symbol = NULL;
       
  3783 
       
  3784         {
       
  3785             identifier_c param_name("IN");
       
  3786             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3787             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3788             
       
  3789             /* Get the value from a foo(<param_value>) style call */
       
  3790             if (IN_param_value == NULL)
       
  3791               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3794             
       
  3795             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3796             {
       
  3797         
       
  3798                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3799                 s4o.print("(");
       
  3800                 return_type_symbol->accept(*this);
       
  3801                 s4o.print(")__int_to_time(");
       
  3802                 IN_param_value->accept(*this);
       
  3803                 s4o.print(")");
       
  3804                 return NULL;
       
  3805                 
       
  3806             }
       
  3807             
       
  3808             ERROR;
       
  3809         }
       
  3810         
       
  3811     }/*function_lint_to_time*/
       
  3812     break;
       
  3813 
       
  3814 /****
       
  3815  *LINT_TO_BOOL
       
  3816  */
       
  3817     case function_lint_to_bool :
       
  3818     {
       
  3819         symbol_c *last_type_symbol = NULL;
       
  3820 
       
  3821         {
       
  3822             identifier_c param_name("IN");
       
  3823             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3824             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3825             
       
  3826             /* Get the value from a foo(<param_value>) style call */
       
  3827             if (IN_param_value == NULL)
       
  3828               IN_param_value = function_call_param_iterator.next();
       
  3829             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3830             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3831             
       
  3832             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3833             {
       
  3834         
       
  3835                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3836                 s4o.print("(");
       
  3837                 return_type_symbol->accept(*this);
       
  3838                 s4o.print(")");
       
  3839                 IN_param_value->accept(*this);
       
  3840                 return NULL;
       
  3841                 
       
  3842             }
       
  3843             
       
  3844             ERROR;
       
  3845         }
       
  3846         
       
  3847     }/*function_lint_to_bool*/
       
  3848     break;
       
  3849 
       
  3850 /****
       
  3851  *LINT_TO_BYTE
       
  3852  */
       
  3853     case function_lint_to_byte :
       
  3854     {
       
  3855         symbol_c *last_type_symbol = NULL;
       
  3856 
       
  3857         {
       
  3858             identifier_c param_name("IN");
       
  3859             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3860             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3861             
       
  3862             /* Get the value from a foo(<param_value>) style call */
       
  3863             if (IN_param_value == NULL)
       
  3864               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  3867             
       
  3868             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3869             {
       
  3870         
       
  3871                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3872                 s4o.print("(");
       
  3873                 return_type_symbol->accept(*this);
       
  3874                 s4o.print(")");
       
  3875                 IN_param_value->accept(*this);
       
  3876                 return NULL;
       
  3877                 
       
  3878             }
       
  3879             
       
  3880             ERROR;
       
  3881         }
       
  3882         
       
  3883     }/*function_lint_to_byte*/
       
  3884     break;
       
  3885 
       
  3886 /****
       
  3887  *LINT_TO_WORD
       
  3888  */
       
  3889     case function_lint_to_word :
       
  3890     {
       
  3891         symbol_c *last_type_symbol = NULL;
       
  3892 
       
  3893         {
       
  3894             identifier_c param_name("IN");
       
  3895             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3896             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3897             
       
  3898             /* Get the value from a foo(<param_value>) style call */
       
  3899             if (IN_param_value == NULL)
       
  3900               IN_param_value = function_call_param_iterator.next();
       
  3901             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3902             last_type_symbol = last_type_symbol && search_expression_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             
       
  3904             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3905             {
       
  3906         
       
  3907                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3908                 s4o.print("(");
       
  3909                 return_type_symbol->accept(*this);
       
  3910                 s4o.print(")");
       
  3911                 IN_param_value->accept(*this);
       
  3912                 return NULL;
       
  3913                 
       
  3914             }
       
  3915             
       
  3916             ERROR;
       
  3917         }
       
  3918         
       
  3919     }/*function_lint_to_word*/
       
  3920     break;
       
  3921 
       
  3922 /****
       
  3923  *LINT_TO_DWORD
       
  3924  */
       
  3925     case function_lint_to_dword :
       
  3926     {
       
  3927         symbol_c *last_type_symbol = NULL;
       
  3928 
       
  3929         {
       
  3930             identifier_c param_name("IN");
       
  3931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3932             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3933             
       
  3934             /* Get the value from a foo(<param_value>) style call */
       
  3935             if (IN_param_value == NULL)
       
  3936               IN_param_value = function_call_param_iterator.next();
       
  3937             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3938             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3939             
       
  3940             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3941             {
       
  3942         
       
  3943                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3944                 s4o.print("(");
       
  3945                 return_type_symbol->accept(*this);
       
  3946                 s4o.print(")");
       
  3947                 IN_param_value->accept(*this);
       
  3948                 return NULL;
       
  3949                 
       
  3950             }
       
  3951             
       
  3952             ERROR;
       
  3953         }
       
  3954         
       
  3955     }/*function_lint_to_dword*/
       
  3956     break;
       
  3957 
       
  3958 /****
       
  3959  *LINT_TO_LWORD
       
  3960  */
       
  3961     case function_lint_to_lword :
       
  3962     {
       
  3963         symbol_c *last_type_symbol = NULL;
       
  3964 
       
  3965         {
       
  3966             identifier_c param_name("IN");
       
  3967             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3968             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3969             
       
  3970             /* Get the value from a foo(<param_value>) style call */
       
  3971             if (IN_param_value == NULL)
       
  3972               IN_param_value = function_call_param_iterator.next();
       
  3973             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3974             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3975             
       
  3976             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3977             {
       
  3978         
       
  3979                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3980                 s4o.print("(");
       
  3981                 return_type_symbol->accept(*this);
       
  3982                 s4o.print(")");
       
  3983                 IN_param_value->accept(*this);
       
  3984                 return NULL;
       
  3985                 
       
  3986             }
       
  3987             
       
  3988             ERROR;
       
  3989         }
       
  3990         
       
  3991     }/*function_lint_to_lword*/
       
  3992     break;
       
  3993 
       
  3994 /****
       
  3995  *LINT_TO_STRING
       
  3996  */
       
  3997     case function_lint_to_string :
       
  3998     {
       
  3999         symbol_c *last_type_symbol = NULL;
       
  4000 
       
  4001         {
       
  4002             identifier_c param_name("IN");
       
  4003             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4004             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4005             
       
  4006             /* Get the value from a foo(<param_value>) style call */
       
  4007             if (IN_param_value == NULL)
       
  4008               IN_param_value = function_call_param_iterator.next();
       
  4009             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4010             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4011             
       
  4012             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4013             {
       
  4014         
       
  4015                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4016                 s4o.print("(");
       
  4017                 return_type_symbol->accept(*this);
       
  4018                 s4o.print(")__sint_to_string(");
       
  4019                 IN_param_value->accept(*this);
       
  4020                 s4o.print(")");
       
  4021                 return NULL;
       
  4022                 
       
  4023             }
       
  4024             
       
  4025             ERROR;
       
  4026         }
       
  4027         
       
  4028     }/*function_lint_to_string*/
       
  4029     break;
       
  4030 
       
  4031 /****
       
  4032  *LINT_TO_DATE
       
  4033  */
       
  4034     case function_lint_to_date :
       
  4035     {
       
  4036         symbol_c *last_type_symbol = NULL;
       
  4037 
       
  4038         {
       
  4039             identifier_c param_name("IN");
       
  4040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4042             
       
  4043             /* Get the value from a foo(<param_value>) style call */
       
  4044             if (IN_param_value == NULL)
       
  4045               IN_param_value = function_call_param_iterator.next();
       
  4046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4048             
       
  4049             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4050             {
       
  4051         
       
  4052                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4053                 s4o.print("(");
       
  4054                 return_type_symbol->accept(*this);
       
  4055                 s4o.print(")__int_to_time(");
       
  4056                 IN_param_value->accept(*this);
       
  4057                 s4o.print(")");
       
  4058                 return NULL;
       
  4059                 
       
  4060             }
       
  4061             
       
  4062             ERROR;
       
  4063         }
       
  4064         
       
  4065     }/*function_lint_to_date*/
       
  4066     break;
       
  4067 
       
  4068 /****
       
  4069  *LINT_TO_TOD
       
  4070  */
       
  4071     case function_lint_to_tod :
       
  4072     {
       
  4073         symbol_c *last_type_symbol = NULL;
       
  4074 
       
  4075         {
       
  4076             identifier_c param_name("IN");
       
  4077             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4078             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4079             
       
  4080             /* Get the value from a foo(<param_value>) style call */
       
  4081             if (IN_param_value == NULL)
       
  4082               IN_param_value = function_call_param_iterator.next();
       
  4083             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4084             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4085             
       
  4086             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4087             {
       
  4088         
       
  4089                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4090                 s4o.print("(");
       
  4091                 return_type_symbol->accept(*this);
       
  4092                 s4o.print(")__int_to_time(");
       
  4093                 IN_param_value->accept(*this);
       
  4094                 s4o.print(")");
       
  4095                 return NULL;
       
  4096                 
       
  4097             }
       
  4098             
       
  4099             ERROR;
       
  4100         }
       
  4101         
       
  4102     }/*function_lint_to_tod*/
       
  4103     break;
       
  4104 
       
  4105 /****
       
  4106  *LINT_TO_DT
       
  4107  */
       
  4108     case function_lint_to_dt :
       
  4109     {
       
  4110         symbol_c *last_type_symbol = NULL;
       
  4111 
       
  4112         {
       
  4113             identifier_c param_name("IN");
       
  4114             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4115             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4116             
       
  4117             /* Get the value from a foo(<param_value>) style call */
       
  4118             if (IN_param_value == NULL)
       
  4119               IN_param_value = function_call_param_iterator.next();
       
  4120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4121             last_type_symbol = last_type_symbol && search_expression_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             
       
  4123             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  4124             {
       
  4125         
       
  4126                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4127                 s4o.print("(");
       
  4128                 return_type_symbol->accept(*this);
       
  4129                 s4o.print(")__int_to_time(");
       
  4130                 IN_param_value->accept(*this);
       
  4131                 s4o.print(")");
       
  4132                 return NULL;
       
  4133                 
       
  4134             }
       
  4135             
       
  4136             ERROR;
       
  4137         }
       
  4138         
       
  4139     }/*function_lint_to_dt*/
       
  4140     break;
       
  4141 
       
  4142 /****
       
  4143  *USINT_TO_REAL
       
  4144  */
       
  4145     case function_usint_to_real :
       
  4146     {
       
  4147         symbol_c *last_type_symbol = NULL;
       
  4148 
       
  4149         {
       
  4150             identifier_c param_name("IN");
       
  4151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4153             
       
  4154             /* Get the value from a foo(<param_value>) style call */
       
  4155             if (IN_param_value == NULL)
       
  4156               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4159             
       
  4160             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4161             {
       
  4162         
       
  4163                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4164                 s4o.print("(");
       
  4165                 return_type_symbol->accept(*this);
       
  4166                 s4o.print(")");
       
  4167                 IN_param_value->accept(*this);
       
  4168                 return NULL;
       
  4169                 
       
  4170             }
       
  4171             
       
  4172             ERROR;
       
  4173         }
       
  4174         
       
  4175     }/*function_usint_to_real*/
       
  4176     break;
       
  4177 
       
  4178 /****
       
  4179  *USINT_TO_LREAL
       
  4180  */
       
  4181     case function_usint_to_lreal :
       
  4182     {
       
  4183         symbol_c *last_type_symbol = NULL;
       
  4184 
       
  4185         {
       
  4186             identifier_c param_name("IN");
       
  4187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4189             
       
  4190             /* Get the value from a foo(<param_value>) style call */
       
  4191             if (IN_param_value == NULL)
       
  4192               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4195             
       
  4196             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4197             {
       
  4198         
       
  4199                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4200                 s4o.print("(");
       
  4201                 return_type_symbol->accept(*this);
       
  4202                 s4o.print(")");
       
  4203                 IN_param_value->accept(*this);
       
  4204                 return NULL;
       
  4205                 
       
  4206             }
       
  4207             
       
  4208             ERROR;
       
  4209         }
       
  4210         
       
  4211     }/*function_usint_to_lreal*/
       
  4212     break;
       
  4213 
       
  4214 /****
       
  4215  *USINT_TO_SINT
       
  4216  */
       
  4217     case function_usint_to_sint :
       
  4218     {
       
  4219         symbol_c *last_type_symbol = NULL;
       
  4220 
       
  4221         {
       
  4222             identifier_c param_name("IN");
       
  4223             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4225             
       
  4226             /* Get the value from a foo(<param_value>) style call */
       
  4227             if (IN_param_value == NULL)
       
  4228               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4231             
       
  4232             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4233             {
       
  4234         
       
  4235                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4236                 s4o.print("(");
       
  4237                 return_type_symbol->accept(*this);
       
  4238                 s4o.print(")");
       
  4239                 IN_param_value->accept(*this);
       
  4240                 return NULL;
       
  4241                 
       
  4242             }
       
  4243             
       
  4244             ERROR;
       
  4245         }
       
  4246         
       
  4247     }/*function_usint_to_sint*/
       
  4248     break;
       
  4249 
       
  4250 /****
       
  4251  *USINT_TO_INT
       
  4252  */
       
  4253     case function_usint_to_int :
       
  4254     {
       
  4255         symbol_c *last_type_symbol = NULL;
       
  4256 
       
  4257         {
       
  4258             identifier_c param_name("IN");
       
  4259             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4260             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4261             
       
  4262             /* Get the value from a foo(<param_value>) style call */
       
  4263             if (IN_param_value == NULL)
       
  4264               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4267             
       
  4268             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4269             {
       
  4270         
       
  4271                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4272                 s4o.print("(");
       
  4273                 return_type_symbol->accept(*this);
       
  4274                 s4o.print(")");
       
  4275                 IN_param_value->accept(*this);
       
  4276                 return NULL;
       
  4277                 
       
  4278             }
       
  4279             
       
  4280             ERROR;
       
  4281         }
       
  4282         
       
  4283     }/*function_usint_to_int*/
       
  4284     break;
       
  4285 
       
  4286 /****
       
  4287  *USINT_TO_DINT
       
  4288  */
       
  4289     case function_usint_to_dint :
       
  4290     {
       
  4291         symbol_c *last_type_symbol = NULL;
       
  4292 
       
  4293         {
       
  4294             identifier_c param_name("IN");
       
  4295             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4296             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4297             
       
  4298             /* Get the value from a foo(<param_value>) style call */
       
  4299             if (IN_param_value == NULL)
       
  4300               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4303             
       
  4304             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4305             {
       
  4306         
       
  4307                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4308                 s4o.print("(");
       
  4309                 return_type_symbol->accept(*this);
       
  4310                 s4o.print(")");
       
  4311                 IN_param_value->accept(*this);
       
  4312                 return NULL;
       
  4313                 
       
  4314             }
       
  4315             
       
  4316             ERROR;
       
  4317         }
       
  4318         
       
  4319     }/*function_usint_to_dint*/
       
  4320     break;
       
  4321 
       
  4322 /****
       
  4323  *USINT_TO_LINT
       
  4324  */
       
  4325     case function_usint_to_lint :
       
  4326     {
       
  4327         symbol_c *last_type_symbol = NULL;
       
  4328 
       
  4329         {
       
  4330             identifier_c param_name("IN");
       
  4331             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4332             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4333             
       
  4334             /* Get the value from a foo(<param_value>) style call */
       
  4335             if (IN_param_value == NULL)
       
  4336               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4339             
       
  4340             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4341             {
       
  4342         
       
  4343                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4344                 s4o.print("(");
       
  4345                 return_type_symbol->accept(*this);
       
  4346                 s4o.print(")");
       
  4347                 IN_param_value->accept(*this);
       
  4348                 return NULL;
       
  4349                 
       
  4350             }
       
  4351             
       
  4352             ERROR;
       
  4353         }
       
  4354         
       
  4355     }/*function_usint_to_lint*/
       
  4356     break;
       
  4357 
       
  4358 /****
       
  4359  *USINT_TO_UINT
       
  4360  */
       
  4361     case function_usint_to_uint :
       
  4362     {
       
  4363         symbol_c *last_type_symbol = NULL;
       
  4364 
       
  4365         {
       
  4366             identifier_c param_name("IN");
       
  4367             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4368             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4369             
       
  4370             /* Get the value from a foo(<param_value>) style call */
       
  4371             if (IN_param_value == NULL)
       
  4372               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4375             
       
  4376             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4377             {
       
  4378         
       
  4379                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4380                 s4o.print("(");
       
  4381                 return_type_symbol->accept(*this);
       
  4382                 s4o.print(")");
       
  4383                 IN_param_value->accept(*this);
       
  4384                 return NULL;
       
  4385                 
       
  4386             }
       
  4387             
       
  4388             ERROR;
       
  4389         }
       
  4390         
       
  4391     }/*function_usint_to_uint*/
       
  4392     break;
       
  4393 
       
  4394 /****
       
  4395  *USINT_TO_UDINT
       
  4396  */
       
  4397     case function_usint_to_udint :
       
  4398     {
       
  4399         symbol_c *last_type_symbol = NULL;
       
  4400 
       
  4401         {
       
  4402             identifier_c param_name("IN");
       
  4403             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4404             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4405             
       
  4406             /* Get the value from a foo(<param_value>) style call */
       
  4407             if (IN_param_value == NULL)
       
  4408               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4411             
       
  4412             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4413             {
       
  4414         
       
  4415                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4416                 s4o.print("(");
       
  4417                 return_type_symbol->accept(*this);
       
  4418                 s4o.print(")");
       
  4419                 IN_param_value->accept(*this);
       
  4420                 return NULL;
       
  4421                 
       
  4422             }
       
  4423             
       
  4424             ERROR;
       
  4425         }
       
  4426         
       
  4427     }/*function_usint_to_udint*/
       
  4428     break;
       
  4429 
       
  4430 /****
       
  4431  *USINT_TO_ULINT
       
  4432  */
       
  4433     case function_usint_to_ulint :
       
  4434     {
       
  4435         symbol_c *last_type_symbol = NULL;
       
  4436 
       
  4437         {
       
  4438             identifier_c param_name("IN");
       
  4439             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4440             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4441             
       
  4442             /* Get the value from a foo(<param_value>) style call */
       
  4443             if (IN_param_value == NULL)
       
  4444               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4447             
       
  4448             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4449             {
       
  4450         
       
  4451                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4452                 s4o.print("(");
       
  4453                 return_type_symbol->accept(*this);
       
  4454                 s4o.print(")");
       
  4455                 IN_param_value->accept(*this);
       
  4456                 return NULL;
       
  4457                 
       
  4458             }
       
  4459             
       
  4460             ERROR;
       
  4461         }
       
  4462         
       
  4463     }/*function_usint_to_ulint*/
       
  4464     break;
       
  4465 
       
  4466 /****
       
  4467  *USINT_TO_TIME
       
  4468  */
       
  4469     case function_usint_to_time :
       
  4470     {
       
  4471         symbol_c *last_type_symbol = NULL;
       
  4472 
       
  4473         {
       
  4474             identifier_c param_name("IN");
       
  4475             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4476             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4477             
       
  4478             /* Get the value from a foo(<param_value>) style call */
       
  4479             if (IN_param_value == NULL)
       
  4480               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4483             
       
  4484             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4485             {
       
  4486         
       
  4487                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4488                 s4o.print("(");
       
  4489                 return_type_symbol->accept(*this);
       
  4490                 s4o.print(")__int_to_time(");
       
  4491                 IN_param_value->accept(*this);
       
  4492                 s4o.print(")");
       
  4493                 return NULL;
       
  4494                 
       
  4495             }
       
  4496             
       
  4497             ERROR;
       
  4498         }
       
  4499         
       
  4500     }/*function_usint_to_time*/
       
  4501     break;
       
  4502 
       
  4503 /****
       
  4504  *USINT_TO_BOOL
       
  4505  */
       
  4506     case function_usint_to_bool :
       
  4507     {
       
  4508         symbol_c *last_type_symbol = NULL;
       
  4509 
       
  4510         {
       
  4511             identifier_c param_name("IN");
       
  4512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4514             
       
  4515             /* Get the value from a foo(<param_value>) style call */
       
  4516             if (IN_param_value == NULL)
       
  4517               IN_param_value = function_call_param_iterator.next();
       
  4518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4520             
       
  4521             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4522             {
       
  4523         
       
  4524                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4525                 s4o.print("(");
       
  4526                 return_type_symbol->accept(*this);
       
  4527                 s4o.print(")");
       
  4528                 IN_param_value->accept(*this);
       
  4529                 return NULL;
       
  4530                 
       
  4531             }
       
  4532             
       
  4533             ERROR;
       
  4534         }
       
  4535         
       
  4536     }/*function_usint_to_bool*/
       
  4537     break;
       
  4538 
       
  4539 /****
       
  4540  *USINT_TO_BYTE
       
  4541  */
       
  4542     case function_usint_to_byte :
       
  4543     {
       
  4544         symbol_c *last_type_symbol = NULL;
       
  4545 
       
  4546         {
       
  4547             identifier_c param_name("IN");
       
  4548             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4549             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4550             
       
  4551             /* Get the value from a foo(<param_value>) style call */
       
  4552             if (IN_param_value == NULL)
       
  4553               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4556             
       
  4557             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4558             {
       
  4559         
       
  4560                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4561                 s4o.print("(");
       
  4562                 return_type_symbol->accept(*this);
       
  4563                 s4o.print(")");
       
  4564                 IN_param_value->accept(*this);
       
  4565                 return NULL;
       
  4566                 
       
  4567             }
       
  4568             
       
  4569             ERROR;
       
  4570         }
       
  4571         
       
  4572     }/*function_usint_to_byte*/
       
  4573     break;
       
  4574 
       
  4575 /****
       
  4576  *USINT_TO_WORD
       
  4577  */
       
  4578     case function_usint_to_word :
       
  4579     {
       
  4580         symbol_c *last_type_symbol = NULL;
       
  4581 
       
  4582         {
       
  4583             identifier_c param_name("IN");
       
  4584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4586             
       
  4587             /* Get the value from a foo(<param_value>) style call */
       
  4588             if (IN_param_value == NULL)
       
  4589               IN_param_value = function_call_param_iterator.next();
       
  4590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4591             last_type_symbol = last_type_symbol && search_expression_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             
       
  4593             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4594             {
       
  4595         
       
  4596                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4597                 s4o.print("(");
       
  4598                 return_type_symbol->accept(*this);
       
  4599                 s4o.print(")");
       
  4600                 IN_param_value->accept(*this);
       
  4601                 return NULL;
       
  4602                 
       
  4603             }
       
  4604             
       
  4605             ERROR;
       
  4606         }
       
  4607         
       
  4608     }/*function_usint_to_word*/
       
  4609     break;
       
  4610 
       
  4611 /****
       
  4612  *USINT_TO_DWORD
       
  4613  */
       
  4614     case function_usint_to_dword :
       
  4615     {
       
  4616         symbol_c *last_type_symbol = NULL;
       
  4617 
       
  4618         {
       
  4619             identifier_c param_name("IN");
       
  4620             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4621             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4622             
       
  4623             /* Get the value from a foo(<param_value>) style call */
       
  4624             if (IN_param_value == NULL)
       
  4625               IN_param_value = function_call_param_iterator.next();
       
  4626             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4627             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4628             
       
  4629             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4630             {
       
  4631         
       
  4632                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4633                 s4o.print("(");
       
  4634                 return_type_symbol->accept(*this);
       
  4635                 s4o.print(")");
       
  4636                 IN_param_value->accept(*this);
       
  4637                 return NULL;
       
  4638                 
       
  4639             }
       
  4640             
       
  4641             ERROR;
       
  4642         }
       
  4643         
       
  4644     }/*function_usint_to_dword*/
       
  4645     break;
       
  4646 
       
  4647 /****
       
  4648  *USINT_TO_LWORD
       
  4649  */
       
  4650     case function_usint_to_lword :
       
  4651     {
       
  4652         symbol_c *last_type_symbol = NULL;
       
  4653 
       
  4654         {
       
  4655             identifier_c param_name("IN");
       
  4656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4658             
       
  4659             /* Get the value from a foo(<param_value>) style call */
       
  4660             if (IN_param_value == NULL)
       
  4661               IN_param_value = function_call_param_iterator.next();
       
  4662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4664             
       
  4665             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4666             {
       
  4667         
       
  4668                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4669                 s4o.print("(");
       
  4670                 return_type_symbol->accept(*this);
       
  4671                 s4o.print(")");
       
  4672                 IN_param_value->accept(*this);
       
  4673                 return NULL;
       
  4674                 
       
  4675             }
       
  4676             
       
  4677             ERROR;
       
  4678         }
       
  4679         
       
  4680     }/*function_usint_to_lword*/
       
  4681     break;
       
  4682 
       
  4683 /****
       
  4684  *USINT_TO_STRING
       
  4685  */
       
  4686     case function_usint_to_string :
       
  4687     {
       
  4688         symbol_c *last_type_symbol = NULL;
       
  4689 
       
  4690         {
       
  4691             identifier_c param_name("IN");
       
  4692             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4693             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4694             
       
  4695             /* Get the value from a foo(<param_value>) style call */
       
  4696             if (IN_param_value == NULL)
       
  4697               IN_param_value = function_call_param_iterator.next();
       
  4698             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4699             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4700             
       
  4701             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4702             {
       
  4703         
       
  4704                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4705                 s4o.print("(");
       
  4706                 return_type_symbol->accept(*this);
       
  4707                 s4o.print(")__uint_to_string(");
       
  4708                 IN_param_value->accept(*this);
       
  4709                 s4o.print(")");
       
  4710                 return NULL;
       
  4711                 
       
  4712             }
       
  4713             
       
  4714             ERROR;
       
  4715         }
       
  4716         
       
  4717     }/*function_usint_to_string*/
       
  4718     break;
       
  4719 
       
  4720 /****
       
  4721  *USINT_TO_DATE
       
  4722  */
       
  4723     case function_usint_to_date :
       
  4724     {
       
  4725         symbol_c *last_type_symbol = NULL;
       
  4726 
       
  4727         {
       
  4728             identifier_c param_name("IN");
       
  4729             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4730             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4731             
       
  4732             /* Get the value from a foo(<param_value>) style call */
       
  4733             if (IN_param_value == NULL)
       
  4734               IN_param_value = function_call_param_iterator.next();
       
  4735             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4736             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4737             
       
  4738             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4739             {
       
  4740         
       
  4741                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4742                 s4o.print("(");
       
  4743                 return_type_symbol->accept(*this);
       
  4744                 s4o.print(")__int_to_time(");
       
  4745                 IN_param_value->accept(*this);
       
  4746                 s4o.print(")");
       
  4747                 return NULL;
       
  4748                 
       
  4749             }
       
  4750             
       
  4751             ERROR;
       
  4752         }
       
  4753         
       
  4754     }/*function_usint_to_date*/
       
  4755     break;
       
  4756 
       
  4757 /****
       
  4758  *USINT_TO_TOD
       
  4759  */
       
  4760     case function_usint_to_tod :
       
  4761     {
       
  4762         symbol_c *last_type_symbol = NULL;
       
  4763 
       
  4764         {
       
  4765             identifier_c param_name("IN");
       
  4766             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4767             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4768             
       
  4769             /* Get the value from a foo(<param_value>) style call */
       
  4770             if (IN_param_value == NULL)
       
  4771               IN_param_value = function_call_param_iterator.next();
       
  4772             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4773             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4774             
       
  4775             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4776             {
       
  4777         
       
  4778                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4779                 s4o.print("(");
       
  4780                 return_type_symbol->accept(*this);
       
  4781                 s4o.print(")__int_to_time(");
       
  4782                 IN_param_value->accept(*this);
       
  4783                 s4o.print(")");
       
  4784                 return NULL;
       
  4785                 
       
  4786             }
       
  4787             
       
  4788             ERROR;
       
  4789         }
       
  4790         
       
  4791     }/*function_usint_to_tod*/
       
  4792     break;
       
  4793 
       
  4794 /****
       
  4795  *USINT_TO_DT
       
  4796  */
       
  4797     case function_usint_to_dt :
       
  4798     {
       
  4799         symbol_c *last_type_symbol = NULL;
       
  4800 
       
  4801         {
       
  4802             identifier_c param_name("IN");
       
  4803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4804             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4805             
       
  4806             /* Get the value from a foo(<param_value>) style call */
       
  4807             if (IN_param_value == NULL)
       
  4808               IN_param_value = function_call_param_iterator.next();
       
  4809             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4810             last_type_symbol = last_type_symbol && search_expression_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             
       
  4812             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4813             {
       
  4814         
       
  4815                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4816                 s4o.print("(");
       
  4817                 return_type_symbol->accept(*this);
       
  4818                 s4o.print(")__int_to_time(");
       
  4819                 IN_param_value->accept(*this);
       
  4820                 s4o.print(")");
       
  4821                 return NULL;
       
  4822                 
       
  4823             }
       
  4824             
       
  4825             ERROR;
       
  4826         }
       
  4827         
       
  4828     }/*function_usint_to_dt*/
       
  4829     break;
       
  4830 
       
  4831 /****
       
  4832  *UINT_TO_REAL
       
  4833  */
       
  4834     case function_uint_to_real :
       
  4835     {
       
  4836         symbol_c *last_type_symbol = NULL;
       
  4837 
       
  4838         {
       
  4839             identifier_c param_name("IN");
       
  4840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4842             
       
  4843             /* Get the value from a foo(<param_value>) style call */
       
  4844             if (IN_param_value == NULL)
       
  4845               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4848             
       
  4849             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4850             {
       
  4851         
       
  4852                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4853                 s4o.print("(");
       
  4854                 return_type_symbol->accept(*this);
       
  4855                 s4o.print(")");
       
  4856                 IN_param_value->accept(*this);
       
  4857                 return NULL;
       
  4858                 
       
  4859             }
       
  4860             
       
  4861             ERROR;
       
  4862         }
       
  4863         
       
  4864     }/*function_uint_to_real*/
       
  4865     break;
       
  4866 
       
  4867 /****
       
  4868  *UINT_TO_LREAL
       
  4869  */
       
  4870     case function_uint_to_lreal :
       
  4871     {
       
  4872         symbol_c *last_type_symbol = NULL;
       
  4873 
       
  4874         {
       
  4875             identifier_c param_name("IN");
       
  4876             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4877             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4878             
       
  4879             /* Get the value from a foo(<param_value>) style call */
       
  4880             if (IN_param_value == NULL)
       
  4881               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4884             
       
  4885             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4886             {
       
  4887         
       
  4888                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4889                 s4o.print("(");
       
  4890                 return_type_symbol->accept(*this);
       
  4891                 s4o.print(")");
       
  4892                 IN_param_value->accept(*this);
       
  4893                 return NULL;
       
  4894                 
       
  4895             }
       
  4896             
       
  4897             ERROR;
       
  4898         }
       
  4899         
       
  4900     }/*function_uint_to_lreal*/
       
  4901     break;
       
  4902 
       
  4903 /****
       
  4904  *UINT_TO_SINT
       
  4905  */
       
  4906     case function_uint_to_sint :
       
  4907     {
       
  4908         symbol_c *last_type_symbol = NULL;
       
  4909 
       
  4910         {
       
  4911             identifier_c param_name("IN");
       
  4912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4914             
       
  4915             /* Get the value from a foo(<param_value>) style call */
       
  4916             if (IN_param_value == NULL)
       
  4917               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4920             
       
  4921             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4922             {
       
  4923         
       
  4924                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4925                 s4o.print("(");
       
  4926                 return_type_symbol->accept(*this);
       
  4927                 s4o.print(")");
       
  4928                 IN_param_value->accept(*this);
       
  4929                 return NULL;
       
  4930                 
       
  4931             }
       
  4932             
       
  4933             ERROR;
       
  4934         }
       
  4935         
       
  4936     }/*function_uint_to_sint*/
       
  4937     break;
       
  4938 
       
  4939 /****
       
  4940  *UINT_TO_INT
       
  4941  */
       
  4942     case function_uint_to_int :
       
  4943     {
       
  4944         symbol_c *last_type_symbol = NULL;
       
  4945 
       
  4946         {
       
  4947             identifier_c param_name("IN");
       
  4948             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4949             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4950             
       
  4951             /* Get the value from a foo(<param_value>) style call */
       
  4952             if (IN_param_value == NULL)
       
  4953               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  4956             
       
  4957             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4958             {
       
  4959         
       
  4960                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4961                 s4o.print("(");
       
  4962                 return_type_symbol->accept(*this);
       
  4963                 s4o.print(")");
       
  4964                 IN_param_value->accept(*this);
       
  4965                 return NULL;
       
  4966                 
       
  4967             }
       
  4968             
       
  4969             ERROR;
       
  4970         }
       
  4971         
       
  4972     }/*function_uint_to_int*/
       
  4973     break;
       
  4974 
       
  4975 /****
       
  4976  *UINT_TO_DINT
       
  4977  */
       
  4978     case function_uint_to_dint :
       
  4979     {
       
  4980         symbol_c *last_type_symbol = NULL;
       
  4981 
       
  4982         {
       
  4983             identifier_c param_name("IN");
       
  4984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4986             
       
  4987             /* Get the value from a foo(<param_value>) style call */
       
  4988             if (IN_param_value == NULL)
       
  4989               IN_param_value = function_call_param_iterator.next();
       
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4992             
       
  4993             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4994             {
       
  4995         
       
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4997                 s4o.print("(");
       
  4998                 return_type_symbol->accept(*this);
       
  4999                 s4o.print(")");
       
  5000                 IN_param_value->accept(*this);
       
  5001                 return NULL;
       
  5002                 
       
  5003             }
       
  5004             
       
  5005             ERROR;
       
  5006         }
       
  5007         
       
  5008     }/*function_uint_to_dint*/
       
  5009     break;
       
  5010 
       
  5011 /****
       
  5012  *UINT_TO_LINT
       
  5013  */
       
  5014     case function_uint_to_lint :
       
  5015     {
       
  5016         symbol_c *last_type_symbol = NULL;
       
  5017 
       
  5018         {
       
  5019             identifier_c param_name("IN");
       
  5020             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5021             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5022             
       
  5023             /* Get the value from a foo(<param_value>) style call */
       
  5024             if (IN_param_value == NULL)
       
  5025               IN_param_value = function_call_param_iterator.next();
       
  5026             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5027             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5028             
       
  5029             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5030             {
       
  5031         
       
  5032                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5033                 s4o.print("(");
       
  5034                 return_type_symbol->accept(*this);
       
  5035                 s4o.print(")");
       
  5036                 IN_param_value->accept(*this);
       
  5037                 return NULL;
       
  5038                 
       
  5039             }
       
  5040             
       
  5041             ERROR;
       
  5042         }
       
  5043         
       
  5044     }/*function_uint_to_lint*/
       
  5045     break;
       
  5046 
       
  5047 /****
       
  5048  *UINT_TO_USINT
       
  5049  */
       
  5050     case function_uint_to_usint :
       
  5051     {
       
  5052         symbol_c *last_type_symbol = NULL;
       
  5053 
       
  5054         {
       
  5055             identifier_c param_name("IN");
       
  5056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5058             
       
  5059             /* Get the value from a foo(<param_value>) style call */
       
  5060             if (IN_param_value == NULL)
       
  5061               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5064             
       
  5065             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5066             {
       
  5067         
       
  5068                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5069                 s4o.print("(");
       
  5070                 return_type_symbol->accept(*this);
       
  5071                 s4o.print(")");
       
  5072                 IN_param_value->accept(*this);
       
  5073                 return NULL;
       
  5074                 
       
  5075             }
       
  5076             
       
  5077             ERROR;
       
  5078         }
       
  5079         
       
  5080     }/*function_uint_to_usint*/
       
  5081     break;
       
  5082 
       
  5083 /****
       
  5084  *UINT_TO_UDINT
       
  5085  */
       
  5086     case function_uint_to_udint :
       
  5087     {
       
  5088         symbol_c *last_type_symbol = NULL;
       
  5089 
       
  5090         {
       
  5091             identifier_c param_name("IN");
       
  5092             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5093             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5094             
       
  5095             /* Get the value from a foo(<param_value>) style call */
       
  5096             if (IN_param_value == NULL)
       
  5097               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5100             
       
  5101             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5102             {
       
  5103         
       
  5104                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5105                 s4o.print("(");
       
  5106                 return_type_symbol->accept(*this);
       
  5107                 s4o.print(")");
       
  5108                 IN_param_value->accept(*this);
       
  5109                 return NULL;
       
  5110                 
       
  5111             }
       
  5112             
       
  5113             ERROR;
       
  5114         }
       
  5115         
       
  5116     }/*function_uint_to_udint*/
       
  5117     break;
       
  5118 
       
  5119 /****
       
  5120  *UINT_TO_ULINT
       
  5121  */
       
  5122     case function_uint_to_ulint :
       
  5123     {
       
  5124         symbol_c *last_type_symbol = NULL;
       
  5125 
       
  5126         {
       
  5127             identifier_c param_name("IN");
       
  5128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5130             
       
  5131             /* Get the value from a foo(<param_value>) style call */
       
  5132             if (IN_param_value == NULL)
       
  5133               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5136             
       
  5137             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5138             {
       
  5139         
       
  5140                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5141                 s4o.print("(");
       
  5142                 return_type_symbol->accept(*this);
       
  5143                 s4o.print(")");
       
  5144                 IN_param_value->accept(*this);
       
  5145                 return NULL;
       
  5146                 
       
  5147             }
       
  5148             
       
  5149             ERROR;
       
  5150         }
       
  5151         
       
  5152     }/*function_uint_to_ulint*/
       
  5153     break;
       
  5154 
       
  5155 /****
       
  5156  *UINT_TO_TIME
       
  5157  */
       
  5158     case function_uint_to_time :
       
  5159     {
       
  5160         symbol_c *last_type_symbol = NULL;
       
  5161 
       
  5162         {
       
  5163             identifier_c param_name("IN");
       
  5164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5165             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5166             
       
  5167             /* Get the value from a foo(<param_value>) style call */
       
  5168             if (IN_param_value == NULL)
       
  5169               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5172             
       
  5173             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5174             {
       
  5175         
       
  5176                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5177                 s4o.print("(");
       
  5178                 return_type_symbol->accept(*this);
       
  5179                 s4o.print(")__int_to_time(");
       
  5180                 IN_param_value->accept(*this);
       
  5181                 s4o.print(")");
       
  5182                 return NULL;
       
  5183                 
       
  5184             }
       
  5185             
       
  5186             ERROR;
       
  5187         }
       
  5188         
       
  5189     }/*function_uint_to_time*/
       
  5190     break;
       
  5191 
       
  5192 /****
       
  5193  *UINT_TO_BOOL
       
  5194  */
       
  5195     case function_uint_to_bool :
       
  5196     {
       
  5197         symbol_c *last_type_symbol = NULL;
       
  5198 
       
  5199         {
       
  5200             identifier_c param_name("IN");
       
  5201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5202             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5203             
       
  5204             /* Get the value from a foo(<param_value>) style call */
       
  5205             if (IN_param_value == NULL)
       
  5206               IN_param_value = function_call_param_iterator.next();
       
  5207             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5208             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5209             
       
  5210             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5211             {
       
  5212         
       
  5213                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5214                 s4o.print("(");
       
  5215                 return_type_symbol->accept(*this);
       
  5216                 s4o.print(")");
       
  5217                 IN_param_value->accept(*this);
       
  5218                 return NULL;
       
  5219                 
       
  5220             }
       
  5221             
       
  5222             ERROR;
       
  5223         }
       
  5224         
       
  5225     }/*function_uint_to_bool*/
       
  5226     break;
       
  5227 
       
  5228 /****
       
  5229  *UINT_TO_BYTE
       
  5230  */
       
  5231     case function_uint_to_byte :
       
  5232     {
       
  5233         symbol_c *last_type_symbol = NULL;
       
  5234 
       
  5235         {
       
  5236             identifier_c param_name("IN");
       
  5237             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5238             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5239             
       
  5240             /* Get the value from a foo(<param_value>) style call */
       
  5241             if (IN_param_value == NULL)
       
  5242               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5245             
       
  5246             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5247             {
       
  5248         
       
  5249                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5250                 s4o.print("(");
       
  5251                 return_type_symbol->accept(*this);
       
  5252                 s4o.print(")");
       
  5253                 IN_param_value->accept(*this);
       
  5254                 return NULL;
       
  5255                 
       
  5256             }
       
  5257             
       
  5258             ERROR;
       
  5259         }
       
  5260         
       
  5261     }/*function_uint_to_byte*/
       
  5262     break;
       
  5263 
       
  5264 /****
       
  5265  *UINT_TO_WORD
       
  5266  */
       
  5267     case function_uint_to_word :
       
  5268     {
       
  5269         symbol_c *last_type_symbol = NULL;
       
  5270 
       
  5271         {
       
  5272             identifier_c param_name("IN");
       
  5273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5274             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5275             
       
  5276             /* Get the value from a foo(<param_value>) style call */
       
  5277             if (IN_param_value == NULL)
       
  5278               IN_param_value = function_call_param_iterator.next();
       
  5279             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5280             last_type_symbol = last_type_symbol && search_expression_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             
       
  5282             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5283             {
       
  5284         
       
  5285                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5286                 s4o.print("(");
       
  5287                 return_type_symbol->accept(*this);
       
  5288                 s4o.print(")");
       
  5289                 IN_param_value->accept(*this);
       
  5290                 return NULL;
       
  5291                 
       
  5292             }
       
  5293             
       
  5294             ERROR;
       
  5295         }
       
  5296         
       
  5297     }/*function_uint_to_word*/
       
  5298     break;
       
  5299 
       
  5300 /****
       
  5301  *UINT_TO_DWORD
       
  5302  */
       
  5303     case function_uint_to_dword :
       
  5304     {
       
  5305         symbol_c *last_type_symbol = NULL;
       
  5306 
       
  5307         {
       
  5308             identifier_c param_name("IN");
       
  5309             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5310             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5311             
       
  5312             /* Get the value from a foo(<param_value>) style call */
       
  5313             if (IN_param_value == NULL)
       
  5314               IN_param_value = function_call_param_iterator.next();
       
  5315             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5316             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5317             
       
  5318             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5319             {
       
  5320         
       
  5321                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5322                 s4o.print("(");
       
  5323                 return_type_symbol->accept(*this);
       
  5324                 s4o.print(")");
       
  5325                 IN_param_value->accept(*this);
       
  5326                 return NULL;
       
  5327                 
       
  5328             }
       
  5329             
       
  5330             ERROR;
       
  5331         }
       
  5332         
       
  5333     }/*function_uint_to_dword*/
       
  5334     break;
       
  5335 
       
  5336 /****
       
  5337  *UINT_TO_LWORD
       
  5338  */
       
  5339     case function_uint_to_lword :
       
  5340     {
       
  5341         symbol_c *last_type_symbol = NULL;
       
  5342 
       
  5343         {
       
  5344             identifier_c param_name("IN");
       
  5345             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5346             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5347             
       
  5348             /* Get the value from a foo(<param_value>) style call */
       
  5349             if (IN_param_value == NULL)
       
  5350               IN_param_value = function_call_param_iterator.next();
       
  5351             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5352             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5353             
       
  5354             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5355             {
       
  5356         
       
  5357                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5358                 s4o.print("(");
       
  5359                 return_type_symbol->accept(*this);
       
  5360                 s4o.print(")");
       
  5361                 IN_param_value->accept(*this);
       
  5362                 return NULL;
       
  5363                 
       
  5364             }
       
  5365             
       
  5366             ERROR;
       
  5367         }
       
  5368         
       
  5369     }/*function_uint_to_lword*/
       
  5370     break;
       
  5371 
       
  5372 /****
       
  5373  *UINT_TO_STRING
       
  5374  */
       
  5375     case function_uint_to_string :
       
  5376     {
       
  5377         symbol_c *last_type_symbol = NULL;
       
  5378 
       
  5379         {
       
  5380             identifier_c param_name("IN");
       
  5381             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5382             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5383             
       
  5384             /* Get the value from a foo(<param_value>) style call */
       
  5385             if (IN_param_value == NULL)
       
  5386               IN_param_value = function_call_param_iterator.next();
       
  5387             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5388             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5389             
       
  5390             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5391             {
       
  5392         
       
  5393                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5394                 s4o.print("(");
       
  5395                 return_type_symbol->accept(*this);
       
  5396                 s4o.print(")__uint_to_string(");
       
  5397                 IN_param_value->accept(*this);
       
  5398                 s4o.print(")");
       
  5399                 return NULL;
       
  5400                 
       
  5401             }
       
  5402             
       
  5403             ERROR;
       
  5404         }
       
  5405         
       
  5406     }/*function_uint_to_string*/
       
  5407     break;
       
  5408 
       
  5409 /****
       
  5410  *UINT_TO_DATE
       
  5411  */
       
  5412     case function_uint_to_date :
       
  5413     {
       
  5414         symbol_c *last_type_symbol = NULL;
       
  5415 
       
  5416         {
       
  5417             identifier_c param_name("IN");
       
  5418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5419             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5420             
       
  5421             /* Get the value from a foo(<param_value>) style call */
       
  5422             if (IN_param_value == NULL)
       
  5423               IN_param_value = function_call_param_iterator.next();
       
  5424             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5425             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5426             
       
  5427             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5428             {
       
  5429         
       
  5430                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5431                 s4o.print("(");
       
  5432                 return_type_symbol->accept(*this);
       
  5433                 s4o.print(")__int_to_time(");
       
  5434                 IN_param_value->accept(*this);
       
  5435                 s4o.print(")");
       
  5436                 return NULL;
       
  5437                 
       
  5438             }
       
  5439             
       
  5440             ERROR;
       
  5441         }
       
  5442         
       
  5443     }/*function_uint_to_date*/
       
  5444     break;
       
  5445 
       
  5446 /****
       
  5447  *UINT_TO_TOD
       
  5448  */
       
  5449     case function_uint_to_tod :
       
  5450     {
       
  5451         symbol_c *last_type_symbol = NULL;
       
  5452 
       
  5453         {
       
  5454             identifier_c param_name("IN");
       
  5455             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5457             
       
  5458             /* Get the value from a foo(<param_value>) style call */
       
  5459             if (IN_param_value == NULL)
       
  5460               IN_param_value = function_call_param_iterator.next();
       
  5461             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5462             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5463             
       
  5464             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5465             {
       
  5466         
       
  5467                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5468                 s4o.print("(");
       
  5469                 return_type_symbol->accept(*this);
       
  5470                 s4o.print(")__int_to_time(");
       
  5471                 IN_param_value->accept(*this);
       
  5472                 s4o.print(")");
       
  5473                 return NULL;
       
  5474                 
       
  5475             }
       
  5476             
       
  5477             ERROR;
       
  5478         }
       
  5479         
       
  5480     }/*function_uint_to_tod*/
       
  5481     break;
       
  5482 
       
  5483 /****
       
  5484  *UINT_TO_DT
       
  5485  */
       
  5486     case function_uint_to_dt :
       
  5487     {
       
  5488         symbol_c *last_type_symbol = NULL;
       
  5489 
       
  5490         {
       
  5491             identifier_c param_name("IN");
       
  5492             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5493             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5494             
       
  5495             /* Get the value from a foo(<param_value>) style call */
       
  5496             if (IN_param_value == NULL)
       
  5497               IN_param_value = function_call_param_iterator.next();
       
  5498             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5499             last_type_symbol = last_type_symbol && search_expression_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             
       
  5501             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5502             {
       
  5503         
       
  5504                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5505                 s4o.print("(");
       
  5506                 return_type_symbol->accept(*this);
       
  5507                 s4o.print(")__int_to_time(");
       
  5508                 IN_param_value->accept(*this);
       
  5509                 s4o.print(")");
       
  5510                 return NULL;
       
  5511                 
       
  5512             }
       
  5513             
       
  5514             ERROR;
       
  5515         }
       
  5516         
       
  5517     }/*function_uint_to_dt*/
       
  5518     break;
       
  5519 
       
  5520 /****
       
  5521  *UDINT_TO_REAL
       
  5522  */
       
  5523     case function_udint_to_real :
       
  5524     {
       
  5525         symbol_c *last_type_symbol = NULL;
       
  5526 
       
  5527         {
       
  5528             identifier_c param_name("IN");
       
  5529             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5530             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5531             
       
  5532             /* Get the value from a foo(<param_value>) style call */
       
  5533             if (IN_param_value == NULL)
       
  5534               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5537             
       
  5538             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5539             {
       
  5540         
       
  5541                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5542                 s4o.print("(");
       
  5543                 return_type_symbol->accept(*this);
       
  5544                 s4o.print(")");
       
  5545                 IN_param_value->accept(*this);
       
  5546                 return NULL;
       
  5547                 
       
  5548             }
       
  5549             
       
  5550             ERROR;
       
  5551         }
       
  5552         
       
  5553     }/*function_udint_to_real*/
       
  5554     break;
       
  5555 
       
  5556 /****
       
  5557  *UDINT_TO_LREAL
       
  5558  */
       
  5559     case function_udint_to_lreal :
       
  5560     {
       
  5561         symbol_c *last_type_symbol = NULL;
       
  5562 
       
  5563         {
       
  5564             identifier_c param_name("IN");
       
  5565             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5566             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5567             
       
  5568             /* Get the value from a foo(<param_value>) style call */
       
  5569             if (IN_param_value == NULL)
       
  5570               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5573             
       
  5574             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5575             {
       
  5576         
       
  5577                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5578                 s4o.print("(");
       
  5579                 return_type_symbol->accept(*this);
       
  5580                 s4o.print(")");
       
  5581                 IN_param_value->accept(*this);
       
  5582                 return NULL;
       
  5583                 
       
  5584             }
       
  5585             
       
  5586             ERROR;
       
  5587         }
       
  5588         
       
  5589     }/*function_udint_to_lreal*/
       
  5590     break;
       
  5591 
       
  5592 /****
       
  5593  *UDINT_TO_SINT
       
  5594  */
       
  5595     case function_udint_to_sint :
       
  5596     {
       
  5597         symbol_c *last_type_symbol = NULL;
       
  5598 
       
  5599         {
       
  5600             identifier_c param_name("IN");
       
  5601             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5602             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5603             
       
  5604             /* Get the value from a foo(<param_value>) style call */
       
  5605             if (IN_param_value == NULL)
       
  5606               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5609             
       
  5610             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5611             {
       
  5612         
       
  5613                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5614                 s4o.print("(");
       
  5615                 return_type_symbol->accept(*this);
       
  5616                 s4o.print(")");
       
  5617                 IN_param_value->accept(*this);
       
  5618                 return NULL;
       
  5619                 
       
  5620             }
       
  5621             
       
  5622             ERROR;
       
  5623         }
       
  5624         
       
  5625     }/*function_udint_to_sint*/
       
  5626     break;
       
  5627 
       
  5628 /****
       
  5629  *UDINT_TO_INT
       
  5630  */
       
  5631     case function_udint_to_int :
       
  5632     {
       
  5633         symbol_c *last_type_symbol = NULL;
       
  5634 
       
  5635         {
       
  5636             identifier_c param_name("IN");
       
  5637             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5638             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5639             
       
  5640             /* Get the value from a foo(<param_value>) style call */
       
  5641             if (IN_param_value == NULL)
       
  5642               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5645             
       
  5646             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5647             {
       
  5648         
       
  5649                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5650                 s4o.print("(");
       
  5651                 return_type_symbol->accept(*this);
       
  5652                 s4o.print(")");
       
  5653                 IN_param_value->accept(*this);
       
  5654                 return NULL;
       
  5655                 
       
  5656             }
       
  5657             
       
  5658             ERROR;
       
  5659         }
       
  5660         
       
  5661     }/*function_udint_to_int*/
       
  5662     break;
       
  5663 
       
  5664 /****
       
  5665  *UDINT_TO_DINT
       
  5666  */
       
  5667     case function_udint_to_dint :
       
  5668     {
       
  5669         symbol_c *last_type_symbol = NULL;
       
  5670 
       
  5671         {
       
  5672             identifier_c param_name("IN");
       
  5673             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5674             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5675             
       
  5676             /* Get the value from a foo(<param_value>) style call */
       
  5677             if (IN_param_value == NULL)
       
  5678               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5681             
       
  5682             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5683             {
       
  5684         
       
  5685                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5686                 s4o.print("(");
       
  5687                 return_type_symbol->accept(*this);
       
  5688                 s4o.print(")");
       
  5689                 IN_param_value->accept(*this);
       
  5690                 return NULL;
       
  5691                 
       
  5692             }
       
  5693             
       
  5694             ERROR;
       
  5695         }
       
  5696         
       
  5697     }/*function_udint_to_dint*/
       
  5698     break;
       
  5699 
       
  5700 /****
       
  5701  *UDINT_TO_LINT
       
  5702  */
       
  5703     case function_udint_to_lint :
       
  5704     {
       
  5705         symbol_c *last_type_symbol = NULL;
       
  5706 
       
  5707         {
       
  5708             identifier_c param_name("IN");
       
  5709             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5710             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5711             
       
  5712             /* Get the value from a foo(<param_value>) style call */
       
  5713             if (IN_param_value == NULL)
       
  5714               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5717             
       
  5718             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5719             {
       
  5720         
       
  5721                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5722                 s4o.print("(");
       
  5723                 return_type_symbol->accept(*this);
       
  5724                 s4o.print(")");
       
  5725                 IN_param_value->accept(*this);
       
  5726                 return NULL;
       
  5727                 
       
  5728             }
       
  5729             
       
  5730             ERROR;
       
  5731         }
       
  5732         
       
  5733     }/*function_udint_to_lint*/
       
  5734     break;
       
  5735 
       
  5736 /****
       
  5737  *UDINT_TO_USINT
       
  5738  */
       
  5739     case function_udint_to_usint :
       
  5740     {
       
  5741         symbol_c *last_type_symbol = NULL;
       
  5742 
       
  5743         {
       
  5744             identifier_c param_name("IN");
       
  5745             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5746             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5747             
       
  5748             /* Get the value from a foo(<param_value>) style call */
       
  5749             if (IN_param_value == NULL)
       
  5750               IN_param_value = function_call_param_iterator.next();
       
  5751             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5752             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5753             
       
  5754             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5755             {
       
  5756         
       
  5757                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5758                 s4o.print("(");
       
  5759                 return_type_symbol->accept(*this);
       
  5760                 s4o.print(")");
       
  5761                 IN_param_value->accept(*this);
       
  5762                 return NULL;
       
  5763                 
       
  5764             }
       
  5765             
       
  5766             ERROR;
       
  5767         }
       
  5768         
       
  5769     }/*function_udint_to_usint*/
       
  5770     break;
       
  5771 
       
  5772 /****
       
  5773  *UDINT_TO_UINT
       
  5774  */
       
  5775     case function_udint_to_uint :
       
  5776     {
       
  5777         symbol_c *last_type_symbol = NULL;
       
  5778 
       
  5779         {
       
  5780             identifier_c param_name("IN");
       
  5781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5782             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5783             
       
  5784             /* Get the value from a foo(<param_value>) style call */
       
  5785             if (IN_param_value == NULL)
       
  5786               IN_param_value = function_call_param_iterator.next();
       
  5787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5788             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5789             
       
  5790             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5791             {
       
  5792         
       
  5793                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5794                 s4o.print("(");
       
  5795                 return_type_symbol->accept(*this);
       
  5796                 s4o.print(")");
       
  5797                 IN_param_value->accept(*this);
       
  5798                 return NULL;
       
  5799                 
       
  5800             }
       
  5801             
       
  5802             ERROR;
       
  5803         }
       
  5804         
       
  5805     }/*function_udint_to_uint*/
       
  5806     break;
       
  5807 
       
  5808 /****
       
  5809  *UDINT_TO_ULINT
       
  5810  */
       
  5811     case function_udint_to_ulint :
       
  5812     {
       
  5813         symbol_c *last_type_symbol = NULL;
       
  5814 
       
  5815         {
       
  5816             identifier_c param_name("IN");
       
  5817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5819             
       
  5820             /* Get the value from a foo(<param_value>) style call */
       
  5821             if (IN_param_value == NULL)
       
  5822               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5825             
       
  5826             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5827             {
       
  5828         
       
  5829                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5830                 s4o.print("(");
       
  5831                 return_type_symbol->accept(*this);
       
  5832                 s4o.print(")");
       
  5833                 IN_param_value->accept(*this);
       
  5834                 return NULL;
       
  5835                 
       
  5836             }
       
  5837             
       
  5838             ERROR;
       
  5839         }
       
  5840         
       
  5841     }/*function_udint_to_ulint*/
       
  5842     break;
       
  5843 
       
  5844 /****
       
  5845  *UDINT_TO_TIME
       
  5846  */
       
  5847     case function_udint_to_time :
       
  5848     {
       
  5849         symbol_c *last_type_symbol = NULL;
       
  5850 
       
  5851         {
       
  5852             identifier_c param_name("IN");
       
  5853             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5854             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5855             
       
  5856             /* Get the value from a foo(<param_value>) style call */
       
  5857             if (IN_param_value == NULL)
       
  5858               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5861             
       
  5862             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5863             {
       
  5864         
       
  5865                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5866                 s4o.print("(");
       
  5867                 return_type_symbol->accept(*this);
       
  5868                 s4o.print(")__int_to_time(");
       
  5869                 IN_param_value->accept(*this);
       
  5870                 s4o.print(")");
       
  5871                 return NULL;
       
  5872                 
       
  5873             }
       
  5874             
       
  5875             ERROR;
       
  5876         }
       
  5877         
       
  5878     }/*function_udint_to_time*/
       
  5879     break;
       
  5880 
       
  5881 /****
       
  5882  *UDINT_TO_BOOL
       
  5883  */
       
  5884     case function_udint_to_bool :
       
  5885     {
       
  5886         symbol_c *last_type_symbol = NULL;
       
  5887 
       
  5888         {
       
  5889             identifier_c param_name("IN");
       
  5890             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5891             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5892             
       
  5893             /* Get the value from a foo(<param_value>) style call */
       
  5894             if (IN_param_value == NULL)
       
  5895               IN_param_value = function_call_param_iterator.next();
       
  5896             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5897             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5898             
       
  5899             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5900             {
       
  5901         
       
  5902                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5903                 s4o.print("(");
       
  5904                 return_type_symbol->accept(*this);
       
  5905                 s4o.print(")");
       
  5906                 IN_param_value->accept(*this);
       
  5907                 return NULL;
       
  5908                 
       
  5909             }
       
  5910             
       
  5911             ERROR;
       
  5912         }
       
  5913         
       
  5914     }/*function_udint_to_bool*/
       
  5915     break;
       
  5916 
       
  5917 /****
       
  5918  *UDINT_TO_BYTE
       
  5919  */
       
  5920     case function_udint_to_byte :
       
  5921     {
       
  5922         symbol_c *last_type_symbol = NULL;
       
  5923 
       
  5924         {
       
  5925             identifier_c param_name("IN");
       
  5926             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5927             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5928             
       
  5929             /* Get the value from a foo(<param_value>) style call */
       
  5930             if (IN_param_value == NULL)
       
  5931               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  5934             
       
  5935             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5936             {
       
  5937         
       
  5938                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5939                 s4o.print("(");
       
  5940                 return_type_symbol->accept(*this);
       
  5941                 s4o.print(")");
       
  5942                 IN_param_value->accept(*this);
       
  5943                 return NULL;
       
  5944                 
       
  5945             }
       
  5946             
       
  5947             ERROR;
       
  5948         }
       
  5949         
       
  5950     }/*function_udint_to_byte*/
       
  5951     break;
       
  5952 
       
  5953 /****
       
  5954  *UDINT_TO_WORD
       
  5955  */
       
  5956     case function_udint_to_word :
       
  5957     {
       
  5958         symbol_c *last_type_symbol = NULL;
       
  5959 
       
  5960         {
       
  5961             identifier_c param_name("IN");
       
  5962             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5963             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5964             
       
  5965             /* Get the value from a foo(<param_value>) style call */
       
  5966             if (IN_param_value == NULL)
       
  5967               IN_param_value = function_call_param_iterator.next();
       
  5968             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5969             last_type_symbol = last_type_symbol && search_expression_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             
       
  5971             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5972             {
       
  5973         
       
  5974                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5975                 s4o.print("(");
       
  5976                 return_type_symbol->accept(*this);
       
  5977                 s4o.print(")");
       
  5978                 IN_param_value->accept(*this);
       
  5979                 return NULL;
       
  5980                 
       
  5981             }
       
  5982             
       
  5983             ERROR;
       
  5984         }
       
  5985         
       
  5986     }/*function_udint_to_word*/
       
  5987     break;
       
  5988 
       
  5989 /****
       
  5990  *UDINT_TO_DWORD
       
  5991  */
       
  5992     case function_udint_to_dword :
       
  5993     {
       
  5994         symbol_c *last_type_symbol = NULL;
       
  5995 
       
  5996         {
       
  5997             identifier_c param_name("IN");
       
  5998             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5999             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6000             
       
  6001             /* Get the value from a foo(<param_value>) style call */
       
  6002             if (IN_param_value == NULL)
       
  6003               IN_param_value = function_call_param_iterator.next();
       
  6004             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6005             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6006             
       
  6007             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6008             {
       
  6009         
       
  6010                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6011                 s4o.print("(");
       
  6012                 return_type_symbol->accept(*this);
       
  6013                 s4o.print(")");
       
  6014                 IN_param_value->accept(*this);
       
  6015                 return NULL;
       
  6016                 
       
  6017             }
       
  6018             
       
  6019             ERROR;
       
  6020         }
       
  6021         
       
  6022     }/*function_udint_to_dword*/
       
  6023     break;
       
  6024 
       
  6025 /****
       
  6026  *UDINT_TO_LWORD
       
  6027  */
       
  6028     case function_udint_to_lword :
       
  6029     {
       
  6030         symbol_c *last_type_symbol = NULL;
       
  6031 
       
  6032         {
       
  6033             identifier_c param_name("IN");
       
  6034             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6035             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6036             
       
  6037             /* Get the value from a foo(<param_value>) style call */
       
  6038             if (IN_param_value == NULL)
       
  6039               IN_param_value = function_call_param_iterator.next();
       
  6040             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6041             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6042             
       
  6043             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6044             {
       
  6045         
       
  6046                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6047                 s4o.print("(");
       
  6048                 return_type_symbol->accept(*this);
       
  6049                 s4o.print(")");
       
  6050                 IN_param_value->accept(*this);
       
  6051                 return NULL;
       
  6052                 
       
  6053             }
       
  6054             
       
  6055             ERROR;
       
  6056         }
       
  6057         
       
  6058     }/*function_udint_to_lword*/
       
  6059     break;
       
  6060 
       
  6061 /****
       
  6062  *UDINT_TO_STRING
       
  6063  */
       
  6064     case function_udint_to_string :
       
  6065     {
       
  6066         symbol_c *last_type_symbol = NULL;
       
  6067 
       
  6068         {
       
  6069             identifier_c param_name("IN");
       
  6070             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6071             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6072             
       
  6073             /* Get the value from a foo(<param_value>) style call */
       
  6074             if (IN_param_value == NULL)
       
  6075               IN_param_value = function_call_param_iterator.next();
       
  6076             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6077             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6078             
       
  6079             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6080             {
       
  6081         
       
  6082                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6083                 s4o.print("(");
       
  6084                 return_type_symbol->accept(*this);
       
  6085                 s4o.print(")__uint_to_string(");
       
  6086                 IN_param_value->accept(*this);
       
  6087                 s4o.print(")");
       
  6088                 return NULL;
       
  6089                 
       
  6090             }
       
  6091             
       
  6092             ERROR;
       
  6093         }
       
  6094         
       
  6095     }/*function_udint_to_string*/
       
  6096     break;
       
  6097 
       
  6098 /****
       
  6099  *UDINT_TO_DATE
       
  6100  */
       
  6101     case function_udint_to_date :
       
  6102     {
       
  6103         symbol_c *last_type_symbol = NULL;
       
  6104 
       
  6105         {
       
  6106             identifier_c param_name("IN");
       
  6107             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6108             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6109             
       
  6110             /* Get the value from a foo(<param_value>) style call */
       
  6111             if (IN_param_value == NULL)
       
  6112               IN_param_value = function_call_param_iterator.next();
       
  6113             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6114             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6115             
       
  6116             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6117             {
       
  6118         
       
  6119                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6120                 s4o.print("(");
       
  6121                 return_type_symbol->accept(*this);
       
  6122                 s4o.print(")__int_to_time(");
       
  6123                 IN_param_value->accept(*this);
       
  6124                 s4o.print(")");
       
  6125                 return NULL;
       
  6126                 
       
  6127             }
       
  6128             
       
  6129             ERROR;
       
  6130         }
       
  6131         
       
  6132     }/*function_udint_to_date*/
       
  6133     break;
       
  6134 
       
  6135 /****
       
  6136  *UDINT_TO_TOD
       
  6137  */
       
  6138     case function_udint_to_tod :
       
  6139     {
       
  6140         symbol_c *last_type_symbol = NULL;
       
  6141 
       
  6142         {
       
  6143             identifier_c param_name("IN");
       
  6144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6146             
       
  6147             /* Get the value from a foo(<param_value>) style call */
       
  6148             if (IN_param_value == NULL)
       
  6149               IN_param_value = function_call_param_iterator.next();
       
  6150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6152             
       
  6153             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6154             {
       
  6155         
       
  6156                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6157                 s4o.print("(");
       
  6158                 return_type_symbol->accept(*this);
       
  6159                 s4o.print(")__int_to_time(");
       
  6160                 IN_param_value->accept(*this);
       
  6161                 s4o.print(")");
       
  6162                 return NULL;
       
  6163                 
       
  6164             }
       
  6165             
       
  6166             ERROR;
       
  6167         }
       
  6168         
       
  6169     }/*function_udint_to_tod*/
       
  6170     break;
       
  6171 
       
  6172 /****
       
  6173  *UDINT_TO_DT
       
  6174  */
       
  6175     case function_udint_to_dt :
       
  6176     {
       
  6177         symbol_c *last_type_symbol = NULL;
       
  6178 
       
  6179         {
       
  6180             identifier_c param_name("IN");
       
  6181             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6182             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6183             
       
  6184             /* Get the value from a foo(<param_value>) style call */
       
  6185             if (IN_param_value == NULL)
       
  6186               IN_param_value = function_call_param_iterator.next();
       
  6187             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6188             last_type_symbol = last_type_symbol && search_expression_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             
       
  6190             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  6191             {
       
  6192         
       
  6193                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6194                 s4o.print("(");
       
  6195                 return_type_symbol->accept(*this);
       
  6196                 s4o.print(")__int_to_time(");
       
  6197                 IN_param_value->accept(*this);
       
  6198                 s4o.print(")");
       
  6199                 return NULL;
       
  6200                 
       
  6201             }
       
  6202             
       
  6203             ERROR;
       
  6204         }
       
  6205         
       
  6206     }/*function_udint_to_dt*/
       
  6207     break;
       
  6208 
       
  6209 /****
       
  6210  *ULINT_TO_REAL
       
  6211  */
       
  6212     case function_ulint_to_real :
       
  6213     {
       
  6214         symbol_c *last_type_symbol = NULL;
       
  6215 
       
  6216         {
       
  6217             identifier_c param_name("IN");
       
  6218             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6219             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6220             
       
  6221             /* Get the value from a foo(<param_value>) style call */
       
  6222             if (IN_param_value == NULL)
       
  6223               IN_param_value = function_call_param_iterator.next();
       
  6224             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6225             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6226             
       
  6227             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6228             {
       
  6229         
       
  6230                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6231                 s4o.print("(");
       
  6232                 return_type_symbol->accept(*this);
       
  6233                 s4o.print(")");
       
  6234                 IN_param_value->accept(*this);
       
  6235                 return NULL;
       
  6236                 
       
  6237             }
       
  6238             
       
  6239             ERROR;
       
  6240         }
       
  6241         
       
  6242     }/*function_ulint_to_real*/
       
  6243     break;
       
  6244 
       
  6245 /****
       
  6246  *ULINT_TO_LREAL
       
  6247  */
       
  6248     case function_ulint_to_lreal :
       
  6249     {
       
  6250         symbol_c *last_type_symbol = NULL;
       
  6251 
       
  6252         {
       
  6253             identifier_c param_name("IN");
       
  6254             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6255             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6256             
       
  6257             /* Get the value from a foo(<param_value>) style call */
       
  6258             if (IN_param_value == NULL)
       
  6259               IN_param_value = function_call_param_iterator.next();
       
  6260             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6261             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6262             
       
  6263             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6264             {
       
  6265         
       
  6266                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6267                 s4o.print("(");
       
  6268                 return_type_symbol->accept(*this);
       
  6269                 s4o.print(")");
       
  6270                 IN_param_value->accept(*this);
       
  6271                 return NULL;
       
  6272                 
       
  6273             }
       
  6274             
       
  6275             ERROR;
       
  6276         }
       
  6277         
       
  6278     }/*function_ulint_to_lreal*/
       
  6279     break;
       
  6280 
       
  6281 /****
       
  6282  *ULINT_TO_SINT
       
  6283  */
       
  6284     case function_ulint_to_sint :
       
  6285     {
       
  6286         symbol_c *last_type_symbol = NULL;
       
  6287 
       
  6288         {
       
  6289             identifier_c param_name("IN");
       
  6290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6291             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6292             
       
  6293             /* Get the value from a foo(<param_value>) style call */
       
  6294             if (IN_param_value == NULL)
       
  6295               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6298             
       
  6299             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6300             {
       
  6301         
       
  6302                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6303                 s4o.print("(");
       
  6304                 return_type_symbol->accept(*this);
       
  6305                 s4o.print(")");
       
  6306                 IN_param_value->accept(*this);
       
  6307                 return NULL;
       
  6308                 
       
  6309             }
       
  6310             
       
  6311             ERROR;
       
  6312         }
       
  6313         
       
  6314     }/*function_ulint_to_sint*/
       
  6315     break;
       
  6316 
       
  6317 /****
       
  6318  *ULINT_TO_INT
       
  6319  */
       
  6320     case function_ulint_to_int :
       
  6321     {
       
  6322         symbol_c *last_type_symbol = NULL;
       
  6323 
       
  6324         {
       
  6325             identifier_c param_name("IN");
       
  6326             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6327             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6328             
       
  6329             /* Get the value from a foo(<param_value>) style call */
       
  6330             if (IN_param_value == NULL)
       
  6331               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6334             
       
  6335             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6336             {
       
  6337         
       
  6338                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6339                 s4o.print("(");
       
  6340                 return_type_symbol->accept(*this);
       
  6341                 s4o.print(")");
       
  6342                 IN_param_value->accept(*this);
       
  6343                 return NULL;
       
  6344                 
       
  6345             }
       
  6346             
       
  6347             ERROR;
       
  6348         }
       
  6349         
       
  6350     }/*function_ulint_to_int*/
       
  6351     break;
       
  6352 
       
  6353 /****
       
  6354  *ULINT_TO_DINT
       
  6355  */
       
  6356     case function_ulint_to_dint :
       
  6357     {
       
  6358         symbol_c *last_type_symbol = NULL;
       
  6359 
       
  6360         {
       
  6361             identifier_c param_name("IN");
       
  6362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6363             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6364             
       
  6365             /* Get the value from a foo(<param_value>) style call */
       
  6366             if (IN_param_value == NULL)
       
  6367               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6370             
       
  6371             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6372             {
       
  6373         
       
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6375                 s4o.print("(");
       
  6376                 return_type_symbol->accept(*this);
       
  6377                 s4o.print(")");
       
  6378                 IN_param_value->accept(*this);
       
  6379                 return NULL;
       
  6380                 
       
  6381             }
       
  6382             
       
  6383             ERROR;
       
  6384         }
       
  6385         
       
  6386     }/*function_ulint_to_dint*/
       
  6387     break;
       
  6388 
       
  6389 /****
       
  6390  *ULINT_TO_LINT
       
  6391  */
       
  6392     case function_ulint_to_lint :
       
  6393     {
       
  6394         symbol_c *last_type_symbol = NULL;
       
  6395 
       
  6396         {
       
  6397             identifier_c param_name("IN");
       
  6398             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6399             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6400             
       
  6401             /* Get the value from a foo(<param_value>) style call */
       
  6402             if (IN_param_value == NULL)
       
  6403               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6406             
       
  6407             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6408             {
       
  6409         
       
  6410                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6411                 s4o.print("(");
       
  6412                 return_type_symbol->accept(*this);
       
  6413                 s4o.print(")");
       
  6414                 IN_param_value->accept(*this);
       
  6415                 return NULL;
       
  6416                 
       
  6417             }
       
  6418             
       
  6419             ERROR;
       
  6420         }
       
  6421         
       
  6422     }/*function_ulint_to_lint*/
       
  6423     break;
       
  6424 
       
  6425 /****
       
  6426  *ULINT_TO_USINT
       
  6427  */
       
  6428     case function_ulint_to_usint :
       
  6429     {
       
  6430         symbol_c *last_type_symbol = NULL;
       
  6431 
       
  6432         {
       
  6433             identifier_c param_name("IN");
       
  6434             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6435             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6436             
       
  6437             /* Get the value from a foo(<param_value>) style call */
       
  6438             if (IN_param_value == NULL)
       
  6439               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6442             
       
  6443             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6444             {
       
  6445         
       
  6446                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6447                 s4o.print("(");
       
  6448                 return_type_symbol->accept(*this);
       
  6449                 s4o.print(")");
       
  6450                 IN_param_value->accept(*this);
       
  6451                 return NULL;
       
  6452                 
       
  6453             }
       
  6454             
       
  6455             ERROR;
       
  6456         }
       
  6457         
       
  6458     }/*function_ulint_to_usint*/
       
  6459     break;
       
  6460 
       
  6461 /****
       
  6462  *ULINT_TO_UINT
       
  6463  */
       
  6464     case function_ulint_to_uint :
       
  6465     {
       
  6466         symbol_c *last_type_symbol = NULL;
       
  6467 
       
  6468         {
       
  6469             identifier_c param_name("IN");
       
  6470             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6471             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6472             
       
  6473             /* Get the value from a foo(<param_value>) style call */
       
  6474             if (IN_param_value == NULL)
       
  6475               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6478             
       
  6479             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6480             {
       
  6481         
       
  6482                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6483                 s4o.print("(");
       
  6484                 return_type_symbol->accept(*this);
       
  6485                 s4o.print(")");
       
  6486                 IN_param_value->accept(*this);
       
  6487                 return NULL;
       
  6488                 
       
  6489             }
       
  6490             
       
  6491             ERROR;
       
  6492         }
       
  6493         
       
  6494     }/*function_ulint_to_uint*/
       
  6495     break;
       
  6496 
       
  6497 /****
       
  6498  *ULINT_TO_UDINT
       
  6499  */
       
  6500     case function_ulint_to_udint :
       
  6501     {
       
  6502         symbol_c *last_type_symbol = NULL;
       
  6503 
       
  6504         {
       
  6505             identifier_c param_name("IN");
       
  6506             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6507             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6508             
       
  6509             /* Get the value from a foo(<param_value>) style call */
       
  6510             if (IN_param_value == NULL)
       
  6511               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6514             
       
  6515             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6516             {
       
  6517         
       
  6518                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6519                 s4o.print("(");
       
  6520                 return_type_symbol->accept(*this);
       
  6521                 s4o.print(")");
       
  6522                 IN_param_value->accept(*this);
       
  6523                 return NULL;
       
  6524                 
       
  6525             }
       
  6526             
       
  6527             ERROR;
       
  6528         }
       
  6529         
       
  6530     }/*function_ulint_to_udint*/
       
  6531     break;
       
  6532 
       
  6533 /****
       
  6534  *ULINT_TO_TIME
       
  6535  */
       
  6536     case function_ulint_to_time :
       
  6537     {
       
  6538         symbol_c *last_type_symbol = NULL;
       
  6539 
       
  6540         {
       
  6541             identifier_c param_name("IN");
       
  6542             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6543             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6544             
       
  6545             /* Get the value from a foo(<param_value>) style call */
       
  6546             if (IN_param_value == NULL)
       
  6547               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6550             
       
  6551             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6552             {
       
  6553         
       
  6554                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6555                 s4o.print("(");
       
  6556                 return_type_symbol->accept(*this);
       
  6557                 s4o.print(")__int_to_time(");
       
  6558                 IN_param_value->accept(*this);
       
  6559                 s4o.print(")");
       
  6560                 return NULL;
       
  6561                 
       
  6562             }
       
  6563             
       
  6564             ERROR;
       
  6565         }
       
  6566         
       
  6567     }/*function_ulint_to_time*/
       
  6568     break;
       
  6569 
       
  6570 /****
       
  6571  *ULINT_TO_BOOL
       
  6572  */
       
  6573     case function_ulint_to_bool :
       
  6574     {
       
  6575         symbol_c *last_type_symbol = NULL;
       
  6576 
       
  6577         {
       
  6578             identifier_c param_name("IN");
       
  6579             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6580             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6581             
       
  6582             /* Get the value from a foo(<param_value>) style call */
       
  6583             if (IN_param_value == NULL)
       
  6584               IN_param_value = function_call_param_iterator.next();
       
  6585             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6586             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6587             
       
  6588             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6589             {
       
  6590         
       
  6591                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6592                 s4o.print("(");
       
  6593                 return_type_symbol->accept(*this);
       
  6594                 s4o.print(")");
       
  6595                 IN_param_value->accept(*this);
       
  6596                 return NULL;
       
  6597                 
       
  6598             }
       
  6599             
       
  6600             ERROR;
       
  6601         }
       
  6602         
       
  6603     }/*function_ulint_to_bool*/
       
  6604     break;
       
  6605 
       
  6606 /****
       
  6607  *ULINT_TO_BYTE
       
  6608  */
       
  6609     case function_ulint_to_byte :
       
  6610     {
       
  6611         symbol_c *last_type_symbol = NULL;
       
  6612 
       
  6613         {
       
  6614             identifier_c param_name("IN");
       
  6615             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6616             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6617             
       
  6618             /* Get the value from a foo(<param_value>) style call */
       
  6619             if (IN_param_value == NULL)
       
  6620               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6623             
       
  6624             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6625             {
       
  6626         
       
  6627                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6628                 s4o.print("(");
       
  6629                 return_type_symbol->accept(*this);
       
  6630                 s4o.print(")");
       
  6631                 IN_param_value->accept(*this);
       
  6632                 return NULL;
       
  6633                 
       
  6634             }
       
  6635             
       
  6636             ERROR;
       
  6637         }
       
  6638         
       
  6639     }/*function_ulint_to_byte*/
       
  6640     break;
       
  6641 
       
  6642 /****
       
  6643  *ULINT_TO_WORD
       
  6644  */
       
  6645     case function_ulint_to_word :
       
  6646     {
       
  6647         symbol_c *last_type_symbol = NULL;
       
  6648 
       
  6649         {
       
  6650             identifier_c param_name("IN");
       
  6651             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6652             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6653             
       
  6654             /* Get the value from a foo(<param_value>) style call */
       
  6655             if (IN_param_value == NULL)
       
  6656               IN_param_value = function_call_param_iterator.next();
       
  6657             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6658             last_type_symbol = last_type_symbol && search_expression_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             
       
  6660             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6661             {
       
  6662         
       
  6663                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6664                 s4o.print("(");
       
  6665                 return_type_symbol->accept(*this);
       
  6666                 s4o.print(")");
       
  6667                 IN_param_value->accept(*this);
       
  6668                 return NULL;
       
  6669                 
       
  6670             }
       
  6671             
       
  6672             ERROR;
       
  6673         }
       
  6674         
       
  6675     }/*function_ulint_to_word*/
       
  6676     break;
       
  6677 
       
  6678 /****
       
  6679  *ULINT_TO_DWORD
       
  6680  */
       
  6681     case function_ulint_to_dword :
       
  6682     {
       
  6683         symbol_c *last_type_symbol = NULL;
       
  6684 
       
  6685         {
       
  6686             identifier_c param_name("IN");
       
  6687             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6688             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6689             
       
  6690             /* Get the value from a foo(<param_value>) style call */
       
  6691             if (IN_param_value == NULL)
       
  6692               IN_param_value = function_call_param_iterator.next();
       
  6693             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6694             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6695             
       
  6696             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6697             {
       
  6698         
       
  6699                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6700                 s4o.print("(");
       
  6701                 return_type_symbol->accept(*this);
       
  6702                 s4o.print(")");
       
  6703                 IN_param_value->accept(*this);
       
  6704                 return NULL;
       
  6705                 
       
  6706             }
       
  6707             
       
  6708             ERROR;
       
  6709         }
       
  6710         
       
  6711     }/*function_ulint_to_dword*/
       
  6712     break;
       
  6713 
       
  6714 /****
       
  6715  *ULINT_TO_LWORD
       
  6716  */
       
  6717     case function_ulint_to_lword :
       
  6718     {
       
  6719         symbol_c *last_type_symbol = NULL;
       
  6720 
       
  6721         {
       
  6722             identifier_c param_name("IN");
       
  6723             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6724             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6725             
       
  6726             /* Get the value from a foo(<param_value>) style call */
       
  6727             if (IN_param_value == NULL)
       
  6728               IN_param_value = function_call_param_iterator.next();
       
  6729             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6730             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6731             
       
  6732             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6733             {
       
  6734         
       
  6735                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6736                 s4o.print("(");
       
  6737                 return_type_symbol->accept(*this);
       
  6738                 s4o.print(")");
       
  6739                 IN_param_value->accept(*this);
       
  6740                 return NULL;
       
  6741                 
       
  6742             }
       
  6743             
       
  6744             ERROR;
       
  6745         }
       
  6746         
       
  6747     }/*function_ulint_to_lword*/
       
  6748     break;
       
  6749 
       
  6750 /****
       
  6751  *ULINT_TO_STRING
       
  6752  */
       
  6753     case function_ulint_to_string :
       
  6754     {
       
  6755         symbol_c *last_type_symbol = NULL;
       
  6756 
       
  6757         {
       
  6758             identifier_c param_name("IN");
       
  6759             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6760             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6761             
       
  6762             /* Get the value from a foo(<param_value>) style call */
       
  6763             if (IN_param_value == NULL)
       
  6764               IN_param_value = function_call_param_iterator.next();
       
  6765             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6766             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6767             
       
  6768             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6769             {
       
  6770         
       
  6771                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6772                 s4o.print("(");
       
  6773                 return_type_symbol->accept(*this);
       
  6774                 s4o.print(")__uint_to_string(");
       
  6775                 IN_param_value->accept(*this);
       
  6776                 s4o.print(")");
       
  6777                 return NULL;
       
  6778                 
       
  6779             }
       
  6780             
       
  6781             ERROR;
       
  6782         }
       
  6783         
       
  6784     }/*function_ulint_to_string*/
       
  6785     break;
       
  6786 
       
  6787 /****
       
  6788  *ULINT_TO_DATE
       
  6789  */
       
  6790     case function_ulint_to_date :
       
  6791     {
       
  6792         symbol_c *last_type_symbol = NULL;
       
  6793 
       
  6794         {
       
  6795             identifier_c param_name("IN");
       
  6796             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6797             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6798             
       
  6799             /* Get the value from a foo(<param_value>) style call */
       
  6800             if (IN_param_value == NULL)
       
  6801               IN_param_value = function_call_param_iterator.next();
       
  6802             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6803             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6804             
       
  6805             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6806             {
       
  6807         
       
  6808                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6809                 s4o.print("(");
       
  6810                 return_type_symbol->accept(*this);
       
  6811                 s4o.print(")__int_to_time(");
       
  6812                 IN_param_value->accept(*this);
       
  6813                 s4o.print(")");
       
  6814                 return NULL;
       
  6815                 
       
  6816             }
       
  6817             
       
  6818             ERROR;
       
  6819         }
       
  6820         
       
  6821     }/*function_ulint_to_date*/
       
  6822     break;
       
  6823 
       
  6824 /****
       
  6825  *ULINT_TO_TOD
       
  6826  */
       
  6827     case function_ulint_to_tod :
       
  6828     {
       
  6829         symbol_c *last_type_symbol = NULL;
       
  6830 
       
  6831         {
       
  6832             identifier_c param_name("IN");
       
  6833             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6834             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6835             
       
  6836             /* Get the value from a foo(<param_value>) style call */
       
  6837             if (IN_param_value == NULL)
       
  6838               IN_param_value = function_call_param_iterator.next();
       
  6839             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6840             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6841             
       
  6842             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6843             {
       
  6844         
       
  6845                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6846                 s4o.print("(");
       
  6847                 return_type_symbol->accept(*this);
       
  6848                 s4o.print(")__int_to_time(");
       
  6849                 IN_param_value->accept(*this);
       
  6850                 s4o.print(")");
       
  6851                 return NULL;
       
  6852                 
       
  6853             }
       
  6854             
       
  6855             ERROR;
       
  6856         }
       
  6857         
       
  6858     }/*function_ulint_to_tod*/
       
  6859     break;
       
  6860 
       
  6861 /****
       
  6862  *ULINT_TO_DT
       
  6863  */
       
  6864     case function_ulint_to_dt :
       
  6865     {
       
  6866         symbol_c *last_type_symbol = NULL;
       
  6867 
       
  6868         {
       
  6869             identifier_c param_name("IN");
       
  6870             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6871             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6872             
       
  6873             /* Get the value from a foo(<param_value>) style call */
       
  6874             if (IN_param_value == NULL)
       
  6875               IN_param_value = function_call_param_iterator.next();
       
  6876             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6877             last_type_symbol = last_type_symbol && search_expression_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             
       
  6879             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6880             {
       
  6881         
       
  6882                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6883                 s4o.print("(");
       
  6884                 return_type_symbol->accept(*this);
       
  6885                 s4o.print(")__int_to_time(");
       
  6886                 IN_param_value->accept(*this);
       
  6887                 s4o.print(")");
       
  6888                 return NULL;
       
  6889                 
       
  6890             }
       
  6891             
       
  6892             ERROR;
       
  6893         }
       
  6894         
       
  6895     }/*function_ulint_to_dt*/
       
  6896     break;
       
  6897 
       
  6898 /****
       
  6899  *TIME_TO_REAL
       
  6900  */
       
  6901     case function_time_to_real :
       
  6902     {
       
  6903         symbol_c *last_type_symbol = NULL;
       
  6904 
       
  6905         {
       
  6906             identifier_c param_name("IN");
       
  6907             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6908             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6909             
       
  6910             /* Get the value from a foo(<param_value>) style call */
       
  6911             if (IN_param_value == NULL)
       
  6912               IN_param_value = function_call_param_iterator.next();
       
  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 ;
       
  6915             
       
  6916             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6917             {
       
  6918         
       
  6919                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6920                 s4o.print("(");
       
  6921                 return_type_symbol->accept(*this);
       
  6922                 s4o.print(")__time_to_real(");
       
  6923                 IN_param_value->accept(*this);
       
  6924                 s4o.print(")");
       
  6925                 return NULL;
       
  6926                 
       
  6927             }
       
  6928             
       
  6929             ERROR;
       
  6930         }
       
  6931         
       
  6932     }/*function_time_to_real*/
       
  6933     break;
       
  6934 
       
  6935 /****
       
  6936  *TIME_TO_LREAL
       
  6937  */
       
  6938     case function_time_to_lreal :
       
  6939     {
       
  6940         symbol_c *last_type_symbol = NULL;
       
  6941 
       
  6942         {
       
  6943             identifier_c param_name("IN");
       
  6944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6946             
       
  6947             /* Get the value from a foo(<param_value>) style call */
       
  6948             if (IN_param_value == NULL)
       
  6949               IN_param_value = function_call_param_iterator.next();
       
  6950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6952             
       
  6953             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6954             {
       
  6955         
       
  6956                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6957                 s4o.print("(");
       
  6958                 return_type_symbol->accept(*this);
       
  6959                 s4o.print(")__time_to_real(");
       
  6960                 IN_param_value->accept(*this);
       
  6961                 s4o.print(")");
       
  6962                 return NULL;
       
  6963                 
       
  6964             }
       
  6965             
       
  6966             ERROR;
       
  6967         }
       
  6968         
       
  6969     }/*function_time_to_lreal*/
       
  6970     break;
       
  6971 
       
  6972 /****
       
  6973  *TIME_TO_SINT
       
  6974  */
       
  6975     case function_time_to_sint :
       
  6976     {
       
  6977         symbol_c *last_type_symbol = NULL;
       
  6978 
       
  6979         {
       
  6980             identifier_c param_name("IN");
       
  6981             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6982             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6983             
       
  6984             /* Get the value from a foo(<param_value>) style call */
       
  6985             if (IN_param_value == NULL)
       
  6986               IN_param_value = function_call_param_iterator.next();
       
  6987             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6988             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6989             
       
  6990             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6991             {
       
  6992         
       
  6993                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6994                 s4o.print("(");
       
  6995                 return_type_symbol->accept(*this);
       
  6996                 s4o.print(")__time_to_int(");
       
  6997                 IN_param_value->accept(*this);
       
  6998                 s4o.print(")");
       
  6999                 return NULL;
       
  7000                 
       
  7001             }
       
  7002             
       
  7003             ERROR;
       
  7004         }
       
  7005         
       
  7006     }/*function_time_to_sint*/
       
  7007     break;
       
  7008 
       
  7009 /****
       
  7010  *TIME_TO_INT
       
  7011  */
       
  7012     case function_time_to_int :
       
  7013     {
       
  7014         symbol_c *last_type_symbol = NULL;
       
  7015 
       
  7016         {
       
  7017             identifier_c param_name("IN");
       
  7018             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7019             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7020             
       
  7021             /* Get the value from a foo(<param_value>) style call */
       
  7022             if (IN_param_value == NULL)
       
  7023               IN_param_value = function_call_param_iterator.next();
       
  7024             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7025             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7026             
       
  7027             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7028             {
       
  7029         
       
  7030                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7031                 s4o.print("(");
       
  7032                 return_type_symbol->accept(*this);
       
  7033                 s4o.print(")__time_to_int(");
       
  7034                 IN_param_value->accept(*this);
       
  7035                 s4o.print(")");
       
  7036                 return NULL;
       
  7037                 
       
  7038             }
       
  7039             
       
  7040             ERROR;
       
  7041         }
       
  7042         
       
  7043     }/*function_time_to_int*/
       
  7044     break;
       
  7045 
       
  7046 /****
       
  7047  *TIME_TO_DINT
       
  7048  */
       
  7049     case function_time_to_dint :
       
  7050     {
       
  7051         symbol_c *last_type_symbol = NULL;
       
  7052 
       
  7053         {
       
  7054             identifier_c param_name("IN");
       
  7055             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7056             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7057             
       
  7058             /* Get the value from a foo(<param_value>) style call */
       
  7059             if (IN_param_value == NULL)
       
  7060               IN_param_value = function_call_param_iterator.next();
       
  7061             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7062             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7063             
       
  7064             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7065             {
       
  7066         
       
  7067                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7068                 s4o.print("(");
       
  7069                 return_type_symbol->accept(*this);
       
  7070                 s4o.print(")__time_to_int(");
       
  7071                 IN_param_value->accept(*this);
       
  7072                 s4o.print(")");
       
  7073                 return NULL;
       
  7074                 
       
  7075             }
       
  7076             
       
  7077             ERROR;
       
  7078         }
       
  7079         
       
  7080     }/*function_time_to_dint*/
       
  7081     break;
       
  7082 
       
  7083 /****
       
  7084  *TIME_TO_LINT
       
  7085  */
       
  7086     case function_time_to_lint :
       
  7087     {
       
  7088         symbol_c *last_type_symbol = NULL;
       
  7089 
       
  7090         {
       
  7091             identifier_c param_name("IN");
       
  7092             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7093             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7094             
       
  7095             /* Get the value from a foo(<param_value>) style call */
       
  7096             if (IN_param_value == NULL)
       
  7097               IN_param_value = function_call_param_iterator.next();
       
  7098             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7099             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7100             
       
  7101             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7102             {
       
  7103         
       
  7104                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7105                 s4o.print("(");
       
  7106                 return_type_symbol->accept(*this);
       
  7107                 s4o.print(")__time_to_int(");
       
  7108                 IN_param_value->accept(*this);
       
  7109                 s4o.print(")");
       
  7110                 return NULL;
       
  7111                 
       
  7112             }
       
  7113             
       
  7114             ERROR;
       
  7115         }
       
  7116         
       
  7117     }/*function_time_to_lint*/
       
  7118     break;
       
  7119 
       
  7120 /****
       
  7121  *TIME_TO_USINT
       
  7122  */
       
  7123     case function_time_to_usint :
       
  7124     {
       
  7125         symbol_c *last_type_symbol = NULL;
       
  7126 
       
  7127         {
       
  7128             identifier_c param_name("IN");
       
  7129             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7130             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7131             
       
  7132             /* Get the value from a foo(<param_value>) style call */
       
  7133             if (IN_param_value == NULL)
       
  7134               IN_param_value = function_call_param_iterator.next();
       
  7135             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7136             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7137             
       
  7138             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7139             {
       
  7140         
       
  7141                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7142                 s4o.print("(");
       
  7143                 return_type_symbol->accept(*this);
       
  7144                 s4o.print(")__time_to_int(");
       
  7145                 IN_param_value->accept(*this);
       
  7146                 s4o.print(")");
       
  7147                 return NULL;
       
  7148                 
       
  7149             }
       
  7150             
       
  7151             ERROR;
       
  7152         }
       
  7153         
       
  7154     }/*function_time_to_usint*/
       
  7155     break;
       
  7156 
       
  7157 /****
       
  7158  *TIME_TO_UINT
       
  7159  */
       
  7160     case function_time_to_uint :
       
  7161     {
       
  7162         symbol_c *last_type_symbol = NULL;
       
  7163 
       
  7164         {
       
  7165             identifier_c param_name("IN");
       
  7166             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7167             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7168             
       
  7169             /* Get the value from a foo(<param_value>) style call */
       
  7170             if (IN_param_value == NULL)
       
  7171               IN_param_value = function_call_param_iterator.next();
       
  7172             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7173             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7174             
       
  7175             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7176             {
       
  7177         
       
  7178                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7179                 s4o.print("(");
       
  7180                 return_type_symbol->accept(*this);
       
  7181                 s4o.print(")__time_to_int(");
       
  7182                 IN_param_value->accept(*this);
       
  7183                 s4o.print(")");
       
  7184                 return NULL;
       
  7185                 
       
  7186             }
       
  7187             
       
  7188             ERROR;
       
  7189         }
       
  7190         
       
  7191     }/*function_time_to_uint*/
       
  7192     break;
       
  7193 
       
  7194 /****
       
  7195  *TIME_TO_UDINT
       
  7196  */
       
  7197     case function_time_to_udint :
       
  7198     {
       
  7199         symbol_c *last_type_symbol = NULL;
       
  7200 
       
  7201         {
       
  7202             identifier_c param_name("IN");
       
  7203             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7205             
       
  7206             /* Get the value from a foo(<param_value>) style call */
       
  7207             if (IN_param_value == NULL)
       
  7208               IN_param_value = function_call_param_iterator.next();
       
  7209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7211             
       
  7212             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7213             {
       
  7214         
       
  7215                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7216                 s4o.print("(");
       
  7217                 return_type_symbol->accept(*this);
       
  7218                 s4o.print(")__time_to_int(");
       
  7219                 IN_param_value->accept(*this);
       
  7220                 s4o.print(")");
       
  7221                 return NULL;
       
  7222                 
       
  7223             }
       
  7224             
       
  7225             ERROR;
       
  7226         }
       
  7227         
       
  7228     }/*function_time_to_udint*/
       
  7229     break;
       
  7230 
       
  7231 /****
       
  7232  *TIME_TO_ULINT
       
  7233  */
       
  7234     case function_time_to_ulint :
       
  7235     {
       
  7236         symbol_c *last_type_symbol = NULL;
       
  7237 
       
  7238         {
       
  7239             identifier_c param_name("IN");
       
  7240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7242             
       
  7243             /* Get the value from a foo(<param_value>) style call */
       
  7244             if (IN_param_value == NULL)
       
  7245               IN_param_value = function_call_param_iterator.next();
       
  7246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7248             
       
  7249             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7250             {
       
  7251         
       
  7252                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7253                 s4o.print("(");
       
  7254                 return_type_symbol->accept(*this);
       
  7255                 s4o.print(")__time_to_int(");
       
  7256                 IN_param_value->accept(*this);
       
  7257                 s4o.print(")");
       
  7258                 return NULL;
       
  7259                 
       
  7260             }
       
  7261             
       
  7262             ERROR;
       
  7263         }
       
  7264         
       
  7265     }/*function_time_to_ulint*/
       
  7266     break;
       
  7267 
       
  7268 /****
       
  7269  *TIME_TO_BOOL
       
  7270  */
       
  7271     case function_time_to_bool :
       
  7272     {
       
  7273         symbol_c *last_type_symbol = NULL;
       
  7274 
       
  7275         {
       
  7276             identifier_c param_name("IN");
       
  7277             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7278             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7279             
       
  7280             /* Get the value from a foo(<param_value>) style call */
       
  7281             if (IN_param_value == NULL)
       
  7282               IN_param_value = function_call_param_iterator.next();
       
  7283             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7284             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7285             
       
  7286             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7287             {
       
  7288         
       
  7289                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7290                 s4o.print("(");
       
  7291                 return_type_symbol->accept(*this);
       
  7292                 s4o.print(")__time_to_int(");
       
  7293                 IN_param_value->accept(*this);
       
  7294                 s4o.print(")");
       
  7295                 return NULL;
       
  7296                 
       
  7297             }
       
  7298             
       
  7299             ERROR;
       
  7300         }
       
  7301         
       
  7302     }/*function_time_to_bool*/
       
  7303     break;
       
  7304 
       
  7305 /****
       
  7306  *TIME_TO_BYTE
       
  7307  */
       
  7308     case function_time_to_byte :
       
  7309     {
       
  7310         symbol_c *last_type_symbol = NULL;
       
  7311 
       
  7312         {
       
  7313             identifier_c param_name("IN");
       
  7314             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7315             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7316             
       
  7317             /* Get the value from a foo(<param_value>) style call */
       
  7318             if (IN_param_value == NULL)
       
  7319               IN_param_value = function_call_param_iterator.next();
       
  7320             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7321             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7322             
       
  7323             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7324             {
       
  7325         
       
  7326                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7327                 s4o.print("(");
       
  7328                 return_type_symbol->accept(*this);
       
  7329                 s4o.print(")__time_to_int(");
       
  7330                 IN_param_value->accept(*this);
       
  7331                 s4o.print(")");
       
  7332                 return NULL;
       
  7333                 
       
  7334             }
       
  7335             
       
  7336             ERROR;
       
  7337         }
       
  7338         
       
  7339     }/*function_time_to_byte*/
       
  7340     break;
       
  7341 
       
  7342 /****
       
  7343  *TIME_TO_WORD
       
  7344  */
       
  7345     case function_time_to_word :
       
  7346     {
       
  7347         symbol_c *last_type_symbol = NULL;
       
  7348 
       
  7349         {
       
  7350             identifier_c param_name("IN");
       
  7351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7353             
       
  7354             /* Get the value from a foo(<param_value>) style call */
       
  7355             if (IN_param_value == NULL)
       
  7356               IN_param_value = function_call_param_iterator.next();
       
  7357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7359             
       
  7360             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7361             {
       
  7362         
       
  7363                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7364                 s4o.print("(");
       
  7365                 return_type_symbol->accept(*this);
       
  7366                 s4o.print(")__time_to_int(");
       
  7367                 IN_param_value->accept(*this);
       
  7368                 s4o.print(")");
       
  7369                 return NULL;
       
  7370                 
       
  7371             }
       
  7372             
       
  7373             ERROR;
       
  7374         }
       
  7375         
       
  7376     }/*function_time_to_word*/
       
  7377     break;
       
  7378 
       
  7379 /****
       
  7380  *TIME_TO_DWORD
       
  7381  */
       
  7382     case function_time_to_dword :
       
  7383     {
       
  7384         symbol_c *last_type_symbol = NULL;
       
  7385 
       
  7386         {
       
  7387             identifier_c param_name("IN");
       
  7388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7390             
       
  7391             /* Get the value from a foo(<param_value>) style call */
       
  7392             if (IN_param_value == NULL)
       
  7393               IN_param_value = function_call_param_iterator.next();
       
  7394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7396             
       
  7397             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7398             {
       
  7399         
       
  7400                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7401                 s4o.print("(");
       
  7402                 return_type_symbol->accept(*this);
       
  7403                 s4o.print(")__time_to_int(");
       
  7404                 IN_param_value->accept(*this);
       
  7405                 s4o.print(")");
       
  7406                 return NULL;
       
  7407                 
       
  7408             }
       
  7409             
       
  7410             ERROR;
       
  7411         }
       
  7412         
       
  7413     }/*function_time_to_dword*/
       
  7414     break;
       
  7415 
       
  7416 /****
       
  7417  *TIME_TO_LWORD
       
  7418  */
       
  7419     case function_time_to_lword :
       
  7420     {
       
  7421         symbol_c *last_type_symbol = NULL;
       
  7422 
       
  7423         {
       
  7424             identifier_c param_name("IN");
       
  7425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7427             
       
  7428             /* Get the value from a foo(<param_value>) style call */
       
  7429             if (IN_param_value == NULL)
       
  7430               IN_param_value = function_call_param_iterator.next();
       
  7431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7432             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7433             
       
  7434             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7435             {
       
  7436         
       
  7437                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7438                 s4o.print("(");
       
  7439                 return_type_symbol->accept(*this);
       
  7440                 s4o.print(")__time_to_int(");
       
  7441                 IN_param_value->accept(*this);
       
  7442                 s4o.print(")");
       
  7443                 return NULL;
       
  7444                 
       
  7445             }
       
  7446             
       
  7447             ERROR;
       
  7448         }
       
  7449         
       
  7450     }/*function_time_to_lword*/
       
  7451     break;
       
  7452 
       
  7453 /****
       
  7454  *TIME_TO_STRING
       
  7455  */
       
  7456     case function_time_to_string :
       
  7457     {
       
  7458         symbol_c *last_type_symbol = NULL;
       
  7459 
       
  7460         {
       
  7461             identifier_c param_name("IN");
       
  7462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7464             
       
  7465             /* Get the value from a foo(<param_value>) style call */
       
  7466             if (IN_param_value == NULL)
       
  7467               IN_param_value = function_call_param_iterator.next();
       
  7468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7470             
       
  7471             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  7472             {
       
  7473         
       
  7474                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7475                 s4o.print("(");
       
  7476                 return_type_symbol->accept(*this);
       
  7477                 s4o.print(")__time_to_string(");
       
  7478                 IN_param_value->accept(*this);
       
  7479                 s4o.print(")");
       
  7480                 return NULL;
       
  7481                 
       
  7482             }
       
  7483             
       
  7484             ERROR;
       
  7485         }
       
  7486         
       
  7487     }/*function_time_to_string*/
       
  7488     break;
       
  7489 
       
  7490 /****
       
  7491  *BOOL_TO_REAL
       
  7492  */
       
  7493     case function_bool_to_real :
       
  7494     {
       
  7495         symbol_c *last_type_symbol = NULL;
       
  7496 
       
  7497         {
       
  7498             identifier_c param_name("IN");
       
  7499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7501             
       
  7502             /* Get the value from a foo(<param_value>) style call */
       
  7503             if (IN_param_value == NULL)
       
  7504               IN_param_value = function_call_param_iterator.next();
       
  7505             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7506             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7507             
       
  7508             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7509             {
       
  7510         
       
  7511                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7512                 s4o.print("(");
       
  7513                 return_type_symbol->accept(*this);
       
  7514                 s4o.print(")");
       
  7515                 IN_param_value->accept(*this);
       
  7516                 return NULL;
       
  7517                 
       
  7518             }
       
  7519             
       
  7520             ERROR;
       
  7521         }
       
  7522         
       
  7523     }/*function_bool_to_real*/
       
  7524     break;
       
  7525 
       
  7526 /****
       
  7527  *BOOL_TO_LREAL
       
  7528  */
       
  7529     case function_bool_to_lreal :
       
  7530     {
       
  7531         symbol_c *last_type_symbol = NULL;
       
  7532 
       
  7533         {
       
  7534             identifier_c param_name("IN");
       
  7535             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7536             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7537             
       
  7538             /* Get the value from a foo(<param_value>) style call */
       
  7539             if (IN_param_value == NULL)
       
  7540               IN_param_value = function_call_param_iterator.next();
       
  7541             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7542             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7543             
       
  7544             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7545             {
       
  7546         
       
  7547                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7548                 s4o.print("(");
       
  7549                 return_type_symbol->accept(*this);
       
  7550                 s4o.print(")");
       
  7551                 IN_param_value->accept(*this);
       
  7552                 return NULL;
       
  7553                 
       
  7554             }
       
  7555             
       
  7556             ERROR;
       
  7557         }
       
  7558         
       
  7559     }/*function_bool_to_lreal*/
       
  7560     break;
       
  7561 
       
  7562 /****
       
  7563  *BOOL_TO_SINT
       
  7564  */
       
  7565     case function_bool_to_sint :
       
  7566     {
       
  7567         symbol_c *last_type_symbol = NULL;
       
  7568 
       
  7569         {
       
  7570             identifier_c param_name("IN");
       
  7571             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7572             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7573             
       
  7574             /* Get the value from a foo(<param_value>) style call */
       
  7575             if (IN_param_value == NULL)
       
  7576               IN_param_value = function_call_param_iterator.next();
       
  7577             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7578             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7579             
       
  7580             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7581             {
       
  7582         
       
  7583                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7584                 s4o.print("(");
       
  7585                 return_type_symbol->accept(*this);
       
  7586                 s4o.print(")");
       
  7587                 IN_param_value->accept(*this);
       
  7588                 return NULL;
       
  7589                 
       
  7590             }
       
  7591             
       
  7592             ERROR;
       
  7593         }
       
  7594         
       
  7595     }/*function_bool_to_sint*/
       
  7596     break;
       
  7597 
       
  7598 /****
       
  7599  *BOOL_TO_INT
       
  7600  */
       
  7601     case function_bool_to_int :
       
  7602     {
       
  7603         symbol_c *last_type_symbol = NULL;
       
  7604 
       
  7605         {
       
  7606             identifier_c param_name("IN");
       
  7607             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7608             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7609             
       
  7610             /* Get the value from a foo(<param_value>) style call */
       
  7611             if (IN_param_value == NULL)
       
  7612               IN_param_value = function_call_param_iterator.next();
       
  7613             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7614             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7615             
       
  7616             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7617             {
       
  7618         
       
  7619                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7620                 s4o.print("(");
       
  7621                 return_type_symbol->accept(*this);
       
  7622                 s4o.print(")");
       
  7623                 IN_param_value->accept(*this);
       
  7624                 return NULL;
       
  7625                 
       
  7626             }
       
  7627             
       
  7628             ERROR;
       
  7629         }
       
  7630         
       
  7631     }/*function_bool_to_int*/
       
  7632     break;
       
  7633 
       
  7634 /****
       
  7635  *BOOL_TO_DINT
       
  7636  */
       
  7637     case function_bool_to_dint :
       
  7638     {
       
  7639         symbol_c *last_type_symbol = NULL;
       
  7640 
       
  7641         {
       
  7642             identifier_c param_name("IN");
       
  7643             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7644             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7645             
       
  7646             /* Get the value from a foo(<param_value>) style call */
       
  7647             if (IN_param_value == NULL)
       
  7648               IN_param_value = function_call_param_iterator.next();
       
  7649             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7650             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7651             
       
  7652             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7653             {
       
  7654         
       
  7655                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7656                 s4o.print("(");
       
  7657                 return_type_symbol->accept(*this);
       
  7658                 s4o.print(")");
       
  7659                 IN_param_value->accept(*this);
       
  7660                 return NULL;
       
  7661                 
       
  7662             }
       
  7663             
       
  7664             ERROR;
       
  7665         }
       
  7666         
       
  7667     }/*function_bool_to_dint*/
       
  7668     break;
       
  7669 
       
  7670 /****
       
  7671  *BOOL_TO_LINT
       
  7672  */
       
  7673     case function_bool_to_lint :
       
  7674     {
       
  7675         symbol_c *last_type_symbol = NULL;
       
  7676 
       
  7677         {
       
  7678             identifier_c param_name("IN");
       
  7679             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7680             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7681             
       
  7682             /* Get the value from a foo(<param_value>) style call */
       
  7683             if (IN_param_value == NULL)
       
  7684               IN_param_value = function_call_param_iterator.next();
       
  7685             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7686             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7687             
       
  7688             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7689             {
       
  7690         
       
  7691                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7692                 s4o.print("(");
       
  7693                 return_type_symbol->accept(*this);
       
  7694                 s4o.print(")");
       
  7695                 IN_param_value->accept(*this);
       
  7696                 return NULL;
       
  7697                 
       
  7698             }
       
  7699             
       
  7700             ERROR;
       
  7701         }
       
  7702         
       
  7703     }/*function_bool_to_lint*/
       
  7704     break;
       
  7705 
       
  7706 /****
       
  7707  *BOOL_TO_USINT
       
  7708  */
       
  7709     case function_bool_to_usint :
       
  7710     {
       
  7711         symbol_c *last_type_symbol = NULL;
       
  7712 
       
  7713         {
       
  7714             identifier_c param_name("IN");
       
  7715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7716             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7717             
       
  7718             /* Get the value from a foo(<param_value>) style call */
       
  7719             if (IN_param_value == NULL)
       
  7720               IN_param_value = function_call_param_iterator.next();
       
  7721             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7722             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7723             
       
  7724             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7725             {
       
  7726         
       
  7727                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7728                 s4o.print("(");
       
  7729                 return_type_symbol->accept(*this);
       
  7730                 s4o.print(")");
       
  7731                 IN_param_value->accept(*this);
       
  7732                 return NULL;
       
  7733                 
       
  7734             }
       
  7735             
       
  7736             ERROR;
       
  7737         }
       
  7738         
       
  7739     }/*function_bool_to_usint*/
       
  7740     break;
       
  7741 
       
  7742 /****
       
  7743  *BOOL_TO_UINT
       
  7744  */
       
  7745     case function_bool_to_uint :
       
  7746     {
       
  7747         symbol_c *last_type_symbol = NULL;
       
  7748 
       
  7749         {
       
  7750             identifier_c param_name("IN");
       
  7751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7752             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7753             
       
  7754             /* Get the value from a foo(<param_value>) style call */
       
  7755             if (IN_param_value == NULL)
       
  7756               IN_param_value = function_call_param_iterator.next();
       
  7757             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7758             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7759             
       
  7760             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7761             {
       
  7762         
       
  7763                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7764                 s4o.print("(");
       
  7765                 return_type_symbol->accept(*this);
       
  7766                 s4o.print(")");
       
  7767                 IN_param_value->accept(*this);
       
  7768                 return NULL;
       
  7769                 
       
  7770             }
       
  7771             
       
  7772             ERROR;
       
  7773         }
       
  7774         
       
  7775     }/*function_bool_to_uint*/
       
  7776     break;
       
  7777 
       
  7778 /****
       
  7779  *BOOL_TO_UDINT
       
  7780  */
       
  7781     case function_bool_to_udint :
       
  7782     {
       
  7783         symbol_c *last_type_symbol = NULL;
       
  7784 
       
  7785         {
       
  7786             identifier_c param_name("IN");
       
  7787             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7788             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7789             
       
  7790             /* Get the value from a foo(<param_value>) style call */
       
  7791             if (IN_param_value == NULL)
       
  7792               IN_param_value = function_call_param_iterator.next();
       
  7793             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7794             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7795             
       
  7796             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7797             {
       
  7798         
       
  7799                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7800                 s4o.print("(");
       
  7801                 return_type_symbol->accept(*this);
       
  7802                 s4o.print(")");
       
  7803                 IN_param_value->accept(*this);
       
  7804                 return NULL;
       
  7805                 
       
  7806             }
       
  7807             
       
  7808             ERROR;
       
  7809         }
       
  7810         
       
  7811     }/*function_bool_to_udint*/
       
  7812     break;
       
  7813 
       
  7814 /****
       
  7815  *BOOL_TO_ULINT
       
  7816  */
       
  7817     case function_bool_to_ulint :
       
  7818     {
       
  7819         symbol_c *last_type_symbol = NULL;
       
  7820 
       
  7821         {
       
  7822             identifier_c param_name("IN");
       
  7823             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7824             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7825             
       
  7826             /* Get the value from a foo(<param_value>) style call */
       
  7827             if (IN_param_value == NULL)
       
  7828               IN_param_value = function_call_param_iterator.next();
       
  7829             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7830             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7831             
       
  7832             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7833             {
       
  7834         
       
  7835                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7836                 s4o.print("(");
       
  7837                 return_type_symbol->accept(*this);
       
  7838                 s4o.print(")");
       
  7839                 IN_param_value->accept(*this);
       
  7840                 return NULL;
       
  7841                 
       
  7842             }
       
  7843             
       
  7844             ERROR;
       
  7845         }
       
  7846         
       
  7847     }/*function_bool_to_ulint*/
       
  7848     break;
       
  7849 
       
  7850 /****
       
  7851  *BOOL_TO_TIME
       
  7852  */
       
  7853     case function_bool_to_time :
       
  7854     {
       
  7855         symbol_c *last_type_symbol = NULL;
       
  7856 
       
  7857         {
       
  7858             identifier_c param_name("IN");
       
  7859             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7860             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7861             
       
  7862             /* Get the value from a foo(<param_value>) style call */
       
  7863             if (IN_param_value == NULL)
       
  7864               IN_param_value = function_call_param_iterator.next();
       
  7865             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7866             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7867             
       
  7868             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7869             {
       
  7870         
       
  7871                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7872                 s4o.print("(");
       
  7873                 return_type_symbol->accept(*this);
       
  7874                 s4o.print(")__int_to_time(");
       
  7875                 IN_param_value->accept(*this);
       
  7876                 s4o.print(")");
       
  7877                 return NULL;
       
  7878                 
       
  7879             }
       
  7880             
       
  7881             ERROR;
       
  7882         }
       
  7883         
       
  7884     }/*function_bool_to_time*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *BOOL_TO_BYTE
       
  7889  */
       
  7890     case function_bool_to_byte :
       
  7891     {
       
  7892         symbol_c *last_type_symbol = NULL;
       
  7893 
       
  7894         {
       
  7895             identifier_c param_name("IN");
       
  7896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7898             
       
  7899             /* Get the value from a foo(<param_value>) style call */
       
  7900             if (IN_param_value == NULL)
       
  7901               IN_param_value = function_call_param_iterator.next();
       
  7902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7904             
       
  7905             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7906             {
       
  7907         
       
  7908                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7909                 s4o.print("(");
       
  7910                 return_type_symbol->accept(*this);
       
  7911                 s4o.print(")");
       
  7912                 IN_param_value->accept(*this);
       
  7913                 return NULL;
       
  7914                 
       
  7915             }
       
  7916             
       
  7917             ERROR;
       
  7918         }
       
  7919         
       
  7920     }/*function_bool_to_byte*/
       
  7921     break;
       
  7922 
       
  7923 /****
       
  7924  *BOOL_TO_WORD
       
  7925  */
       
  7926     case function_bool_to_word :
       
  7927     {
       
  7928         symbol_c *last_type_symbol = NULL;
       
  7929 
       
  7930         {
       
  7931             identifier_c param_name("IN");
       
  7932             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7933             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7934             
       
  7935             /* Get the value from a foo(<param_value>) style call */
       
  7936             if (IN_param_value == NULL)
       
  7937               IN_param_value = function_call_param_iterator.next();
       
  7938             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7939             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7940             
       
  7941             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7942             {
       
  7943         
       
  7944                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7945                 s4o.print("(");
       
  7946                 return_type_symbol->accept(*this);
       
  7947                 s4o.print(")");
       
  7948                 IN_param_value->accept(*this);
       
  7949                 return NULL;
       
  7950                 
       
  7951             }
       
  7952             
       
  7953             ERROR;
       
  7954         }
       
  7955         
       
  7956     }/*function_bool_to_word*/
       
  7957     break;
       
  7958 
       
  7959 /****
       
  7960  *BOOL_TO_DWORD
       
  7961  */
       
  7962     case function_bool_to_dword :
       
  7963     {
       
  7964         symbol_c *last_type_symbol = NULL;
       
  7965 
       
  7966         {
       
  7967             identifier_c param_name("IN");
       
  7968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7970             
       
  7971             /* Get the value from a foo(<param_value>) style call */
       
  7972             if (IN_param_value == NULL)
       
  7973               IN_param_value = function_call_param_iterator.next();
       
  7974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7976             
       
  7977             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7978             {
       
  7979         
       
  7980                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7981                 s4o.print("(");
       
  7982                 return_type_symbol->accept(*this);
       
  7983                 s4o.print(")");
       
  7984                 IN_param_value->accept(*this);
       
  7985                 return NULL;
       
  7986                 
       
  7987             }
       
  7988             
       
  7989             ERROR;
       
  7990         }
       
  7991         
       
  7992     }/*function_bool_to_dword*/
       
  7993     break;
       
  7994 
       
  7995 /****
       
  7996  *BOOL_TO_LWORD
       
  7997  */
       
  7998     case function_bool_to_lword :
       
  7999     {
       
  8000         symbol_c *last_type_symbol = NULL;
       
  8001 
       
  8002         {
       
  8003             identifier_c param_name("IN");
       
  8004             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8005             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8006             
       
  8007             /* Get the value from a foo(<param_value>) style call */
       
  8008             if (IN_param_value == NULL)
       
  8009               IN_param_value = function_call_param_iterator.next();
       
  8010             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8011             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8012             
       
  8013             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8014             {
       
  8015         
       
  8016                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8017                 s4o.print("(");
       
  8018                 return_type_symbol->accept(*this);
       
  8019                 s4o.print(")");
       
  8020                 IN_param_value->accept(*this);
       
  8021                 return NULL;
       
  8022                 
       
  8023             }
       
  8024             
       
  8025             ERROR;
       
  8026         }
       
  8027         
       
  8028     }/*function_bool_to_lword*/
       
  8029     break;
       
  8030 
       
  8031 /****
       
  8032  *BOOL_TO_STRING
       
  8033  */
       
  8034     case function_bool_to_string :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8050             {
       
  8051         
       
  8052                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8053                 s4o.print("(");
       
  8054                 return_type_symbol->accept(*this);
       
  8055                 s4o.print(")__bool_to_string(");
       
  8056                 IN_param_value->accept(*this);
       
  8057                 s4o.print(")");
       
  8058                 return NULL;
       
  8059                 
       
  8060             }
       
  8061             
       
  8062             ERROR;
       
  8063         }
       
  8064         
       
  8065     }/*function_bool_to_string*/
       
  8066     break;
       
  8067 
       
  8068 /****
       
  8069  *BOOL_TO_DATE
       
  8070  */
       
  8071     case function_bool_to_date :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8087             {
       
  8088         
       
  8089                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8090                 s4o.print("(");
       
  8091                 return_type_symbol->accept(*this);
       
  8092                 s4o.print(")__int_to_time(");
       
  8093                 IN_param_value->accept(*this);
       
  8094                 s4o.print(")");
       
  8095                 return NULL;
       
  8096                 
       
  8097             }
       
  8098             
       
  8099             ERROR;
       
  8100         }
       
  8101         
       
  8102     }/*function_bool_to_date*/
       
  8103     break;
       
  8104 
       
  8105 /****
       
  8106  *BOOL_TO_TOD
       
  8107  */
       
  8108     case function_bool_to_tod :
       
  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 (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  8124             {
       
  8125         
       
  8126                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8127                 s4o.print("(");
       
  8128                 return_type_symbol->accept(*this);
       
  8129                 s4o.print(")__int_to_time(");
       
  8130                 IN_param_value->accept(*this);
       
  8131                 s4o.print(")");
       
  8132                 return NULL;
       
  8133                 
       
  8134             }
       
  8135             
       
  8136             ERROR;
       
  8137         }
       
  8138         
       
  8139     }/*function_bool_to_tod*/
       
  8140     break;
       
  8141 
       
  8142 /****
       
  8143  *BOOL_TO_DT
       
  8144  */
       
  8145     case function_bool_to_dt :
       
  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(bool_type_name_c))
       
  8161             {
       
  8162         
       
  8163                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8164                 s4o.print("(");
       
  8165                 return_type_symbol->accept(*this);
       
  8166                 s4o.print(")__int_to_time(");
       
  8167                 IN_param_value->accept(*this);
       
  8168                 s4o.print(")");
       
  8169                 return NULL;
       
  8170                 
       
  8171             }
       
  8172             
       
  8173             ERROR;
       
  8174         }
       
  8175         
       
  8176     }/*function_bool_to_dt*/
       
  8177     break;
       
  8178 
       
  8179 /****
       
  8180  *BYTE_TO_REAL
       
  8181  */
       
  8182     case function_byte_to_real :
       
  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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8198             {
       
  8199         
       
  8200                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8201                 s4o.print("(");
       
  8202                 return_type_symbol->accept(*this);
       
  8203                 s4o.print(")");
       
  8204                 IN_param_value->accept(*this);
       
  8205                 return NULL;
       
  8206                 
       
  8207             }
       
  8208             
       
  8209             ERROR;
       
  8210         }
       
  8211         
       
  8212     }/*function_byte_to_real*/
       
  8213     break;
       
  8214 
       
  8215 /****
       
  8216  *BYTE_TO_LREAL
       
  8217  */
       
  8218     case function_byte_to_lreal :
       
  8219     {
       
  8220         symbol_c *last_type_symbol = NULL;
       
  8221 
       
  8222         {
       
  8223             identifier_c param_name("IN");
       
  8224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8226             
       
  8227             /* Get the value from a foo(<param_value>) style call */
       
  8228             if (IN_param_value == NULL)
       
  8229               IN_param_value = function_call_param_iterator.next();
       
  8230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8231             last_type_symbol = last_type_symbol && search_expression_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             
       
  8233             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8234             {
       
  8235         
       
  8236                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8237                 s4o.print("(");
       
  8238                 return_type_symbol->accept(*this);
       
  8239                 s4o.print(")");
       
  8240                 IN_param_value->accept(*this);
       
  8241                 return NULL;
       
  8242                 
       
  8243             }
       
  8244             
       
  8245             ERROR;
       
  8246         }
       
  8247         
       
  8248     }/*function_byte_to_lreal*/
       
  8249     break;
       
  8250 
       
  8251 /****
       
  8252  *BYTE_TO_SINT
       
  8253  */
       
  8254     case function_byte_to_sint :
       
  8255     {
       
  8256         symbol_c *last_type_symbol = NULL;
       
  8257 
       
  8258         {
       
  8259             identifier_c param_name("IN");
       
  8260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8261             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8262             
       
  8263             /* Get the value from a foo(<param_value>) style call */
       
  8264             if (IN_param_value == NULL)
       
  8265               IN_param_value = function_call_param_iterator.next();
       
  8266             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8267             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8268             
       
  8269             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8270             {
       
  8271         
       
  8272                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8273                 s4o.print("(");
       
  8274                 return_type_symbol->accept(*this);
       
  8275                 s4o.print(")");
       
  8276                 IN_param_value->accept(*this);
       
  8277                 return NULL;
       
  8278                 
       
  8279             }
       
  8280             
       
  8281             ERROR;
       
  8282         }
       
  8283         
       
  8284     }/*function_byte_to_sint*/
       
  8285     break;
       
  8286 
       
  8287 /****
       
  8288  *BYTE_TO_INT
       
  8289  */
       
  8290     case function_byte_to_int :
       
  8291     {
       
  8292         symbol_c *last_type_symbol = NULL;
       
  8293 
       
  8294         {
       
  8295             identifier_c param_name("IN");
       
  8296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8298             
       
  8299             /* Get the value from a foo(<param_value>) style call */
       
  8300             if (IN_param_value == NULL)
       
  8301               IN_param_value = function_call_param_iterator.next();
       
  8302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8304             
       
  8305             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8306             {
       
  8307         
       
  8308                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8309                 s4o.print("(");
       
  8310                 return_type_symbol->accept(*this);
       
  8311                 s4o.print(")");
       
  8312                 IN_param_value->accept(*this);
       
  8313                 return NULL;
       
  8314                 
       
  8315             }
       
  8316             
       
  8317             ERROR;
       
  8318         }
       
  8319         
       
  8320     }/*function_byte_to_int*/
       
  8321     break;
       
  8322 
       
  8323 /****
       
  8324  *BYTE_TO_DINT
       
  8325  */
       
  8326     case function_byte_to_dint :
       
  8327     {
       
  8328         symbol_c *last_type_symbol = NULL;
       
  8329 
       
  8330         {
       
  8331             identifier_c param_name("IN");
       
  8332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8333             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8334             
       
  8335             /* Get the value from a foo(<param_value>) style call */
       
  8336             if (IN_param_value == NULL)
       
  8337               IN_param_value = function_call_param_iterator.next();
       
  8338             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8339             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8340             
       
  8341             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8342             {
       
  8343         
       
  8344                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8345                 s4o.print("(");
       
  8346                 return_type_symbol->accept(*this);
       
  8347                 s4o.print(")");
       
  8348                 IN_param_value->accept(*this);
       
  8349                 return NULL;
       
  8350                 
       
  8351             }
       
  8352             
       
  8353             ERROR;
       
  8354         }
       
  8355         
       
  8356     }/*function_byte_to_dint*/
       
  8357     break;
       
  8358 
       
  8359 /****
       
  8360  *BYTE_TO_LINT
       
  8361  */
       
  8362     case function_byte_to_lint :
       
  8363     {
       
  8364         symbol_c *last_type_symbol = NULL;
       
  8365 
       
  8366         {
       
  8367             identifier_c param_name("IN");
       
  8368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8370             
       
  8371             /* Get the value from a foo(<param_value>) style call */
       
  8372             if (IN_param_value == NULL)
       
  8373               IN_param_value = function_call_param_iterator.next();
       
  8374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8376             
       
  8377             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8378             {
       
  8379         
       
  8380                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8381                 s4o.print("(");
       
  8382                 return_type_symbol->accept(*this);
       
  8383                 s4o.print(")");
       
  8384                 IN_param_value->accept(*this);
       
  8385                 return NULL;
       
  8386                 
       
  8387             }
       
  8388             
       
  8389             ERROR;
       
  8390         }
       
  8391         
       
  8392     }/*function_byte_to_lint*/
       
  8393     break;
       
  8394 
       
  8395 /****
       
  8396  *BYTE_TO_USINT
       
  8397  */
       
  8398     case function_byte_to_usint :
       
  8399     {
       
  8400         symbol_c *last_type_symbol = NULL;
       
  8401 
       
  8402         {
       
  8403             identifier_c param_name("IN");
       
  8404             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8405             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8406             
       
  8407             /* Get the value from a foo(<param_value>) style call */
       
  8408             if (IN_param_value == NULL)
       
  8409               IN_param_value = function_call_param_iterator.next();
       
  8410             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8411             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8412             
       
  8413             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8414             {
       
  8415         
       
  8416                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8417                 s4o.print("(");
       
  8418                 return_type_symbol->accept(*this);
       
  8419                 s4o.print(")");
       
  8420                 IN_param_value->accept(*this);
       
  8421                 return NULL;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_byte_to_usint*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *BYTE_TO_UINT
       
  8433  */
       
  8434     case function_byte_to_uint :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = NULL;
       
  8437 
       
  8438         {
       
  8439             identifier_c param_name("IN");
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8442             
       
  8443             /* Get the value from a foo(<param_value>) style call */
       
  8444             if (IN_param_value == NULL)
       
  8445               IN_param_value = function_call_param_iterator.next();
       
  8446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8448             
       
  8449             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8453                 s4o.print("(");
       
  8454                 return_type_symbol->accept(*this);
       
  8455                 s4o.print(")");
       
  8456                 IN_param_value->accept(*this);
       
  8457                 return NULL;
       
  8458                 
       
  8459             }
       
  8460             
       
  8461             ERROR;
       
  8462         }
       
  8463         
       
  8464     }/*function_byte_to_uint*/
       
  8465     break;
       
  8466 
       
  8467 /****
       
  8468  *BYTE_TO_UDINT
       
  8469  */
       
  8470     case function_byte_to_udint :
       
  8471     {
       
  8472         symbol_c *last_type_symbol = NULL;
       
  8473 
       
  8474         {
       
  8475             identifier_c param_name("IN");
       
  8476             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8477             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8478             
       
  8479             /* Get the value from a foo(<param_value>) style call */
       
  8480             if (IN_param_value == NULL)
       
  8481               IN_param_value = function_call_param_iterator.next();
       
  8482             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8483             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8484             
       
  8485             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8486             {
       
  8487         
       
  8488                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8489                 s4o.print("(");
       
  8490                 return_type_symbol->accept(*this);
       
  8491                 s4o.print(")");
       
  8492                 IN_param_value->accept(*this);
       
  8493                 return NULL;
       
  8494                 
       
  8495             }
       
  8496             
       
  8497             ERROR;
       
  8498         }
       
  8499         
       
  8500     }/*function_byte_to_udint*/
       
  8501     break;
       
  8502 
       
  8503 /****
       
  8504  *BYTE_TO_ULINT
       
  8505  */
       
  8506     case function_byte_to_ulint :
       
  8507     {
       
  8508         symbol_c *last_type_symbol = NULL;
       
  8509 
       
  8510         {
       
  8511             identifier_c param_name("IN");
       
  8512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8514             
       
  8515             /* Get the value from a foo(<param_value>) style call */
       
  8516             if (IN_param_value == NULL)
       
  8517               IN_param_value = function_call_param_iterator.next();
       
  8518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8520             
       
  8521             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8522             {
       
  8523         
       
  8524                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8525                 s4o.print("(");
       
  8526                 return_type_symbol->accept(*this);
       
  8527                 s4o.print(")");
       
  8528                 IN_param_value->accept(*this);
       
  8529                 return NULL;
       
  8530                 
       
  8531             }
       
  8532             
       
  8533             ERROR;
       
  8534         }
       
  8535         
       
  8536     }/*function_byte_to_ulint*/
       
  8537     break;
       
  8538 
       
  8539 /****
       
  8540  *BYTE_TO_TIME
       
  8541  */
       
  8542     case function_byte_to_time :
       
  8543     {
       
  8544         symbol_c *last_type_symbol = NULL;
       
  8545 
       
  8546         {
       
  8547             identifier_c param_name("IN");
       
  8548             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8549             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8550             
       
  8551             /* Get the value from a foo(<param_value>) style call */
       
  8552             if (IN_param_value == NULL)
       
  8553               IN_param_value = function_call_param_iterator.next();
       
  8554             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8555             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8556             
       
  8557             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8558             {
       
  8559         
       
  8560                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8561                 s4o.print("(");
       
  8562                 return_type_symbol->accept(*this);
       
  8563                 s4o.print(")__int_to_time(");
       
  8564                 IN_param_value->accept(*this);
       
  8565                 s4o.print(")");
       
  8566                 return NULL;
       
  8567                 
       
  8568             }
       
  8569             
       
  8570             ERROR;
       
  8571         }
       
  8572         
       
  8573     }/*function_byte_to_time*/
       
  8574     break;
       
  8575 
       
  8576 /****
       
  8577  *BYTE_TO_BOOL
       
  8578  */
       
  8579     case function_byte_to_bool :
       
  8580     {
       
  8581         symbol_c *last_type_symbol = NULL;
       
  8582 
       
  8583         {
       
  8584             identifier_c param_name("IN");
       
  8585             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8586             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8587             
       
  8588             /* Get the value from a foo(<param_value>) style call */
       
  8589             if (IN_param_value == NULL)
       
  8590               IN_param_value = function_call_param_iterator.next();
       
  8591             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8592             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8593             
       
  8594             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8595             {
       
  8596         
       
  8597                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8598                 s4o.print("(");
       
  8599                 return_type_symbol->accept(*this);
       
  8600                 s4o.print(")");
       
  8601                 IN_param_value->accept(*this);
       
  8602                 return NULL;
       
  8603                 
       
  8604             }
       
  8605             
       
  8606             ERROR;
       
  8607         }
       
  8608         
       
  8609     }/*function_byte_to_bool*/
       
  8610     break;
       
  8611 
       
  8612 /****
       
  8613  *BYTE_TO_WORD
       
  8614  */
       
  8615     case function_byte_to_word :
       
  8616     {
       
  8617         symbol_c *last_type_symbol = NULL;
       
  8618 
       
  8619         {
       
  8620             identifier_c param_name("IN");
       
  8621             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8622             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8623             
       
  8624             /* Get the value from a foo(<param_value>) style call */
       
  8625             if (IN_param_value == NULL)
       
  8626               IN_param_value = function_call_param_iterator.next();
       
  8627             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8628             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8629             
       
  8630             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8631             {
       
  8632         
       
  8633                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8634                 s4o.print("(");
       
  8635                 return_type_symbol->accept(*this);
       
  8636                 s4o.print(")");
       
  8637                 IN_param_value->accept(*this);
       
  8638                 return NULL;
       
  8639                 
       
  8640             }
       
  8641             
       
  8642             ERROR;
       
  8643         }
       
  8644         
       
  8645     }/*function_byte_to_word*/
       
  8646     break;
       
  8647 
       
  8648 /****
       
  8649  *BYTE_TO_DWORD
       
  8650  */
       
  8651     case function_byte_to_dword :
       
  8652     {
       
  8653         symbol_c *last_type_symbol = NULL;
       
  8654 
       
  8655         {
       
  8656             identifier_c param_name("IN");
       
  8657             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8658             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8659             
       
  8660             /* Get the value from a foo(<param_value>) style call */
       
  8661             if (IN_param_value == NULL)
       
  8662               IN_param_value = function_call_param_iterator.next();
       
  8663             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8664             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8665             
       
  8666             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8667             {
       
  8668         
       
  8669                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8670                 s4o.print("(");
       
  8671                 return_type_symbol->accept(*this);
       
  8672                 s4o.print(")");
       
  8673                 IN_param_value->accept(*this);
       
  8674                 return NULL;
       
  8675                 
       
  8676             }
       
  8677             
       
  8678             ERROR;
       
  8679         }
       
  8680         
       
  8681     }/*function_byte_to_dword*/
       
  8682     break;
       
  8683 
       
  8684 /****
       
  8685  *BYTE_TO_LWORD
       
  8686  */
       
  8687     case function_byte_to_lword :
       
  8688     {
       
  8689         symbol_c *last_type_symbol = NULL;
       
  8690 
       
  8691         {
       
  8692             identifier_c param_name("IN");
       
  8693             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8694             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8695             
       
  8696             /* Get the value from a foo(<param_value>) style call */
       
  8697             if (IN_param_value == NULL)
       
  8698               IN_param_value = function_call_param_iterator.next();
       
  8699             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8700             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8701             
       
  8702             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8703             {
       
  8704         
       
  8705                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8706                 s4o.print("(");
       
  8707                 return_type_symbol->accept(*this);
       
  8708                 s4o.print(")");
       
  8709                 IN_param_value->accept(*this);
       
  8710                 return NULL;
       
  8711                 
       
  8712             }
       
  8713             
       
  8714             ERROR;
       
  8715         }
       
  8716         
       
  8717     }/*function_byte_to_lword*/
       
  8718     break;
       
  8719 
       
  8720 /****
       
  8721  *BYTE_TO_STRING
       
  8722  */
       
  8723     case function_byte_to_string :
       
  8724     {
       
  8725         symbol_c *last_type_symbol = NULL;
       
  8726 
       
  8727         {
       
  8728             identifier_c param_name("IN");
       
  8729             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8730             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8731             
       
  8732             /* Get the value from a foo(<param_value>) style call */
       
  8733             if (IN_param_value == NULL)
       
  8734               IN_param_value = function_call_param_iterator.next();
       
  8735             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8736             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8737             
       
  8738             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8739             {
       
  8740         
       
  8741                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8742                 s4o.print("(");
       
  8743                 return_type_symbol->accept(*this);
       
  8744                 s4o.print(")__bit_to_string(");
       
  8745                 IN_param_value->accept(*this);
       
  8746                 s4o.print(")");
       
  8747                 return NULL;
       
  8748                 
       
  8749             }
       
  8750             
       
  8751             ERROR;
       
  8752         }
       
  8753         
       
  8754     }/*function_byte_to_string*/
       
  8755     break;
       
  8756 
       
  8757 /****
       
  8758  *BYTE_TO_DATE
       
  8759  */
       
  8760     case function_byte_to_date :
       
  8761     {
       
  8762         symbol_c *last_type_symbol = NULL;
       
  8763 
       
  8764         {
       
  8765             identifier_c param_name("IN");
       
  8766             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8767             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8768             
       
  8769             /* Get the value from a foo(<param_value>) style call */
       
  8770             if (IN_param_value == NULL)
       
  8771               IN_param_value = function_call_param_iterator.next();
       
  8772             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8773             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8774             
       
  8775             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8776             {
       
  8777         
       
  8778                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8779                 s4o.print("(");
       
  8780                 return_type_symbol->accept(*this);
       
  8781                 s4o.print(")__int_to_time(");
       
  8782                 IN_param_value->accept(*this);
       
  8783                 s4o.print(")");
       
  8784                 return NULL;
       
  8785                 
       
  8786             }
       
  8787             
       
  8788             ERROR;
       
  8789         }
       
  8790         
       
  8791     }/*function_byte_to_date*/
       
  8792     break;
       
  8793 
       
  8794 /****
       
  8795  *BYTE_TO_TOD
       
  8796  */
       
  8797     case function_byte_to_tod :
       
  8798     {
       
  8799         symbol_c *last_type_symbol = NULL;
       
  8800 
       
  8801         {
       
  8802             identifier_c param_name("IN");
       
  8803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8804             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8805             
       
  8806             /* Get the value from a foo(<param_value>) style call */
       
  8807             if (IN_param_value == NULL)
       
  8808               IN_param_value = function_call_param_iterator.next();
       
  8809             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8810             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8811             
       
  8812             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8813             {
       
  8814         
       
  8815                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8816                 s4o.print("(");
       
  8817                 return_type_symbol->accept(*this);
       
  8818                 s4o.print(")__int_to_time(");
       
  8819                 IN_param_value->accept(*this);
       
  8820                 s4o.print(")");
       
  8821                 return NULL;
       
  8822                 
       
  8823             }
       
  8824             
       
  8825             ERROR;
       
  8826         }
       
  8827         
       
  8828     }/*function_byte_to_tod*/
       
  8829     break;
       
  8830 
       
  8831 /****
       
  8832  *BYTE_TO_DT
       
  8833  */
       
  8834     case function_byte_to_dt :
       
  8835     {
       
  8836         symbol_c *last_type_symbol = NULL;
       
  8837 
       
  8838         {
       
  8839             identifier_c param_name("IN");
       
  8840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8842             
       
  8843             /* Get the value from a foo(<param_value>) style call */
       
  8844             if (IN_param_value == NULL)
       
  8845               IN_param_value = function_call_param_iterator.next();
       
  8846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8848             
       
  8849             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8850             {
       
  8851         
       
  8852                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8853                 s4o.print("(");
       
  8854                 return_type_symbol->accept(*this);
       
  8855                 s4o.print(")__int_to_time(");
       
  8856                 IN_param_value->accept(*this);
       
  8857                 s4o.print(")");
       
  8858                 return NULL;
       
  8859                 
       
  8860             }
       
  8861             
       
  8862             ERROR;
       
  8863         }
       
  8864         
       
  8865     }/*function_byte_to_dt*/
       
  8866     break;
       
  8867 
       
  8868 /****
       
  8869  *WORD_TO_REAL
       
  8870  */
       
  8871     case function_word_to_real :
       
  8872     {
       
  8873         symbol_c *last_type_symbol = NULL;
       
  8874 
       
  8875         {
       
  8876             identifier_c param_name("IN");
       
  8877             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8878             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8879             
       
  8880             /* Get the value from a foo(<param_value>) style call */
       
  8881             if (IN_param_value == NULL)
       
  8882               IN_param_value = function_call_param_iterator.next();
       
  8883             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8884             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8885             
       
  8886             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8887             {
       
  8888         
       
  8889                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8890                 s4o.print("(");
       
  8891                 return_type_symbol->accept(*this);
       
  8892                 s4o.print(")");
       
  8893                 IN_param_value->accept(*this);
       
  8894                 return NULL;
       
  8895                 
       
  8896             }
       
  8897             
       
  8898             ERROR;
       
  8899         }
       
  8900         
       
  8901     }/*function_word_to_real*/
       
  8902     break;
       
  8903 
       
  8904 /****
       
  8905  *WORD_TO_LREAL
       
  8906  */
       
  8907     case function_word_to_lreal :
       
  8908     {
       
  8909         symbol_c *last_type_symbol = NULL;
       
  8910 
       
  8911         {
       
  8912             identifier_c param_name("IN");
       
  8913             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8914             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8915             
       
  8916             /* Get the value from a foo(<param_value>) style call */
       
  8917             if (IN_param_value == NULL)
       
  8918               IN_param_value = function_call_param_iterator.next();
       
  8919             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8920             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8921             
       
  8922             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8923             {
       
  8924         
       
  8925                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8926                 s4o.print("(");
       
  8927                 return_type_symbol->accept(*this);
       
  8928                 s4o.print(")");
       
  8929                 IN_param_value->accept(*this);
       
  8930                 return NULL;
       
  8931                 
       
  8932             }
       
  8933             
       
  8934             ERROR;
       
  8935         }
       
  8936         
       
  8937     }/*function_word_to_lreal*/
       
  8938     break;
       
  8939 
       
  8940 /****
       
  8941  *WORD_TO_SINT
       
  8942  */
       
  8943     case function_word_to_sint :
       
  8944     {
       
  8945         symbol_c *last_type_symbol = NULL;
       
  8946 
       
  8947         {
       
  8948             identifier_c param_name("IN");
       
  8949             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8950             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8951             
       
  8952             /* Get the value from a foo(<param_value>) style call */
       
  8953             if (IN_param_value == NULL)
       
  8954               IN_param_value = function_call_param_iterator.next();
       
  8955             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8956             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8957             
       
  8958             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8959             {
       
  8960         
       
  8961                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8962                 s4o.print("(");
       
  8963                 return_type_symbol->accept(*this);
       
  8964                 s4o.print(")");
       
  8965                 IN_param_value->accept(*this);
       
  8966                 return NULL;
       
  8967                 
       
  8968             }
       
  8969             
       
  8970             ERROR;
       
  8971         }
       
  8972         
       
  8973     }/*function_word_to_sint*/
       
  8974     break;
       
  8975 
       
  8976 /****
       
  8977  *WORD_TO_INT
       
  8978  */
       
  8979     case function_word_to_int :
       
  8980     {
       
  8981         symbol_c *last_type_symbol = NULL;
       
  8982 
       
  8983         {
       
  8984             identifier_c param_name("IN");
       
  8985             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8986             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8987             
       
  8988             /* Get the value from a foo(<param_value>) style call */
       
  8989             if (IN_param_value == NULL)
       
  8990               IN_param_value = function_call_param_iterator.next();
       
  8991             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8992             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8993             
       
  8994             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8995             {
       
  8996         
       
  8997                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8998                 s4o.print("(");
       
  8999                 return_type_symbol->accept(*this);
       
  9000                 s4o.print(")");
       
  9001                 IN_param_value->accept(*this);
       
  9002                 return NULL;
       
  9003                 
       
  9004             }
       
  9005             
       
  9006             ERROR;
       
  9007         }
       
  9008         
       
  9009     }/*function_word_to_int*/
       
  9010     break;
       
  9011 
       
  9012 /****
       
  9013  *WORD_TO_DINT
       
  9014  */
       
  9015     case function_word_to_dint :
       
  9016     {
       
  9017         symbol_c *last_type_symbol = NULL;
       
  9018 
       
  9019         {
       
  9020             identifier_c param_name("IN");
       
  9021             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9022             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9023             
       
  9024             /* Get the value from a foo(<param_value>) style call */
       
  9025             if (IN_param_value == NULL)
       
  9026               IN_param_value = function_call_param_iterator.next();
       
  9027             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9028             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9029             
       
  9030             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9031             {
       
  9032         
       
  9033                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9034                 s4o.print("(");
       
  9035                 return_type_symbol->accept(*this);
       
  9036                 s4o.print(")");
       
  9037                 IN_param_value->accept(*this);
       
  9038                 return NULL;
       
  9039                 
       
  9040             }
       
  9041             
       
  9042             ERROR;
       
  9043         }
       
  9044         
       
  9045     }/*function_word_to_dint*/
       
  9046     break;
       
  9047 
       
  9048 /****
       
  9049  *WORD_TO_LINT
       
  9050  */
       
  9051     case function_word_to_lint :
       
  9052     {
       
  9053         symbol_c *last_type_symbol = NULL;
       
  9054 
       
  9055         {
       
  9056             identifier_c param_name("IN");
       
  9057             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9058             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9059             
       
  9060             /* Get the value from a foo(<param_value>) style call */
       
  9061             if (IN_param_value == NULL)
       
  9062               IN_param_value = function_call_param_iterator.next();
       
  9063             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9064             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9065             
       
  9066             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9067             {
       
  9068         
       
  9069                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9070                 s4o.print("(");
       
  9071                 return_type_symbol->accept(*this);
       
  9072                 s4o.print(")");
       
  9073                 IN_param_value->accept(*this);
       
  9074                 return NULL;
       
  9075                 
       
  9076             }
       
  9077             
       
  9078             ERROR;
       
  9079         }
       
  9080         
       
  9081     }/*function_word_to_lint*/
       
  9082     break;
       
  9083 
       
  9084 /****
       
  9085  *WORD_TO_USINT
       
  9086  */
       
  9087     case function_word_to_usint :
       
  9088     {
       
  9089         symbol_c *last_type_symbol = NULL;
       
  9090 
       
  9091         {
       
  9092             identifier_c param_name("IN");
       
  9093             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9094             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9095             
       
  9096             /* Get the value from a foo(<param_value>) style call */
       
  9097             if (IN_param_value == NULL)
       
  9098               IN_param_value = function_call_param_iterator.next();
       
  9099             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9100             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9101             
       
  9102             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9103             {
       
  9104         
       
  9105                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9106                 s4o.print("(");
       
  9107                 return_type_symbol->accept(*this);
       
  9108                 s4o.print(")");
       
  9109                 IN_param_value->accept(*this);
       
  9110                 return NULL;
       
  9111                 
       
  9112             }
       
  9113             
       
  9114             ERROR;
       
  9115         }
       
  9116         
       
  9117     }/*function_word_to_usint*/
       
  9118     break;
       
  9119 
       
  9120 /****
       
  9121  *WORD_TO_UINT
       
  9122  */
       
  9123     case function_word_to_uint :
       
  9124     {
       
  9125         symbol_c *last_type_symbol = NULL;
       
  9126 
       
  9127         {
       
  9128             identifier_c param_name("IN");
       
  9129             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9130             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9131             
       
  9132             /* Get the value from a foo(<param_value>) style call */
       
  9133             if (IN_param_value == NULL)
       
  9134               IN_param_value = function_call_param_iterator.next();
       
  9135             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9136             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9137             
       
  9138             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9139             {
       
  9140         
       
  9141                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9142                 s4o.print("(");
       
  9143                 return_type_symbol->accept(*this);
       
  9144                 s4o.print(")");
       
  9145                 IN_param_value->accept(*this);
       
  9146                 return NULL;
       
  9147                 
       
  9148             }
       
  9149             
       
  9150             ERROR;
       
  9151         }
       
  9152         
       
  9153     }/*function_word_to_uint*/
       
  9154     break;
       
  9155 
       
  9156 /****
       
  9157  *WORD_TO_UDINT
       
  9158  */
       
  9159     case function_word_to_udint :
       
  9160     {
       
  9161         symbol_c *last_type_symbol = NULL;
       
  9162 
       
  9163         {
       
  9164             identifier_c param_name("IN");
       
  9165             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9166             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9167             
       
  9168             /* Get the value from a foo(<param_value>) style call */
       
  9169             if (IN_param_value == NULL)
       
  9170               IN_param_value = function_call_param_iterator.next();
       
  9171             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9172             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9173             
       
  9174             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9175             {
       
  9176         
       
  9177                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9178                 s4o.print("(");
       
  9179                 return_type_symbol->accept(*this);
       
  9180                 s4o.print(")");
       
  9181                 IN_param_value->accept(*this);
       
  9182                 return NULL;
       
  9183                 
       
  9184             }
       
  9185             
       
  9186             ERROR;
       
  9187         }
       
  9188         
       
  9189     }/*function_word_to_udint*/
       
  9190     break;
       
  9191 
       
  9192 /****
       
  9193  *WORD_TO_ULINT
       
  9194  */
       
  9195     case function_word_to_ulint :
       
  9196     {
       
  9197         symbol_c *last_type_symbol = NULL;
       
  9198 
       
  9199         {
       
  9200             identifier_c param_name("IN");
       
  9201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9202             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9203             
       
  9204             /* Get the value from a foo(<param_value>) style call */
       
  9205             if (IN_param_value == NULL)
       
  9206               IN_param_value = function_call_param_iterator.next();
       
  9207             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9208             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9209             
       
  9210             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9211             {
       
  9212         
       
  9213                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9214                 s4o.print("(");
       
  9215                 return_type_symbol->accept(*this);
       
  9216                 s4o.print(")");
       
  9217                 IN_param_value->accept(*this);
       
  9218                 return NULL;
       
  9219                 
       
  9220             }
       
  9221             
       
  9222             ERROR;
       
  9223         }
       
  9224         
       
  9225     }/*function_word_to_ulint*/
       
  9226     break;
       
  9227 
       
  9228 /****
       
  9229  *WORD_TO_TIME
       
  9230  */
       
  9231     case function_word_to_time :
       
  9232     {
       
  9233         symbol_c *last_type_symbol = NULL;
       
  9234 
       
  9235         {
       
  9236             identifier_c param_name("IN");
       
  9237             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9238             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9239             
       
  9240             /* Get the value from a foo(<param_value>) style call */
       
  9241             if (IN_param_value == NULL)
       
  9242               IN_param_value = function_call_param_iterator.next();
       
  9243             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9244             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9245             
       
  9246             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9247             {
       
  9248         
       
  9249                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9250                 s4o.print("(");
       
  9251                 return_type_symbol->accept(*this);
       
  9252                 s4o.print(")__int_to_time(");
       
  9253                 IN_param_value->accept(*this);
       
  9254                 s4o.print(")");
       
  9255                 return NULL;
       
  9256                 
       
  9257             }
       
  9258             
       
  9259             ERROR;
       
  9260         }
       
  9261         
       
  9262     }/*function_word_to_time*/
       
  9263     break;
       
  9264 
       
  9265 /****
       
  9266  *WORD_TO_BOOL
       
  9267  */
       
  9268     case function_word_to_bool :
       
  9269     {
       
  9270         symbol_c *last_type_symbol = NULL;
       
  9271 
       
  9272         {
       
  9273             identifier_c param_name("IN");
       
  9274             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9275             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9276             
       
  9277             /* Get the value from a foo(<param_value>) style call */
       
  9278             if (IN_param_value == NULL)
       
  9279               IN_param_value = function_call_param_iterator.next();
       
  9280             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9281             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9282             
       
  9283             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9284             {
       
  9285         
       
  9286                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9287                 s4o.print("(");
       
  9288                 return_type_symbol->accept(*this);
       
  9289                 s4o.print(")");
       
  9290                 IN_param_value->accept(*this);
       
  9291                 return NULL;
       
  9292                 
       
  9293             }
       
  9294             
       
  9295             ERROR;
       
  9296         }
       
  9297         
       
  9298     }/*function_word_to_bool*/
       
  9299     break;
       
  9300 
       
  9301 /****
       
  9302  *WORD_TO_BYTE
       
  9303  */
       
  9304     case function_word_to_byte :
       
  9305     {
       
  9306         symbol_c *last_type_symbol = NULL;
       
  9307 
       
  9308         {
       
  9309             identifier_c param_name("IN");
       
  9310             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9311             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9312             
       
  9313             /* Get the value from a foo(<param_value>) style call */
       
  9314             if (IN_param_value == NULL)
       
  9315               IN_param_value = function_call_param_iterator.next();
       
  9316             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9317             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9318             
       
  9319             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9320             {
       
  9321         
       
  9322                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9323                 s4o.print("(");
       
  9324                 return_type_symbol->accept(*this);
       
  9325                 s4o.print(")");
       
  9326                 IN_param_value->accept(*this);
       
  9327                 return NULL;
       
  9328                 
       
  9329             }
       
  9330             
       
  9331             ERROR;
       
  9332         }
       
  9333         
       
  9334     }/*function_word_to_byte*/
       
  9335     break;
       
  9336 
       
  9337 /****
       
  9338  *WORD_TO_DWORD
       
  9339  */
       
  9340     case function_word_to_dword :
       
  9341     {
       
  9342         symbol_c *last_type_symbol = NULL;
       
  9343 
       
  9344         {
       
  9345             identifier_c param_name("IN");
       
  9346             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9347             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9348             
       
  9349             /* Get the value from a foo(<param_value>) style call */
       
  9350             if (IN_param_value == NULL)
       
  9351               IN_param_value = function_call_param_iterator.next();
       
  9352             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9353             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9354             
       
  9355             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9356             {
       
  9357         
       
  9358                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9359                 s4o.print("(");
       
  9360                 return_type_symbol->accept(*this);
       
  9361                 s4o.print(")");
       
  9362                 IN_param_value->accept(*this);
       
  9363                 return NULL;
       
  9364                 
       
  9365             }
       
  9366             
       
  9367             ERROR;
       
  9368         }
       
  9369         
       
  9370     }/*function_word_to_dword*/
       
  9371     break;
       
  9372 
       
  9373 /****
       
  9374  *WORD_TO_LWORD
       
  9375  */
       
  9376     case function_word_to_lword :
       
  9377     {
       
  9378         symbol_c *last_type_symbol = NULL;
       
  9379 
       
  9380         {
       
  9381             identifier_c param_name("IN");
       
  9382             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9383             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9384             
       
  9385             /* Get the value from a foo(<param_value>) style call */
       
  9386             if (IN_param_value == NULL)
       
  9387               IN_param_value = function_call_param_iterator.next();
       
  9388             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9389             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9390             
       
  9391             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9392             {
       
  9393         
       
  9394                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9395                 s4o.print("(");
       
  9396                 return_type_symbol->accept(*this);
       
  9397                 s4o.print(")");
       
  9398                 IN_param_value->accept(*this);
       
  9399                 return NULL;
       
  9400                 
       
  9401             }
       
  9402             
       
  9403             ERROR;
       
  9404         }
       
  9405         
       
  9406     }/*function_word_to_lword*/
       
  9407     break;
       
  9408 
       
  9409 /****
       
  9410  *WORD_TO_STRING
       
  9411  */
       
  9412     case function_word_to_string :
       
  9413     {
       
  9414         symbol_c *last_type_symbol = NULL;
       
  9415 
       
  9416         {
       
  9417             identifier_c param_name("IN");
       
  9418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9419             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9420             
       
  9421             /* Get the value from a foo(<param_value>) style call */
       
  9422             if (IN_param_value == NULL)
       
  9423               IN_param_value = function_call_param_iterator.next();
       
  9424             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9425             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9426             
       
  9427             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9428             {
       
  9429         
       
  9430                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9431                 s4o.print("(");
       
  9432                 return_type_symbol->accept(*this);
       
  9433                 s4o.print(")__bit_to_string(");
       
  9434                 IN_param_value->accept(*this);
       
  9435                 s4o.print(")");
       
  9436                 return NULL;
       
  9437                 
       
  9438             }
       
  9439             
       
  9440             ERROR;
       
  9441         }
       
  9442         
       
  9443     }/*function_word_to_string*/
       
  9444     break;
       
  9445 
       
  9446 /****
       
  9447  *WORD_TO_DATE
       
  9448  */
       
  9449     case function_word_to_date :
       
  9450     {
       
  9451         symbol_c *last_type_symbol = NULL;
       
  9452 
       
  9453         {
       
  9454             identifier_c param_name("IN");
       
  9455             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9457             
       
  9458             /* Get the value from a foo(<param_value>) style call */
       
  9459             if (IN_param_value == NULL)
       
  9460               IN_param_value = function_call_param_iterator.next();
       
  9461             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9462             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9463             
       
  9464             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9465             {
       
  9466         
       
  9467                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9468                 s4o.print("(");
       
  9469                 return_type_symbol->accept(*this);
       
  9470                 s4o.print(")__int_to_time(");
       
  9471                 IN_param_value->accept(*this);
       
  9472                 s4o.print(")");
       
  9473                 return NULL;
       
  9474                 
       
  9475             }
       
  9476             
       
  9477             ERROR;
       
  9478         }
       
  9479         
       
  9480     }/*function_word_to_date*/
       
  9481     break;
       
  9482 
       
  9483 /****
       
  9484  *WORD_TO_TOD
       
  9485  */
       
  9486     case function_word_to_tod :
       
  9487     {
       
  9488         symbol_c *last_type_symbol = NULL;
       
  9489 
       
  9490         {
       
  9491             identifier_c param_name("IN");
       
  9492             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9493             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9494             
       
  9495             /* Get the value from a foo(<param_value>) style call */
       
  9496             if (IN_param_value == NULL)
       
  9497               IN_param_value = function_call_param_iterator.next();
       
  9498             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9499             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9500             
       
  9501             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9502             {
       
  9503         
       
  9504                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9505                 s4o.print("(");
       
  9506                 return_type_symbol->accept(*this);
       
  9507                 s4o.print(")__int_to_time(");
       
  9508                 IN_param_value->accept(*this);
       
  9509                 s4o.print(")");
       
  9510                 return NULL;
       
  9511                 
       
  9512             }
       
  9513             
       
  9514             ERROR;
       
  9515         }
       
  9516         
       
  9517     }/*function_word_to_tod*/
       
  9518     break;
       
  9519 
       
  9520 /****
       
  9521  *WORD_TO_DT
       
  9522  */
       
  9523     case function_word_to_dt :
       
  9524     {
       
  9525         symbol_c *last_type_symbol = NULL;
       
  9526 
       
  9527         {
       
  9528             identifier_c param_name("IN");
       
  9529             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9530             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9531             
       
  9532             /* Get the value from a foo(<param_value>) style call */
       
  9533             if (IN_param_value == NULL)
       
  9534               IN_param_value = function_call_param_iterator.next();
       
  9535             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9536             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9537             
       
  9538             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9539             {
       
  9540         
       
  9541                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9542                 s4o.print("(");
       
  9543                 return_type_symbol->accept(*this);
       
  9544                 s4o.print(")__int_to_time(");
       
  9545                 IN_param_value->accept(*this);
       
  9546                 s4o.print(")");
       
  9547                 return NULL;
       
  9548                 
       
  9549             }
       
  9550             
       
  9551             ERROR;
       
  9552         }
       
  9553         
       
  9554     }/*function_word_to_dt*/
       
  9555     break;
       
  9556 
       
  9557 /****
       
  9558  *DWORD_TO_REAL
       
  9559  */
       
  9560     case function_dword_to_real :
       
  9561     {
       
  9562         symbol_c *last_type_symbol = NULL;
       
  9563 
       
  9564         {
       
  9565             identifier_c param_name("IN");
       
  9566             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9567             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9568             
       
  9569             /* Get the value from a foo(<param_value>) style call */
       
  9570             if (IN_param_value == NULL)
       
  9571               IN_param_value = function_call_param_iterator.next();
       
  9572             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9573             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9574             
       
  9575             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9576             {
       
  9577         
       
  9578                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9579                 s4o.print("(");
       
  9580                 return_type_symbol->accept(*this);
       
  9581                 s4o.print(")");
       
  9582                 IN_param_value->accept(*this);
       
  9583                 return NULL;
       
  9584                 
       
  9585             }
       
  9586             
       
  9587             ERROR;
       
  9588         }
       
  9589         
       
  9590     }/*function_dword_to_real*/
       
  9591     break;
       
  9592 
       
  9593 /****
       
  9594  *DWORD_TO_LREAL
       
  9595  */
       
  9596     case function_dword_to_lreal :
       
  9597     {
       
  9598         symbol_c *last_type_symbol = NULL;
       
  9599 
       
  9600         {
       
  9601             identifier_c param_name("IN");
       
  9602             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9603             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9604             
       
  9605             /* Get the value from a foo(<param_value>) style call */
       
  9606             if (IN_param_value == NULL)
       
  9607               IN_param_value = function_call_param_iterator.next();
       
  9608             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9609             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9610             
       
  9611             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9612             {
       
  9613         
       
  9614                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9615                 s4o.print("(");
       
  9616                 return_type_symbol->accept(*this);
       
  9617                 s4o.print(")");
       
  9618                 IN_param_value->accept(*this);
       
  9619                 return NULL;
       
  9620                 
       
  9621             }
       
  9622             
       
  9623             ERROR;
       
  9624         }
       
  9625         
       
  9626     }/*function_dword_to_lreal*/
       
  9627     break;
       
  9628 
       
  9629 /****
       
  9630  *DWORD_TO_SINT
       
  9631  */
       
  9632     case function_dword_to_sint :
       
  9633     {
       
  9634         symbol_c *last_type_symbol = NULL;
       
  9635 
       
  9636         {
       
  9637             identifier_c param_name("IN");
       
  9638             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9639             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9640             
       
  9641             /* Get the value from a foo(<param_value>) style call */
       
  9642             if (IN_param_value == NULL)
       
  9643               IN_param_value = function_call_param_iterator.next();
       
  9644             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9645             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9646             
       
  9647             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9648             {
       
  9649         
       
  9650                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9651                 s4o.print("(");
       
  9652                 return_type_symbol->accept(*this);
       
  9653                 s4o.print(")");
       
  9654                 IN_param_value->accept(*this);
       
  9655                 return NULL;
       
  9656                 
       
  9657             }
       
  9658             
       
  9659             ERROR;
       
  9660         }
       
  9661         
       
  9662     }/*function_dword_to_sint*/
       
  9663     break;
       
  9664 
       
  9665 /****
       
  9666  *DWORD_TO_INT
       
  9667  */
       
  9668     case function_dword_to_int :
       
  9669     {
       
  9670         symbol_c *last_type_symbol = NULL;
       
  9671 
       
  9672         {
       
  9673             identifier_c param_name("IN");
       
  9674             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9675             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9676             
       
  9677             /* Get the value from a foo(<param_value>) style call */
       
  9678             if (IN_param_value == NULL)
       
  9679               IN_param_value = function_call_param_iterator.next();
       
  9680             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9681             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9682             
       
  9683             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9684             {
       
  9685         
       
  9686                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9687                 s4o.print("(");
       
  9688                 return_type_symbol->accept(*this);
       
  9689                 s4o.print(")");
       
  9690                 IN_param_value->accept(*this);
       
  9691                 return NULL;
       
  9692                 
       
  9693             }
       
  9694             
       
  9695             ERROR;
       
  9696         }
       
  9697         
       
  9698     }/*function_dword_to_int*/
       
  9699     break;
       
  9700 
       
  9701 /****
       
  9702  *DWORD_TO_DINT
       
  9703  */
       
  9704     case function_dword_to_dint :
       
  9705     {
       
  9706         symbol_c *last_type_symbol = NULL;
       
  9707 
       
  9708         {
       
  9709             identifier_c param_name("IN");
       
  9710             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9711             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9712             
       
  9713             /* Get the value from a foo(<param_value>) style call */
       
  9714             if (IN_param_value == NULL)
       
  9715               IN_param_value = function_call_param_iterator.next();
       
  9716             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9717             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9718             
       
  9719             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9720             {
       
  9721         
       
  9722                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9723                 s4o.print("(");
       
  9724                 return_type_symbol->accept(*this);
       
  9725                 s4o.print(")");
       
  9726                 IN_param_value->accept(*this);
       
  9727                 return NULL;
       
  9728                 
       
  9729             }
       
  9730             
       
  9731             ERROR;
       
  9732         }
       
  9733         
       
  9734     }/*function_dword_to_dint*/
       
  9735     break;
       
  9736 
       
  9737 /****
       
  9738  *DWORD_TO_LINT
       
  9739  */
       
  9740     case function_dword_to_lint :
       
  9741     {
       
  9742         symbol_c *last_type_symbol = NULL;
       
  9743 
       
  9744         {
       
  9745             identifier_c param_name("IN");
       
  9746             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9747             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9748             
       
  9749             /* Get the value from a foo(<param_value>) style call */
       
  9750             if (IN_param_value == NULL)
       
  9751               IN_param_value = function_call_param_iterator.next();
       
  9752             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9753             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9754             
       
  9755             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9756             {
       
  9757         
       
  9758                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9759                 s4o.print("(");
       
  9760                 return_type_symbol->accept(*this);
       
  9761                 s4o.print(")");
       
  9762                 IN_param_value->accept(*this);
       
  9763                 return NULL;
       
  9764                 
       
  9765             }
       
  9766             
       
  9767             ERROR;
       
  9768         }
       
  9769         
       
  9770     }/*function_dword_to_lint*/
       
  9771     break;
       
  9772 
       
  9773 /****
       
  9774  *DWORD_TO_USINT
       
  9775  */
       
  9776     case function_dword_to_usint :
       
  9777     {
       
  9778         symbol_c *last_type_symbol = NULL;
       
  9779 
       
  9780         {
       
  9781             identifier_c param_name("IN");
       
  9782             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9783             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9784             
       
  9785             /* Get the value from a foo(<param_value>) style call */
       
  9786             if (IN_param_value == NULL)
       
  9787               IN_param_value = function_call_param_iterator.next();
       
  9788             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9789             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9790             
       
  9791             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9792             {
       
  9793         
       
  9794                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9795                 s4o.print("(");
       
  9796                 return_type_symbol->accept(*this);
       
  9797                 s4o.print(")");
       
  9798                 IN_param_value->accept(*this);
       
  9799                 return NULL;
       
  9800                 
       
  9801             }
       
  9802             
       
  9803             ERROR;
       
  9804         }
       
  9805         
       
  9806     }/*function_dword_to_usint*/
       
  9807     break;
       
  9808 
       
  9809 /****
       
  9810  *DWORD_TO_UINT
       
  9811  */
       
  9812     case function_dword_to_uint :
       
  9813     {
       
  9814         symbol_c *last_type_symbol = NULL;
       
  9815 
       
  9816         {
       
  9817             identifier_c param_name("IN");
       
  9818             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9819             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9820             
       
  9821             /* Get the value from a foo(<param_value>) style call */
       
  9822             if (IN_param_value == NULL)
       
  9823               IN_param_value = function_call_param_iterator.next();
       
  9824             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9825             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9826             
       
  9827             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9828             {
       
  9829         
       
  9830                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9831                 s4o.print("(");
       
  9832                 return_type_symbol->accept(*this);
       
  9833                 s4o.print(")");
       
  9834                 IN_param_value->accept(*this);
       
  9835                 return NULL;
       
  9836                 
       
  9837             }
       
  9838             
       
  9839             ERROR;
       
  9840         }
       
  9841         
       
  9842     }/*function_dword_to_uint*/
       
  9843     break;
       
  9844 
       
  9845 /****
       
  9846  *DWORD_TO_UDINT
       
  9847  */
       
  9848     case function_dword_to_udint :
       
  9849     {
       
  9850         symbol_c *last_type_symbol = NULL;
       
  9851 
       
  9852         {
       
  9853             identifier_c param_name("IN");
       
  9854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9855             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9856             
       
  9857             /* Get the value from a foo(<param_value>) style call */
       
  9858             if (IN_param_value == NULL)
       
  9859               IN_param_value = function_call_param_iterator.next();
       
  9860             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9861             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9862             
       
  9863             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9864             {
       
  9865         
       
  9866                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9867                 s4o.print("(");
       
  9868                 return_type_symbol->accept(*this);
       
  9869                 s4o.print(")");
       
  9870                 IN_param_value->accept(*this);
       
  9871                 return NULL;
       
  9872                 
       
  9873             }
       
  9874             
       
  9875             ERROR;
       
  9876         }
       
  9877         
       
  9878     }/*function_dword_to_udint*/
       
  9879     break;
       
  9880 
       
  9881 /****
       
  9882  *DWORD_TO_ULINT
       
  9883  */
       
  9884     case function_dword_to_ulint :
       
  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(dword_type_name_c))
       
  9900             {
       
  9901         
       
  9902                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9903                 s4o.print("(");
       
  9904                 return_type_symbol->accept(*this);
       
  9905                 s4o.print(")");
       
  9906                 IN_param_value->accept(*this);
       
  9907                 return NULL;
       
  9908                 
       
  9909             }
       
  9910             
       
  9911             ERROR;
       
  9912         }
       
  9913         
       
  9914     }/*function_dword_to_ulint*/
       
  9915     break;
       
  9916 
       
  9917 /****
       
  9918  *DWORD_TO_TIME
       
  9919  */
       
  9920     case function_dword_to_time :
       
  9921     {
       
  9922         symbol_c *last_type_symbol = NULL;
       
  9923 
       
  9924         {
       
  9925             identifier_c param_name("IN");
       
  9926             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9927             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9928             
       
  9929             /* Get the value from a foo(<param_value>) style call */
       
  9930             if (IN_param_value == NULL)
       
  9931               IN_param_value = function_call_param_iterator.next();
       
  9932             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9933             last_type_symbol = last_type_symbol && search_expression_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             
       
  9935             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9936             {
       
  9937         
       
  9938                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9939                 s4o.print("(");
       
  9940                 return_type_symbol->accept(*this);
       
  9941                 s4o.print(")__int_to_time(");
       
  9942                 IN_param_value->accept(*this);
       
  9943                 s4o.print(")");
       
  9944                 return NULL;
       
  9945                 
       
  9946             }
       
  9947             
       
  9948             ERROR;
       
  9949         }
       
  9950         
       
  9951     }/*function_dword_to_time*/
       
  9952     break;
       
  9953 
       
  9954 /****
       
  9955  *DWORD_TO_BOOL
       
  9956  */
       
  9957     case function_dword_to_bool :
       
  9958     {
       
  9959         symbol_c *last_type_symbol = NULL;
       
  9960 
       
  9961         {
       
  9962             identifier_c param_name("IN");
       
  9963             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9964             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9965             
       
  9966             /* Get the value from a foo(<param_value>) style call */
       
  9967             if (IN_param_value == NULL)
       
  9968               IN_param_value = function_call_param_iterator.next();
       
  9969             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9970             last_type_symbol = last_type_symbol && search_expression_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             
       
  9972             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9973             {
       
  9974         
       
  9975                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9976                 s4o.print("(");
       
  9977                 return_type_symbol->accept(*this);
       
  9978                 s4o.print(")");
       
  9979                 IN_param_value->accept(*this);
       
  9980                 return NULL;
       
  9981                 
       
  9982             }
       
  9983             
       
  9984             ERROR;
       
  9985         }
       
  9986         
       
  9987     }/*function_dword_to_bool*/
       
  9988     break;
       
  9989 
       
  9990 /****
       
  9991  *DWORD_TO_BYTE
       
  9992  */
       
  9993     case function_dword_to_byte :
       
  9994     {
       
  9995         symbol_c *last_type_symbol = NULL;
       
  9996 
       
  9997         {
       
  9998             identifier_c param_name("IN");
       
  9999             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10000             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10001             
       
 10002             /* Get the value from a foo(<param_value>) style call */
       
 10003             if (IN_param_value == NULL)
       
 10004               IN_param_value = function_call_param_iterator.next();
       
 10005             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10006             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10007             
       
 10008             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10009             {
       
 10010         
       
 10011                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10012                 s4o.print("(");
       
 10013                 return_type_symbol->accept(*this);
       
 10014                 s4o.print(")");
       
 10015                 IN_param_value->accept(*this);
       
 10016                 return NULL;
       
 10017                 
       
 10018             }
       
 10019             
       
 10020             ERROR;
       
 10021         }
       
 10022         
       
 10023     }/*function_dword_to_byte*/
       
 10024     break;
       
 10025 
       
 10026 /****
       
 10027  *DWORD_TO_WORD
       
 10028  */
       
 10029     case function_dword_to_word :
       
 10030     {
       
 10031         symbol_c *last_type_symbol = NULL;
       
 10032 
       
 10033         {
       
 10034             identifier_c param_name("IN");
       
 10035             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10036             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10037             
       
 10038             /* Get the value from a foo(<param_value>) style call */
       
 10039             if (IN_param_value == NULL)
       
 10040               IN_param_value = function_call_param_iterator.next();
       
 10041             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10042             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10043             
       
 10044             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10045             {
       
 10046         
       
 10047                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10048                 s4o.print("(");
       
 10049                 return_type_symbol->accept(*this);
       
 10050                 s4o.print(")");
       
 10051                 IN_param_value->accept(*this);
       
 10052                 return NULL;
       
 10053                 
       
 10054             }
       
 10055             
       
 10056             ERROR;
       
 10057         }
       
 10058         
       
 10059     }/*function_dword_to_word*/
       
 10060     break;
       
 10061 
       
 10062 /****
       
 10063  *DWORD_TO_LWORD
       
 10064  */
       
 10065     case function_dword_to_lword :
       
 10066     {
       
 10067         symbol_c *last_type_symbol = NULL;
       
 10068 
       
 10069         {
       
 10070             identifier_c param_name("IN");
       
 10071             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10072             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10073             
       
 10074             /* Get the value from a foo(<param_value>) style call */
       
 10075             if (IN_param_value == NULL)
       
 10076               IN_param_value = function_call_param_iterator.next();
       
 10077             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10078             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10079             
       
 10080             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10081             {
       
 10082         
       
 10083                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10084                 s4o.print("(");
       
 10085                 return_type_symbol->accept(*this);
       
 10086                 s4o.print(")");
       
 10087                 IN_param_value->accept(*this);
       
 10088                 return NULL;
       
 10089                 
       
 10090             }
       
 10091             
       
 10092             ERROR;
       
 10093         }
       
 10094         
       
 10095     }/*function_dword_to_lword*/
       
 10096     break;
       
 10097 
       
 10098 /****
       
 10099  *DWORD_TO_STRING
       
 10100  */
       
 10101     case function_dword_to_string :
       
 10102     {
       
 10103         symbol_c *last_type_symbol = NULL;
       
 10104 
       
 10105         {
       
 10106             identifier_c param_name("IN");
       
 10107             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10108             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10109             
       
 10110             /* Get the value from a foo(<param_value>) style call */
       
 10111             if (IN_param_value == NULL)
       
 10112               IN_param_value = function_call_param_iterator.next();
       
 10113             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10114             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10115             
       
 10116             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10117             {
       
 10118         
       
 10119                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10120                 s4o.print("(");
       
 10121                 return_type_symbol->accept(*this);
       
 10122                 s4o.print(")__bit_to_string(");
       
 10123                 IN_param_value->accept(*this);
       
 10124                 s4o.print(")");
       
 10125                 return NULL;
       
 10126                 
       
 10127             }
       
 10128             
       
 10129             ERROR;
       
 10130         }
       
 10131         
       
 10132     }/*function_dword_to_string*/
       
 10133     break;
       
 10134 
       
 10135 /****
       
 10136  *DWORD_TO_DATE
       
 10137  */
       
 10138     case function_dword_to_date :
       
 10139     {
       
 10140         symbol_c *last_type_symbol = NULL;
       
 10141 
       
 10142         {
       
 10143             identifier_c param_name("IN");
       
 10144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10146             
       
 10147             /* Get the value from a foo(<param_value>) style call */
       
 10148             if (IN_param_value == NULL)
       
 10149               IN_param_value = function_call_param_iterator.next();
       
 10150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10152             
       
 10153             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10154             {
       
 10155         
       
 10156                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10157                 s4o.print("(");
       
 10158                 return_type_symbol->accept(*this);
       
 10159                 s4o.print(")__int_to_time(");
       
 10160                 IN_param_value->accept(*this);
       
 10161                 s4o.print(")");
       
 10162                 return NULL;
       
 10163                 
       
 10164             }
       
 10165             
       
 10166             ERROR;
       
 10167         }
       
 10168         
       
 10169     }/*function_dword_to_date*/
       
 10170     break;
       
 10171 
       
 10172 /****
       
 10173  *DWORD_TO_TOD
       
 10174  */
       
 10175     case function_dword_to_tod :
       
 10176     {
       
 10177         symbol_c *last_type_symbol = NULL;
       
 10178 
       
 10179         {
       
 10180             identifier_c param_name("IN");
       
 10181             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10182             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10183             
       
 10184             /* Get the value from a foo(<param_value>) style call */
       
 10185             if (IN_param_value == NULL)
       
 10186               IN_param_value = function_call_param_iterator.next();
       
 10187             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10188             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10189             
       
 10190             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10191             {
       
 10192         
       
 10193                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10194                 s4o.print("(");
       
 10195                 return_type_symbol->accept(*this);
       
 10196                 s4o.print(")__int_to_time(");
       
 10197                 IN_param_value->accept(*this);
       
 10198                 s4o.print(")");
       
 10199                 return NULL;
       
 10200                 
       
 10201             }
       
 10202             
       
 10203             ERROR;
       
 10204         }
       
 10205         
       
 10206     }/*function_dword_to_tod*/
       
 10207     break;
       
 10208 
       
 10209 /****
       
 10210  *DWORD_TO_DT
       
 10211  */
       
 10212     case function_dword_to_dt :
       
 10213     {
       
 10214         symbol_c *last_type_symbol = NULL;
       
 10215 
       
 10216         {
       
 10217             identifier_c param_name("IN");
       
 10218             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10219             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10220             
       
 10221             /* Get the value from a foo(<param_value>) style call */
       
 10222             if (IN_param_value == NULL)
       
 10223               IN_param_value = function_call_param_iterator.next();
       
 10224             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10225             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10226             
       
 10227             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10228             {
       
 10229         
       
 10230                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10231                 s4o.print("(");
       
 10232                 return_type_symbol->accept(*this);
       
 10233                 s4o.print(")__int_to_time(");
       
 10234                 IN_param_value->accept(*this);
       
 10235                 s4o.print(")");
       
 10236                 return NULL;
       
 10237                 
       
 10238             }
       
 10239             
       
 10240             ERROR;
       
 10241         }
       
 10242         
       
 10243     }/*function_dword_to_dt*/
       
 10244     break;
       
 10245 
       
 10246 /****
       
 10247  *LWORD_TO_REAL
       
 10248  */
       
 10249     case function_lword_to_real :
       
 10250     {
       
 10251         symbol_c *last_type_symbol = NULL;
       
 10252 
       
 10253         {
       
 10254             identifier_c param_name("IN");
       
 10255             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10256             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10257             
       
 10258             /* Get the value from a foo(<param_value>) style call */
       
 10259             if (IN_param_value == NULL)
       
 10260               IN_param_value = function_call_param_iterator.next();
       
 10261             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10262             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10263             
       
 10264             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10265             {
       
 10266         
       
 10267                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10268                 s4o.print("(");
       
 10269                 return_type_symbol->accept(*this);
       
 10270                 s4o.print(")");
       
 10271                 IN_param_value->accept(*this);
       
 10272                 return NULL;
       
 10273                 
       
 10274             }
       
 10275             
       
 10276             ERROR;
       
 10277         }
       
 10278         
       
 10279     }/*function_lword_to_real*/
       
 10280     break;
       
 10281 
       
 10282 /****
       
 10283  *LWORD_TO_LREAL
       
 10284  */
       
 10285     case function_lword_to_lreal :
       
 10286     {
       
 10287         symbol_c *last_type_symbol = NULL;
       
 10288 
       
 10289         {
       
 10290             identifier_c param_name("IN");
       
 10291             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10292             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10293             
       
 10294             /* Get the value from a foo(<param_value>) style call */
       
 10295             if (IN_param_value == NULL)
       
 10296               IN_param_value = function_call_param_iterator.next();
       
 10297             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10298             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10299             
       
 10300             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10301             {
       
 10302         
       
 10303                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10304                 s4o.print("(");
       
 10305                 return_type_symbol->accept(*this);
       
 10306                 s4o.print(")");
       
 10307                 IN_param_value->accept(*this);
       
 10308                 return NULL;
       
 10309                 
       
 10310             }
       
 10311             
       
 10312             ERROR;
       
 10313         }
       
 10314         
       
 10315     }/*function_lword_to_lreal*/
       
 10316     break;
       
 10317 
       
 10318 /****
       
 10319  *LWORD_TO_SINT
       
 10320  */
       
 10321     case function_lword_to_sint :
       
 10322     {
       
 10323         symbol_c *last_type_symbol = NULL;
       
 10324 
       
 10325         {
       
 10326             identifier_c param_name("IN");
       
 10327             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10328             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10329             
       
 10330             /* Get the value from a foo(<param_value>) style call */
       
 10331             if (IN_param_value == NULL)
       
 10332               IN_param_value = function_call_param_iterator.next();
       
 10333             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10334             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10335             
       
 10336             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10337             {
       
 10338         
       
 10339                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10340                 s4o.print("(");
       
 10341                 return_type_symbol->accept(*this);
       
 10342                 s4o.print(")");
       
 10343                 IN_param_value->accept(*this);
       
 10344                 return NULL;
       
 10345                 
       
 10346             }
       
 10347             
       
 10348             ERROR;
       
 10349         }
       
 10350         
       
 10351     }/*function_lword_to_sint*/
       
 10352     break;
       
 10353 
       
 10354 /****
       
 10355  *LWORD_TO_INT
       
 10356  */
       
 10357     case function_lword_to_int :
       
 10358     {
       
 10359         symbol_c *last_type_symbol = NULL;
       
 10360 
       
 10361         {
       
 10362             identifier_c param_name("IN");
       
 10363             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10364             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10365             
       
 10366             /* Get the value from a foo(<param_value>) style call */
       
 10367             if (IN_param_value == NULL)
       
 10368               IN_param_value = function_call_param_iterator.next();
       
 10369             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10370             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10371             
       
 10372             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10373             {
       
 10374         
       
 10375                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10376                 s4o.print("(");
       
 10377                 return_type_symbol->accept(*this);
       
 10378                 s4o.print(")");
       
 10379                 IN_param_value->accept(*this);
       
 10380                 return NULL;
       
 10381                 
       
 10382             }
       
 10383             
       
 10384             ERROR;
       
 10385         }
       
 10386         
       
 10387     }/*function_lword_to_int*/
       
 10388     break;
       
 10389 
       
 10390 /****
       
 10391  *LWORD_TO_DINT
       
 10392  */
       
 10393     case function_lword_to_dint :
       
 10394     {
       
 10395         symbol_c *last_type_symbol = NULL;
       
 10396 
       
 10397         {
       
 10398             identifier_c param_name("IN");
       
 10399             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10400             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10401             
       
 10402             /* Get the value from a foo(<param_value>) style call */
       
 10403             if (IN_param_value == NULL)
       
 10404               IN_param_value = function_call_param_iterator.next();
       
 10405             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10406             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10407             
       
 10408             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10409             {
       
 10410         
       
 10411                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10412                 s4o.print("(");
       
 10413                 return_type_symbol->accept(*this);
       
 10414                 s4o.print(")");
       
 10415                 IN_param_value->accept(*this);
       
 10416                 return NULL;
       
 10417                 
       
 10418             }
       
 10419             
       
 10420             ERROR;
       
 10421         }
       
 10422         
       
 10423     }/*function_lword_to_dint*/
       
 10424     break;
       
 10425 
       
 10426 /****
       
 10427  *LWORD_TO_LINT
       
 10428  */
       
 10429     case function_lword_to_lint :
       
 10430     {
       
 10431         symbol_c *last_type_symbol = NULL;
       
 10432 
       
 10433         {
       
 10434             identifier_c param_name("IN");
       
 10435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10436             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10437             
       
 10438             /* Get the value from a foo(<param_value>) style call */
       
 10439             if (IN_param_value == NULL)
       
 10440               IN_param_value = function_call_param_iterator.next();
       
 10441             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10442             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10443             
       
 10444             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10445             {
       
 10446         
       
 10447                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10448                 s4o.print("(");
       
 10449                 return_type_symbol->accept(*this);
       
 10450                 s4o.print(")");
       
 10451                 IN_param_value->accept(*this);
       
 10452                 return NULL;
       
 10453                 
       
 10454             }
       
 10455             
       
 10456             ERROR;
       
 10457         }
       
 10458         
       
 10459     }/*function_lword_to_lint*/
       
 10460     break;
       
 10461 
       
 10462 /****
       
 10463  *LWORD_TO_USINT
       
 10464  */
       
 10465     case function_lword_to_usint :
       
 10466     {
       
 10467         symbol_c *last_type_symbol = NULL;
       
 10468 
       
 10469         {
       
 10470             identifier_c param_name("IN");
       
 10471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10472             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10473             
       
 10474             /* Get the value from a foo(<param_value>) style call */
       
 10475             if (IN_param_value == NULL)
       
 10476               IN_param_value = function_call_param_iterator.next();
       
 10477             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10478             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10479             
       
 10480             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10481             {
       
 10482         
       
 10483                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10484                 s4o.print("(");
       
 10485                 return_type_symbol->accept(*this);
       
 10486                 s4o.print(")");
       
 10487                 IN_param_value->accept(*this);
       
 10488                 return NULL;
       
 10489                 
       
 10490             }
       
 10491             
       
 10492             ERROR;
       
 10493         }
       
 10494         
       
 10495     }/*function_lword_to_usint*/
       
 10496     break;
       
 10497 
       
 10498 /****
       
 10499  *LWORD_TO_UINT
       
 10500  */
       
 10501     case function_lword_to_uint :
       
 10502     {
       
 10503         symbol_c *last_type_symbol = NULL;
       
 10504 
       
 10505         {
       
 10506             identifier_c param_name("IN");
       
 10507             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10508             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10509             
       
 10510             /* Get the value from a foo(<param_value>) style call */
       
 10511             if (IN_param_value == NULL)
       
 10512               IN_param_value = function_call_param_iterator.next();
       
 10513             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10514             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10515             
       
 10516             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10517             {
       
 10518         
       
 10519                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10520                 s4o.print("(");
       
 10521                 return_type_symbol->accept(*this);
       
 10522                 s4o.print(")");
       
 10523                 IN_param_value->accept(*this);
       
 10524                 return NULL;
       
 10525                 
       
 10526             }
       
 10527             
       
 10528             ERROR;
       
 10529         }
       
 10530         
       
 10531     }/*function_lword_to_uint*/
       
 10532     break;
       
 10533 
       
 10534 /****
       
 10535  *LWORD_TO_UDINT
       
 10536  */
       
 10537     case function_lword_to_udint :
       
 10538     {
       
 10539         symbol_c *last_type_symbol = NULL;
       
 10540 
       
 10541         {
       
 10542             identifier_c param_name("IN");
       
 10543             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10544             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10545             
       
 10546             /* Get the value from a foo(<param_value>) style call */
       
 10547             if (IN_param_value == NULL)
       
 10548               IN_param_value = function_call_param_iterator.next();
       
 10549             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10550             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10551             
       
 10552             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10553             {
       
 10554         
       
 10555                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10556                 s4o.print("(");
       
 10557                 return_type_symbol->accept(*this);
       
 10558                 s4o.print(")");
       
 10559                 IN_param_value->accept(*this);
       
 10560                 return NULL;
       
 10561                 
       
 10562             }
       
 10563             
       
 10564             ERROR;
       
 10565         }
       
 10566         
       
 10567     }/*function_lword_to_udint*/
       
 10568     break;
       
 10569 
       
 10570 /****
       
 10571  *LWORD_TO_ULINT
       
 10572  */
       
 10573     case function_lword_to_ulint :
       
 10574     {
       
 10575         symbol_c *last_type_symbol = NULL;
       
 10576 
       
 10577         {
       
 10578             identifier_c param_name("IN");
       
 10579             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10580             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10581             
       
 10582             /* Get the value from a foo(<param_value>) style call */
       
 10583             if (IN_param_value == NULL)
       
 10584               IN_param_value = function_call_param_iterator.next();
       
 10585             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10586             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10587             
       
 10588             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10589             {
       
 10590         
       
 10591                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10592                 s4o.print("(");
       
 10593                 return_type_symbol->accept(*this);
       
 10594                 s4o.print(")");
       
 10595                 IN_param_value->accept(*this);
       
 10596                 return NULL;
       
 10597                 
       
 10598             }
       
 10599             
       
 10600             ERROR;
       
 10601         }
       
 10602         
       
 10603     }/*function_lword_to_ulint*/
       
 10604     break;
       
 10605 
       
 10606 /****
       
 10607  *LWORD_TO_TIME
       
 10608  */
       
 10609     case function_lword_to_time :
       
 10610     {
       
 10611         symbol_c *last_type_symbol = NULL;
       
 10612 
       
 10613         {
       
 10614             identifier_c param_name("IN");
       
 10615             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10616             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10617             
       
 10618             /* Get the value from a foo(<param_value>) style call */
       
 10619             if (IN_param_value == NULL)
       
 10620               IN_param_value = function_call_param_iterator.next();
       
 10621             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10622             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10623             
       
 10624             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10625             {
       
 10626         
       
 10627                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10628                 s4o.print("(");
       
 10629                 return_type_symbol->accept(*this);
       
 10630                 s4o.print(")__int_to_time(");
       
 10631                 IN_param_value->accept(*this);
       
 10632                 s4o.print(")");
       
 10633                 return NULL;
       
 10634                 
       
 10635             }
       
 10636             
       
 10637             ERROR;
       
 10638         }
       
 10639         
       
 10640     }/*function_lword_to_time*/
       
 10641     break;
       
 10642 
       
 10643 /****
       
 10644  *LWORD_TO_BOOL
       
 10645  */
       
 10646     case function_lword_to_bool :
       
 10647     {
       
 10648         symbol_c *last_type_symbol = NULL;
       
 10649 
       
 10650         {
       
 10651             identifier_c param_name("IN");
       
 10652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10653             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10654             
       
 10655             /* Get the value from a foo(<param_value>) style call */
       
 10656             if (IN_param_value == NULL)
       
 10657               IN_param_value = function_call_param_iterator.next();
       
 10658             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10659             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10660             
       
 10661             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10662             {
       
 10663         
       
 10664                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10665                 s4o.print("(");
       
 10666                 return_type_symbol->accept(*this);
       
 10667                 s4o.print(")");
       
 10668                 IN_param_value->accept(*this);
       
 10669                 return NULL;
       
 10670                 
       
 10671             }
       
 10672             
       
 10673             ERROR;
       
 10674         }
       
 10675         
       
 10676     }/*function_lword_to_bool*/
       
 10677     break;
       
 10678 
       
 10679 /****
       
 10680  *LWORD_TO_BYTE
       
 10681  */
       
 10682     case function_lword_to_byte :
       
 10683     {
       
 10684         symbol_c *last_type_symbol = NULL;
       
 10685 
       
 10686         {
       
 10687             identifier_c param_name("IN");
       
 10688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10690             
       
 10691             /* Get the value from a foo(<param_value>) style call */
       
 10692             if (IN_param_value == NULL)
       
 10693               IN_param_value = function_call_param_iterator.next();
       
 10694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10696             
       
 10697             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10698             {
       
 10699         
       
 10700                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10701                 s4o.print("(");
       
 10702                 return_type_symbol->accept(*this);
       
 10703                 s4o.print(")");
       
 10704                 IN_param_value->accept(*this);
       
 10705                 return NULL;
       
 10706                 
       
 10707             }
       
 10708             
       
 10709             ERROR;
       
 10710         }
       
 10711         
       
 10712     }/*function_lword_to_byte*/
       
 10713     break;
       
 10714 
       
 10715 /****
       
 10716  *LWORD_TO_WORD
       
 10717  */
       
 10718     case function_lword_to_word :
       
 10719     {
       
 10720         symbol_c *last_type_symbol = NULL;
       
 10721 
       
 10722         {
       
 10723             identifier_c param_name("IN");
       
 10724             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10725             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10726             
       
 10727             /* Get the value from a foo(<param_value>) style call */
       
 10728             if (IN_param_value == NULL)
       
 10729               IN_param_value = function_call_param_iterator.next();
       
 10730             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10731             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10732             
       
 10733             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10734             {
       
 10735         
       
 10736                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10737                 s4o.print("(");
       
 10738                 return_type_symbol->accept(*this);
       
 10739                 s4o.print(")");
       
 10740                 IN_param_value->accept(*this);
       
 10741                 return NULL;
       
 10742                 
       
 10743             }
       
 10744             
       
 10745             ERROR;
       
 10746         }
       
 10747         
       
 10748     }/*function_lword_to_word*/
       
 10749     break;
       
 10750 
       
 10751 /****
       
 10752  *LWORD_TO_DWORD
       
 10753  */
       
 10754     case function_lword_to_dword :
       
 10755     {
       
 10756         symbol_c *last_type_symbol = NULL;
       
 10757 
       
 10758         {
       
 10759             identifier_c param_name("IN");
       
 10760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10762             
       
 10763             /* Get the value from a foo(<param_value>) style call */
       
 10764             if (IN_param_value == NULL)
       
 10765               IN_param_value = function_call_param_iterator.next();
       
 10766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10768             
       
 10769             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10770             {
       
 10771         
       
 10772                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10773                 s4o.print("(");
       
 10774                 return_type_symbol->accept(*this);
       
 10775                 s4o.print(")");
       
 10776                 IN_param_value->accept(*this);
       
 10777                 return NULL;
       
 10778                 
       
 10779             }
       
 10780             
       
 10781             ERROR;
       
 10782         }
       
 10783         
       
 10784     }/*function_lword_to_dword*/
 13411     }/*function_lword_to_dword*/
 10785     break;
       
 10786 
       
 10787 /****
       
 10788  *LWORD_TO_STRING
       
 10789  */
       
 10790     case function_lword_to_string :
       
 10791     {
       
 10792         symbol_c *last_type_symbol = NULL;
       
 10793 
       
 10794         {
       
 10795             identifier_c param_name("IN");
       
 10796             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10797             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10798             
       
 10799             /* Get the value from a foo(<param_value>) style call */
       
 10800             if (IN_param_value == NULL)
       
 10801               IN_param_value = function_call_param_iterator.next();
       
 10802             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10803             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10804             
       
 10805             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10806             {
       
 10807         
       
 10808                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10809                 s4o.print("(");
       
 10810                 return_type_symbol->accept(*this);
       
 10811                 s4o.print(")__bit_to_string(");
       
 10812                 IN_param_value->accept(*this);
       
 10813                 s4o.print(")");
       
 10814                 return NULL;
       
 10815                 
       
 10816             }
       
 10817             
       
 10818             ERROR;
       
 10819         }
       
 10820         
       
 10821     }/*function_lword_to_string*/
       
 10822     break;
       
 10823 
       
 10824 /****
       
 10825  *LWORD_TO_DATE
       
 10826  */
       
 10827     case function_lword_to_date :
       
 10828     {
       
 10829         symbol_c *last_type_symbol = NULL;
       
 10830 
       
 10831         {
       
 10832             identifier_c param_name("IN");
       
 10833             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10834             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10835             
       
 10836             /* Get the value from a foo(<param_value>) style call */
       
 10837             if (IN_param_value == NULL)
       
 10838               IN_param_value = function_call_param_iterator.next();
       
 10839             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10840             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10841             
       
 10842             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10843             {
       
 10844         
       
 10845                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10846                 s4o.print("(");
       
 10847                 return_type_symbol->accept(*this);
       
 10848                 s4o.print(")__int_to_time(");
       
 10849                 IN_param_value->accept(*this);
       
 10850                 s4o.print(")");
       
 10851                 return NULL;
       
 10852                 
       
 10853             }
       
 10854             
       
 10855             ERROR;
       
 10856         }
       
 10857         
       
 10858     }/*function_lword_to_date*/
       
 10859     break;
       
 10860 
       
 10861 /****
       
 10862  *LWORD_TO_TOD
       
 10863  */
       
 10864     case function_lword_to_tod :
       
 10865     {
       
 10866         symbol_c *last_type_symbol = NULL;
       
 10867 
       
 10868         {
       
 10869             identifier_c param_name("IN");
       
 10870             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10871             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10872             
       
 10873             /* Get the value from a foo(<param_value>) style call */
       
 10874             if (IN_param_value == NULL)
       
 10875               IN_param_value = function_call_param_iterator.next();
       
 10876             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10877             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10878             
       
 10879             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10880             {
       
 10881         
       
 10882                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10883                 s4o.print("(");
       
 10884                 return_type_symbol->accept(*this);
       
 10885                 s4o.print(")__int_to_time(");
       
 10886                 IN_param_value->accept(*this);
       
 10887                 s4o.print(")");
       
 10888                 return NULL;
       
 10889                 
       
 10890             }
       
 10891             
       
 10892             ERROR;
       
 10893         }
       
 10894         
       
 10895     }/*function_lword_to_tod*/
       
 10896     break;
       
 10897 
       
 10898 /****
       
 10899  *LWORD_TO_DT
       
 10900  */
       
 10901     case function_lword_to_dt :
       
 10902     {
       
 10903         symbol_c *last_type_symbol = NULL;
       
 10904 
       
 10905         {
       
 10906             identifier_c param_name("IN");
       
 10907             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10908             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10909             
       
 10910             /* Get the value from a foo(<param_value>) style call */
       
 10911             if (IN_param_value == NULL)
       
 10912               IN_param_value = function_call_param_iterator.next();
       
 10913             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10914             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10915             
       
 10916             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10917             {
       
 10918         
       
 10919                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10920                 s4o.print("(");
       
 10921                 return_type_symbol->accept(*this);
       
 10922                 s4o.print(")__int_to_time(");
       
 10923                 IN_param_value->accept(*this);
       
 10924                 s4o.print(")");
       
 10925                 return NULL;
       
 10926                 
       
 10927             }
       
 10928             
       
 10929             ERROR;
       
 10930         }
       
 10931         
       
 10932     }/*function_lword_to_dt*/
       
 10933     break;
       
 10934 
       
 10935 /****
       
 10936  *STRING_TO_REAL
       
 10937  */
       
 10938     case function_string_to_real :
       
 10939     {
       
 10940         symbol_c *last_type_symbol = NULL;
       
 10941 
       
 10942         {
       
 10943             identifier_c param_name("IN");
       
 10944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10946             
       
 10947             /* Get the value from a foo(<param_value>) style call */
       
 10948             if (IN_param_value == NULL)
       
 10949               IN_param_value = function_call_param_iterator.next();
       
 10950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10952             
       
 10953             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10954             {
       
 10955         
       
 10956                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10957                 s4o.print("(");
       
 10958                 return_type_symbol->accept(*this);
       
 10959                 s4o.print(")__string_to_real(");
       
 10960                 IN_param_value->accept(*this);
       
 10961                 s4o.print(")");
       
 10962                 return NULL;
       
 10963                 
       
 10964             }
       
 10965             
       
 10966             ERROR;
       
 10967         }
       
 10968         
       
 10969     }/*function_string_to_real*/
       
 10970     break;
       
 10971 
       
 10972 /****
       
 10973  *STRING_TO_LREAL
       
 10974  */
       
 10975     case function_string_to_lreal :
       
 10976     {
       
 10977         symbol_c *last_type_symbol = NULL;
       
 10978 
       
 10979         {
       
 10980             identifier_c param_name("IN");
       
 10981             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10982             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10983             
       
 10984             /* Get the value from a foo(<param_value>) style call */
       
 10985             if (IN_param_value == NULL)
       
 10986               IN_param_value = function_call_param_iterator.next();
       
 10987             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10988             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10989             
       
 10990             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10991             {
       
 10992         
       
 10993                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10994                 s4o.print("(");
       
 10995                 return_type_symbol->accept(*this);
       
 10996                 s4o.print(")__string_to_real(");
       
 10997                 IN_param_value->accept(*this);
       
 10998                 s4o.print(")");
       
 10999                 return NULL;
       
 11000                 
       
 11001             }
       
 11002             
       
 11003             ERROR;
       
 11004         }
       
 11005         
       
 11006     }/*function_string_to_lreal*/
       
 11007     break;
       
 11008 
       
 11009 /****
       
 11010  *STRING_TO_SINT
       
 11011  */
       
 11012     case function_string_to_sint :
       
 11013     {
       
 11014         symbol_c *last_type_symbol = NULL;
       
 11015 
       
 11016         {
       
 11017             identifier_c param_name("IN");
       
 11018             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11019             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11020             
       
 11021             /* Get the value from a foo(<param_value>) style call */
       
 11022             if (IN_param_value == NULL)
       
 11023               IN_param_value = function_call_param_iterator.next();
       
 11024             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11025             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11026             
       
 11027             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11028             {
       
 11029         
       
 11030                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11031                 s4o.print("(");
       
 11032                 return_type_symbol->accept(*this);
       
 11033                 s4o.print(")__string_to_sint(");
       
 11034                 IN_param_value->accept(*this);
       
 11035                 s4o.print(")");
       
 11036                 return NULL;
       
 11037                 
       
 11038             }
       
 11039             
       
 11040             ERROR;
       
 11041         }
       
 11042         
       
 11043     }/*function_string_to_sint*/
       
 11044     break;
       
 11045 
       
 11046 /****
       
 11047  *STRING_TO_INT
       
 11048  */
       
 11049     case function_string_to_int :
       
 11050     {
       
 11051         symbol_c *last_type_symbol = NULL;
       
 11052 
       
 11053         {
       
 11054             identifier_c param_name("IN");
       
 11055             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11056             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11057             
       
 11058             /* Get the value from a foo(<param_value>) style call */
       
 11059             if (IN_param_value == NULL)
       
 11060               IN_param_value = function_call_param_iterator.next();
       
 11061             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11062             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11063             
       
 11064             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11065             {
       
 11066         
       
 11067                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11068                 s4o.print("(");
       
 11069                 return_type_symbol->accept(*this);
       
 11070                 s4o.print(")__string_to_sint(");
       
 11071                 IN_param_value->accept(*this);
       
 11072                 s4o.print(")");
       
 11073                 return NULL;
       
 11074                 
       
 11075             }
       
 11076             
       
 11077             ERROR;
       
 11078         }
       
 11079         
       
 11080     }/*function_string_to_int*/
       
 11081     break;
       
 11082 
       
 11083 /****
       
 11084  *STRING_TO_DINT
       
 11085  */
       
 11086     case function_string_to_dint :
       
 11087     {
       
 11088         symbol_c *last_type_symbol = NULL;
       
 11089 
       
 11090         {
       
 11091             identifier_c param_name("IN");
       
 11092             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11093             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11094             
       
 11095             /* Get the value from a foo(<param_value>) style call */
       
 11096             if (IN_param_value == NULL)
       
 11097               IN_param_value = function_call_param_iterator.next();
       
 11098             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11099             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11100             
       
 11101             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11102             {
       
 11103         
       
 11104                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11105                 s4o.print("(");
       
 11106                 return_type_symbol->accept(*this);
       
 11107                 s4o.print(")__string_to_sint(");
       
 11108                 IN_param_value->accept(*this);
       
 11109                 s4o.print(")");
       
 11110                 return NULL;
       
 11111                 
       
 11112             }
       
 11113             
       
 11114             ERROR;
       
 11115         }
       
 11116         
       
 11117     }/*function_string_to_dint*/
       
 11118     break;
       
 11119 
       
 11120 /****
       
 11121  *STRING_TO_LINT
       
 11122  */
       
 11123     case function_string_to_lint :
       
 11124     {
       
 11125         symbol_c *last_type_symbol = NULL;
       
 11126 
       
 11127         {
       
 11128             identifier_c param_name("IN");
       
 11129             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11130             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11131             
       
 11132             /* Get the value from a foo(<param_value>) style call */
       
 11133             if (IN_param_value == NULL)
       
 11134               IN_param_value = function_call_param_iterator.next();
       
 11135             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11136             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11137             
       
 11138             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11139             {
       
 11140         
       
 11141                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11142                 s4o.print("(");
       
 11143                 return_type_symbol->accept(*this);
       
 11144                 s4o.print(")__string_to_sint(");
       
 11145                 IN_param_value->accept(*this);
       
 11146                 s4o.print(")");
       
 11147                 return NULL;
       
 11148                 
       
 11149             }
       
 11150             
       
 11151             ERROR;
       
 11152         }
       
 11153         
       
 11154     }/*function_string_to_lint*/
       
 11155     break;
       
 11156 
       
 11157 /****
       
 11158  *STRING_TO_USINT
       
 11159  */
       
 11160     case function_string_to_usint :
       
 11161     {
       
 11162         symbol_c *last_type_symbol = NULL;
       
 11163 
       
 11164         {
       
 11165             identifier_c param_name("IN");
       
 11166             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11167             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11168             
       
 11169             /* Get the value from a foo(<param_value>) style call */
       
 11170             if (IN_param_value == NULL)
       
 11171               IN_param_value = function_call_param_iterator.next();
       
 11172             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11173             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11174             
       
 11175             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11176             {
       
 11177         
       
 11178                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11179                 s4o.print("(");
       
 11180                 return_type_symbol->accept(*this);
       
 11181                 s4o.print(")__string_to_uint(");
       
 11182                 IN_param_value->accept(*this);
       
 11183                 s4o.print(")");
       
 11184                 return NULL;
       
 11185                 
       
 11186             }
       
 11187             
       
 11188             ERROR;
       
 11189         }
       
 11190         
       
 11191     }/*function_string_to_usint*/
       
 11192     break;
       
 11193 
       
 11194 /****
       
 11195  *STRING_TO_UINT
       
 11196  */
       
 11197     case function_string_to_uint :
       
 11198     {
       
 11199         symbol_c *last_type_symbol = NULL;
       
 11200 
       
 11201         {
       
 11202             identifier_c param_name("IN");
       
 11203             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11205             
       
 11206             /* Get the value from a foo(<param_value>) style call */
       
 11207             if (IN_param_value == NULL)
       
 11208               IN_param_value = function_call_param_iterator.next();
       
 11209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11211             
       
 11212             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11213             {
       
 11214         
       
 11215                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11216                 s4o.print("(");
       
 11217                 return_type_symbol->accept(*this);
       
 11218                 s4o.print(")__string_to_uint(");
       
 11219                 IN_param_value->accept(*this);
       
 11220                 s4o.print(")");
       
 11221                 return NULL;
       
 11222                 
       
 11223             }
       
 11224             
       
 11225             ERROR;
       
 11226         }
       
 11227         
       
 11228     }/*function_string_to_uint*/
       
 11229     break;
       
 11230 
       
 11231 /****
       
 11232  *STRING_TO_UDINT
       
 11233  */
       
 11234     case function_string_to_udint :
       
 11235     {
       
 11236         symbol_c *last_type_symbol = NULL;
       
 11237 
       
 11238         {
       
 11239             identifier_c param_name("IN");
       
 11240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11242             
       
 11243             /* Get the value from a foo(<param_value>) style call */
       
 11244             if (IN_param_value == NULL)
       
 11245               IN_param_value = function_call_param_iterator.next();
       
 11246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11248             
       
 11249             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11250             {
       
 11251         
       
 11252                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11253                 s4o.print("(");
       
 11254                 return_type_symbol->accept(*this);
       
 11255                 s4o.print(")__string_to_uint(");
       
 11256                 IN_param_value->accept(*this);
       
 11257                 s4o.print(")");
       
 11258                 return NULL;
       
 11259                 
       
 11260             }
       
 11261             
       
 11262             ERROR;
       
 11263         }
       
 11264         
       
 11265     }/*function_string_to_udint*/
       
 11266     break;
       
 11267 
       
 11268 /****
       
 11269  *STRING_TO_ULINT
       
 11270  */
       
 11271     case function_string_to_ulint :
       
 11272     {
       
 11273         symbol_c *last_type_symbol = NULL;
       
 11274 
       
 11275         {
       
 11276             identifier_c param_name("IN");
       
 11277             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11278             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11279             
       
 11280             /* Get the value from a foo(<param_value>) style call */
       
 11281             if (IN_param_value == NULL)
       
 11282               IN_param_value = function_call_param_iterator.next();
       
 11283             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11284             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11285             
       
 11286             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11287             {
       
 11288         
       
 11289                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11290                 s4o.print("(");
       
 11291                 return_type_symbol->accept(*this);
       
 11292                 s4o.print(")__string_to_uint(");
       
 11293                 IN_param_value->accept(*this);
       
 11294                 s4o.print(")");
       
 11295                 return NULL;
       
 11296                 
       
 11297             }
       
 11298             
       
 11299             ERROR;
       
 11300         }
       
 11301         
       
 11302     }/*function_string_to_ulint*/
       
 11303     break;
       
 11304 
       
 11305 /****
       
 11306  *STRING_TO_TIME
       
 11307  */
       
 11308     case function_string_to_time :
       
 11309     {
       
 11310         symbol_c *last_type_symbol = NULL;
       
 11311 
       
 11312         {
       
 11313             identifier_c param_name("IN");
       
 11314             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11315             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11316             
       
 11317             /* Get the value from a foo(<param_value>) style call */
       
 11318             if (IN_param_value == NULL)
       
 11319               IN_param_value = function_call_param_iterator.next();
       
 11320             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11321             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11322             
       
 11323             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11324             {
       
 11325         
       
 11326                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11327                 s4o.print("(");
       
 11328                 return_type_symbol->accept(*this);
       
 11329                 s4o.print(")__string_to_time(");
       
 11330                 IN_param_value->accept(*this);
       
 11331                 s4o.print(")");
       
 11332                 return NULL;
       
 11333                 
       
 11334             }
       
 11335             
       
 11336             ERROR;
       
 11337         }
       
 11338         
       
 11339     }/*function_string_to_time*/
       
 11340     break;
       
 11341 
       
 11342 /****
       
 11343  *STRING_TO_BOOL
       
 11344  */
       
 11345     case function_string_to_bool :
       
 11346     {
       
 11347         symbol_c *last_type_symbol = NULL;
       
 11348 
       
 11349         {
       
 11350             identifier_c param_name("IN");
       
 11351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11353             
       
 11354             /* Get the value from a foo(<param_value>) style call */
       
 11355             if (IN_param_value == NULL)
       
 11356               IN_param_value = function_call_param_iterator.next();
       
 11357             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11358             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11359             
       
 11360             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11361             {
       
 11362         
       
 11363                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11364                 s4o.print("(");
       
 11365                 return_type_symbol->accept(*this);
       
 11366                 s4o.print(")__string_to_bool(");
       
 11367                 IN_param_value->accept(*this);
       
 11368                 s4o.print(")");
       
 11369                 return NULL;
       
 11370                 
       
 11371             }
       
 11372             
       
 11373             ERROR;
       
 11374         }
       
 11375         
       
 11376     }/*function_string_to_bool*/
       
 11377     break;
       
 11378 
       
 11379 /****
       
 11380  *STRING_TO_BYTE
       
 11381  */
       
 11382     case function_string_to_byte :
       
 11383     {
       
 11384         symbol_c *last_type_symbol = NULL;
       
 11385 
       
 11386         {
       
 11387             identifier_c param_name("IN");
       
 11388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11390             
       
 11391             /* Get the value from a foo(<param_value>) style call */
       
 11392             if (IN_param_value == NULL)
       
 11393               IN_param_value = function_call_param_iterator.next();
       
 11394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11396             
       
 11397             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11398             {
       
 11399         
       
 11400                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11401                 s4o.print("(");
       
 11402                 return_type_symbol->accept(*this);
       
 11403                 s4o.print(")__string_to_bit(");
       
 11404                 IN_param_value->accept(*this);
       
 11405                 s4o.print(")");
       
 11406                 return NULL;
       
 11407                 
       
 11408             }
       
 11409             
       
 11410             ERROR;
       
 11411         }
       
 11412         
       
 11413     }/*function_string_to_byte*/
       
 11414     break;
       
 11415 
       
 11416 /****
       
 11417  *STRING_TO_WORD
       
 11418  */
       
 11419     case function_string_to_word :
       
 11420     {
       
 11421         symbol_c *last_type_symbol = NULL;
       
 11422 
       
 11423         {
       
 11424             identifier_c param_name("IN");
       
 11425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11427             
       
 11428             /* Get the value from a foo(<param_value>) style call */
       
 11429             if (IN_param_value == NULL)
       
 11430               IN_param_value = function_call_param_iterator.next();
       
 11431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11432             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11433             
       
 11434             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11435             {
       
 11436         
       
 11437                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11438                 s4o.print("(");
       
 11439                 return_type_symbol->accept(*this);
       
 11440                 s4o.print(")__string_to_bit(");
       
 11441                 IN_param_value->accept(*this);
       
 11442                 s4o.print(")");
       
 11443                 return NULL;
       
 11444                 
       
 11445             }
       
 11446             
       
 11447             ERROR;
       
 11448         }
       
 11449         
       
 11450     }/*function_string_to_word*/
       
 11451     break;
       
 11452 
       
 11453 /****
       
 11454  *STRING_TO_DWORD
       
 11455  */
       
 11456     case function_string_to_dword :
       
 11457     {
       
 11458         symbol_c *last_type_symbol = NULL;
       
 11459 
       
 11460         {
       
 11461             identifier_c param_name("IN");
       
 11462             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11463             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11464             
       
 11465             /* Get the value from a foo(<param_value>) style call */
       
 11466             if (IN_param_value == NULL)
       
 11467               IN_param_value = function_call_param_iterator.next();
       
 11468             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11469             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11470             
       
 11471             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11472             {
       
 11473         
       
 11474                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11475                 s4o.print("(");
       
 11476                 return_type_symbol->accept(*this);
       
 11477                 s4o.print(")__string_to_bit(");
       
 11478                 IN_param_value->accept(*this);
       
 11479                 s4o.print(")");
       
 11480                 return NULL;
       
 11481                 
       
 11482             }
       
 11483             
       
 11484             ERROR;
       
 11485         }
       
 11486         
       
 11487     }/*function_string_to_dword*/
       
 11488     break;
       
 11489 
       
 11490 /****
       
 11491  *STRING_TO_LWORD
       
 11492  */
       
 11493     case function_string_to_lword :
       
 11494     {
       
 11495         symbol_c *last_type_symbol = NULL;
       
 11496 
       
 11497         {
       
 11498             identifier_c param_name("IN");
       
 11499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11501             
       
 11502             /* Get the value from a foo(<param_value>) style call */
       
 11503             if (IN_param_value == NULL)
       
 11504               IN_param_value = function_call_param_iterator.next();
       
 11505             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11506             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11507             
       
 11508             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11509             {
       
 11510         
       
 11511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11512                 s4o.print("(");
       
 11513                 return_type_symbol->accept(*this);
       
 11514                 s4o.print(")__string_to_bit(");
       
 11515                 IN_param_value->accept(*this);
       
 11516                 s4o.print(")");
       
 11517                 return NULL;
       
 11518                 
       
 11519             }
       
 11520             
       
 11521             ERROR;
       
 11522         }
       
 11523         
       
 11524     }/*function_string_to_lword*/
       
 11525     break;
       
 11526 
       
 11527 /****
       
 11528  *STRING_TO_DATE
       
 11529  */
       
 11530     case function_string_to_date :
       
 11531     {
       
 11532         symbol_c *last_type_symbol = NULL;
       
 11533 
       
 11534         {
       
 11535             identifier_c param_name("IN");
       
 11536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11538             
       
 11539             /* Get the value from a foo(<param_value>) style call */
       
 11540             if (IN_param_value == NULL)
       
 11541               IN_param_value = function_call_param_iterator.next();
       
 11542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11544             
       
 11545             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11546             {
       
 11547         
       
 11548                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11549                 s4o.print("(");
       
 11550                 return_type_symbol->accept(*this);
       
 11551                 s4o.print(")__string_to_time(");
       
 11552                 IN_param_value->accept(*this);
       
 11553                 s4o.print(")");
       
 11554                 return NULL;
       
 11555                 
       
 11556             }
       
 11557             
       
 11558             ERROR;
       
 11559         }
       
 11560         
       
 11561     }/*function_string_to_date*/
       
 11562     break;
       
 11563 
       
 11564 /****
       
 11565  *STRING_TO_TOD
       
 11566  */
       
 11567     case function_string_to_tod :
       
 11568     {
       
 11569         symbol_c *last_type_symbol = NULL;
       
 11570 
       
 11571         {
       
 11572             identifier_c param_name("IN");
       
 11573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11575             
       
 11576             /* Get the value from a foo(<param_value>) style call */
       
 11577             if (IN_param_value == NULL)
       
 11578               IN_param_value = function_call_param_iterator.next();
       
 11579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11581             
       
 11582             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11583             {
       
 11584         
       
 11585                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11586                 s4o.print("(");
       
 11587                 return_type_symbol->accept(*this);
       
 11588                 s4o.print(")__string_to_time(");
       
 11589                 IN_param_value->accept(*this);
       
 11590                 s4o.print(")");
       
 11591                 return NULL;
       
 11592                 
       
 11593             }
       
 11594             
       
 11595             ERROR;
       
 11596         }
       
 11597         
       
 11598     }/*function_string_to_tod*/
       
 11599     break;
       
 11600 
       
 11601 /****
       
 11602  *STRING_TO_DT
       
 11603  */
       
 11604     case function_string_to_dt :
       
 11605     {
       
 11606         symbol_c *last_type_symbol = NULL;
       
 11607 
       
 11608         {
       
 11609             identifier_c param_name("IN");
       
 11610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11612             
       
 11613             /* Get the value from a foo(<param_value>) style call */
       
 11614             if (IN_param_value == NULL)
       
 11615               IN_param_value = function_call_param_iterator.next();
       
 11616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11618             
       
 11619             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 11620             {
       
 11621         
       
 11622                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11623                 s4o.print("(");
       
 11624                 return_type_symbol->accept(*this);
       
 11625                 s4o.print(")__string_to_time(");
       
 11626                 IN_param_value->accept(*this);
       
 11627                 s4o.print(")");
       
 11628                 return NULL;
       
 11629                 
       
 11630             }
       
 11631             
       
 11632             ERROR;
       
 11633         }
       
 11634         
       
 11635     }/*function_string_to_dt*/
       
 11636     break;
       
 11637 
       
 11638 /****
       
 11639  *DATE_TO_REAL
       
 11640  */
       
 11641     case function_date_to_real :
       
 11642     {
       
 11643         symbol_c *last_type_symbol = NULL;
       
 11644 
       
 11645         {
       
 11646             identifier_c param_name("IN");
       
 11647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11649             
       
 11650             /* Get the value from a foo(<param_value>) style call */
       
 11651             if (IN_param_value == NULL)
       
 11652               IN_param_value = function_call_param_iterator.next();
       
 11653             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11654             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11655             
       
 11656             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11657             {
       
 11658         
       
 11659                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11660                 s4o.print("(");
       
 11661                 return_type_symbol->accept(*this);
       
 11662                 s4o.print(")__time_to_real(");
       
 11663                 IN_param_value->accept(*this);
       
 11664                 s4o.print(")");
       
 11665                 return NULL;
       
 11666                 
       
 11667             }
       
 11668             
       
 11669             ERROR;
       
 11670         }
       
 11671         
       
 11672     }/*function_date_to_real*/
       
 11673     break;
       
 11674 
       
 11675 /****
       
 11676  *DATE_TO_LREAL
       
 11677  */
       
 11678     case function_date_to_lreal :
       
 11679     {
       
 11680         symbol_c *last_type_symbol = NULL;
       
 11681 
       
 11682         {
       
 11683             identifier_c param_name("IN");
       
 11684             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11685             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11686             
       
 11687             /* Get the value from a foo(<param_value>) style call */
       
 11688             if (IN_param_value == NULL)
       
 11689               IN_param_value = function_call_param_iterator.next();
       
 11690             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11691             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11692             
       
 11693             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11694             {
       
 11695         
       
 11696                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11697                 s4o.print("(");
       
 11698                 return_type_symbol->accept(*this);
       
 11699                 s4o.print(")__time_to_real(");
       
 11700                 IN_param_value->accept(*this);
       
 11701                 s4o.print(")");
       
 11702                 return NULL;
       
 11703                 
       
 11704             }
       
 11705             
       
 11706             ERROR;
       
 11707         }
       
 11708         
       
 11709     }/*function_date_to_lreal*/
       
 11710     break;
       
 11711 
       
 11712 /****
       
 11713  *DATE_TO_SINT
       
 11714  */
       
 11715     case function_date_to_sint :
       
 11716     {
       
 11717         symbol_c *last_type_symbol = NULL;
       
 11718 
       
 11719         {
       
 11720             identifier_c param_name("IN");
       
 11721             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11722             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11723             
       
 11724             /* Get the value from a foo(<param_value>) style call */
       
 11725             if (IN_param_value == NULL)
       
 11726               IN_param_value = function_call_param_iterator.next();
       
 11727             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11728             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11729             
       
 11730             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11731             {
       
 11732         
       
 11733                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11734                 s4o.print("(");
       
 11735                 return_type_symbol->accept(*this);
       
 11736                 s4o.print(")__time_to_int(");
       
 11737                 IN_param_value->accept(*this);
       
 11738                 s4o.print(")");
       
 11739                 return NULL;
       
 11740                 
       
 11741             }
       
 11742             
       
 11743             ERROR;
       
 11744         }
       
 11745         
       
 11746     }/*function_date_to_sint*/
       
 11747     break;
       
 11748 
       
 11749 /****
       
 11750  *DATE_TO_INT
       
 11751  */
       
 11752     case function_date_to_int :
       
 11753     {
       
 11754         symbol_c *last_type_symbol = NULL;
       
 11755 
       
 11756         {
       
 11757             identifier_c param_name("IN");
       
 11758             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11759             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11760             
       
 11761             /* Get the value from a foo(<param_value>) style call */
       
 11762             if (IN_param_value == NULL)
       
 11763               IN_param_value = function_call_param_iterator.next();
       
 11764             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11765             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11766             
       
 11767             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11768             {
       
 11769         
       
 11770                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11771                 s4o.print("(");
       
 11772                 return_type_symbol->accept(*this);
       
 11773                 s4o.print(")__time_to_int(");
       
 11774                 IN_param_value->accept(*this);
       
 11775                 s4o.print(")");
       
 11776                 return NULL;
       
 11777                 
       
 11778             }
       
 11779             
       
 11780             ERROR;
       
 11781         }
       
 11782         
       
 11783     }/*function_date_to_int*/
       
 11784     break;
       
 11785 
       
 11786 /****
       
 11787  *DATE_TO_DINT
       
 11788  */
       
 11789     case function_date_to_dint :
       
 11790     {
       
 11791         symbol_c *last_type_symbol = NULL;
       
 11792 
       
 11793         {
       
 11794             identifier_c param_name("IN");
       
 11795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11796             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11797             
       
 11798             /* Get the value from a foo(<param_value>) style call */
       
 11799             if (IN_param_value == NULL)
       
 11800               IN_param_value = function_call_param_iterator.next();
       
 11801             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11802             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11803             
       
 11804             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11805             {
       
 11806         
       
 11807                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11808                 s4o.print("(");
       
 11809                 return_type_symbol->accept(*this);
       
 11810                 s4o.print(")__time_to_int(");
       
 11811                 IN_param_value->accept(*this);
       
 11812                 s4o.print(")");
       
 11813                 return NULL;
       
 11814                 
       
 11815             }
       
 11816             
       
 11817             ERROR;
       
 11818         }
       
 11819         
       
 11820     }/*function_date_to_dint*/
       
 11821     break;
       
 11822 
       
 11823 /****
       
 11824  *DATE_TO_LINT
       
 11825  */
       
 11826     case function_date_to_lint :
       
 11827     {
       
 11828         symbol_c *last_type_symbol = NULL;
       
 11829 
       
 11830         {
       
 11831             identifier_c param_name("IN");
       
 11832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11834             
       
 11835             /* Get the value from a foo(<param_value>) style call */
       
 11836             if (IN_param_value == NULL)
       
 11837               IN_param_value = function_call_param_iterator.next();
       
 11838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11840             
       
 11841             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11842             {
       
 11843         
       
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11845                 s4o.print("(");
       
 11846                 return_type_symbol->accept(*this);
       
 11847                 s4o.print(")__time_to_int(");
       
 11848                 IN_param_value->accept(*this);
       
 11849                 s4o.print(")");
       
 11850                 return NULL;
       
 11851                 
       
 11852             }
       
 11853             
       
 11854             ERROR;
       
 11855         }
       
 11856         
       
 11857     }/*function_date_to_lint*/
       
 11858     break;
       
 11859 
       
 11860 /****
       
 11861  *DATE_TO_USINT
       
 11862  */
       
 11863     case function_date_to_usint :
       
 11864     {
       
 11865         symbol_c *last_type_symbol = NULL;
       
 11866 
       
 11867         {
       
 11868             identifier_c param_name("IN");
       
 11869             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11870             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11871             
       
 11872             /* Get the value from a foo(<param_value>) style call */
       
 11873             if (IN_param_value == NULL)
       
 11874               IN_param_value = function_call_param_iterator.next();
       
 11875             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11876             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11877             
       
 11878             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11879             {
       
 11880         
       
 11881                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11882                 s4o.print("(");
       
 11883                 return_type_symbol->accept(*this);
       
 11884                 s4o.print(")__time_to_int(");
       
 11885                 IN_param_value->accept(*this);
       
 11886                 s4o.print(")");
       
 11887                 return NULL;
       
 11888                 
       
 11889             }
       
 11890             
       
 11891             ERROR;
       
 11892         }
       
 11893         
       
 11894     }/*function_date_to_usint*/
       
 11895     break;
       
 11896 
       
 11897 /****
       
 11898  *DATE_TO_UINT
       
 11899  */
       
 11900     case function_date_to_uint :
       
 11901     {
       
 11902         symbol_c *last_type_symbol = NULL;
       
 11903 
       
 11904         {
       
 11905             identifier_c param_name("IN");
       
 11906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11907             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11908             
       
 11909             /* Get the value from a foo(<param_value>) style call */
       
 11910             if (IN_param_value == NULL)
       
 11911               IN_param_value = function_call_param_iterator.next();
       
 11912             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11913             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11914             
       
 11915             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11916             {
       
 11917         
       
 11918                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11919                 s4o.print("(");
       
 11920                 return_type_symbol->accept(*this);
       
 11921                 s4o.print(")__time_to_int(");
       
 11922                 IN_param_value->accept(*this);
       
 11923                 s4o.print(")");
       
 11924                 return NULL;
       
 11925                 
       
 11926             }
       
 11927             
       
 11928             ERROR;
       
 11929         }
       
 11930         
       
 11931     }/*function_date_to_uint*/
       
 11932     break;
       
 11933 
       
 11934 /****
       
 11935  *DATE_TO_UDINT
       
 11936  */
       
 11937     case function_date_to_udint :
       
 11938     {
       
 11939         symbol_c *last_type_symbol = NULL;
       
 11940 
       
 11941         {
       
 11942             identifier_c param_name("IN");
       
 11943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11944             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11945             
       
 11946             /* Get the value from a foo(<param_value>) style call */
       
 11947             if (IN_param_value == NULL)
       
 11948               IN_param_value = function_call_param_iterator.next();
       
 11949             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11950             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11951             
       
 11952             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11953             {
       
 11954         
       
 11955                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11956                 s4o.print("(");
       
 11957                 return_type_symbol->accept(*this);
       
 11958                 s4o.print(")__time_to_int(");
       
 11959                 IN_param_value->accept(*this);
       
 11960                 s4o.print(")");
       
 11961                 return NULL;
       
 11962                 
       
 11963             }
       
 11964             
       
 11965             ERROR;
       
 11966         }
       
 11967         
       
 11968     }/*function_date_to_udint*/
       
 11969     break;
       
 11970 
       
 11971 /****
       
 11972  *DATE_TO_ULINT
       
 11973  */
       
 11974     case function_date_to_ulint :
       
 11975     {
       
 11976         symbol_c *last_type_symbol = NULL;
       
 11977 
       
 11978         {
       
 11979             identifier_c param_name("IN");
       
 11980             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11981             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11982             
       
 11983             /* Get the value from a foo(<param_value>) style call */
       
 11984             if (IN_param_value == NULL)
       
 11985               IN_param_value = function_call_param_iterator.next();
       
 11986             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11987             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11988             
       
 11989             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11990             {
       
 11991         
       
 11992                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11993                 s4o.print("(");
       
 11994                 return_type_symbol->accept(*this);
       
 11995                 s4o.print(")__time_to_int(");
       
 11996                 IN_param_value->accept(*this);
       
 11997                 s4o.print(")");
       
 11998                 return NULL;
       
 11999                 
       
 12000             }
       
 12001             
       
 12002             ERROR;
       
 12003         }
       
 12004         
       
 12005     }/*function_date_to_ulint*/
       
 12006     break;
       
 12007 
       
 12008 /****
       
 12009  *DATE_TO_BOOL
       
 12010  */
       
 12011     case function_date_to_bool :
       
 12012     {
       
 12013         symbol_c *last_type_symbol = NULL;
       
 12014 
       
 12015         {
       
 12016             identifier_c param_name("IN");
       
 12017             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12018             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12019             
       
 12020             /* Get the value from a foo(<param_value>) style call */
       
 12021             if (IN_param_value == NULL)
       
 12022               IN_param_value = function_call_param_iterator.next();
       
 12023             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12024             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12025             
       
 12026             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12027             {
       
 12028         
       
 12029                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12030                 s4o.print("(");
       
 12031                 return_type_symbol->accept(*this);
       
 12032                 s4o.print(")__time_to_int(");
       
 12033                 IN_param_value->accept(*this);
       
 12034                 s4o.print(")");
       
 12035                 return NULL;
       
 12036                 
       
 12037             }
       
 12038             
       
 12039             ERROR;
       
 12040         }
       
 12041         
       
 12042     }/*function_date_to_bool*/
       
 12043     break;
       
 12044 
       
 12045 /****
       
 12046  *DATE_TO_BYTE
       
 12047  */
       
 12048     case function_date_to_byte :
       
 12049     {
       
 12050         symbol_c *last_type_symbol = NULL;
       
 12051 
       
 12052         {
       
 12053             identifier_c param_name("IN");
       
 12054             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12055             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12056             
       
 12057             /* Get the value from a foo(<param_value>) style call */
       
 12058             if (IN_param_value == NULL)
       
 12059               IN_param_value = function_call_param_iterator.next();
       
 12060             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12061             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12062             
       
 12063             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12064             {
       
 12065         
       
 12066                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12067                 s4o.print("(");
       
 12068                 return_type_symbol->accept(*this);
       
 12069                 s4o.print(")__time_to_int(");
       
 12070                 IN_param_value->accept(*this);
       
 12071                 s4o.print(")");
       
 12072                 return NULL;
       
 12073                 
       
 12074             }
       
 12075             
       
 12076             ERROR;
       
 12077         }
       
 12078         
       
 12079     }/*function_date_to_byte*/
       
 12080     break;
       
 12081 
       
 12082 /****
       
 12083  *DATE_TO_WORD
       
 12084  */
       
 12085     case function_date_to_word :
       
 12086     {
       
 12087         symbol_c *last_type_symbol = NULL;
       
 12088 
       
 12089         {
       
 12090             identifier_c param_name("IN");
       
 12091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12092             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12093             
       
 12094             /* Get the value from a foo(<param_value>) style call */
       
 12095             if (IN_param_value == NULL)
       
 12096               IN_param_value = function_call_param_iterator.next();
       
 12097             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12098             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12099             
       
 12100             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12101             {
       
 12102         
       
 12103                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12104                 s4o.print("(");
       
 12105                 return_type_symbol->accept(*this);
       
 12106                 s4o.print(")__time_to_int(");
       
 12107                 IN_param_value->accept(*this);
       
 12108                 s4o.print(")");
       
 12109                 return NULL;
       
 12110                 
       
 12111             }
       
 12112             
       
 12113             ERROR;
       
 12114         }
       
 12115         
       
 12116     }/*function_date_to_word*/
       
 12117     break;
       
 12118 
       
 12119 /****
       
 12120  *DATE_TO_DWORD
       
 12121  */
       
 12122     case function_date_to_dword :
       
 12123     {
       
 12124         symbol_c *last_type_symbol = NULL;
       
 12125 
       
 12126         {
       
 12127             identifier_c param_name("IN");
       
 12128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12130             
       
 12131             /* Get the value from a foo(<param_value>) style call */
       
 12132             if (IN_param_value == NULL)
       
 12133               IN_param_value = function_call_param_iterator.next();
       
 12134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12136             
       
 12137             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12138             {
       
 12139         
       
 12140                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12141                 s4o.print("(");
       
 12142                 return_type_symbol->accept(*this);
       
 12143                 s4o.print(")__time_to_int(");
       
 12144                 IN_param_value->accept(*this);
       
 12145                 s4o.print(")");
       
 12146                 return NULL;
       
 12147                 
       
 12148             }
       
 12149             
       
 12150             ERROR;
       
 12151         }
       
 12152         
       
 12153     }/*function_date_to_dword*/
       
 12154     break;
       
 12155 
       
 12156 /****
       
 12157  *DATE_TO_LWORD
       
 12158  */
       
 12159     case function_date_to_lword :
       
 12160     {
       
 12161         symbol_c *last_type_symbol = NULL;
       
 12162 
       
 12163         {
       
 12164             identifier_c param_name("IN");
       
 12165             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12166             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12167             
       
 12168             /* Get the value from a foo(<param_value>) style call */
       
 12169             if (IN_param_value == NULL)
       
 12170               IN_param_value = function_call_param_iterator.next();
       
 12171             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12172             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12173             
       
 12174             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12175             {
       
 12176         
       
 12177                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12178                 s4o.print("(");
       
 12179                 return_type_symbol->accept(*this);
       
 12180                 s4o.print(")__time_to_int(");
       
 12181                 IN_param_value->accept(*this);
       
 12182                 s4o.print(")");
       
 12183                 return NULL;
       
 12184                 
       
 12185             }
       
 12186             
       
 12187             ERROR;
       
 12188         }
       
 12189         
       
 12190     }/*function_date_to_lword*/
       
 12191     break;
       
 12192 
       
 12193 /****
       
 12194  *DATE_TO_STRING
       
 12195  */
       
 12196     case function_date_to_string :
       
 12197     {
       
 12198         symbol_c *last_type_symbol = NULL;
       
 12199 
       
 12200         {
       
 12201             identifier_c param_name("IN");
       
 12202             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12203             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12204             
       
 12205             /* Get the value from a foo(<param_value>) style call */
       
 12206             if (IN_param_value == NULL)
       
 12207               IN_param_value = function_call_param_iterator.next();
       
 12208             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12209             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12210             
       
 12211             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 12212             {
       
 12213         
       
 12214                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12215                 s4o.print("(");
       
 12216                 return_type_symbol->accept(*this);
       
 12217                 s4o.print(")__date_to_string(");
       
 12218                 IN_param_value->accept(*this);
       
 12219                 s4o.print(")");
       
 12220                 return NULL;
       
 12221                 
       
 12222             }
       
 12223             
       
 12224             ERROR;
       
 12225         }
       
 12226         
       
 12227     }/*function_date_to_string*/
       
 12228     break;
       
 12229 
       
 12230 /****
       
 12231  *TOD_TO_REAL
       
 12232  */
       
 12233     case function_tod_to_real :
       
 12234     {
       
 12235         symbol_c *last_type_symbol = NULL;
       
 12236 
       
 12237         {
       
 12238             identifier_c param_name("IN");
       
 12239             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12240             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12241             
       
 12242             /* Get the value from a foo(<param_value>) style call */
       
 12243             if (IN_param_value == NULL)
       
 12244               IN_param_value = function_call_param_iterator.next();
       
 12245             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12246             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12247             
       
 12248             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12249             {
       
 12250         
       
 12251                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12252                 s4o.print("(");
       
 12253                 return_type_symbol->accept(*this);
       
 12254                 s4o.print(")__time_to_real(");
       
 12255                 IN_param_value->accept(*this);
       
 12256                 s4o.print(")");
       
 12257                 return NULL;
       
 12258                 
       
 12259             }
       
 12260             
       
 12261             ERROR;
       
 12262         }
       
 12263         
       
 12264     }/*function_tod_to_real*/
       
 12265     break;
       
 12266 
       
 12267 /****
       
 12268  *TOD_TO_LREAL
       
 12269  */
       
 12270     case function_tod_to_lreal :
       
 12271     {
       
 12272         symbol_c *last_type_symbol = NULL;
       
 12273 
       
 12274         {
       
 12275             identifier_c param_name("IN");
       
 12276             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12277             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12278             
       
 12279             /* Get the value from a foo(<param_value>) style call */
       
 12280             if (IN_param_value == NULL)
       
 12281               IN_param_value = function_call_param_iterator.next();
       
 12282             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12283             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12284             
       
 12285             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12286             {
       
 12287         
       
 12288                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12289                 s4o.print("(");
       
 12290                 return_type_symbol->accept(*this);
       
 12291                 s4o.print(")__time_to_real(");
       
 12292                 IN_param_value->accept(*this);
       
 12293                 s4o.print(")");
       
 12294                 return NULL;
       
 12295                 
       
 12296             }
       
 12297             
       
 12298             ERROR;
       
 12299         }
       
 12300         
       
 12301     }/*function_tod_to_lreal*/
       
 12302     break;
       
 12303 
       
 12304 /****
       
 12305  *TOD_TO_SINT
       
 12306  */
       
 12307     case function_tod_to_sint :
       
 12308     {
       
 12309         symbol_c *last_type_symbol = NULL;
       
 12310 
       
 12311         {
       
 12312             identifier_c param_name("IN");
       
 12313             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12314             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12315             
       
 12316             /* Get the value from a foo(<param_value>) style call */
       
 12317             if (IN_param_value == NULL)
       
 12318               IN_param_value = function_call_param_iterator.next();
       
 12319             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12320             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12321             
       
 12322             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12323             {
       
 12324         
       
 12325                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12326                 s4o.print("(");
       
 12327                 return_type_symbol->accept(*this);
       
 12328                 s4o.print(")__time_to_int(");
       
 12329                 IN_param_value->accept(*this);
       
 12330                 s4o.print(")");
       
 12331                 return NULL;
       
 12332                 
       
 12333             }
       
 12334             
       
 12335             ERROR;
       
 12336         }
       
 12337         
       
 12338     }/*function_tod_to_sint*/
       
 12339     break;
       
 12340 
       
 12341 /****
       
 12342  *TOD_TO_INT
       
 12343  */
       
 12344     case function_tod_to_int :
       
 12345     {
       
 12346         symbol_c *last_type_symbol = NULL;
       
 12347 
       
 12348         {
       
 12349             identifier_c param_name("IN");
       
 12350             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12351             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12352             
       
 12353             /* Get the value from a foo(<param_value>) style call */
       
 12354             if (IN_param_value == NULL)
       
 12355               IN_param_value = function_call_param_iterator.next();
       
 12356             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12357             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12358             
       
 12359             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12360             {
       
 12361         
       
 12362                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12363                 s4o.print("(");
       
 12364                 return_type_symbol->accept(*this);
       
 12365                 s4o.print(")__time_to_int(");
       
 12366                 IN_param_value->accept(*this);
       
 12367                 s4o.print(")");
       
 12368                 return NULL;
       
 12369                 
       
 12370             }
       
 12371             
       
 12372             ERROR;
       
 12373         }
       
 12374         
       
 12375     }/*function_tod_to_int*/
       
 12376     break;
       
 12377 
       
 12378 /****
       
 12379  *TOD_TO_DINT
       
 12380  */
       
 12381     case function_tod_to_dint :
       
 12382     {
       
 12383         symbol_c *last_type_symbol = NULL;
       
 12384 
       
 12385         {
       
 12386             identifier_c param_name("IN");
       
 12387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12388             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12389             
       
 12390             /* Get the value from a foo(<param_value>) style call */
       
 12391             if (IN_param_value == NULL)
       
 12392               IN_param_value = function_call_param_iterator.next();
       
 12393             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12394             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12395             
       
 12396             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12397             {
       
 12398         
       
 12399                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12400                 s4o.print("(");
       
 12401                 return_type_symbol->accept(*this);
       
 12402                 s4o.print(")__time_to_int(");
       
 12403                 IN_param_value->accept(*this);
       
 12404                 s4o.print(")");
       
 12405                 return NULL;
       
 12406                 
       
 12407             }
       
 12408             
       
 12409             ERROR;
       
 12410         }
       
 12411         
       
 12412     }/*function_tod_to_dint*/
       
 12413     break;
       
 12414 
       
 12415 /****
       
 12416  *TOD_TO_LINT
       
 12417  */
       
 12418     case function_tod_to_lint :
       
 12419     {
       
 12420         symbol_c *last_type_symbol = NULL;
       
 12421 
       
 12422         {
       
 12423             identifier_c param_name("IN");
       
 12424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12426             
       
 12427             /* Get the value from a foo(<param_value>) style call */
       
 12428             if (IN_param_value == NULL)
       
 12429               IN_param_value = function_call_param_iterator.next();
       
 12430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12432             
       
 12433             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12434             {
       
 12435         
       
 12436                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12437                 s4o.print("(");
       
 12438                 return_type_symbol->accept(*this);
       
 12439                 s4o.print(")__time_to_int(");
       
 12440                 IN_param_value->accept(*this);
       
 12441                 s4o.print(")");
       
 12442                 return NULL;
       
 12443                 
       
 12444             }
       
 12445             
       
 12446             ERROR;
       
 12447         }
       
 12448         
       
 12449     }/*function_tod_to_lint*/
       
 12450     break;
       
 12451 
       
 12452 /****
       
 12453  *TOD_TO_USINT
       
 12454  */
       
 12455     case function_tod_to_usint :
       
 12456     {
       
 12457         symbol_c *last_type_symbol = NULL;
       
 12458 
       
 12459         {
       
 12460             identifier_c param_name("IN");
       
 12461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12462             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12463             
       
 12464             /* Get the value from a foo(<param_value>) style call */
       
 12465             if (IN_param_value == NULL)
       
 12466               IN_param_value = function_call_param_iterator.next();
       
 12467             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12468             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12469             
       
 12470             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12471             {
       
 12472         
       
 12473                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12474                 s4o.print("(");
       
 12475                 return_type_symbol->accept(*this);
       
 12476                 s4o.print(")__time_to_int(");
       
 12477                 IN_param_value->accept(*this);
       
 12478                 s4o.print(")");
       
 12479                 return NULL;
       
 12480                 
       
 12481             }
       
 12482             
       
 12483             ERROR;
       
 12484         }
       
 12485         
       
 12486     }/*function_tod_to_usint*/
       
 12487     break;
       
 12488 
       
 12489 /****
       
 12490  *TOD_TO_UINT
       
 12491  */
       
 12492     case function_tod_to_uint :
       
 12493     {
       
 12494         symbol_c *last_type_symbol = NULL;
       
 12495 
       
 12496         {
       
 12497             identifier_c param_name("IN");
       
 12498             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12499             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12500             
       
 12501             /* Get the value from a foo(<param_value>) style call */
       
 12502             if (IN_param_value == NULL)
       
 12503               IN_param_value = function_call_param_iterator.next();
       
 12504             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12505             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12506             
       
 12507             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12508             {
       
 12509         
       
 12510                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12511                 s4o.print("(");
       
 12512                 return_type_symbol->accept(*this);
       
 12513                 s4o.print(")__time_to_int(");
       
 12514                 IN_param_value->accept(*this);
       
 12515                 s4o.print(")");
       
 12516                 return NULL;
       
 12517                 
       
 12518             }
       
 12519             
       
 12520             ERROR;
       
 12521         }
       
 12522         
       
 12523     }/*function_tod_to_uint*/
       
 12524     break;
       
 12525 
       
 12526 /****
       
 12527  *TOD_TO_UDINT
       
 12528  */
       
 12529     case function_tod_to_udint :
       
 12530     {
       
 12531         symbol_c *last_type_symbol = NULL;
       
 12532 
       
 12533         {
       
 12534             identifier_c param_name("IN");
       
 12535             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12536             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12537             
       
 12538             /* Get the value from a foo(<param_value>) style call */
       
 12539             if (IN_param_value == NULL)
       
 12540               IN_param_value = function_call_param_iterator.next();
       
 12541             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12542             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12543             
       
 12544             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12545             {
       
 12546         
       
 12547                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12548                 s4o.print("(");
       
 12549                 return_type_symbol->accept(*this);
       
 12550                 s4o.print(")__time_to_int(");
       
 12551                 IN_param_value->accept(*this);
       
 12552                 s4o.print(")");
       
 12553                 return NULL;
       
 12554                 
       
 12555             }
       
 12556             
       
 12557             ERROR;
       
 12558         }
       
 12559         
       
 12560     }/*function_tod_to_udint*/
       
 12561     break;
       
 12562 
       
 12563 /****
       
 12564  *TOD_TO_ULINT
       
 12565  */
       
 12566     case function_tod_to_ulint :
       
 12567     {
       
 12568         symbol_c *last_type_symbol = NULL;
       
 12569 
       
 12570         {
       
 12571             identifier_c param_name("IN");
       
 12572             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12573             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12574             
       
 12575             /* Get the value from a foo(<param_value>) style call */
       
 12576             if (IN_param_value == NULL)
       
 12577               IN_param_value = function_call_param_iterator.next();
       
 12578             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12579             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12580             
       
 12581             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12582             {
       
 12583         
       
 12584                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12585                 s4o.print("(");
       
 12586                 return_type_symbol->accept(*this);
       
 12587                 s4o.print(")__time_to_int(");
       
 12588                 IN_param_value->accept(*this);
       
 12589                 s4o.print(")");
       
 12590                 return NULL;
       
 12591                 
       
 12592             }
       
 12593             
       
 12594             ERROR;
       
 12595         }
       
 12596         
       
 12597     }/*function_tod_to_ulint*/
       
 12598     break;
       
 12599 
       
 12600 /****
       
 12601  *TOD_TO_BOOL
       
 12602  */
       
 12603     case function_tod_to_bool :
       
 12604     {
       
 12605         symbol_c *last_type_symbol = NULL;
       
 12606 
       
 12607         {
       
 12608             identifier_c param_name("IN");
       
 12609             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12610             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12611             
       
 12612             /* Get the value from a foo(<param_value>) style call */
       
 12613             if (IN_param_value == NULL)
       
 12614               IN_param_value = function_call_param_iterator.next();
       
 12615             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12616             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12617             
       
 12618             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12619             {
       
 12620         
       
 12621                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12622                 s4o.print("(");
       
 12623                 return_type_symbol->accept(*this);
       
 12624                 s4o.print(")__time_to_int(");
       
 12625                 IN_param_value->accept(*this);
       
 12626                 s4o.print(")");
       
 12627                 return NULL;
       
 12628                 
       
 12629             }
       
 12630             
       
 12631             ERROR;
       
 12632         }
       
 12633         
       
 12634     }/*function_tod_to_bool*/
       
 12635     break;
       
 12636 
       
 12637 /****
       
 12638  *TOD_TO_BYTE
       
 12639  */
       
 12640     case function_tod_to_byte :
       
 12641     {
       
 12642         symbol_c *last_type_symbol = NULL;
       
 12643 
       
 12644         {
       
 12645             identifier_c param_name("IN");
       
 12646             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12647             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12648             
       
 12649             /* Get the value from a foo(<param_value>) style call */
       
 12650             if (IN_param_value == NULL)
       
 12651               IN_param_value = function_call_param_iterator.next();
       
 12652             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12653             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12654             
       
 12655             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12656             {
       
 12657         
       
 12658                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12659                 s4o.print("(");
       
 12660                 return_type_symbol->accept(*this);
       
 12661                 s4o.print(")__time_to_int(");
       
 12662                 IN_param_value->accept(*this);
       
 12663                 s4o.print(")");
       
 12664                 return NULL;
       
 12665                 
       
 12666             }
       
 12667             
       
 12668             ERROR;
       
 12669         }
       
 12670         
       
 12671     }/*function_tod_to_byte*/
       
 12672     break;
       
 12673 
       
 12674 /****
       
 12675  *TOD_TO_WORD
       
 12676  */
       
 12677     case function_tod_to_word :
       
 12678     {
       
 12679         symbol_c *last_type_symbol = NULL;
       
 12680 
       
 12681         {
       
 12682             identifier_c param_name("IN");
       
 12683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12685             
       
 12686             /* Get the value from a foo(<param_value>) style call */
       
 12687             if (IN_param_value == NULL)
       
 12688               IN_param_value = function_call_param_iterator.next();
       
 12689             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12690             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12691             
       
 12692             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12693             {
       
 12694         
       
 12695                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12696                 s4o.print("(");
       
 12697                 return_type_symbol->accept(*this);
       
 12698                 s4o.print(")__time_to_int(");
       
 12699                 IN_param_value->accept(*this);
       
 12700                 s4o.print(")");
       
 12701                 return NULL;
       
 12702                 
       
 12703             }
       
 12704             
       
 12705             ERROR;
       
 12706         }
       
 12707         
       
 12708     }/*function_tod_to_word*/
       
 12709     break;
       
 12710 
       
 12711 /****
       
 12712  *TOD_TO_DWORD
       
 12713  */
       
 12714     case function_tod_to_dword :
       
 12715     {
       
 12716         symbol_c *last_type_symbol = NULL;
       
 12717 
       
 12718         {
       
 12719             identifier_c param_name("IN");
       
 12720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12722             
       
 12723             /* Get the value from a foo(<param_value>) style call */
       
 12724             if (IN_param_value == NULL)
       
 12725               IN_param_value = function_call_param_iterator.next();
       
 12726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12728             
       
 12729             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12730             {
       
 12731         
       
 12732                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12733                 s4o.print("(");
       
 12734                 return_type_symbol->accept(*this);
       
 12735                 s4o.print(")__time_to_int(");
       
 12736                 IN_param_value->accept(*this);
       
 12737                 s4o.print(")");
       
 12738                 return NULL;
       
 12739                 
       
 12740             }
       
 12741             
       
 12742             ERROR;
       
 12743         }
       
 12744         
       
 12745     }/*function_tod_to_dword*/
       
 12746     break;
       
 12747 
       
 12748 /****
       
 12749  *TOD_TO_LWORD
       
 12750  */
       
 12751     case function_tod_to_lword :
       
 12752     {
       
 12753         symbol_c *last_type_symbol = NULL;
       
 12754 
       
 12755         {
       
 12756             identifier_c param_name("IN");
       
 12757             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12758             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12759             
       
 12760             /* Get the value from a foo(<param_value>) style call */
       
 12761             if (IN_param_value == NULL)
       
 12762               IN_param_value = function_call_param_iterator.next();
       
 12763             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12764             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12765             
       
 12766             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12767             {
       
 12768         
       
 12769                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12770                 s4o.print("(");
       
 12771                 return_type_symbol->accept(*this);
       
 12772                 s4o.print(")__time_to_int(");
       
 12773                 IN_param_value->accept(*this);
       
 12774                 s4o.print(")");
       
 12775                 return NULL;
       
 12776                 
       
 12777             }
       
 12778             
       
 12779             ERROR;
       
 12780         }
       
 12781         
       
 12782     }/*function_tod_to_lword*/
       
 12783     break;
       
 12784 
       
 12785 /****
       
 12786  *TOD_TO_STRING
       
 12787  */
       
 12788     case function_tod_to_string :
       
 12789     {
       
 12790         symbol_c *last_type_symbol = NULL;
       
 12791 
       
 12792         {
       
 12793             identifier_c param_name("IN");
       
 12794             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12795             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12796             
       
 12797             /* Get the value from a foo(<param_value>) style call */
       
 12798             if (IN_param_value == NULL)
       
 12799               IN_param_value = function_call_param_iterator.next();
       
 12800             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12801             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12802             
       
 12803             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12804             {
       
 12805         
       
 12806                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12807                 s4o.print("(");
       
 12808                 return_type_symbol->accept(*this);
       
 12809                 s4o.print(")__tod_to_string(");
       
 12810                 IN_param_value->accept(*this);
       
 12811                 s4o.print(")");
       
 12812                 return NULL;
       
 12813                 
       
 12814             }
       
 12815             
       
 12816             ERROR;
       
 12817         }
       
 12818         
       
 12819     }/*function_tod_to_string*/
       
 12820     break;
       
 12821 
       
 12822 /****
       
 12823  *DT_TO_REAL
       
 12824  */
       
 12825     case function_dt_to_real :
       
 12826     {
       
 12827         symbol_c *last_type_symbol = NULL;
       
 12828 
       
 12829         {
       
 12830             identifier_c param_name("IN");
       
 12831             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12832             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12833             
       
 12834             /* Get the value from a foo(<param_value>) style call */
       
 12835             if (IN_param_value == NULL)
       
 12836               IN_param_value = function_call_param_iterator.next();
       
 12837             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12838             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12839             
       
 12840             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12841             {
       
 12842         
       
 12843                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12844                 s4o.print("(");
       
 12845                 return_type_symbol->accept(*this);
       
 12846                 s4o.print(")__time_to_real(");
       
 12847                 IN_param_value->accept(*this);
       
 12848                 s4o.print(")");
       
 12849                 return NULL;
       
 12850                 
       
 12851             }
       
 12852             
       
 12853             ERROR;
       
 12854         }
       
 12855         
       
 12856     }/*function_dt_to_real*/
       
 12857     break;
       
 12858 
       
 12859 /****
       
 12860  *DT_TO_LREAL
       
 12861  */
       
 12862     case function_dt_to_lreal :
       
 12863     {
       
 12864         symbol_c *last_type_symbol = NULL;
       
 12865 
       
 12866         {
       
 12867             identifier_c param_name("IN");
       
 12868             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12869             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12870             
       
 12871             /* Get the value from a foo(<param_value>) style call */
       
 12872             if (IN_param_value == NULL)
       
 12873               IN_param_value = function_call_param_iterator.next();
       
 12874             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12875             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12876             
       
 12877             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12878             {
       
 12879         
       
 12880                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12881                 s4o.print("(");
       
 12882                 return_type_symbol->accept(*this);
       
 12883                 s4o.print(")__time_to_real(");
       
 12884                 IN_param_value->accept(*this);
       
 12885                 s4o.print(")");
       
 12886                 return NULL;
       
 12887                 
       
 12888             }
       
 12889             
       
 12890             ERROR;
       
 12891         }
       
 12892         
       
 12893     }/*function_dt_to_lreal*/
       
 12894     break;
       
 12895 
       
 12896 /****
       
 12897  *DT_TO_SINT
       
 12898  */
       
 12899     case function_dt_to_sint :
       
 12900     {
       
 12901         symbol_c *last_type_symbol = NULL;
       
 12902 
       
 12903         {
       
 12904             identifier_c param_name("IN");
       
 12905             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12906             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12907             
       
 12908             /* Get the value from a foo(<param_value>) style call */
       
 12909             if (IN_param_value == NULL)
       
 12910               IN_param_value = function_call_param_iterator.next();
       
 12911             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12912             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12913             
       
 12914             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12915             {
       
 12916         
       
 12917                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12918                 s4o.print("(");
       
 12919                 return_type_symbol->accept(*this);
       
 12920                 s4o.print(")__time_to_int(");
       
 12921                 IN_param_value->accept(*this);
       
 12922                 s4o.print(")");
       
 12923                 return NULL;
       
 12924                 
       
 12925             }
       
 12926             
       
 12927             ERROR;
       
 12928         }
       
 12929         
       
 12930     }/*function_dt_to_sint*/
       
 12931     break;
       
 12932 
       
 12933 /****
       
 12934  *DT_TO_INT
       
 12935  */
       
 12936     case function_dt_to_int :
       
 12937     {
       
 12938         symbol_c *last_type_symbol = NULL;
       
 12939 
       
 12940         {
       
 12941             identifier_c param_name("IN");
       
 12942             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12943             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12944             
       
 12945             /* Get the value from a foo(<param_value>) style call */
       
 12946             if (IN_param_value == NULL)
       
 12947               IN_param_value = function_call_param_iterator.next();
       
 12948             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12949             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12950             
       
 12951             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12952             {
       
 12953         
       
 12954                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12955                 s4o.print("(");
       
 12956                 return_type_symbol->accept(*this);
       
 12957                 s4o.print(")__time_to_int(");
       
 12958                 IN_param_value->accept(*this);
       
 12959                 s4o.print(")");
       
 12960                 return NULL;
       
 12961                 
       
 12962             }
       
 12963             
       
 12964             ERROR;
       
 12965         }
       
 12966         
       
 12967     }/*function_dt_to_int*/
       
 12968     break;
       
 12969 
       
 12970 /****
       
 12971  *DT_TO_DINT
       
 12972  */
       
 12973     case function_dt_to_dint :
       
 12974     {
       
 12975         symbol_c *last_type_symbol = NULL;
       
 12976 
       
 12977         {
       
 12978             identifier_c param_name("IN");
       
 12979             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12980             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12981             
       
 12982             /* Get the value from a foo(<param_value>) style call */
       
 12983             if (IN_param_value == NULL)
       
 12984               IN_param_value = function_call_param_iterator.next();
       
 12985             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12986             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12987             
       
 12988             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12989             {
       
 12990         
       
 12991                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12992                 s4o.print("(");
       
 12993                 return_type_symbol->accept(*this);
       
 12994                 s4o.print(")__time_to_int(");
       
 12995                 IN_param_value->accept(*this);
       
 12996                 s4o.print(")");
       
 12997                 return NULL;
       
 12998                 
       
 12999             }
       
 13000             
       
 13001             ERROR;
       
 13002         }
       
 13003         
       
 13004     }/*function_dt_to_dint*/
       
 13005     break;
       
 13006 
       
 13007 /****
       
 13008  *DT_TO_LINT
       
 13009  */
       
 13010     case function_dt_to_lint :
       
 13011     {
       
 13012         symbol_c *last_type_symbol = NULL;
       
 13013 
       
 13014         {
       
 13015             identifier_c param_name("IN");
       
 13016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13018             
       
 13019             /* Get the value from a foo(<param_value>) style call */
       
 13020             if (IN_param_value == NULL)
       
 13021               IN_param_value = function_call_param_iterator.next();
       
 13022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13024             
       
 13025             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13026             {
       
 13027         
       
 13028                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13029                 s4o.print("(");
       
 13030                 return_type_symbol->accept(*this);
       
 13031                 s4o.print(")__time_to_int(");
       
 13032                 IN_param_value->accept(*this);
       
 13033                 s4o.print(")");
       
 13034                 return NULL;
       
 13035                 
       
 13036             }
       
 13037             
       
 13038             ERROR;
       
 13039         }
       
 13040         
       
 13041     }/*function_dt_to_lint*/
       
 13042     break;
       
 13043 
       
 13044 /****
       
 13045  *DT_TO_USINT
       
 13046  */
       
 13047     case function_dt_to_usint :
       
 13048     {
       
 13049         symbol_c *last_type_symbol = NULL;
       
 13050 
       
 13051         {
       
 13052             identifier_c param_name("IN");
       
 13053             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13054             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13055             
       
 13056             /* Get the value from a foo(<param_value>) style call */
       
 13057             if (IN_param_value == NULL)
       
 13058               IN_param_value = function_call_param_iterator.next();
       
 13059             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13060             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13061             
       
 13062             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13063             {
       
 13064         
       
 13065                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13066                 s4o.print("(");
       
 13067                 return_type_symbol->accept(*this);
       
 13068                 s4o.print(")__time_to_int(");
       
 13069                 IN_param_value->accept(*this);
       
 13070                 s4o.print(")");
       
 13071                 return NULL;
       
 13072                 
       
 13073             }
       
 13074             
       
 13075             ERROR;
       
 13076         }
       
 13077         
       
 13078     }/*function_dt_to_usint*/
       
 13079     break;
       
 13080 
       
 13081 /****
       
 13082  *DT_TO_UINT
       
 13083  */
       
 13084     case function_dt_to_uint :
       
 13085     {
       
 13086         symbol_c *last_type_symbol = NULL;
       
 13087 
       
 13088         {
       
 13089             identifier_c param_name("IN");
       
 13090             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13091             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13092             
       
 13093             /* Get the value from a foo(<param_value>) style call */
       
 13094             if (IN_param_value == NULL)
       
 13095               IN_param_value = function_call_param_iterator.next();
       
 13096             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13097             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13098             
       
 13099             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13100             {
       
 13101         
       
 13102                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13103                 s4o.print("(");
       
 13104                 return_type_symbol->accept(*this);
       
 13105                 s4o.print(")__time_to_int(");
       
 13106                 IN_param_value->accept(*this);
       
 13107                 s4o.print(")");
       
 13108                 return NULL;
       
 13109                 
       
 13110             }
       
 13111             
       
 13112             ERROR;
       
 13113         }
       
 13114         
       
 13115     }/*function_dt_to_uint*/
       
 13116     break;
       
 13117 
       
 13118 /****
       
 13119  *DT_TO_UDINT
       
 13120  */
       
 13121     case function_dt_to_udint :
       
 13122     {
       
 13123         symbol_c *last_type_symbol = NULL;
       
 13124 
       
 13125         {
       
 13126             identifier_c param_name("IN");
       
 13127             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13128             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13129             
       
 13130             /* Get the value from a foo(<param_value>) style call */
       
 13131             if (IN_param_value == NULL)
       
 13132               IN_param_value = function_call_param_iterator.next();
       
 13133             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13134             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13135             
       
 13136             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13137             {
       
 13138         
       
 13139                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13140                 s4o.print("(");
       
 13141                 return_type_symbol->accept(*this);
       
 13142                 s4o.print(")__time_to_int(");
       
 13143                 IN_param_value->accept(*this);
       
 13144                 s4o.print(")");
       
 13145                 return NULL;
       
 13146                 
       
 13147             }
       
 13148             
       
 13149             ERROR;
       
 13150         }
       
 13151         
       
 13152     }/*function_dt_to_udint*/
       
 13153     break;
       
 13154 
       
 13155 /****
       
 13156  *DT_TO_ULINT
       
 13157  */
       
 13158     case function_dt_to_ulint :
       
 13159     {
       
 13160         symbol_c *last_type_symbol = NULL;
       
 13161 
       
 13162         {
       
 13163             identifier_c param_name("IN");
       
 13164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13165             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13166             
       
 13167             /* Get the value from a foo(<param_value>) style call */
       
 13168             if (IN_param_value == NULL)
       
 13169               IN_param_value = function_call_param_iterator.next();
       
 13170             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13171             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13172             
       
 13173             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13174             {
       
 13175         
       
 13176                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13177                 s4o.print("(");
       
 13178                 return_type_symbol->accept(*this);
       
 13179                 s4o.print(")__time_to_int(");
       
 13180                 IN_param_value->accept(*this);
       
 13181                 s4o.print(")");
       
 13182                 return NULL;
       
 13183                 
       
 13184             }
       
 13185             
       
 13186             ERROR;
       
 13187         }
       
 13188         
       
 13189     }/*function_dt_to_ulint*/
       
 13190     break;
       
 13191 
       
 13192 /****
       
 13193  *DT_TO_BOOL
       
 13194  */
       
 13195     case function_dt_to_bool :
       
 13196     {
       
 13197         symbol_c *last_type_symbol = NULL;
       
 13198 
       
 13199         {
       
 13200             identifier_c param_name("IN");
       
 13201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13202             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13203             
       
 13204             /* Get the value from a foo(<param_value>) style call */
       
 13205             if (IN_param_value == NULL)
       
 13206               IN_param_value = function_call_param_iterator.next();
       
 13207             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13208             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13209             
       
 13210             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13211             {
       
 13212         
       
 13213                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13214                 s4o.print("(");
       
 13215                 return_type_symbol->accept(*this);
       
 13216                 s4o.print(")__time_to_int(");
       
 13217                 IN_param_value->accept(*this);
       
 13218                 s4o.print(")");
       
 13219                 return NULL;
       
 13220                 
       
 13221             }
       
 13222             
       
 13223             ERROR;
       
 13224         }
       
 13225         
       
 13226     }/*function_dt_to_bool*/
       
 13227     break;
       
 13228 
       
 13229 /****
       
 13230  *DT_TO_BYTE
       
 13231  */
       
 13232     case function_dt_to_byte :
       
 13233     {
       
 13234         symbol_c *last_type_symbol = NULL;
       
 13235 
       
 13236         {
       
 13237             identifier_c param_name("IN");
       
 13238             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13239             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13240             
       
 13241             /* Get the value from a foo(<param_value>) style call */
       
 13242             if (IN_param_value == NULL)
       
 13243               IN_param_value = function_call_param_iterator.next();
       
 13244             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13245             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13246             
       
 13247             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13248             {
       
 13249         
       
 13250                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 13251                 s4o.print("(");
       
 13252                 return_type_symbol->accept(*this);
       
 13253                 s4o.print(")__time_to_int(");
       
 13254                 IN_param_value->accept(*this);
       
 13255                 s4o.print(")");
       
 13256                 return NULL;
       
 13257                 
       
 13258             }
       
 13259             
       
 13260             ERROR;
       
 13261         }
       
 13262         
       
 13263     }/*function_dt_to_byte*/
       
 13264     break;
       
 13265 
       
 13266 /****
       
 13267  *DT_TO_WORD
       
 13268  */
       
 13269     case function_dt_to_word :
       
 13270     {
       
 13271         symbol_c *last_type_symbol = NULL;
       
 13272 
       
 13273         {
       
 13274             identifier_c param_name("IN");
       
 13275             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13276             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13277             
       
 13278             /* Get the value from a foo(<param_value>) style call */
       
 13279             if (IN_param_value == NULL)
       
 13280               IN_param_value = function_call_param_iterator.next();
       
 13281             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13282             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13283             
       
 13284             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13285             {
       
 13286         
       
 13287                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 13288                 s4o.print("(");
       
 13289                 return_type_symbol->accept(*this);
       
 13290                 s4o.print(")__time_to_int(");
       
 13291                 IN_param_value->accept(*this);
       
 13292                 s4o.print(")");
       
 13293                 return NULL;
       
 13294                 
       
 13295             }
       
 13296             
       
 13297             ERROR;
       
 13298         }
       
 13299         
       
 13300     }/*function_dt_to_word*/
       
 13301     break;
       
 13302 
       
 13303 /****
       
 13304  *DT_TO_DWORD
       
 13305  */
       
 13306     case function_dt_to_dword :
       
 13307     {
       
 13308         symbol_c *last_type_symbol = NULL;
       
 13309 
       
 13310         {
       
 13311             identifier_c param_name("IN");
       
 13312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13314             
       
 13315             /* Get the value from a foo(<param_value>) style call */
       
 13316             if (IN_param_value == NULL)
       
 13317               IN_param_value = function_call_param_iterator.next();
       
 13318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13320             
       
 13321             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13322             {
       
 13323         
       
 13324                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 13325                 s4o.print("(");
       
 13326                 return_type_symbol->accept(*this);
       
 13327                 s4o.print(")__time_to_int(");
       
 13328                 IN_param_value->accept(*this);
       
 13329                 s4o.print(")");
       
 13330                 return NULL;
       
 13331                 
       
 13332             }
       
 13333             
       
 13334             ERROR;
       
 13335         }
       
 13336         
       
 13337     }/*function_dt_to_dword*/
       
 13338     break;
       
 13339 
       
 13340 /****
       
 13341  *DT_TO_LWORD
       
 13342  */
       
 13343     case function_dt_to_lword :
       
 13344     {
       
 13345         symbol_c *last_type_symbol = NULL;
       
 13346 
       
 13347         {
       
 13348             identifier_c param_name("IN");
       
 13349             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13350             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13351             
       
 13352             /* Get the value from a foo(<param_value>) style call */
       
 13353             if (IN_param_value == NULL)
       
 13354               IN_param_value = function_call_param_iterator.next();
       
 13355             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13356             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13357             
       
 13358             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13359             {
       
 13360         
       
 13361                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 13362                 s4o.print("(");
       
 13363                 return_type_symbol->accept(*this);
       
 13364                 s4o.print(")__time_to_int(");
       
 13365                 IN_param_value->accept(*this);
       
 13366                 s4o.print(")");
       
 13367                 return NULL;
       
 13368                 
       
 13369             }
       
 13370             
       
 13371             ERROR;
       
 13372         }
       
 13373         
       
 13374     }/*function_dt_to_lword*/
       
 13375     break;
       
 13376 
       
 13377 /****
       
 13378  *DT_TO_STRING
       
 13379  */
       
 13380     case function_dt_to_string :
       
 13381     {
       
 13382         symbol_c *last_type_symbol = NULL;
       
 13383 
       
 13384         {
       
 13385             identifier_c param_name("IN");
       
 13386             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13387             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13388             
       
 13389             /* Get the value from a foo(<param_value>) style call */
       
 13390             if (IN_param_value == NULL)
       
 13391               IN_param_value = function_call_param_iterator.next();
       
 13392             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13393             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13394             
       
 13395             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 13396             {
       
 13397         
       
 13398                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 13399                 s4o.print("(");
       
 13400                 return_type_symbol->accept(*this);
       
 13401                 s4o.print(")__dt_to_string(");
       
 13402                 IN_param_value->accept(*this);
       
 13403                 s4o.print(")");
       
 13404                 return NULL;
       
 13405                 
       
 13406             }
       
 13407             
       
 13408             ERROR;
       
 13409         }
       
 13410         
       
 13411     }/*function_dt_to_string*/
       
 13412     break;
 13412     break;
 13413 
 13413 
 13414 /****
 13414 /****
 13415  *TRUNC
 13415  *TRUNC
 13416  */
 13416  */
 14963                     if (N_param_value == NULL)
 14963                     if (N_param_value == NULL)
 14964                       N_param_value = function_call_param_iterator.next();
 14964                       N_param_value = function_call_param_iterator.next();
 14965                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 14965                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 14966                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 14966                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 14967                     
 14967                     
 14968                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 14968                     if(search_expression_type->is_integer_type(N_type_symbol))
 14969                     {
 14969                     {
 14970                 
 14970                 
 14971                         symbol_c * return_type_symbol = IN_type_symbol;
 14971                         symbol_c * return_type_symbol = IN_type_symbol;
 14972                         IN_param_value->accept(*this);
 14972                         IN_param_value->accept(*this);
 14973                         s4o.print("<<");
 14973                         s4o.print("<<");
 15017                     if (N_param_value == NULL)
 15017                     if (N_param_value == NULL)
 15018                       N_param_value = function_call_param_iterator.next();
 15018                       N_param_value = function_call_param_iterator.next();
 15019                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15019                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15020                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15020                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15021                     
 15021                     
 15022                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15022                     if(search_expression_type->is_integer_type(N_type_symbol))
 15023                     {
 15023                     {
 15024                 
 15024                 
 15025                         symbol_c * return_type_symbol = IN_type_symbol;
 15025                         symbol_c * return_type_symbol = IN_type_symbol;
 15026                         IN_param_value->accept(*this);
 15026                         IN_param_value->accept(*this);
 15027                         s4o.print(">>");
 15027                         s4o.print(">>");
 15071                     if (N_param_value == NULL)
 15071                     if (N_param_value == NULL)
 15072                       N_param_value = function_call_param_iterator.next();
 15072                       N_param_value = function_call_param_iterator.next();
 15073                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15073                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15074                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15074                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15075                     
 15075                     
 15076                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15076                     if(search_expression_type->is_integer_type(N_type_symbol))
 15077                     {
 15077                     {
 15078                 
 15078                 
 15079                         symbol_c * return_type_symbol = IN_type_symbol;
 15079                         symbol_c * return_type_symbol = IN_type_symbol;
 15080                         s4o.print("__ror_");
 15080                         s4o.print("__ror_");
 15081                         IN_type_symbol->accept(*this);
 15081                         IN_type_symbol->accept(*this);
 15129                     if (N_param_value == NULL)
 15129                     if (N_param_value == NULL)
 15130                       N_param_value = function_call_param_iterator.next();
 15130                       N_param_value = function_call_param_iterator.next();
 15131                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15131                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
 15132                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15132                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
 15133                     
 15133                     
 15134                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 15134                     if(search_expression_type->is_integer_type(N_type_symbol))
 15135                     {
 15135                     {
 15136                 
 15136                 
 15137                         symbol_c * return_type_symbol = IN_type_symbol;
 15137                         symbol_c * return_type_symbol = IN_type_symbol;
 15138                         s4o.print("__rol_");
 15138                         s4o.print("__rol_");
 15139                         IN_type_symbol->accept(*this);
 15139                         IN_type_symbol->accept(*this);
 16472                     if (L_param_value == NULL)
 16472                     if (L_param_value == NULL)
 16473                       L_param_value = function_call_param_iterator.next();
 16473                       L_param_value = function_call_param_iterator.next();
 16474                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16474                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16475                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16475                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16476                     
 16476                     
 16477                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16477                     if(search_expression_type->is_integer_type(L_type_symbol))
 16478                     {
 16478                     {
 16479                 
 16479                 
 16480                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16480                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16481                         s4o.print("__left(");
 16481                         s4o.print("__left(");
 16482                         IN_param_value->accept(*this);
 16482                         IN_param_value->accept(*this);
 16528                     if (L_param_value == NULL)
 16528                     if (L_param_value == NULL)
 16529                       L_param_value = function_call_param_iterator.next();
 16529                       L_param_value = function_call_param_iterator.next();
 16530                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16530                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16531                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16531                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16532                     
 16532                     
 16533                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16533                     if(search_expression_type->is_integer_type(L_type_symbol))
 16534                     {
 16534                     {
 16535                 
 16535                 
 16536                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16536                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16537                         s4o.print("__right(");
 16537                         s4o.print("__right(");
 16538                         IN_param_value->accept(*this);
 16538                         IN_param_value->accept(*this);
 16584                     if (L_param_value == NULL)
 16584                     if (L_param_value == NULL)
 16585                       L_param_value = function_call_param_iterator.next();
 16585                       L_param_value = function_call_param_iterator.next();
 16586                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16586                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16587                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16587                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16588                     
 16588                     
 16589                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16589                     if(search_expression_type->is_integer_type(L_type_symbol))
 16590                     {
 16590                     {
 16591                 
 16591                 
 16592                         {
 16592                         {
 16593                             identifier_c param_name("P");
 16593                             identifier_c param_name("P");
 16594                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16594                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16598                             if (P_param_value == NULL)
 16598                             if (P_param_value == NULL)
 16599                               P_param_value = function_call_param_iterator.next();
 16599                               P_param_value = function_call_param_iterator.next();
 16600                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16600                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16601                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16601                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16602                             
 16602                             
 16603                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16603                             if(search_expression_type->is_integer_type(P_type_symbol))
 16604                             {
 16604                             {
 16605                         
 16605                         
 16606                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16606                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16607                                 s4o.print("__mid(");
 16607                                 s4o.print("__mid(");
 16608                                 IN_param_value->accept(*this);
 16608                                 IN_param_value->accept(*this);
 16791                             if (P_param_value == NULL)
 16791                             if (P_param_value == NULL)
 16792                               P_param_value = function_call_param_iterator.next();
 16792                               P_param_value = function_call_param_iterator.next();
 16793                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16793                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16794                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16794                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16795                             
 16795                             
 16796                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16796                             if(search_expression_type->is_integer_type(P_type_symbol))
 16797                             {
 16797                             {
 16798                         
 16798                         
 16799                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16799                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16800                                 s4o.print("__insert(");
 16800                                 s4o.print("__insert(");
 16801                                 IN1_param_value->accept(*this);
 16801                                 IN1_param_value->accept(*this);
 16854                     if (L_param_value == NULL)
 16854                     if (L_param_value == NULL)
 16855                       L_param_value = function_call_param_iterator.next();
 16855                       L_param_value = function_call_param_iterator.next();
 16856                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16856                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16857                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16857                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16858                     
 16858                     
 16859                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16859                     if(search_expression_type->is_integer_type(L_type_symbol))
 16860                     {
 16860                     {
 16861                 
 16861                 
 16862                         {
 16862                         {
 16863                             identifier_c param_name("P");
 16863                             identifier_c param_name("P");
 16864                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16864                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 16868                             if (P_param_value == NULL)
 16868                             if (P_param_value == NULL)
 16869                               P_param_value = function_call_param_iterator.next();
 16869                               P_param_value = function_call_param_iterator.next();
 16870                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16870                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16871                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16871                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16872                             
 16872                             
 16873                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16873                             if(search_expression_type->is_integer_type(P_type_symbol))
 16874                             {
 16874                             {
 16875                         
 16875                         
 16876                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16876                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16877                                 s4o.print("__delete(");
 16877                                 s4o.print("__delete(");
 16878                                 IN_param_value->accept(*this);
 16878                                 IN_param_value->accept(*this);
 16945                             if (L_param_value == NULL)
 16945                             if (L_param_value == NULL)
 16946                               L_param_value = function_call_param_iterator.next();
 16946                               L_param_value = function_call_param_iterator.next();
 16947                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16947                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
 16948                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16948                             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
 16949                             
 16949                             
 16950                             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16950                             if(search_expression_type->is_integer_type(L_type_symbol))
 16951                             {
 16951                             {
 16952                         
 16952                         
 16953                                 {
 16953                                 {
 16954                                     identifier_c param_name("P");
 16954                                     identifier_c param_name("P");
 16955                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16955                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16959                                     if (P_param_value == NULL)
 16959                                     if (P_param_value == NULL)
 16960                                       P_param_value = function_call_param_iterator.next();
 16960                                       P_param_value = function_call_param_iterator.next();
 16961                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16961                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
 16962                                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16962                                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
 16963                                     
 16963                                     
 16964                                     if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16964                                     if(search_expression_type->is_integer_type(P_type_symbol))
 16965                                     {
 16965                                     {
 16966                                 
 16966                                 
 16967                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16967                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16968                                         s4o.print("__replace(");
 16968                                         s4o.print("__replace(");
 16969                                         IN1_param_value->accept(*this);
 16969                                         IN1_param_value->accept(*this);